Commit 3bb55572 authored by Jonathon Duerig's avatar Jonathon Duerig

Include schema files for emulab extension.

parent 540807dd
<?xml version="1.0" encoding="UTF-8"?>
<!-- The default namespace for the ptop extension -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1">
<xs:include schemaLocation="top_extension.xsd"/>
<xs:group name="NodeFlagSpec">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="emulab:trivial_bandwidth"/>
<xs:element ref="emulab:unique"/>
</xs:choice>
</xs:sequence>
</xs:group>
<xs:element name="trivial_bandwidth">
<xs:annotation>
<xs:documentation>Gives the amount of bandwidth this node can forward through its loopback
interface. In the future, we will make the loopback interface/link
explicit in the topology
Valid only for physical nodes</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="value" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="unique">
<xs:annotation>
<xs:documentation>Indicates that this node should never be considered identical to any
other node. Could be done with a property
Valid only for physical nodes</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:element name="policy">
<xs:complexType>
<xs:attributeGroup ref="emulab:PolicySpecContents"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="PolicySpecContents">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="desire"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="limit" use="required">
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="disallow"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="set_type_limit">
<xs:complexType>
<xs:attributeGroup ref="emulab:TypeLimitContents"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="TypeLimitContents">
<xs:attribute name="typeclass" use="required"/>
<xs:attribute name="count" use="required" type="xs:integer"/>
</xs:attributeGroup>
<xs:element name="interface">
<xs:complexType>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2010 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Definition of common extensions in topologies -
shared between vtop (virtual topology) and ptop (physical topology)
extensions.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1">
<xs:element name="node_type">
<xs:complexType>
<xs:attribute name="type_slots" use="required"/>
<xs:attribute name="static">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="fd">
<xs:complexType>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation>Name of this feature or desire
element fd_name { text },</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="weight" use="required">
<xs:annotation>
<xs:documentation>Weight assocated with the feature or desire
element fd_weight { xsd:float },</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="violatable">
<xs:annotation>
<xs:documentation>A flag indicating whether or not a failure to match the desire with a
a feature is a constraint violation
element violatable { empty }?,</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="global_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="local_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="GlobalSpec">
<xs:annotation>
<xs:documentation>GlobalSpec = element global {
element operator { "OnceOnly" | "FirstFree" }
}</xs:documentation>
</xs:annotation>
<xs:attribute name="global_operator" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="LocalSpec">
<xs:annotation>
<xs:documentation>LocalSpec = element local {
element operator { "+" }
attribute local_operator { "+" }
}</xs:documentation>
</xs:annotation>
<xs:attribute name="local_operator" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="property">
<xs:complexType>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation>Name of this property</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" use="required">
<xs:annotation>
<xs:documentation>Value associated with this property
TODO: Add ranges and other types from rspec</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="penalty" use="required">
<xs:annotation>
<xs:documentation>The penalty associated with this property</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="violatable">
<xs:annotation>
<xs:documentation>If this flag is present, not having the property is considered a violation</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="global_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="local_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2010 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Description of Emulab-specific extensions for a virtual topology
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1">
<xs:include schemaLocation="top_extension.xsd"/>
<!--
We include the common topology extension specification schema,
-->
<xs:group name="HintToSpec">
<xs:annotation>
<xs:documentation>Provides hints to assign regarding the physical node to which this
virtual node should be mapped</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" ref="emulab:hint_to"/>
</xs:sequence>
</xs:group>
<xs:element name="hint_to">
<xs:complexType>
<xs:attribute name="value" use="required"/>
</xs:complexType>
</xs:element>
<xs:group name="NodeFlagSpec">
<xs:annotation>
<xs:documentation>"Legacy" assign node flags - will be replaced with properties, and in some
cases, explicit links</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" ref="emulab:disallow_trivial_mix"/>
</xs:sequence>
</xs:group>
<xs:element name="disallow_trivial_mix">
<xs:annotation>
<xs:documentation>Indicates that virtual links must either all be trivial (loopback), or
none of them must be. Possibly expressible with properties?</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:group name="LinkFlagSpec">
<xs:annotation>
<xs:documentation>"Legacy" link flags used by assign. Will be replaced by properties</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="emulab:nodelay"/>
<xs:element ref="emulab:multiplex_ok"/>
<xs:element ref="emulab:trivial_ok"/>
</xs:choice>
</xs:sequence>
</xs:group>
<xs:element name="nodelay">
<xs:annotation>
<xs:documentation>Indicates that it is not okay to use a delay node to artificially
shape/delay traffic for this link. Replace by using type system.</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:element name="multiplex_ok">
<xs:annotation>
<xs:documentation>Indicates whether it is okay to multiplex this link with other virtual
links onto the same physical link (old name: emulated) Probably replace
by using the type system (ie. have an 'Ethernet' type that can only
hold one slot, and an 'Ethernet-tagged' type that can hold more).</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:element name="trivial_ok">
<xs:annotation>
<xs:documentation>Indicates whether it is okay to satisfy this link with a trivial
(loopback) link. Replace using type system.</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:element name="fixedinterface">
<xs:complexType>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="vclass">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="emulab:physical_type"/>
</xs:sequence>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation>Name of the virtual class</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="weight" use="required">
<xs:annotation>
<xs:documentation>Specify whether the vclass is hard (ie. all nodes *must* be of the same
type) or soft (ie. violating it is allowed, but penalize)</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="hard"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="physical_type">
<xs:annotation>
<xs:documentation>The physical types associated with this vclass</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
<!--
Information about the virtual node in the nodes table assigned to a
particular node.
-->
<xs:element name="vnode">
<xs:complexType>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
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