Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
cf1b170f
Commit
cf1b170f
authored
Jul 14, 2011
by
Jonathon Duerig
Browse files
Accept stitching extension in the correct namespace.
Updated example stitching request.
parent
2c9ab4b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCM.pm.in
View file @
cf1b170f
...
...
@@ -1214,27 +1214,26 @@ sub GetTicketAuxAux($$$$$$$$$)
# Look for a stitching section. The paths are indexed by the id, which
# will match the client_id in the link.
#
if (defined(GeniXML::FindFirst("n:stitching", $rspec))) {
foreach my $ref (GeniXML::FindNodes("n:stitching",
$rspec)->get_nodelist()) {
foreach my $path (GeniXML::FindNodes("n:path",
$ref)->get_nodelist()) {
my $path_id = GeniXML::GetText("id", $path);
#
# Get the hop list and create and create a hash too.
#
my @hoplist = GeniXML::FindNodes("n:hop",
$path)->get_nodelist();
my %hophash = ();
foreach my $hop (@hoplist) {
my $hop_id = GeniXML::GetText("id", $hop);
$hophash{$hop_id} = $hop;
}
$stitching_paths{$path_id} = { "path" => $path,
"hophash" => \%hophash,
"hoplist" => \@hoplist };
foreach my $ref (GeniXML::FindNodesNS("n:stitching",
$rspec,
$GeniXML::STITCH_NS)->get_nodelist()) {
foreach my $path (GeniXML::FindNodes("n:path",
$ref)->get_nodelist()) {
my $path_id = GeniXML::GetText("id", $path);
#
# Get the hop list and create and create a hash too.
#
my @hoplist = GeniXML::FindNodes("n:hop",
$path)->get_nodelist();
my %hophash = ();
foreach my $hop (@hoplist) {
my $hop_id = GeniXML::GetText("id", $hop);
$hophash{$hop_id} = $hop;
}
$stitching_paths{$path_id} = { "path" => $path,
"hophash" => \%hophash,
"hoplist" => \@hoplist };
}
}
#
...
...
protogeni/lib/GeniXML.pm.in
View file @
cf1b170f
...
...
@@ -29,13 +29,15 @@ use GeniHRN;
use
GeniUtil
;
use
Carp
qw
(
cluck
carp
);
use
vars
qw
($
RSPEC_0_1
$
RSPEC_0_2
$
RSPEC_2
$
EMULAB_NS
$
XSI_NS
$
REQUEST_URL
$
MANIFEST_URL
);
use
vars
qw
($
RSPEC_0_1
$
RSPEC_0_2
$
RSPEC_2
$
EMULAB_NS
$
XSI_NS
$
STITCH_NS
$
REQUEST_URL
$
MANIFEST_URL
);
$
RSPEC_0_1
=
"0.1"
;
$
RSPEC_0_2
=
"0.2"
;
$
RSPEC_2
=
"2"
;
$
EMULAB_NS
=
"http://www.protogeni.net/resources/rspec/ext/emulab/1"
;
$
XSI_NS
=
"http://www.w3.org/2001/XMLSchema-instance"
;
$
STITCH_NS
=
"http://hpn.east.isi.edu/rspec/ext/stitch/0.1/"
;
$
REQUEST_URL
=
"http://www.protogeni.net/resources/rspec/2/request.xsd"
;
$
MANIFEST_URL
=
"http://www.protogeni.net/resources/rspec/2/manifest.xsd"
;
...
...
protogeni/test/stitching-v2.rspec
View file @
cf1b170f
...
...
@@ -34,7 +34,8 @@ http://www.protogeni.net/resources/rspec/2/request.xsd"
component_id=
"urn:publicid:IDN+dragon.maxgigapop.net+interface+planetlab2:eth1"
/>
</link>
<stitching
lastUpdateTime=
"20110220:09:30:21"
>
<stitching
xmlns=
"http://hpn.east.isi.edu/rspec/ext/stitch/0.1/"
lastUpdateTime=
"20110220:09:30:21"
>
<path
id=
"mylink"
>
<hop
id=
"1"
type=
"strict"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment