IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17756 for trunk/Nebulous/lib


Ignore:
Timestamp:
May 19, 2008, 5:46:11 PM (18 years ago)
Author:
jhoblitt
Message:

change Nebulous::Client->find() to handle a volume param and to fall back to searching on the ':any' volume if the first search fails

File:
1 edited

Legend:

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

    r17737 r17756  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.51 2008-05-19 20:52:37 jhoblitt Exp $
     3# $Id: Client.pm,v 1.52 2008-05-20 03:46:11 jhoblitt Exp $
    44
    55package Nebulous::Client;
     
    671671    my $self = shift;
    672672
    673     my ( $key ) = validate_pos( @_,
     673    my ( $key, @params ) = validate_pos( @_,
    674674        {
    675675            type        => SCALAR,
     
    684684    $log->debug( "entered - @_" );
    685685
    686     my $locations = $self->find_instances( $key, undef );
     686    my $locations = $self->find_instances( $key, @params );
     687    unless (defined $locations) {
     688        unless ($self->err =~ /no instances on storage volume/) {
     689            return;
     690        }
     691
     692        # then fall back to looking for isntances on any volume
     693        $locations = $self->find_instances( $key, ':any');
     694        unless (defined $locations) {
     695            return;
     696        }
     697    }
    687698
    688699    my $path;
Note: See TracChangeset for help on using the changeset viewer.