rspec-request-common.xsd 6.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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="rspec-request-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">
20
      <xs:element ref="rspec:subnode_of"/>
21
22
23
24
25
26
27
28
29
30
      <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"/>
31
          <xs:enumeration value="bgpmux"/>
32
33
34
35
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attributeGroup ref="rspec:VirtualName"/>
36
    <xs:attributeGroup ref="rspec:ComponentName"/>
37
38
    <xs:attribute name="colocate"/>
    <xs:attribute name="virtualization_subtype"/>
39
    <xs:attribute name="exclusive"/>
40
  </xs:complexType>
41
  <xs:element name="subnode_of" type="xs:string"/>
42
43
44
45
46
47
48
49
  <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>
50
        <xs:group ref="rspec:LinkType"/>
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
        <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>
76
    <xs:attribute name="link_type"/>
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    <xs:attributeGroup ref="rspec:VirtualName"/>
  </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>
111
  <xs:group name="LinkType">
112
    <xs:sequence>
113
114
115
      <xs:element name="link_type">
        <xs:complexType>
          <xs:sequence>
116
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:field"/>
117
          </xs:sequence>
118
119
          <xs:attribute name="name"/>
          <xs:attribute name="type_name"/>
120
121
        </xs:complexType>
      </xs:element>
122
123
    </xs:sequence>
  </xs:group>
124
125
126
127
128
129
  <xs:element name="field">
    <xs:complexType>
      <xs:attribute name="key" use="required"/>
      <xs:attribute name="value" use="required"/>
    </xs:complexType>
  </xs:element>
130
131
132
133
  <xs:attributeGroup name="VirtualName">
    <xs:attribute name="virtual_id" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="ComponentName">
134
135
    <xs:attribute name="component_manager_uuid"/>
    <xs:attribute name="component_manager_urn"/>
136
    <xs:attribute name="component_name"/>
137
138
    <xs:attribute name="component_uuid"/>
    <xs:attribute name="component_urn"/>
139
140
141
142
143
  </xs:attributeGroup>
  <xs:attributeGroup name="ComponentInterfaceDeclName">
    <xs:attribute name="component_id" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="ComponentInterfaceRefName">
144
145
    <xs:attribute name="component_node_uuid"/>
    <xs:attribute name="component_node_urn"/>
146
147
148
149
150
151
152
153
    <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"/>
154
    <xs:attribute name="tunnel_netmask"/>
155
156
157
158
159
160
161
    <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"/>
162
      <xs:attribute name="latitude"/>
163
164
165
166
167
168
169
170
171
    </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"/>
172
    <xs:attribute name="generated_by"/>
173
174
175
176
177
178
179
180
181
182
    <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>