IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18454


Ignore:
Timestamp:
Jul 9, 2008, 4:38:24 PM (18 years ago)
Author:
jhoblitt
Message:

change "any" volume usage to corespond to changes in Nebulous::Server

Location:
trunk/Nebulous
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/Changes

    r18390 r18454  
    22
    330.09
     4    - change "any" volume usage to corespond to changes in Nebulous::Server
    45    - add neb-replicate --copies option
    56    - fix neb-stat to work when a neb key is used that implies a storage volume
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r17765 r18454  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.54 2008-05-22 01:39:41 jhoblitt Exp $
     3# $Id: Client.pm,v 1.55 2008-07-10 02:38:24 jhoblitt Exp $
    44
    55package Nebulous::Client;
     
    695695
    696696        # then fall back to looking for isntances on any volume
    697         $locations = $self->find_instances( $key, ':any');
     697        $locations = $self->find_instances( $key, '~any');
    698698        unless (defined $locations) {
    699699            return;
  • trunk/Nebulous/t/56_client_find_instances.t

    r17756 r18454  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 56_client_find_instances.t,v 1.2 2008-05-20 03:46:11 jhoblitt Exp $
     5# $Id: 56_client_find_instances.t,v 1.3 2008-07-10 02:38:24 jhoblitt Exp $
    66
    77use strict;
     
    126126    $neb->create( "foo", "node01" );
    127127
    128     my $locations = $neb->find_instances( "neb://node02/foo", ":any" );
     128    my $locations = $neb->find_instances( "neb://node02/foo", "any" );
    129129
    130130    is( scalar @$locations, 1, "found 1" );
     
    140140        proxy => "http://$hostport/nebulous",
    141141    );
    142     $neb->create( "foo" );
    143     $neb->replicate( "foo" );
     142    $neb->create( "foo", "node01" );
     143    $neb->replicate( "foo", "node01" );
    144144
    145145    my $locations = $neb->find_instances( "foo", "node01" );
  • trunk/Nebulous/t/57_client_find.t

    r17756 r18454  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 57_client_find.t,v 1.2 2008-05-20 03:46:11 jhoblitt Exp $
     5# $Id: 57_client_find.t,v 1.3 2008-07-10 02:38:24 jhoblitt Exp $
    66
    77use strict;
     
    5252{
    5353    # key, volume does not hold key but this works anyways ans find will fall
    54     # back to looking for ":any"
     54    # back to looking for "any"
    5555    my $neb = Nebulous::Client->new(
    5656        proxy => "http://$hostport/nebulous",
     
    6666
    6767{
    68     # key, volume :any
     68    # key, volume any
    6969    my $neb = Nebulous::Client->new(
    7070        proxy => "http://$hostport/nebulous",
     
    7272    my $uri = $neb->create( "foo", "node01" );
    7373
    74     my $path = $neb->find( "foo", ":any" );
     74    my $path = $neb->find( "foo", "any" );
    7575
    7676    ok( -e $path, "file exists" );
  • trunk/Nebulous/t/65_client_mounts.t

    r17081 r18454  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 65_client_mounts.t,v 1.1 2008-03-21 01:53:36 jhoblitt Exp $
     5# $Id: 65_client_mounts.t,v 1.2 2008-07-10 02:38:24 jhoblitt Exp $
    66
    77use strict;
     
    1010use Apache::Test qw( -withtestmore );
    1111
    12 plan tests => 16;
     12plan tests => 18;
    1313
    1414use lib qw( ./t ./lib );
     
    3333    my %row;
    3434    # first row
    35     @row{qw(mountpoint total used vol_id name path allocate available xattr)}
     35    @row{qw(mountpoint total used vol_id name host path allocate available xattr)}
    3636        = @{$mounts->[0]};
    3737
     
    4040    is($row{vol_id},    1);
    4141    is($row{name},      "node01");
     42    is($row{host},      "node01");
    4243    is($row{allocate},  1);
    4344    is($row{available}, 1);
     
    4546
    4647    # 2nd row
    47     @row{qw(mountpoint total used vol_id name path allocate available xattr)}
     48    @row{qw(mountpoint total used vol_id name host path allocate available xattr)}
    4849        = @{$mounts->[1]};
    4950
     
    5253    is($row{vol_id},    2);
    5354    is($row{name},      "node02");
     55    is($row{host},      "node02");
    5456    is($row{allocate},  1);
    5557    is($row{available}, 1);
Note: See TracChangeset for help on using the changeset viewer.