All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 9d127b4a authored by Jonathon Duerig's avatar Jonathon Duerig

Fixed to accomodate Tarun's tweaks to the schema which changed a few thing...

Fixed to accomodate Tarun's tweaks to the schema which changed a few thing from elements to attributes and used interface_ref.
parent e59c6569
......@@ -17,8 +17,14 @@
<xs:element name="link" type="rspec:LinkContents"/>
<xs:complexType name="NodeContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="rspec:NodeTypeList"/>
<xs:element ref="rspec:interface"/>
<xs:choice>
<xs:group ref="rspec:NodeTypeList"/>
<xs:element ref="rspec:interface"/>
</xs:choice>
<xs:choice>
<xs:element ref="rspec:location"/>
<xs:element ref="rspec:available"/>
</xs:choice>
</xs:choice>
<xs:attribute name="virtualization_type">
<xs:simpleType>
......@@ -30,35 +36,20 @@
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="rspec:VirtualName"/>
<xs:attribute name="component_manager_uuid"/>
<xs:attribute name="component_name"/>
<xs:attribute name="component_uuid"/>
<xs:attribute name="colocate"/>
<xs:attribute name="virtualization_subtype"/>
<xs:attributeGroup ref="rspec:ComponentName"/>
</xs:complexType>
<xs:element name="interface">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceDecl"/>
</xs:complexType>
</xs:element>
<xs:element name="interface" type="rspec:InterfaceDecl"/>
<xs:element name="available" type="xs:boolean"/>
<xs:complexType name="LinkContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:group ref="rspec:LinkTypeList"/>
<xs:element name="interface_ref">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceRef"/>
</xs:complexType>
</xs:element>
<xs:element ref="rspec:interface_ref"/>
</xs:choice>
<xs:choice>
<xs:group ref="rspec:LinkMapping"/>
<xs:choice>
<xs:element ref="rspec:bandwidth"/>
<xs:element ref="rspec:latency"/>
<xs:element ref="rspec:packet_loss"/>
</xs:choice>
<xs:element ref="rspec:bandwidth"/>
<xs:element ref="rspec:latency"/>
<xs:element ref="rspec:packet_loss"/>
</xs:choice>
</xs:choice>
<xs:attribute name="virtualization_type">
......@@ -71,9 +62,13 @@
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="link_type"/>
<xs:attributeGroup ref="rspec:VirtualName"/>
<xs:attributeGroup ref="rspec:ComponentName"/>
</xs:complexType>
<xs:element name="interface_ref">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceRef"/>
</xs:complexType>
</xs:element>
<xs:element name="bandwidth">
<xs:annotation>
<xs:documentation>Bandwidth of the link in kbps</xs:documentation>
......@@ -126,14 +121,19 @@
<xs:attribute name="component_node_uuid" use="required"/>
<xs:attribute name="component_interface_id" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="InterfaceDecl">
<xs:attribute name="component_id"/>
<xs:attributeGroup ref="rspec:VirtualName"/>
</xs:attributeGroup>
<xs:complexType name="InterfaceDecl">
<xs:sequence>
<xs:element minOccurs="0" ref="rspec:monitoring"/>
</xs:sequence>
<xs:attributeGroup ref="rspec:ComponentInterfaceDeclName"/>
</xs:complexType>
<xs:element name="monitoring">
<xs:complexType>
<xs:attribute name="user_traffic"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="InterfaceRef">
<xs:attribute name="tunnel_ip"/>
<xs:attribute name="virtual_node_id" use="required"/>
<xs:attribute name="virtual_interface_id" use="required"/>
<xs:attributeGroup ref="rspec:ComponentInterfaceRefName"/>
</xs:attributeGroup>
<xs:element name="location">
<xs:complexType>
......@@ -153,7 +153,7 @@
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="request"/>
<xs:enumeration value="advertisement"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
......
......@@ -1341,17 +1341,17 @@ sub print_node_types
$name = substr($name, 1);
$is_static = 1;
}
print " <node_type>\n";
print " <type_name>$name</type_name>\n";
print " <node_type \n";
print " type_name=\"$name\"\n";
if ($count eq "*") {
print " <unlimited/>\n";
print " type_slots=\"unlimited\"\n";
} else {
print " <type_slots>$count</type_slots>\n";
print " type_slots=\"$count\"\n";
}
if ($is_static) {
print " <static/>\n";
print " static=\"true\"\n";
}
print " </node_type>\n";
print " />\n";
}
}
......@@ -1414,7 +1414,7 @@ sub print_node_interfaces
for (; $i < scalar(@interfaces); ++$i) {
my $name = $interfaces[$i];
my $urn = GeniHRN::GenerateInterface($OURDOMAIN, $nodeName, $name);
print " <interface component_name=\"$urn\"/>\n";
print " <interface component_id=\"$urn\"/>\n";
}
}
......@@ -1473,10 +1473,17 @@ sub print_named_link_xml
print " <bandwidth>$bw</bandwidth>\n";
print " <latency>$delay</latency>\n";
print " <packet_loss>$loss</packet_loss>\n";
my $i = 0;
for (; $i < $proto_count; ++$i) {
print " <link_type><type_name>" . $_[$i]
. "</type_name></link_type>\n";
if ($genimode) {
my $i = 0;
for (; $i < $proto_count; ++$i) {
print " <link_type type_name=\"" . $_[$i] . "\" />\n";
}
} else {
my $i = 0;
for (; $i < $proto_count; ++$i) {
print " <link_type><type_name>" . $_[$i]
. "</type_name></link_type>\n";
}
}
print "</link>\n\n";
}
......@@ -1485,13 +1492,13 @@ sub print_interface
{
my $node = shift(@_);
my $interface = shift(@_);
print " <interface ";
print " <interface_ref ";
print "component_node_uuid=\"";
my $nodeUrn = GeniHRN::Generate($OURDOMAIN, "node", $node);
print $nodeUrn;
my $interfaceUrn = GeniHRN::GenerateInterface($OURDOMAIN, $node,
$interface);
print "\" component_interface_name=\"" . $interfaceUrn . "\"";
print "\" component_interface_id=\"" . $interfaceUrn . "\"";
print "/>\n";
}
......
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