Commit 25d7ae4b authored by Jonathon Duerig's avatar Jonathon Duerig

Added an optional subnode_of option to both advertisements and requests....

Added an optional subnode_of option to both advertisements and requests. Ptopgen now generates the subnode_of relationship in Geni mode.
parent 9d6403b0
......@@ -20,6 +20,11 @@ NodeContents =
attribute virtualization_type { "raw" | "trellis-vserver" |
"planetlab-vserver" | "emulab-vnode" | "bgpmux" }? &
# Each node may be the subnode of (physically located within) another.
# In advertisements, this is the URN of the other component.
# In requests, this is the virtual_id of the other sliver.
element subnode_of { text }? &
# Node type list
NodeTypeList &
......
......@@ -18,6 +18,7 @@
<xs:complexType name="NodeContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="rspec:subnode_of"/>
<xs:group ref="rspec:NodeTypeList"/>
<xs:element ref="rspec:interface"/>
</xs:choice>
......@@ -42,6 +43,7 @@
</xs:attribute>
<xs:attributeGroup ref="rspec:ComponentName"/>
</xs:complexType>
<xs:element name="subnode_of" type="xs:string"/>
<xs:element name="interface" type="rspec:InterfaceDecl"/>
<xs:element name="available" type="xs:boolean"/>
<xs:element name="exclusive" type="xs:boolean"/>
......
......@@ -17,6 +17,7 @@
<xs:element name="link" type="rspec:LinkContents"/>
<xs:complexType name="NodeContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="rspec:subnode_of"/>
<xs:group ref="rspec:NodeTypeList"/>
<xs:element ref="rspec:interface"/>
</xs:choice>
......@@ -37,6 +38,7 @@
<xs:attribute name="virtualization_subtype"/>
<xs:attribute name="exclusive"/>
</xs:complexType>
<xs:element name="subnode_of" type="xs:string"/>
<xs:element name="interface">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceDecl"/>
......
......@@ -1583,6 +1583,7 @@ sub print_node
print " <location country=\"$country\" longitude=\"$long\" " .
"latitude=\"$lat\" />\n";
}
print_node_flags(@$flags);
print_node_interfaces($name, @$interfaces);
print "</node>\n";
} else {
......@@ -1658,13 +1659,13 @@ sub print_node_flags
my $i = 0;
for (; $i < scalar(@_); ++$i) {
my ($name, $value) = split(/:/, $_[$i], 2);
if ($name eq "trivial_bw") {
if ($name eq "trivial_bw" && ! $genimode) {
print " <trivial_bandwidth>$value</trivial_bandwidth>\n";
}
elsif ($name eq "subnode_of") {
print " <subnode_of>$value</subnode_of>\n";
}
elsif ($name eq "unique") {
elsif ($name eq "unique" && ! $genimode) {
print " <unique/>\n";
}
elsif ($name eq "disallow_trivial_mix") {
......
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