IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13058


Ignore:
Timestamp:
Apr 27, 2007, 11:30:16 AM (19 years ago)
Author:
jhoblitt
Message:

add $volume param to ->cull()

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

Legend:

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

    r13048 r13058  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.25 2007-04-27 00:09:22 jhoblitt Exp $
     3# $Id: Client.pm,v 1.26 2007-04-27 21:30:16 jhoblitt Exp $
    44
    55package Nebulous::Client;
     
    249249    my $self = shift;
    250250
    251     my ( $key ) = validate_pos( @_,
     251    my ( $key, @params ) = validate_pos( @_,
    252252        {
    253253            type => SCALAR,
    254254        },
     255        {
     256            # volume
     257            type        => SCALAR,
     258            optional    => 1,
     259        },
    255260    );
    256261
     
    258263
    259264    # need some way to determine which is the best instance to remove
    260     my $locations = $self->find_instances( $key );
     265    my $locations = $self->find_instances( $key, @params );
    261266    unless ( $locations ) {
    262267            $log->debug( "no instances" );
  • trunk/Nebulous/lib/Nebulous/Client.pod

    r13057 r13058  
    1616    my $fh = $neb->open_create( "key", 0, "node01", "example" );
    1717    $neb->replicate( "key", "node01" );
    18     $neb->cull( "key" );
     18    $neb->cull( "key", "node01" );
    1919    $neb->lock( "key", 'write' );
    2020    $neb->unlock( "key", 'write' );
     
    174174
    175175
    176 =item * cull($key)
     176=item * cull($key, $volume)
    177177
    178178Removes an instance from a storage object.
     
    183183
    184184The storage object key (name).
     185
     186=item * volume
     187
     188The volume to attempt to remove an instance from.  If there is no instance on
     189the specified volume this method will fail.  If there is more then one instance
     190on the specified volume I<only one> of them will be removed.
     191
     192This parameter is optional.
    185193
    186194=back
Note: See TracChangeset for help on using the changeset viewer.