Commit 12213ea4 authored by Jonathon Duerig's avatar Jonathon Duerig

Changed merge names so that new node attributes are merged inside of the node....

Changed merge names so that new node attributes are merged inside of the node. Same of link/interface.
parent a33930bc
......@@ -10,7 +10,7 @@
include "../../assign/top.rnc" {
# Add some more stuff to nodes
NodeSpec &=
NodeContents &=
# Semantic change - the 'name' of a (physical) node is now
# solely for human-readability. It's the UUID, which we add here,
# that is the "true" identifier (ie. used in identifying link
......@@ -29,14 +29,14 @@ include "../../assign/top.rnc" {
element avaiable { xsd:boolean }?,
# Optionally, include the URL for this component's CM
CMURLSpec?
LinkSpec &=
LinkContents &=
# Semantic change - the 'name' of a (physical) link is now
# solely for human-readability. It's the UUID, which we add here,
# that is the "true" identifier.
attribute uuid { text },
attribute name { text }?
# TODO: Might add a URL for the CM for a link in the future
InterfaceSpec &=
InterfaceContents &=
# Semantic change - the 'name' in an interface is solely for human
# readability. It's the UUID that is used to uniquely identify a
# node.
......
......@@ -14,14 +14,11 @@
-->
<!-- Add some more stuff to nodes -->
<xs:group name="NodeSpec">
<xs:complexType name="NodeContents">
<xs:sequence>
<xs:element minOccurs="0" ref="avaiable"/>
<xs:element minOccurs="0" ref="component_manager_URL"/>
</xs:sequence>
</xs:group>
<xs:element name="avaiable" type="xs:boolean"/>
<xs:attributeGroup name="NodeSpec">
<xs:attribute name="uuid" use="required"/>
<xs:attribute name="name"/>
<xs:attribute name="virtualization_type">
......@@ -34,36 +31,26 @@
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="LinkSpec">
</xs:complexType>
<xs:element name="avaiable" type="xs:boolean"/>
<xs:attributeGroup name="LinkContents">
<xs:attribute name="uuid" use="required"/>
<xs:attribute name="name"/>
</xs:attributeGroup>
<!-- TODO: Might add a URL for the CM for a link in the future -->
<xs:attributeGroup name="InterfaceSpec">
<xs:attributeGroup name="InterfaceContents">
<xs:attribute name="node_uuid" use="required"/>
<xs:attribute name="node_name"/>
</xs:attributeGroup>
<xs:element name="component_manager_URL" type="xs:anyURI"/>
<xs:element name="rspec">
<xs:complexType>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="NodeSpec"/>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="node"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="link"/>
</xs:sequence>
<xs:attribute name="generated" use="required" type="xs:dateTime"/>
<xs:attribute name="valid_until" use="required" type="xs:dateTime"/>
<xs:attribute name="uuid"/>
<xs:attribute name="name"/>
<xs:attribute name="virtualization_type">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="raw"/>
<xs:enumeration value="trellis-vserver"/>
<xs:enumeration value="planetlab-vserver"/>
<xs:enumeration value="emulab-vnode"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="uuid"/>
<xs:attribute name="name"/>
</xs:complexType>
</xs:element>
</xs:schema>
......@@ -16,14 +16,11 @@
-->
<!-- Add some more stuff to nodes -->
<xs:group name="NodeSpec">
<xs:complexType name="NodeContents">
<xs:sequence>
<xs:element minOccurs="0" ref="credential:avaiable"/>
<xs:element minOccurs="0" ref="credential:component_manager_URL"/>
</xs:sequence>
</xs:group>
<xs:element name="avaiable" type="xs:boolean"/>
<xs:attributeGroup name="NodeSpec">
<xs:attribute name="uuid" use="required"/>
<xs:attribute name="name"/>
<xs:attribute name="virtualization_type">
......@@ -36,36 +33,26 @@
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="LinkSpec">
</xs:complexType>
<xs:element name="avaiable" type="xs:boolean"/>
<xs:attributeGroup name="LinkContents">
<xs:attribute name="uuid" use="required"/>
<xs:attribute name="name"/>
</xs:attributeGroup>
<!-- TODO: Might add a URL for the CM for a link in the future -->
<xs:attributeGroup name="InterfaceSpec">
<xs:attributeGroup name="InterfaceContents">
<xs:attribute name="node_uuid" use="required"/>
<xs:attribute name="node_name"/>
</xs:attributeGroup>
<xs:element name="component_manager_URL" type="xs:anyURI"/>
<xs:element name="rspec">
<xs:complexType>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="credential:NodeSpec"/>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="credential:node"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="credential:link"/>
</xs:sequence>
<xs:attribute name="generated" use="required" type="xs:dateTime"/>
<xs:attribute name="valid_until" use="required" type="xs:dateTime"/>
<xs:attribute name="uuid"/>
<xs:attribute name="name"/>
<xs:attribute name="virtualization_type">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="raw"/>
<xs:enumeration value="trellis-vserver"/>
<xs:enumeration value="planetlab-vserver"/>
<xs:enumeration value="emulab-vnode"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="uuid"/>
<xs:attribute name="name"/>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/credential/0.1" xmlns:sig="http://www.w3.org/2000/09/xmldsig#" xmlns:credential="http://www.protogeni.net/resources/credential/0.1">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="sig.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!--
EMULAB-COPYRIGHT
......@@ -25,17 +23,17 @@
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element ref="credential:type_slots"/>
<xs:element ref="credential:unlimited"/>
<xs:element ref="type_slots"/>
<xs:element ref="unlimited"/>
</xs:choice>
<xs:element minOccurs="0" ref="credential:static"/>
<xs:element minOccurs="0" ref="static"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="type_slots">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
......@@ -45,12 +43,30 @@
<xs:element name="static">
<xs:complexType/>
</xs:element>
<xs:element name="node" type="NodeContents"/>
<xs:complexType name="NodeContents">
<xs:sequence>
<xs:group ref="NodeSpec.NodeType"/>
<xs:group ref="NodeFlagSpec">
<xs:annotation>
<xs:documentation>Legacy flags</xs:documentation>
</xs:annotation>
</xs:group>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="fd">
<xs:annotation>
<xs:documentation>Legacy features and desires</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
</xs:complexType>
<xs:group name="NodeSpec.NodeType">
<xs:annotation>
<xs:documentation>A node can (by default) have one or more types</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="credential:node_type"/>
<xs:element maxOccurs="unbounded" ref="node_type"/>
</xs:sequence>
</xs:group>
<xs:element name="link_type">
......@@ -60,19 +76,70 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="link" type="LinkContents"/>
<xs:complexType name="LinkContents">
<xs:sequence>
<xs:element ref="source_interface"/>
<xs:element ref="destination_interface"/>
<xs:element ref="bandwidth"/>
<xs:element ref="latency"/>
<xs:element ref="packet_loss"/>
<xs:group ref="LinkSpec.LinkType"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property">
<xs:annotation>
<xs:documentation>Properties of this link</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation>Name of the link - must be unique in the top</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="source_interface" type="InterfaceSpec"/>
<xs:element name="destination_interface" type="InterfaceSpec">
<xs:annotation>
<xs:documentation>Second interface for this link</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="bandwidth">
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minExclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="latency">
<xs:annotation>
<xs:documentation>Latency of the link in ms</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="packet_loss">
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:group name="LinkSpec.LinkType">
<xs:annotation>
<xs:documentation>A link can (by default) have zero or more types</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="credential:link_type"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="link_type"/>
</xs:sequence>
</xs:group>
<xs:element name="fd">
<xs:complexType>
<xs:sequence>
<xs:element ref="credential:fd_name"/>
<xs:element ref="credential:fd_weight"/>
<xs:element ref="fd_name"/>
<xs:element ref="fd_weight"/>
<xs:element minOccurs="0" name="violatable">
<xs:complexType/>
</xs:element>
......@@ -81,7 +148,7 @@
<xs:documentation>Type information expressed in features and desires</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="credential:global"/>
<xs:element ref="global"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
......@@ -92,7 +159,7 @@
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element ref="credential:local"/>
<xs:element ref="local"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
......@@ -123,10 +190,10 @@
</xs:element>
<xs:group name="NodeFlagSpec">
<xs:sequence>
<xs:element ref="credential:trivial_bandwidth"/>
<xs:element minOccurs="0" ref="credential:subnode_of"/>
<xs:element minOccurs="0" ref="credential:unique"/>
<xs:element minOccurs="0" ref="credential:disallow_trivial_mix"/>
<xs:element minOccurs="0" ref="trivial_bandwidth"/>
<xs:element minOccurs="0" ref="subnode_of"/>
<xs:element minOccurs="0" ref="unique"/>
<xs:element minOccurs="0" ref="disallow_trivial_mix"/>
</xs:sequence>
</xs:group>
<xs:element name="trivial_bandwidth" type="xs:integer"/>
......@@ -137,12 +204,40 @@
<xs:element name="disallow_trivial_mix">
<xs:complexType/>
</xs:element>
<xs:complexType name="InterfaceSpec">
<xs:annotation>
<xs:documentation>Interfaces</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="interface" type="InterfaceContents"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InterfaceContents">
<xs:sequence>
<xs:element ref="node_name"/>
<xs:element name="interface" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the interface itself</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property">
<xs:annotation>
<xs:documentation>Properties of the interface</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="node_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the node, which must match one of the nodes in this topology</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:sequence>
<xs:element ref="credential:property_name"/>
<xs:element ref="credential:property_value"/>
<xs:element ref="credential:property_penalty"/>
<xs:element ref="property_name"/>
<xs:element ref="property_value"/>
<xs:element ref="property_penalty"/>
<xs:element minOccurs="0" name="violatable">
<xs:annotation>
<xs:documentation>If this flag is present, not having the property is considered a violation</xs:documentation>
......@@ -151,7 +246,7 @@
</xs:element>
<xs:choice minOccurs="0">
<xs:sequence>
<xs:element ref="credential:global"/>
<xs:element ref="global"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
......@@ -162,7 +257,7 @@
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element ref="credential:local"/>
<xs:element ref="local"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
......
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