Commit cf1b170f authored by Jonathon Duerig's avatar Jonathon Duerig

Accept stitching extension in the correct namespace.

Updated example stitching request.
parent 2c9ab4b7
......@@ -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 };
}
}
#
......
......@@ -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";
......
......@@ -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">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment