Commit 77f17272 authored by Jonathon Duerig's avatar Jonathon Duerig

Added link types to rspec. Removed old link_type attribute. Link types also...

Added link types to rspec. Removed old link_type attribute. Link types also have parameters which are just key/value pairs which can be anything. For instance, Georgia Tech can use them to encode the key and ttl parameters for EGRE tunnels.
parent 34b97b3f
......@@ -37,7 +37,7 @@ NodeContents =
attribute virtualization_type { "raw" | "trellis-vserver" |
"planetlab-vserver" | "emulab-vnode" }? &
# Link types
LinkTypeList &
LinkType+ &
# The interfaces which this link spans.
element interface_ref {
InterfaceRef
......@@ -45,7 +45,15 @@ NodeContents =
NodeTypeList = NodeTypeSpec+
LinkTypeList = LinkTypeSpec+
LinkType = element link_type {
attribute name { text } &
LinkTypeField+
}
LinkTypeField = element field {
attribute key { text } &
attribute value { text }
}
VirtualName = attribute virtual_id { text }
......
......@@ -45,7 +45,7 @@
<xs:complexType name="LinkContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:group ref="rspec:LinkTypeList"/>
<xs:group ref="rspec:LinkType"/>
<xs:element ref="rspec:interface_ref"/>
</xs:choice>
<xs:choice>
......@@ -103,11 +103,24 @@
<xs:element maxOccurs="unbounded" ref="rspec:node_type"/>
</xs:sequence>
</xs:group>
<xs:group name="LinkTypeList">
<xs:group name="LinkType">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:link_type"/>
<xs:element name="link_type">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:field"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:element name="field">
<xs:complexType>
<xs:attribute name="key" use="required"/>
<xs:attribute name="value" use="required"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="VirtualName">
<xs:attribute name="virtual_id" use="required"/>
</xs:attributeGroup>
......@@ -141,7 +154,7 @@
<xs:complexType>
<xs:attribute name="country" use="required"/>
<xs:attribute name="longitude"/>
<xs:attribute name="lattitude"/>
<xs:attribute name="latitude"/>
</xs:complexType>
</xs:element>
<xs:element name="rspec" type="rspec:RSpecContents"/>
......
......@@ -46,11 +46,15 @@
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="link_type">
<xs:complexType>
<xs:attribute name="type_name" use="required"/>
</xs:complexType>
</xs:element>
<xs:group name="LinkTypeSpec">
<xs:sequence>
<xs:element name="link_type">
<xs:complexType>
<xs:attribute name="type_name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="LinkEndPoints">
<xs:sequence>
<xs:element ref="rspec:source_interface"/>
......
......@@ -46,7 +46,7 @@
<xs:complexType name="LinkContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:group ref="rspec:LinkTypeList"/>
<xs:group ref="rspec:LinkType"/>
<xs:element name="interface_ref">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceRef"/>
......@@ -72,7 +72,6 @@
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="link_type"/>
<xs:attributeGroup ref="rspec:VirtualName"/>
</xs:complexType>
<xs:element name="bandwidth">
......@@ -107,11 +106,24 @@
<xs:element maxOccurs="unbounded" ref="rspec:node_type"/>
</xs:sequence>
</xs:group>
<xs:group name="LinkTypeList">
<xs:group name="LinkType">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:link_type"/>
<xs:element name="link_type">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:field"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:element name="field">
<xs:complexType>
<xs:attribute name="key" use="required"/>
<xs:attribute name="value" use="required"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="VirtualName">
<xs:attribute name="virtual_id" use="required"/>
</xs:attributeGroup>
......@@ -140,7 +152,7 @@
<xs:complexType>
<xs:attribute name="country" use="required"/>
<xs:attribute name="longitude"/>
<xs:attribute name="lattitude"/>
<xs:attribute name="latitude"/>
</xs:complexType>
</xs:element>
<xs:element name="rspec" type="rspec:RSpecContents"/>
......
......@@ -46,11 +46,15 @@
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="link_type">
<xs:complexType>
<xs:attribute name="type_name" use="required"/>
</xs:complexType>
</xs:element>
<xs:group name="LinkTypeSpec">
<xs:sequence>
<xs:element name="link_type">
<xs:complexType>
<xs:attribute name="type_name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="LinkEndPoints">
<xs:sequence>
<xs:element ref="rspec:source_interface"/>
......
......@@ -23,7 +23,7 @@ NodeContents &=
# The LinkMapping will only be available after an assignment
LinkContents &=
attribute link_type { text }? &
# attribute link_type { text }? &
VirtualName &
LinkMapping? &
# Characteristics (bandwidth, latency, loss) which affect traffic.
......
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