IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13067 for trunk/Nebulous/lib


Ignore:
Timestamp:
Apr 27, 2007, 1:50:57 PM (19 years ago)
Author:
jhoblitt
Message:

add $volume param to ->copy()

Location:
trunk/Nebulous/lib/Nebulous
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r13058 r13067  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.26 2007-04-27 21:30:16 jhoblitt Exp $
     3# $Id: Client.pm,v 1.27 2007-04-27 23:50:57 jhoblitt Exp $
    44
    55package Nebulous::Client;
     
    583583    my $self = shift;
    584584
    585     my ( $key, $new_key ) = validate_pos( @_,
     585    my ( $key, $new_key, $volume ) = validate_pos( @_,
    586586        {
    587587            type => SCALAR,
     
    589589        {
    590590            type => SCALAR,
     591        },
     592        {
     593            #volume
     594            type        => SCALAR,
     595            optional    => 1,
    591596        },
    592597    );
     
    602607    }
    603608
    604     my $new_fh  = $self->open_create( $new_key );
     609    my $new_fh;
     610    if (defined $volume) {
     611        $new_fh  = $self->open_create( $new_key, 0, $volume );
     612    } else {
     613        $new_fh  = $self->open_create( $new_key );
     614    }
    605615    unless ( $new_fh ) {
    606616        $log->debug( "can not open object" );
  • trunk/Nebulous/lib/Nebulous/Client.pod

    r13058 r13067  
    2424    my $fh = $neb->open( "key", 'read' );
    2525    $data->delete( "key" );
    26     $data->copy( "key", "new_key" );
     26    $data->copy( "key", "new_key", "node01" );
    2727    $data->move( "key", "new_key" );
    2828    $data->delete_instance( $uri );
     
    330330
    331331
    332 =item * copy($key, $new_key)
     332=item * copy($key, $new_key, $volume)
    333333
    334334Copy a storage object.
     
    343343
    344344The destination object.
     345
     346=item * volume
     347
     348The preferred storage location of the new instance.
     349
     350This parameter is optional.
    345351
    346352=back
Note: See TracChangeset for help on using the changeset viewer.