Changeset 18454
- Timestamp:
- Jul 9, 2008, 4:38:24 PM (18 years ago)
- Location:
- trunk/Nebulous
- Files:
-
- 5 edited
-
Changes (modified) (1 diff)
-
lib/Nebulous/Client.pm (modified) (2 diffs)
-
t/56_client_find_instances.t (modified) (3 diffs)
-
t/57_client_find.t (modified) (4 diffs)
-
t/65_client_mounts.t (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/Changes
r18390 r18454 2 2 3 3 0.09 4 - change "any" volume usage to corespond to changes in Nebulous::Server 4 5 - add neb-replicate --copies option 5 6 - fix neb-stat to work when a neb key is used that implies a storage volume -
trunk/Nebulous/lib/Nebulous/Client.pm
r17765 r18454 1 1 # Copyright (c) 2004-2008 Joshua Hoblitt 2 2 # 3 # $Id: Client.pm,v 1.5 4 2008-05-22 01:39:41jhoblitt Exp $3 # $Id: Client.pm,v 1.55 2008-07-10 02:38:24 jhoblitt Exp $ 4 4 5 5 package Nebulous::Client; … … 695 695 696 696 # then fall back to looking for isntances on any volume 697 $locations = $self->find_instances( $key, ' :any');697 $locations = $self->find_instances( $key, '~any'); 698 698 unless (defined $locations) { 699 699 return; -
trunk/Nebulous/t/56_client_find_instances.t
r17756 r18454 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 56_client_find_instances.t,v 1. 2 2008-05-20 03:46:11jhoblitt Exp $5 # $Id: 56_client_find_instances.t,v 1.3 2008-07-10 02:38:24 jhoblitt Exp $ 6 6 7 7 use strict; … … 126 126 $neb->create( "foo", "node01" ); 127 127 128 my $locations = $neb->find_instances( "neb://node02/foo", " :any" );128 my $locations = $neb->find_instances( "neb://node02/foo", "any" ); 129 129 130 130 is( scalar @$locations, 1, "found 1" ); … … 140 140 proxy => "http://$hostport/nebulous", 141 141 ); 142 $neb->create( "foo" );143 $neb->replicate( "foo" );142 $neb->create( "foo", "node01" ); 143 $neb->replicate( "foo", "node01" ); 144 144 145 145 my $locations = $neb->find_instances( "foo", "node01" ); -
trunk/Nebulous/t/57_client_find.t
r17756 r18454 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 57_client_find.t,v 1. 2 2008-05-20 03:46:11jhoblitt Exp $5 # $Id: 57_client_find.t,v 1.3 2008-07-10 02:38:24 jhoblitt Exp $ 6 6 7 7 use strict; … … 52 52 { 53 53 # 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" 55 55 my $neb = Nebulous::Client->new( 56 56 proxy => "http://$hostport/nebulous", … … 66 66 67 67 { 68 # key, volume :any68 # key, volume any 69 69 my $neb = Nebulous::Client->new( 70 70 proxy => "http://$hostport/nebulous", … … 72 72 my $uri = $neb->create( "foo", "node01" ); 73 73 74 my $path = $neb->find( "foo", " :any" );74 my $path = $neb->find( "foo", "any" ); 75 75 76 76 ok( -e $path, "file exists" ); -
trunk/Nebulous/t/65_client_mounts.t
r17081 r18454 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 65_client_mounts.t,v 1. 1 2008-03-21 01:53:36jhoblitt Exp $5 # $Id: 65_client_mounts.t,v 1.2 2008-07-10 02:38:24 jhoblitt Exp $ 6 6 7 7 use strict; … … 10 10 use Apache::Test qw( -withtestmore ); 11 11 12 plan tests => 1 6;12 plan tests => 18; 13 13 14 14 use lib qw( ./t ./lib ); … … 33 33 my %row; 34 34 # 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)} 36 36 = @{$mounts->[0]}; 37 37 … … 40 40 is($row{vol_id}, 1); 41 41 is($row{name}, "node01"); 42 is($row{host}, "node01"); 42 43 is($row{allocate}, 1); 43 44 is($row{available}, 1); … … 45 46 46 47 # 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)} 48 49 = @{$mounts->[1]}; 49 50 … … 52 53 is($row{vol_id}, 2); 53 54 is($row{name}, "node02"); 55 is($row{host}, "node02"); 54 56 is($row{allocate}, 1); 55 57 is($row{available}, 1);
Note:
See TracChangeset
for help on using the changeset viewer.
