Changeset 24244 for branches/cnb_branches/cnb_branch_20090301/Nebulous
- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 2 deleted
- 43 edited
- 25 copied
-
. (modified) (1 prop)
-
Nebulous (modified) (1 prop)
-
Nebulous/Build.PL (modified) (1 diff)
-
Nebulous/MANIFEST (modified) (1 diff)
-
Nebulous/bin (modified) (1 prop)
-
Nebulous/bin/neb-ls (modified) (7 diffs)
-
Nebulous/bin/neb-replicate (modified) (4 diffs)
-
Nebulous/examples (modified) (1 prop)
-
Nebulous/lib (modified) (1 prop)
-
Nebulous/lib/Nebulous/Client.pm (modified) (7 diffs)
-
Nebulous/lib/Nebulous/Server (deleted)
-
Nebulous/lib/Nebulous/Util.pm (modified) (1 diff)
-
Nebulous/nebclient (modified) (1 prop)
-
Nebulous/nebclient/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/.cvsignore )
-
Nebulous/nebclient/nebulous.wsdl (modified) (1 diff)
-
Nebulous/nebclient/src/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/src/.cvsignore )
-
Nebulous/nebclient/src/nebclient.c (modified) (4 diffs)
-
Nebulous/nebclient/src/nebclient.h (modified) (1 diff)
-
Nebulous/nebclient/src/nebulous.h (modified) (4 diffs)
-
Nebulous/nebclient/src/soapC.c (modified) (6 diffs)
-
Nebulous/nebclient/src/soapClient.c (modified) (3 diffs)
-
Nebulous/nebclient/src/soapServer.c (modified) (2 diffs)
-
Nebulous/nebclient/src/soapStub.h (modified) (3 diffs)
-
Nebulous/nebclient/tests/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/.cvsignore )
-
Nebulous/nebclient/tests/tap/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/.cvsignore )
-
Nebulous/nebclient/tests/tap/src/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/src/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/diag (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/diag/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/diag/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/fail (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/fail/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/fail/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/ok (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/ok/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/ok/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/ok/ok (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/ok/ok-hash (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/ok/ok-hash/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/ok/ok-hash/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/ok/ok-numeric (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/ok/ok-numeric/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/ok/ok-numeric/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/ok/ok/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/ok/ok/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/pass (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/pass/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/pass/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/no-tests (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/no-tests/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/no-tests/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/no_plan (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/no_plan/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/no_plan/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/not-enough-tests (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/not-enough-tests/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/not-enough-tests/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/sane (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/sane/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/sane/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/skip_all (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/skip_all/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/skip_all/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/too-many-plans (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/too-many-plans/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/too-many-plans/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/plan/too-many-tests (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/plan/too-many-tests/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/plan/too-many-tests/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/skip (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/skip/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/skip/.cvsignore )
-
Nebulous/nebclient/tests/tap/tests/todo (modified) (1 prop)
-
Nebulous/nebclient/tests/tap/tests/todo/.cvsignore (copied) (copied from trunk/Nebulous/nebclient/tests/tap/tests/todo/.cvsignore )
-
Nebulous/scripts/ptest.pl (modified) (2 diffs)
-
Nebulous/scripts/stats.pl (modified) (1 diff)
-
Nebulous/scripts/test_prog_simple.pl (copied) (copied from trunk/Nebulous/scripts/test_prog_simple.pl )
-
Nebulous/t (modified) (1 prop)
-
Nebulous/t/62_client_delete_instance.t (modified) (8 diffs)
-
Nebulous/t/70_neb-ls.t (copied) (copied from trunk/Nebulous/t/70_neb-ls.t )
-
Nebulous/t/Test (deleted)
-
Nebulous/t/conf/startup.pl.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/Nebulous
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/pap/Nebulous merged eligible /trunk/Nebulous merged eligible /branches/eam_branches/eam_branch_20090303/Nebulous 23158-23228 /branches/jhoblitt/Nebulous 2785-12604 /branches/pap_magic/Nebulous 24120-24173
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/Build.PL
r23352 r24244 95 95 'Nebulous::Server::SOAP' => 0, 96 96 'Test::Nebulous' => 0, 97 'Test::Cmd' => '1.05', 97 98 'Apache2::SOAP' => 0, 98 99 'Apache::DBI' => '1.05', -
branches/cnb_branches/cnb_branch_20090301/Nebulous/MANIFEST
r23352 r24244 98 98 t/66_client_xattr.t 99 99 t/67_client_swap.t 100 t/70_neb-ls.t 100 101 t/90_nebclient.t 101 102 t/TEST.PL -
branches/cnb_branches/cnb_branch_20090301/Nebulous/bin
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/neb_distrib_20081210/Nebulous/bin merged eligible /branches/pap/Nebulous/bin merged eligible /trunk/Nebulous/bin merged eligible /branches/eam_branches/eam_branch_20090303/Nebulous/bin 23158-23228 /branches/jhoblitt/Nebulous/bin 2785-12604 /branches/pap_magic/Nebulous/bin 24120-24173
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/bin/neb-ls
r18092 r24244 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2007-2008 Joshua Hoblitt 4 # 5 # $Id: neb-ls,v 1.7 2008-06-12 20:03:37 jhoblitt Exp $ 3 # Copyright (C) 2007-2009 Joshua Hoblitt 6 4 7 5 use strict; … … 9 7 10 8 use vars qw( $VERSION ); 11 $VERSION = '0.0 2';9 $VERSION = '0.03'; 12 10 13 11 use Nebulous::Client; … … 16 14 use Pod::Usage qw( pod2usage ); 17 15 18 my ($server, $long, $recursive); 16 my ( 17 $server, 18 $long, 19 # $recursive, 20 ); 19 21 20 22 $server = $ENV{'NEB_SERVER'} unless $server; … … 22 24 GetOptions( 23 25 'server|s=s' => \$server, 24 'recursive|r' => \$recursive,26 # 'recursive|r' => \$recursive, 25 27 'l|1' => \$long, 26 28 ) || pod2usage( 2 ); … … 39 41 unless defined $neb; 40 42 41 # default to listing everything (bad idea?)42 $pattern ||= " .*";43 # default to listing root 44 $pattern ||= "/"; 43 45 44 if ($recursive) {45 $pattern = "^" . $pattern . ".*";46 } else {47 $pattern = "^" . $pattern . "\$";48 }46 #if ($recursive) { 47 # $pattern = "^" . $pattern . ".*"; 48 #} else { 49 # $pattern = "^" . $pattern . "\$"; 50 #} 49 51 50 52 my $keys = $neb->find_objects($pattern); … … 86 88 Optional 87 89 88 =item * --recursive|-r 89 90 By default C<neb-ls> will only try to match the exact string provided to it. 91 With this option set all keys which match C<<pattern>> as a REGEX or substring 92 will be returned. 93 94 Optional 95 90 =cut 91 #=item * --recursive|-r 92 # 93 #By default C<neb-ls> will only try to match the exact string provided to it. 94 #With this option set all keys which match C<<pattern>> as a REGEX or substring 95 #will be returned. 96 # 97 #Optional 98 # 96 99 =item * --server|-s <URL> 97 100 … … 130 133 =head1 COPYRIGHT 131 134 132 Copyright (C) 2007-200 8Joshua Hoblitt. All rights reserved.135 Copyright (C) 2007-2009 Joshua Hoblitt. All rights reserved. 133 136 134 137 This program is free software; you can redistribute it and/or modify it under -
branches/cnb_branches/cnb_branch_20090301/Nebulous/bin/neb-replicate
r18390 r24244 25 25 'volume|v=s' => \$volume, 26 26 'copies|c=i' => \$copies, 27 'set_copies=i' => \$set_copies, 27 28 ) || pod2usage( 2 ); 28 29 … … 44 45 unless defined $neb; 45 46 46 for (my $i = 0; $i < $copies; $i++) { 47 if (defined $volume) { 48 $neb->replicate($key, $volume) 49 or die "failed to replicate Nebulous key: $key"; 50 } else { 51 $neb->replicate($key) 52 or die "failed to replicate Nebulous key: $key"; 47 # if replicate fails, we should still set user.copies (if requested) 48 my $replication_problem; 49 eval { 50 for (my $i = 0; $i < $copies; $i++) { 51 if (defined $volume) { 52 $neb->replicate($key, $volume) 53 or die "failed to replicate Nebulous key: $key"; 54 } else { 55 $neb->replicate($key) 56 or die "failed to replicate Nebulous key: $key"; 57 } 53 58 } 59 }; 60 if ($@) { 61 warn $@; 62 $replication_problem = 1; 54 63 } 55 64 65 if ($set_copies) { 66 $neb->setxattr($key, "user.copies", $copies, "replace") 67 or die $neb->err; 68 } 69 70 exit(32) if defined $replication_problem; 56 71 57 72 __END__ … … 66 81 67 82 neb-replicate [--server <URL>] [--volume <volume name>] 68 [--copies <n>] <key>83 [--copies <n>] [--set_copies <n>] <key> 69 84 70 85 =head1 DESCRIPTION … … 93 108 The number of new replications to create. 94 109 95 Optional. Defaults to 0. 110 Optional. Defaults to 1. 111 112 =item * --set_copies|c <n> 113 114 Set the C<user.copies> xattr for this storage object to C<<n>>. 115 116 Optional. 96 117 97 118 =back -
branches/cnb_branches/cnb_branch_20090301/Nebulous/examples
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/neb_distrib_20081210/Nebulous/examples merged eligible /branches/pap/Nebulous/examples merged eligible /trunk/Nebulous/examples merged eligible /branches/eam_branches/eam_branch_20090303/Nebulous/examples 23158-23228 /branches/jhoblitt/Nebulous/examples 2785-12604 /branches/pap_magic/Nebulous/examples 24120-24173
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/lib
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/neb_distrib_20081210/Nebulous/lib merged eligible /branches/pap/Nebulous/lib merged eligible /trunk/Nebulous/lib merged eligible /branches/eam_branches/eam_branch_20090303/Nebulous/lib 23158-23228 /branches/jhoblitt/Nebulous/lib 2785-12604 /branches/pap_magic/Nebulous/lib 24120-24173
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/lib/Nebulous/Client.pm
r20988 r24244 243 243 # if the copy failed we now have a zero length instances floating 244 244 # around that must be removed 245 unless ($self->delete_instance( "$uri")) {245 unless ($self->delete_instance($key, "$uri")) { 246 246 $log->logdie( "can not copy instance $uri AND FAILED TO CLEANUP EMPTY INSTANCE" ); 247 247 } … … 256 256 257 257 unless ($src_md5 eq $dst_md5) { 258 $self->delete_instance( "$uri");258 $self->delete_instance($key, "$uri"); 259 259 $log->logdie( "md5sum mismatch" ); 260 260 } … … 327 327 } 328 328 329 my $uri = $self->delete_instance( @$locations[0]);329 my $uri = $self->delete_instance($key, @$locations[0]); 330 330 331 331 $log->debug("leaving"); … … 615 615 return; 616 616 } 617 if ($response->faultstring =~ /does not match any key or directory/) { 618 $log->debug( "leaving" ); 619 return; 620 } 617 621 618 622 $log->logdie("unhandled fault - ", $self->err); … … 813 817 # a lock is implicitly removed when the last storage object is deleted 814 818 foreach my $uri ( @$locations ) { 815 $self->delete_instance( $uri) or return undef;819 $self->delete_instance($key, $uri) or return undef; 816 820 } 817 821 … … 944 948 my $self = shift; 945 949 946 my ($uri) = validate_pos(@_, 950 my ($key, $uri) = validate_pos(@_, 951 { 952 type => SCALAR, 953 }, 947 954 { 948 955 type => SCALAR, … … 961 968 $log->logdie( $@ ) if $@; 962 969 963 my $response = $self->{ 'server' }->delete_instance( $uri);970 my $response = $self->{ 'server' }->delete_instance($key, $uri); 964 971 if ( $response->fault ) { 965 972 $self->set_err($response->faultstring); -
branches/cnb_branches/cnb_branch_20090301/Nebulous/lib/Nebulous/Util.pm
r18463 r24244 45 45 46 46 47 # XXX replace the unlink with a 'move to trash' operation 48 # empty the trash with a daemon on the NSF server 47 49 sub _nuke_file { 48 50 my $path = shift; -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/neb_distrib_20081210/Nebulous/nebclient merged eligible /branches/pap/Nebulous/nebclient merged eligible /trunk/Nebulous/nebclient merged eligible /branches/eam_branches/eam_branch_20090303/Nebulous/nebclient 23158-23228 /branches/jhoblitt/Nebulous/nebclient 2785-12604 /branches/pap_magic/Nebulous/nebclient 24120-24173
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/nebulous.wsdl
r20988 r24244 125 125 126 126 <message name="delete_instanceRequest"> 127 <part name="key" type="xsd:string" /> 127 128 <part name="uri" type="xsd:string" /> 128 129 </message> -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/nebclient.c
r21461 r24244 253 253 } 254 254 255 if (!nebDeleteInstance(server, locations->URI[0])) {255 if (!nebDeleteInstance(server, key, locations->URI[0])) { 256 256 nebObjectInstancesFree(locations); 257 257 … … 633 633 634 634 for (int i = 0; i < locations->n; i++) { 635 if (!nebDeleteInstance(server, locations->URI[i])) {635 if (!nebDeleteInstance(server, key, locations->URI[i])) { 636 636 nebSetErr(server, "can not delete instance"); 637 637 nebObjectInstancesFree(locations); … … 749 749 } 750 750 751 bool nebDeleteInstance(nebServer *server, const char * URI)751 bool nebDeleteInstance(nebServer *server, const char *key, const char *URI) 752 752 { 753 753 int response; … … 770 770 771 771 if (soap_call_ns1__delete_USCOREinstance(server->soap, server->endpoint, 772 NULL, (char *)URI, &response) != SOAP_OK) {772 NULL, (char *)key, (char *)URI, &response) != SOAP_OK) { 773 773 nebFree(filename); 774 774 -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/nebclient.h
r21462 r24244 282 282 bool nebDeleteInstance( 283 283 nebServer *server, ///< nebServer object 284 const char *key, ///< storage object key (name) 284 285 const char *URI ///< URL of instance to remove 285 286 ); -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/nebulous.h
r23352 r24244 1 1 /* src/nebulous.h 2 2 Generated by wsdl2h 1.2.12 from nebulous.wsdl and typemap.dat 3 2009-0 3-05 21:11:05GMT3 2009-04-20 22:15:21 GMT 4 4 Copyright (C) 2001-2008 Robert van Engelen, Genivia Inc. All Rights Reserved. 5 5 This part of the software is released under one of the following licenses: … … 808 808 NULL, // char *action = NULL selects default action for this operation 809 809 // request parameters: 810 char* key, 810 811 char* uri, 811 812 // response parameters: … … 819 820 struct soap *soap, 820 821 // request parameters: 822 char* key, 821 823 char* uri, 822 824 // response parameters: … … 831 833 //gsoap ns1 service method-action: delete_USCOREinstance urn:Nebulous/Server/SOAP#delete_instance 832 834 int ns1__delete_USCOREinstance( 835 char* key, ///< Request parameter 833 836 char* uri, ///< Request parameter 834 837 int *result ///< Response parameter -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/soapC.c
r23352 r24244 12 12 #endif 13 13 14 SOAP_SOURCE_STAMP("@(#) soapC.c ver 2.7.12 2009-0 3-05 21:11:05GMT")14 SOAP_SOURCE_STAMP("@(#) soapC.c ver 2.7.12 2009-04-20 22:15:22 GMT") 15 15 16 16 … … 1344 1344 { 1345 1345 (void)soap; (void)a; /* appease -Wall -Werror */ 1346 soap_default_string(soap, &a->key); 1346 1347 soap_default_string(soap, &a->uri); 1347 1348 } … … 1350 1351 { 1351 1352 (void)soap; (void)a; /* appease -Wall -Werror */ 1353 soap_serialize_string(soap, &a->key); 1352 1354 soap_serialize_string(soap, &a->uri); 1353 1355 } … … 1365 1367 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__delete_USCOREinstance), type)) 1366 1368 return soap->error; 1369 if (soap_out_string(soap, "key", -1, &a->key, "")) 1370 return soap->error; 1367 1371 if (soap_out_string(soap, "uri", -1, &a->uri, "")) 1368 1372 return soap->error; … … 1380 1384 SOAP_FMAC3 struct ns1__delete_USCOREinstance * SOAP_FMAC4 soap_in_ns1__delete_USCOREinstance(struct soap *soap, const char *tag, struct ns1__delete_USCOREinstance *a, const char *type) 1381 1385 { 1386 size_t soap_flag_key = 1; 1382 1387 size_t soap_flag_uri = 1; 1383 1388 if (soap_element_begin_in(soap, tag, 0, type)) … … 1391 1396 for (;;) 1392 1397 { soap->error = SOAP_TAG_MISMATCH; 1398 if (soap_flag_key && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 1399 if (soap_in_string(soap, "key", &a->key, "xsd:string")) 1400 { soap_flag_key--; 1401 continue; 1402 } 1393 1403 if (soap_flag_uri && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 1394 1404 if (soap_in_string(soap, "uri", &a->uri, "xsd:string")) -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/soapClient.c
r23352 r24244 10 10 #endif 11 11 12 SOAP_SOURCE_STAMP("@(#) soapClient.c ver 2.7.12 2009-0 3-05 21:11:05GMT")12 SOAP_SOURCE_STAMP("@(#) soapClient.c ver 2.7.12 2009-04-20 22:15:21 GMT") 13 13 14 14 … … 700 700 } 701 701 702 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__delete_USCOREinstance(struct soap *soap, const char *soap_endpoint, const char *soap_action, char * uri, int *result)702 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__delete_USCOREinstance(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *key, char *uri, int *result) 703 703 { struct ns1__delete_USCOREinstance soap_tmp_ns1__delete_USCOREinstance; 704 704 struct ns1__delete_USCOREinstanceResponse *soap_tmp_ns1__delete_USCOREinstanceResponse; … … 708 708 soap_action = "urn:Nebulous/Server/SOAP#delete_instance"; 709 709 soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"; 710 soap_tmp_ns1__delete_USCOREinstance.key = key; 710 711 soap_tmp_ns1__delete_USCOREinstance.uri = uri; 711 712 soap_begin(soap); -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/soapServer.c
r23352 r24244 10 10 #endif 11 11 12 SOAP_SOURCE_STAMP("@(#) soapServer.c ver 2.7.12 2009-0 3-05 21:11:05GMT")12 SOAP_SOURCE_STAMP("@(#) soapServer.c ver 2.7.12 2009-04-20 22:15:21 GMT") 13 13 14 14 … … 643 643 || soap_end_recv(soap)) 644 644 return soap->error; 645 soap->error = ns1__delete_USCOREinstance(soap, soap_tmp_ns1__delete_USCOREinstance. uri, &soap_tmp_int);645 soap->error = ns1__delete_USCOREinstance(soap, soap_tmp_ns1__delete_USCOREinstance.key, soap_tmp_ns1__delete_USCOREinstance.uri, &soap_tmp_int); 646 646 if (soap->error) 647 647 return soap->error; -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/src/soapStub.h
r23352 r24244 283 283 struct ns1__delete_USCOREinstance 284 284 { 285 char *key; /* optional element of type xsd:string */ 285 286 char *uri; /* optional element of type xsd:string */ 286 287 }; … … 432 433 SOAP_FMAC5 int SOAP_FMAC6 ns1__find_USCOREinstances(struct soap*, char *key, char *volume, struct ns1__find_USCOREinstancesResponse *_param_3); 433 434 434 SOAP_FMAC5 int SOAP_FMAC6 ns1__delete_USCOREinstance(struct soap*, char * uri, int *result);435 SOAP_FMAC5 int SOAP_FMAC6 ns1__delete_USCOREinstance(struct soap*, char *key, char *uri, int *result); 435 436 436 437 SOAP_FMAC5 int SOAP_FMAC6 ns1__stat_USCOREobject(struct soap*, char *key, struct ns1__stat_USCOREobjectResponse *_param_4); … … 467 468 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__find_USCOREinstances(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *key, char *volume, struct ns1__find_USCOREinstancesResponse *_param_3); 468 469 469 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__delete_USCOREinstance(struct soap *soap, const char *soap_endpoint, const char *soap_action, char * uri, int *result);470 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__delete_USCOREinstance(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *key, char *uri, int *result); 470 471 471 472 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__stat_USCOREobject(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *key, struct ns1__stat_USCOREobjectResponse *_param_4); -
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests
-
Property svn:ignore
set to
Makefile
Makefile.in
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/diag
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/fail
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/ok
-
Property svn:ignore
set to
Makefile
Makefile.in
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/ok/ok
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/ok/ok-hash
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/ok/ok-numeric
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/pass
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan
-
Property svn:ignore
set to
Makefile
Makefile.in
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/no-tests
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/no_plan
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/not-enough-tests
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/sane
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/skip_all
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/too-many-plans
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/plan/too-many-tests
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/skip
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/nebclient/tests/tap/tests/todo
-
Property svn:ignore
set to
.deps
Makefile
Makefile.in
.libs
test
test.c.out
test.pl.out
*.bb
*.bbg
*.da
gmon.out
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/scripts/ptest.pl
r23352 r24244 18 18 $| = 1; 19 19 20 my $prog_file = shift; 20 21 my $key = shift || 'foobar'; 21 22 my $kids = shift || 1; 22 23 24 require $prog_file; 23 25 $key = "/tmp/" . $key; 24 26 … … 72 74 } 73 75 74 # select $sock;75 # $| = 1;76 77 # child78 76 my $fname = "${key}_$id"; 79 77 80 78 my $neb = Nebulous::Client::Bench->new( 81 79 # proxy => 'http://localhost:80/nebulous' 82 proxy => 'http:// alala:80/nebulous',83 # sock => \*STDOUT,80 proxy => 'http://ipp008:80/nebulous' 81 # proxy => 'http://alala:80/nebulous', 84 82 ); 85 83 86 87 while (1) { 88 # print $sock "$$ : i'm a little tea pot using key: $fname\n"; 89 my $fh = $neb->open_create( $fname ) 90 or child_die($sock, "can't create file $fname"); 91 close $fh; 92 93 $fh = $neb->open( $fname, 'read' ) 94 or child_die("can't open file"); 95 close $fh; 96 97 $neb->lock( $fname, 'read' ); 98 $neb->unlock( $fname, 'read' ); 99 $neb->replicate( $fname ); 100 $neb->cull( $fname ); 101 $neb->find( $fname ); 102 $neb->copy( $fname, $fname . "_copy" ); 103 $neb->move( $fname, $fname . "_move" ); 104 $neb->delete( $fname . "_copy" ); 105 $neb->delete( $fname . "_move" ); 106 107 # print $sock "$$ : all done!\n"; 108 } 109 110 return 1; 84 test_prog($neb, $fname); 111 85 } 112 86 -
branches/cnb_branches/cnb_branch_20090301/Nebulous/scripts/stats.pl
r23594 r24244 17 17 foreach my $line (split(/\n/, $data)) { 18 18 my ($time, $method, $duration) = split(/\s+/, $line); 19 20 unless (defined $time and defined $method and defined $duration) { 21 warn "bad line: $line\n"; 22 next; 23 } 19 24 20 25 push @{$methods{$method}->{time}}, $time; -
branches/cnb_branches/cnb_branch_20090301/Nebulous/t
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/neb_distrib_20081210/Nebulous/t merged eligible /branches/pap/Nebulous/t merged eligible /trunk/Nebulous/t merged eligible /branches/eam_branches/eam_branch_20090303/Nebulous/t 23158-23228 /branches/jhoblitt/Nebulous/t 2785-12604 /branches/pap_magic/Nebulous/t 24120-24173
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Nebulous/t/62_client_delete_instance.t
r20988 r24244 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 62_client_delete_instance.t,v 1. 3 2008-12-14 22:48:35eugene Exp $5 # $Id: 62_client_delete_instance.t,v 1.1.38.1 2008-12-14 22:03:08 eugene Exp $ 6 6 7 7 use strict; … … 10 10 use Apache::Test qw( -withtestmore ); 11 11 12 plan tests => 9;12 plan tests => 11; 13 13 14 14 use lib qw( ./t ./lib ); … … 26 26 proxy => "http://$hostport/nebulous", 27 27 ); 28 $neb->create( "foo" );29 28 30 my $locations = $neb->find_instances( "foo" ); 29 my $key = "foo"; 30 $neb->create($key); 31 31 32 my $uri = $neb->delete_instance( @$locations[0] ); 32 my $locations = $neb->find_instances($key); 33 34 my $uri = $neb->delete_instance($key, @$locations[0]); 33 35 34 36 is( $uri, @$locations[0], "delete instance" ); … … 43 45 proxy => "http://$hostport/nebulous", 44 46 ); 45 $neb->create( "foo" ); 46 $neb->replicate( "foo" ); 47 my $key = "foo"; 48 $neb->create($key); 49 $neb->replicate($key); 47 50 48 51 my $uri1 = $neb->find_instances( "foo" )->[0]; 49 52 50 ok( $neb->delete_instance( $uri1), "delete instance" );53 ok( $neb->delete_instance($key, $uri1), "delete instance" ); 51 54 52 55 my $uri2 = $neb->find_instances( "foo" )->[0]; … … 54 57 isnt( $uri1, $uri2, "other instance remains" ); 55 58 56 ok( $neb->delete_instance( $uri2), "delete instance" );59 ok( $neb->delete_instance($key, $uri2), "delete instance" ); 57 60 58 61 my $locations = $neb->find_instances( "foo" ); 59 62 60 is( $locations, undef, "no rema ning instances" );63 is( $locations, undef, "no remaining instances" ); 61 64 } 65 66 Test::Nebulous->setup; 62 67 63 68 { … … 65 70 proxy => "http://$hostport/nebulous", 66 71 ); 67 my $uri = $neb->delete_instance( "file:/foo" ); 72 my $key = "foo"; 73 $neb->create($key); 74 my $uri = $neb->delete_instance($key, "file:/foo" ); 68 75 69 76 is( $uri, undef, "uri does not exist" ); … … 76 83 proxy => "http://$hostport/nebulous", 77 84 ); 78 $neb->delete_instance();85 my $uri = $neb->delete_instance("foo", "file:/foo" ); 79 86 }; 80 like( $@, qr/ 1 was expected/, "no params" );87 like( $@, qr/is valid object key/, "bad object key" ); 81 88 82 89 Test::Nebulous->setup; … … 86 93 proxy => "http://$hostport/nebulous", 87 94 ); 88 $neb->delete_instance( "foo", 2);95 my $uri = $neb->delete_instance("foo"); 89 96 }; 90 like( $@, qr/1 was expected/, "too many params" ); 97 like( $@, qr/2 were expected/, "missing second param" ); 98 99 Test::Nebulous->setup; 100 101 eval { 102 my $neb = Nebulous::Client->new( 103 proxy => "http://$hostport/nebulous", 104 ); 105 $neb->delete_instance(); 106 }; 107 like( $@, qr/2 were expected/, "no params" ); 108 109 Test::Nebulous->setup; 110 111 eval { 112 my $neb = Nebulous::Client->new( 113 proxy => "http://$hostport/nebulous", 114 ); 115 $neb->delete_instance("foo", 2, 3); 116 }; 117 like( $@, qr/2 were expected/, "too many params" ); 91 118 92 119 Test::Nebulous->cleanup; -
branches/cnb_branches/cnb_branch_20090301/Nebulous/t/conf/startup.pl.in
r16281 r24244 12 12 use Test::Nebulous; 13 13 14 #$Apache::DBI::DEBUG = 1; 14 15 Apache::DBI->connect_on_init( $NEB_DB, $NEB_USER, $NEB_PASS ); 15 Nebulous::Server::SOAP->new_on_init( 16 Apache::DBI->setPingTimeOut($NEB_DB, 10); 17 18 my $config = Nebulous::Server::Config->new( 19 trace => 'all', 20 ); 21 $config->add_db( 22 dbindex => 0, 16 23 dsn => $NEB_DB, 17 24 dbuser => $NEB_USER, 18 25 dbpasswd => $NEB_PASS, 19 log_level => 'all',20 26 ); 27 #$config->add_db( 28 # dbindex => 1, 29 # dsn => 'DBI:mysql:database=nebulous1:host=localhost', 30 # dbuser => $dbuser, 31 # dbpasswd => $dbpasswd, 32 #); 33 34 Nebulous::Server::SOAP->new_on_init($config); 21 35 22 36 1;
Note:
See TracChangeset
for help on using the changeset viewer.
