Commit dd4da7e3 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Added initial manifest schema

parent e3c5f95b
<?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/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<xs:include schemaLocation="manifest-top.xsd"/>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2008 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Common definitions for advertisements, requests, and tickets
-->
<xs:element name="node" type="rspec:NodeContents"/>
<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: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: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:attribute name="exclusive"/>
<xs:attribute name="sliver_id" use="required"/>
</xs:complexType>
<xs:element name="interface">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceDecl"/>
</xs:complexType>
</xs:element>
<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: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:choice>
</xs:choice>
<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="link_type"/>
<xs:attributeGroup ref="rspec:VirtualName"/>
<xs:attribute name="sliver_id" use="required"/>
</xs:complexType>
<xs:element name="bandwidth">
<xs:annotation>
<xs:documentation>Bandwidth of the link in kbps</xs:documentation>
</xs:annotation>
<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="NodeTypeList">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:node_type"/>
</xs:sequence>
</xs:group>
<xs:group name="LinkTypeList">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:link_type"/>
</xs:sequence>
</xs:group>
<xs:attributeGroup name="VirtualName">
<xs:attribute name="virtual_id" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="ComponentName">
<xs:attribute name="component_manager_uuid" use="required"/>
<xs:attribute name="component_name"/>
<xs:attribute name="component_uuid" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="ComponentInterfaceDeclName">
<xs:attribute name="component_id" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="ComponentInterfaceRefName">
<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: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>
<xs:element name="location">
<xs:complexType>
<xs:attribute name="country" use="required"/>
<xs:attribute name="longitude"/>
<xs:attribute name="lattitude"/>
</xs:complexType>
</xs:element>
<xs:element name="rspec" type="rspec:RSpecContents"/>
<xs:complexType name="RSpecContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="rspec:node"/>
<xs:element ref="rspec:link"/>
</xs:choice>
<xs:attribute name="generated" type="xs:dateTime"/>
<xs:attribute name="valid_until" type="xs:dateTime"/>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="request"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2008 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Prototype of a request RSpec, to be used by ProtoGENI
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<xs:include schemaLocation="manifest-common.xsd"/>
<!-- The ComponentName will only be available after an assignment -->
<!-- The LinkMapping will only be available after an assignment -->
<!-- The ComponentInterfaceDeclName will only be available after an assignment -->
<!-- The ComponentInterfaceRefName will only be available after an assignment -->
<!--
A request link is mapped to an arbitrary topology which represents
the virtual LAN/link which embodies it. Note that nodes do not
provide any additional information and can be derived from the
interface mapping.
-->
<xs:group name="LinkMapping">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:component_hop"/>
</xs:sequence>
</xs:group>
<xs:element name="component_hop">
<xs:complexType>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="rspec:InterfaceMapping"/>
<xs:attributeGroup ref="rspec:ComponentName"/>
</xs:complexType>
</xs:element>
<!--
Each interface represents a particular physical interface. If that
interface is one of the link end points, it is also mapped to that
virtual interface name.
-->
<xs:group name="InterfaceMapping">
<xs:sequence>
<xs:element name="interface_ref">
<xs:complexType>
<xs:attribute name="component_node_uuid"/>
<xs:attribute name="component_interface_id"/>
<xs:attribute name="virtual_node_id"/>
<xs:attribute name="virtual_interface_id"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
</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/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<!--
EMULAB-COPYRIGHT
Copyright (c) 2005-2007 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Definition of common data structures used for representing topologies -
shared between vtop (virtual topology) and ptop (physical topology)
formats.
-->
<xs:element name="node_type">
<xs:complexType>
<xs:attribute name="type_name" use="required">
<xs:annotation>
<xs:documentation>Name of the type - will almost certainly not be unique</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type_slots" use="required">
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="unlimited"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<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="link_type">
<xs:complexType>
<xs:attribute name="type_name" use="required"/>
</xs:complexType>
</xs:element>
<xs:group name="LinkEndPoints">
<xs:sequence>
<xs:element ref="rspec:source_interface"/>
<xs:element ref="rspec:destination_interface"/>
</xs:sequence>
</xs:group>
<xs:element name="source_interface" type="rspec:InterfaceSpec">
<xs:annotation>
<xs:documentation>First interface for this link</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="destination_interface" type="rspec:InterfaceSpec">
<xs:annotation>
<xs:documentation>Second interface for this link</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group name="LinkCharacteristics">
<xs:sequence>
<xs:element ref="rspec:bandwidth"/>
<xs:element ref="rspec:latency"/>
<xs:element ref="rspec:packet_loss"/>
</xs:sequence>
</xs:group>
<xs:element name="fd">
<xs:complexType>
<xs:attribute name="fd_name" use="required"/>
<xs:attribute name="fd_weight" use="required"/>
<xs:attribute name="violatable">
<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: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: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:complexType name="InterfaceSpec">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:property"/>
</xs:sequence>
<xs:attribute name="node_name" use="required"/>
<xs:attribute name="interface_name" use="required"/>
<xs:attribute name="physical_node_name"/>
<xs:attribute name="physical_interface_name"/>
</xs:complexType>
<xs:group name="InterfaceContents">
<xs:sequence>
<xs:element ref="rspec:node_name"/>
<xs:element ref="rspec:interface_name"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:property">
<xs:annotation>
<xs:documentation>Properties of the interface</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<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="interface_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the interface itself</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:sequence>
<xs:element ref="rspec:property_name"/>
<xs:element ref="rspec:property_value"/>
<xs:element ref="rspec:property_penalty"/>
<xs:element minOccurs="0" ref="rspec:violatable"/>
</xs:sequence>
<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:element name="property_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of this property</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="property_value" type="xs:string"/>
<xs:element name="property_penalty">
<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:element>
<xs:element name="violatable">
<xs:annotation>
<xs:documentation>If this flag is present, not having the property is considered a violation</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
</xs:schema>
#
# EMULAB-COPYRIGHT
# Copyright (c) 2009 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Schema for a manifest RSpec, to be used by ProtoGENI
#
include "request.rnc"
NodeContents &=
attribute sliver_id { text }
LinkContents &=
attribute sliver_id { text }
<?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/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<xs:include schemaLocation="manifest-request.xsd"/>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2009 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Schema for a manifest RSpec, to be used by ProtoGENI
-->
</xs:schema>
......@@ -18,6 +18,19 @@ done
for path in 0.1; do
rm -f ${path}/*.xsd
### Manifest
$TRANGCMD ${path}/manifest.rnc ${path}/manifest.xsd
mv ${path}/top.xsd ${path}/manifest-top.xsd
sed "s/top.xsd/manifest-top.xsd/" ${path}/common.xsd > ${path}/manifest-common.xsd
rm ${path}/common.xsd
sed "s/common.xsd/manifest-common.xsd/" ${path}/request.xsd > ${path}/manifest-request.xsd
rm ${path}/request.xsd
sed "s/request.xsd/manifest-request.xsd/" ${path}/manifest.xsd > ${path}/manifest.tmp
mv ${path}/manifest.tmp ${path}/manifest.xsd
### End Manifest
for schema in ad request; do
$TRANGCMD ${path}/${schema}.rnc ${path}/${schema}.xsd
......
Supports Markdown
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