omf_sfa 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. data/.gitignore +24 -0
  2. data/Gemfile +6 -0
  3. data/README.md +211 -0
  4. data/Rakefile +23 -0
  5. data/bin/parse_rspec.rb +167 -0
  6. data/etc/omf-sfa/omf-sfa-am.yaml +12 -0
  7. data/examples/exogeni5nodemanifest.rspec +105 -0
  8. data/examples/instageni5nodemanifest.rspec +150 -0
  9. data/lib/omf-sfa/am/am-rest/REST_API.md +301 -0
  10. data/lib/omf-sfa/am/am-rest/account_handler.rb +145 -0
  11. data/lib/omf-sfa/am/am-rest/am_rest_server.rb +255 -0
  12. data/lib/omf-sfa/am/am-rest/api_template.html +48 -0
  13. data/lib/omf-sfa/am/am-rest/config.ru +110 -0
  14. data/lib/omf-sfa/am/am-rest/resource_handler.rb +178 -0
  15. data/lib/omf-sfa/am/am-rest/rest_handler.rb +573 -0
  16. data/lib/omf-sfa/am/am-rest/session_authenticator.rb +130 -0
  17. data/lib/omf-sfa/am/am-rpc/abstract_rpc_service.rb +60 -0
  18. data/lib/omf-sfa/am/am-rpc/am_authorizer.rb +161 -0
  19. data/lib/omf-sfa/am/am-rpc/am_rpc_api.rb +450 -0
  20. data/lib/omf-sfa/am/am-rpc/am_rpc_service.rb +402 -0
  21. data/lib/omf-sfa/am/am_liaison.rb +93 -0
  22. data/lib/omf-sfa/am/am_manager.rb +859 -0
  23. data/lib/omf-sfa/am/am_runner.rb +108 -0
  24. data/lib/omf-sfa/am/am_scheduler.rb +146 -0
  25. data/lib/omf-sfa/am/am_server.rb +194 -0
  26. data/lib/omf-sfa/am/config.ru +122 -0
  27. data/lib/omf-sfa/am/credential.rb +145 -0
  28. data/lib/omf-sfa/am/default_authorizer.rb +44 -0
  29. data/lib/omf-sfa/am/privilege_credential.rb +76 -0
  30. data/lib/omf-sfa/am/signature.rb +37 -0
  31. data/lib/omf-sfa/am/user_credential.rb +56 -0
  32. data/lib/omf-sfa/am.rb +7 -0
  33. data/lib/omf-sfa/model/abstract_prop_description.rb +87 -0
  34. data/lib/omf-sfa/model/model_class_description.rb +145 -0
  35. data/lib/omf-sfa/model/model_data_prop_description.rb +28 -0
  36. data/lib/omf-sfa/model/model_obj_prop_description.rb +49 -0
  37. data/lib/omf-sfa/model/ontology.rb +169 -0
  38. data/lib/omf-sfa/resource/README.md +24 -0
  39. data/lib/omf-sfa/resource/channel.rb +49 -0
  40. data/lib/omf-sfa/resource/comp_group.rb +41 -0
  41. data/lib/omf-sfa/resource/component_lease.rb +10 -0
  42. data/lib/omf-sfa/resource/constants.rb +24 -0
  43. data/lib/omf-sfa/resource/group_component.rb +35 -0
  44. data/lib/omf-sfa/resource/group_membership.rb +17 -0
  45. data/lib/omf-sfa/resource/gurn.rb +187 -0
  46. data/lib/omf-sfa/resource/interface.rb +78 -0
  47. data/lib/omf-sfa/resource/ip.rb +48 -0
  48. data/lib/omf-sfa/resource/link.rb +29 -0
  49. data/lib/omf-sfa/resource/node.rb +75 -0
  50. data/lib/omf-sfa/resource/oaccount.rb +94 -0
  51. data/lib/omf-sfa/resource/ocomponent.rb +134 -0
  52. data/lib/omf-sfa/resource/ogroup.rb +106 -0
  53. data/lib/omf-sfa/resource/olease.rb +61 -0
  54. data/lib/omf-sfa/resource/oproperty.rb +178 -0
  55. data/lib/omf-sfa/resource/oreference.rb +15 -0
  56. data/lib/omf-sfa/resource/oresource.rb +491 -0
  57. data/lib/omf-sfa/resource/project.rb +28 -0
  58. data/lib/omf-sfa/resource/project_membership.rb +13 -0
  59. data/lib/omf-sfa/resource/sfa_base.rb +544 -0
  60. data/lib/omf-sfa/resource/user.rb +25 -0
  61. data/lib/omf-sfa/resource.rb +20 -0
  62. data/lib/omf-sfa/util/create_sample_testbed.rb +68 -0
  63. data/lib/omf-sfa/util/load_from_sfa_xml.rb +65 -0
  64. data/lib/omf-sfa/version.rb +4 -0
  65. data/lib/omf_sfa.rb +5 -0
  66. data/omf_sfa.gemspec +46 -0
  67. data/owl/README +3 -0
  68. data/owl/ben-6509.rdf +1377 -0
  69. data/owl/ben-dell.rdf +586 -0
  70. data/owl/ben-dtn.rdf +1698 -0
  71. data/owl/ben.rdf +1335 -0
  72. data/owl/collections.owl +309 -0
  73. data/owl/compute.owl +1486 -0
  74. data/owl/domain.owl +444 -0
  75. data/owl/dtn.owl +1165 -0
  76. data/owl/ec2.owl +385 -0
  77. data/owl/ethernet.owl +466 -0
  78. data/owl/eucalyptus.owl +431 -0
  79. data/owl/id-mp-Request1.rdf +247 -0
  80. data/owl/itu-grid.owl +147 -0
  81. data/owl/kansei.owl +511 -0
  82. data/owl/layer.owl +645 -0
  83. data/owl/location.owl +117 -0
  84. data/owl/mass.rdf +608 -0
  85. data/owl/nlr.rdf +901 -0
  86. data/owl/orca.owl +181 -0
  87. data/owl/planetlab.owl +124 -0
  88. data/owl/protogeni.owl +467 -0
  89. data/owl/request-6509-2.rdf +150 -0
  90. data/owl/request-6509-3.rdf +158 -0
  91. data/owl/request-6509.rdf +199 -0
  92. data/owl/request.owl +222 -0
  93. data/owl/storage.owl +511 -0
  94. data/owl/topology.owl +608 -0
  95. data/schema/rspec-v3/ad-common.xsd +269 -0
  96. data/schema/rspec-v3/ad-reservation.rnc +12 -0
  97. data/schema/rspec-v3/ad-reservation.rng +28 -0
  98. data/schema/rspec-v3/ad-reservation.xsd +13 -0
  99. data/schema/rspec-v3/ad.rnc +151 -0
  100. data/schema/rspec-v3/ad.xsd +77 -0
  101. data/schema/rspec-v3/any-extension-schema.xsd +38 -0
  102. data/schema/rspec-v3/any-extension.rnc +30 -0
  103. data/schema/rspec-v3/common.rnc +185 -0
  104. data/schema/rspec-v3/manifest-common.xsd +244 -0
  105. data/schema/rspec-v3/manifest-request.xsd +95 -0
  106. data/schema/rspec-v3/manifest.rnc +62 -0
  107. data/schema/rspec-v3/manifest.xsd +34 -0
  108. data/schema/rspec-v3/request-common.xsd +219 -0
  109. data/schema/rspec-v3/request-reservation.rnc +12 -0
  110. data/schema/rspec-v3/request-reservation.xsd +13 -0
  111. data/schema/rspec-v3/request.rnc +118 -0
  112. data/schema/rspec-v3/request.xsd +94 -0
  113. data/share/assets/css/default.css +147 -0
  114. data/share/assets/css/rest_api.css +0 -0
  115. data/share/assets/network.html +28 -0
  116. data/share/assets/network.js +82 -0
  117. data/spec/am/am-rest/common.rb +29 -0
  118. data/spec/am/am-rest/resource_group_handler_XspecX.rb +97 -0
  119. data/spec/am/am-rest/resource_handler_spec.rb +204 -0
  120. data/spec/am/am-rpc/sfa_methods_spec.rb +150 -0
  121. data/spec/am/am_manager_spec.rb +307 -0
  122. data/spec/am/am_scheduler_spec.rb +57 -0
  123. data/spec/am/common.rb +24 -0
  124. data/spec/resource/common.rb +31 -0
  125. data/spec/resource/node_spec.rb +171 -0
  126. data/spec/resource/oaccount_spec.rb +92 -0
  127. data/spec/resource/ocomponent_spec.rb +225 -0
  128. data/spec/resource/ogroup_spec.rb +93 -0
  129. data/spec/resource/oresource_spec.rb +208 -0
  130. data/spec/resource_and_leases_spec.rb +377 -0
  131. data/test/OLD_FILES/assertion1.xml +117 -0
  132. data/test/OLD_FILES/greeter_spec.rb +15 -0
  133. data/test/OLD_FILES/mongo_test.rb +45 -0
  134. data/test/OLD_FILES/req-sfa-2.xml +6 -0
  135. data/test/OLD_FILES/req-sfa-g.xml +8 -0
  136. data/test/OLD_FILES/req-sfa-g2.xml +10 -0
  137. data/test/OLD_FILES/req-sfa-g3.xml +14 -0
  138. data/test/OLD_FILES/req-sfa.xml +6 -0
  139. data/test/OLD_FILES/req1.xml +22 -0
  140. data/test/OLD_FILES/req1b.xml +15 -0
  141. data/test/OLD_FILES/rspec-test.xml +1867 -0
  142. data/test/OLD_FILES/test.rb +67 -0
  143. data/test/OLD_FILES/test2.rb +32 -0
  144. data/test/am/am_manager_rspec_tests.rb +378 -0
  145. data/test/am/am_manager_tests.rb +518 -0
  146. data/test/am/am_scheduler_tests.rb +173 -0
  147. data/test/resource/olease_test.rb +74 -0
  148. data/test/sfa_requests/request.xml +5 -0
  149. data/test/sfa_requests/request1.xml +5 -0
  150. data/test/sfa_requests/request2.xml +5 -0
  151. data/test/sfa_requests/request3.xml +5 -0
  152. metadata +601 -0
@@ -0,0 +1,269 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ GENIPUBLIC-COPYRIGHT
5
+ Copyright (c) 2011 University of Utah and the Flux Group.
6
+ All rights reserved.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and/or hardware specification (the "Work") to
10
+ deal in the Work without restriction, including without limitation the
11
+ rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ and/or sell copies of the Work, and to permit persons to whom the Work
13
+ is furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Work.
17
+
18
+ THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
25
+ IN THE WORK.
26
+ -->
27
+ <!--
28
+
29
+ Common definitions for advertisements, requests, etc
30
+ Version 3
31
+
32
+ -->
33
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.geni.net/resources/rspec/3" xmlns:rspec="http://www.geni.net/resources/rspec/3">
34
+ <xs:include schemaLocation="any-extension-schema.xsd"/>
35
+ <xs:element name="rspec" type="rspec:RSpecContents"/>
36
+ <xs:complexType name="RSpecContents">
37
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
38
+ <xs:choice>
39
+ <xs:group ref="rspec:AnyExtension"/>
40
+ <xs:element ref="rspec:node"/>
41
+ <xs:element ref="rspec:link"/>
42
+ </xs:choice>
43
+ <xs:choice>
44
+ <xs:element ref="rspec:external_ref"/>
45
+ <xs:element ref="rspec:type_relation"/>
46
+ </xs:choice>
47
+ </xs:choice>
48
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
49
+ <xs:attribute name="generated" type="xs:dateTime"/>
50
+ <xs:attribute name="generated_by"/>
51
+ <xs:attribute name="expires" type="xs:dateTime"/>
52
+ <xs:attribute name="type" use="required">
53
+ <xs:simpleType>
54
+ <xs:restriction base="xs:token">
55
+ <xs:enumeration value="advertisement"/>
56
+ </xs:restriction>
57
+ </xs:simpleType>
58
+ </xs:attribute>
59
+ </xs:complexType>
60
+ <xs:element name="external_ref" type="rspec:ExternalReferenceContents"/>
61
+ <xs:element name="type_relation" type="rspec:TypeRelationContents"/>
62
+ <xs:element name="node" type="rspec:NodeContents"/>
63
+ <xs:element name="link" type="rspec:LinkContents"/>
64
+ <xs:complexType name="NodeContents">
65
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
66
+ <xs:choice>
67
+ <xs:group ref="rspec:AnyExtension"/>
68
+ <xs:element ref="rspec:relation"/>
69
+ <xs:element ref="rspec:location"/>
70
+ <xs:element ref="rspec:services"/>
71
+ <xs:element ref="rspec:interface"/>
72
+ </xs:choice>
73
+ <xs:choice>
74
+ <xs:element ref="rspec:available"/>
75
+ <xs:element ref="rspec:cloud"/>
76
+ <xs:element ref="rspec:hardware_type"/>
77
+ <xs:element name="sliver_type">
78
+ <xs:complexType>
79
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
80
+ <xs:group ref="rspec:SliverTypeContents"/>
81
+ <xs:element name="disk_image">
82
+ <xs:complexType>
83
+ <xs:complexContent>
84
+ <xs:extension base="rspec:DiskImageContents">
85
+ <xs:attribute name="default"/>
86
+ </xs:extension>
87
+ </xs:complexContent>
88
+ </xs:complexType>
89
+ </xs:element>
90
+ </xs:choice>
91
+ <xs:attributeGroup ref="rspec:SliverTypeContents"/>
92
+ </xs:complexType>
93
+ </xs:element>
94
+ </xs:choice>
95
+ </xs:choice>
96
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
97
+ <xs:attribute name="component_id" use="required"/>
98
+ <xs:attribute name="component_manager_id" use="required"/>
99
+ <xs:attribute name="component_name"/>
100
+ <xs:attribute name="exclusive" use="required" type="xs:boolean"/>
101
+ </xs:complexType>
102
+ <xs:element name="relation" type="rspec:RelationContents"/>
103
+ <xs:element name="location" type="rspec:LocationContents"/>
104
+ <xs:element name="services" type="rspec:ServiceContents"/>
105
+ <xs:element name="interface" type="rspec:InterfaceContents"/>
106
+ <xs:element name="available" type="rspec:AvailableContents"/>
107
+ <xs:element name="cloud">
108
+ <xs:complexType>
109
+ <xs:group ref="rspec:AnyExtension"/>
110
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
111
+ </xs:complexType>
112
+ </xs:element>
113
+ <xs:complexType name="ServiceContents">
114
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
115
+ <xs:choice>
116
+ <xs:group ref="rspec:AnyExtension"/>
117
+ <xs:element ref="rspec:login"/>
118
+ </xs:choice>
119
+ <xs:choice>
120
+ <xs:element ref="rspec:install"/>
121
+ <xs:element ref="rspec:execute"/>
122
+ </xs:choice>
123
+ </xs:choice>
124
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
125
+ </xs:complexType>
126
+ <xs:element name="login" type="rspec:LoginServiceContents"/>
127
+ <xs:element name="install" type="rspec:InstallServiceContents"/>
128
+ <xs:element name="execute" type="rspec:ExecuteServiceContents"/>
129
+ <xs:complexType name="LoginServiceContents">
130
+ <xs:group ref="rspec:AnyExtension"/>
131
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
132
+ <xs:attribute name="authentication" use="required"/>
133
+ <xs:attribute name="hostname"/>
134
+ <xs:attribute name="port"/>
135
+ </xs:complexType>
136
+ <xs:complexType name="RelationContents">
137
+ <xs:group ref="rspec:AnyExtension"/>
138
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
139
+ <xs:attribute name="type" use="required"/>
140
+ <xs:attribute name="component_id" use="required"/>
141
+ </xs:complexType>
142
+ <xs:complexType name="LocationContents">
143
+ <xs:group ref="rspec:AnyExtension"/>
144
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
145
+ <xs:attribute name="country" use="required"/>
146
+ <xs:attribute name="longitude"/>
147
+ <xs:attribute name="latitude"/>
148
+ </xs:complexType>
149
+ <xs:complexType name="InterfaceContents">
150
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
151
+ <xs:choice>
152
+ <xs:group ref="rspec:AnyExtension"/>
153
+ <xs:element ref="rspec:ip"/>
154
+ </xs:choice>
155
+ <xs:element ref="rspec:monitoring"/>
156
+ </xs:choice>
157
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
158
+ <xs:attribute name="component_id" use="required"/>
159
+ <xs:attribute name="component_name"/>
160
+ <xs:attribute name="role"/>
161
+ <xs:attribute name="public_ipv4"/>
162
+ </xs:complexType>
163
+ <xs:element name="ip" type="rspec:IpContents"/>
164
+ <xs:element name="monitoring" type="rspec:MonitoringContents"/>
165
+ <xs:complexType name="IpContents">
166
+ <xs:group ref="rspec:AnyExtension"/>
167
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
168
+ <xs:attribute name="address" use="required"/>
169
+ <xs:attribute name="netmask"/>
170
+ <xs:attribute name="type"/>
171
+ </xs:complexType>
172
+ <xs:complexType name="LinkContents">
173
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
174
+ <xs:choice>
175
+ <xs:group ref="rspec:AnyExtension"/>
176
+ <xs:element ref="rspec:property"/>
177
+ <xs:element ref="rspec:link_type"/>
178
+ <xs:element ref="rspec:interface_ref"/>
179
+ </xs:choice>
180
+ <xs:element ref="rspec:component_manager"/>
181
+ </xs:choice>
182
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
183
+ <xs:attribute name="component_id" use="required"/>
184
+ <xs:attribute name="component_name"/>
185
+ </xs:complexType>
186
+ <xs:element name="property" type="rspec:LinkPropertyContents"/>
187
+ <xs:element name="interface_ref" type="rspec:InterfaceRefContents"/>
188
+ <xs:element name="component_manager">
189
+ <xs:complexType>
190
+ <xs:attribute name="name" use="required"/>
191
+ </xs:complexType>
192
+ </xs:element>
193
+ <xs:complexType name="InterfaceRefContents">
194
+ <xs:group ref="rspec:AnyExtension"/>
195
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
196
+ <xs:attribute name="component_id" use="required"/>
197
+ </xs:complexType>
198
+ <!-- The unidirectional network properties of a link. -->
199
+ <xs:complexType name="LinkPropertyContents">
200
+ <xs:group ref="rspec:AnyExtension"/>
201
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
202
+ <xs:attribute name="source_id" use="required"/>
203
+ <xs:attribute name="dest_id" use="required"/>
204
+ <xs:attribute name="capacity"/>
205
+ <xs:attribute name="latency"/>
206
+ <xs:attribute name="packet_loss"/>
207
+ </xs:complexType>
208
+ <xs:element name="link_type">
209
+ <xs:complexType>
210
+ <xs:group ref="rspec:AnyExtension"/>
211
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
212
+ <xs:attribute name="name" use="required"/>
213
+ <xs:attribute name="class"/>
214
+ </xs:complexType>
215
+ </xs:element>
216
+ <xs:element name="link_class">
217
+ <xs:complexType>
218
+ <xs:group ref="rspec:AnyExtension"/>
219
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
220
+ <xs:attribute name="name" use="required"/>
221
+ </xs:complexType>
222
+ </xs:element>
223
+ <xs:group name="SliverType">
224
+ <xs:sequence>
225
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
226
+ <xs:element name="sliver_type">
227
+ <xs:complexType>
228
+ <xs:group ref="rspec:SliverTypeContents"/>
229
+ <xs:attributeGroup ref="rspec:SliverTypeContents"/>
230
+ </xs:complexType>
231
+ </xs:element>
232
+ <xs:element name="disk_image">
233
+ <xs:complexType>
234
+ <xs:complexContent>
235
+ <xs:extension base="rspec:DiskImageContents">
236
+ <xs:attribute name="default"/>
237
+ </xs:extension>
238
+ </xs:complexContent>
239
+ </xs:complexType>
240
+ </xs:element>
241
+ </xs:choice>
242
+ </xs:sequence>
243
+ </xs:group>
244
+ <xs:attributeGroup name="SliverType">
245
+ <xs:attribute name="default"/>
246
+ </xs:attributeGroup>
247
+ <xs:group name="SliverTypeContents">
248
+ <xs:sequence>
249
+ <xs:group ref="rspec:AnyExtension"/>
250
+ </xs:sequence>
251
+ </xs:group>
252
+ <xs:attributeGroup name="SliverTypeContents">
253
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
254
+ <xs:attribute name="name" use="required"/>
255
+ </xs:attributeGroup>
256
+ <xs:complexType name="HardwareTypeContents">
257
+ <xs:group ref="rspec:AnyExtension"/>
258
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
259
+ <xs:attribute name="name" use="required"/>
260
+ </xs:complexType>
261
+ <xs:complexType name="DiskImageContents">
262
+ <xs:group ref="rspec:AnyExtension"/>
263
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
264
+ <xs:attribute name="name" use="required"/>
265
+ <xs:attribute name="os"/>
266
+ <xs:attribute name="version"/>
267
+ <xs:attribute name="description"/>
268
+ </xs:complexType>
269
+ </xs:schema>
@@ -0,0 +1,12 @@
1
+ default namespace = "http://nitlab.inf.uth.gr/schema/sfa/rspec/1"
2
+
3
+ start = Lease
4
+
5
+ Lease = element lease {
6
+ (attribute leaseID { xsd:ID } &
7
+ attribute uuid { text } &
8
+ attribute slice_id { text } &
9
+ attribute valid_from { xsd:dateTime } &
10
+ attribute valid_until { xsd:dateTime })
11
+ | (attribute leaseREF { xsd:IDREF })
12
+ }
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar ns="http://nitlab.inf.uth.gr/schema/sfa/rspec/1" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <start>
4
+ <ref name="Lease"/>
5
+ </start>
6
+ <define name="Lease">
7
+ <element name="lease">
8
+ <choice>
9
+ <interleave>
10
+ <attribute name="leaseID">
11
+ <data type="ID"/>
12
+ </attribute>
13
+ <attribute name="uuid"/>
14
+ <attribute name="slice_id"/>
15
+ <attribute name="valid_from">
16
+ <data type="dateTime"/>
17
+ </attribute>
18
+ <attribute name="valid_until">
19
+ <data type="dateTime"/>
20
+ </attribute>
21
+ </interleave>
22
+ <attribute name="leaseREF">
23
+ <data type="IDREF"/>
24
+ </attribute>
25
+ </choice>
26
+ </element>
27
+ </define>
28
+ </grammar>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://nitlab.inf.uth.gr/schema/sfa/rspec/1" xmlns:rspec="http://nitlab.inf.uth.gr/schema/sfa/rspec/1">
3
+ <xs:element name="lease">
4
+ <xs:complexType>
5
+ <xs:attribute name="leaseID" type="xs:ID"/>
6
+ <xs:attribute name="uuid"/>
7
+ <xs:attribute name="slice_id"/>
8
+ <xs:attribute name="valid_from" type="xs:dateTime"/>
9
+ <xs:attribute name="valid_until" type="xs:dateTime"/>
10
+ <xs:attribute name="leaseREF" type="xs:IDREF"/>
11
+ </xs:complexType>
12
+ </xs:element>
13
+ </xs:schema>
@@ -0,0 +1,151 @@
1
+ #
2
+ # GENIPUBLIC-COPYRIGHT
3
+ # Copyright (c) 2011 University of Utah and the Flux Group.
4
+ # All rights reserved.
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining
7
+ # a copy of this software and/or hardware specification (the "Work") to
8
+ # deal in the Work without restriction, including without limitation the
9
+ # rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Work, and to permit persons to whom the Work
11
+ # is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Work.
15
+ #
16
+ # THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
23
+ # IN THE WORK.
24
+
25
+ #
26
+ # Prototype of an advertisement RSpec, to be used by GENI
27
+ # Version 3
28
+ #
29
+
30
+ default namespace = "http://www.geni.net/resources/rspec/3"
31
+
32
+ include "common.rnc"
33
+
34
+ NodeContents &=
35
+ # Component identifiers
36
+ attribute component_id { text } &
37
+ attribute component_manager_id { text } &
38
+ attribute component_name { text }? &
39
+
40
+ # Indicates whether the node is in sharing mode: exclusive is true if
41
+ # the component manager will agree to promise not to share it.
42
+ attribute exclusive { xsd:boolean } &
43
+
44
+ # Indicate whether or not this node is available - the idea is that a
45
+ # full dump of the static physical topology will not include this, but
46
+ # that we can later get updates that include only this attribute (and a
47
+ # URN)
48
+ element available { AvailableContents } &
49
+
50
+ # Marks this node as a stand-in for a large network rather than a
51
+ # single machine. This means that other AMs can make external
52
+ # references to this node without a corresponding external reference
53
+ # in this advertisement. It also means that it makes sense for
54
+ # multiple physical links to connect to the same interface.
55
+ element cloud { AnyExtension } &
56
+
57
+ # Node type. This includes both hardware and sliver type elements:
58
+ HardwareType* &
59
+ element sliver_type {
60
+ SliverTypeContents &
61
+ element disk_image {
62
+ DiskImageContents &
63
+ attribute default { text }?
64
+ }*
65
+ }*
66
+
67
+ SliverType &=
68
+ element disk_image {
69
+ DiskImageContents &
70
+ attribute default { text }?
71
+ }* &
72
+ attribute default { text }?
73
+
74
+
75
+ RelationContents &=
76
+ attribute component_id { text }
77
+
78
+ AvailableContents =
79
+ AnyExtension &
80
+ # Indictates current availability
81
+ attribute now { xsd:boolean }
82
+
83
+ LinkContents &=
84
+ # Component identifiers
85
+ attribute component_id { text } &
86
+ element component_manager { attribute name { text } }* &
87
+ attribute component_name { text }?
88
+
89
+ InterfaceContents &=
90
+ attribute component_id { text } &
91
+ attribute component_name { text }? &
92
+ element monitoring { MonitoringContents }? &
93
+ # role should usually be one of:
94
+ # 'control' (interface used to communicate with AM and/or the world)
95
+ # 'experimental' (interface used to communicate within the topology
96
+ # 'mixed' (interface used for both of the above
97
+ attribute role { text }? &
98
+ attribute public_ipv4 { text }?
99
+
100
+ MonitoringContents &=
101
+ AnyExtension &
102
+ # True if user traffic moves through this interface and is available
103
+ # for monitoring.
104
+ attribute user_traffic { xsd:boolean }?
105
+
106
+ InterfaceRefContents &=
107
+ attribute component_id { text }
108
+
109
+ # Reference to components managed by other component managers.
110
+ ExternalReferenceContents &=
111
+ AnyExtension &
112
+ attribute component_id { text } &
113
+ attribute component_manager_id { text }?
114
+
115
+ ServiceContents &=
116
+ # Install services include download and extraction of a file at
117
+ # experiment startup.
118
+ element install { InstallServiceContents }* &
119
+
120
+ # Execute services include initialization scripts
121
+ element execute { ExecuteServiceContents }*
122
+
123
+ InstallServiceContents &=
124
+ AnyExtension &
125
+ # Type(s) of archives supported
126
+ # file_type should usually be one of 'tar.gz' or 'tar.bz2' for tarballs
127
+ attribute file_type { text }
128
+
129
+ ExecuteServiceContents &=
130
+ AnyExtension &
131
+ # Shell environment allowed
132
+ # Should usually be 'sh' to indicate a generic unix shell
133
+ # environment for the script.
134
+ attribute shell { text }
135
+
136
+ TypeRelationContents &=
137
+ AnyExtension &
138
+ element hardware_type { HardwareTypeContents }* &
139
+ element sliver_type { SliverTypeContents }* &
140
+ element disk_image { DiskImageContents }*
141
+
142
+ RSpecContents &=
143
+ attribute type { "advertisement" } &
144
+ element external_ref {
145
+ ExternalReferenceContents
146
+ }* &
147
+ element type_relation {
148
+ TypeRelationContents
149
+ }*
150
+
151
+ start = RSpec
@@ -0,0 +1,77 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ GENIPUBLIC-COPYRIGHT
5
+ Copyright (c) 2011 University of Utah and the Flux Group.
6
+ All rights reserved.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and/or hardware specification (the "Work") to
10
+ deal in the Work without restriction, including without limitation the
11
+ rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ and/or sell copies of the Work, and to permit persons to whom the Work
13
+ is furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Work.
17
+
18
+ THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
25
+ IN THE WORK.
26
+ -->
27
+ <!--
28
+
29
+ Prototype of an advertisement RSpec, to be used by GENI
30
+ Version 3
31
+
32
+ -->
33
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.geni.net/resources/rspec/3" xmlns:rspec="http://www.geni.net/resources/rspec/3">
34
+ <xs:include schemaLocation="ad-common.xsd"/>
35
+ <xs:complexType name="AvailableContents">
36
+ <xs:group ref="rspec:AnyExtension"/>
37
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
38
+ <xs:attribute name="now" use="required" type="xs:boolean"/>
39
+ </xs:complexType>
40
+ <xs:complexType name="MonitoringContents">
41
+ <xs:group ref="rspec:AnyExtension"/>
42
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
43
+ <xs:attribute name="user_traffic" type="xs:boolean"/>
44
+ </xs:complexType>
45
+ <!-- Reference to components managed by other component managers. -->
46
+ <xs:complexType name="ExternalReferenceContents">
47
+ <xs:group ref="rspec:AnyExtension"/>
48
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
49
+ <xs:attribute name="component_id" use="required"/>
50
+ <xs:attribute name="component_manager_id"/>
51
+ </xs:complexType>
52
+ <xs:complexType name="InstallServiceContents">
53
+ <xs:group ref="rspec:AnyExtension"/>
54
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
55
+ <xs:attribute name="file_type" use="required"/>
56
+ </xs:complexType>
57
+ <xs:complexType name="ExecuteServiceContents">
58
+ <xs:group ref="rspec:AnyExtension"/>
59
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
60
+ <xs:attribute name="shell" use="required"/>
61
+ </xs:complexType>
62
+ <xs:complexType name="TypeRelationContents">
63
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
64
+ <xs:group ref="rspec:AnyExtension"/>
65
+ <xs:element ref="rspec:hardware_type"/>
66
+ <xs:element name="sliver_type">
67
+ <xs:complexType>
68
+ <xs:group ref="rspec:SliverTypeContents"/>
69
+ <xs:attributeGroup ref="rspec:SliverTypeContents"/>
70
+ </xs:complexType>
71
+ </xs:element>
72
+ <xs:element name="disk_image" type="rspec:DiskImageContents"/>
73
+ </xs:choice>
74
+ <xs:attributeGroup ref="rspec:AnyExtension"/>
75
+ </xs:complexType>
76
+ <xs:element name="hardware_type" type="rspec:HardwareTypeContents"/>
77
+ </xs:schema>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ GENIPUBLIC-COPYRIGHT
5
+ Copyright (c) 2011 University of Utah and the Flux Group.
6
+ All rights reserved.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and/or hardware specification (the "Work") to
10
+ deal in the Work without restriction, including without limitation the
11
+ rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ and/or sell copies of the Work, and to permit persons to whom the Work
13
+ is furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Work.
17
+
18
+ THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
25
+ IN THE WORK.
26
+ -->
27
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.geni.net/resources/rspec/3" >
28
+ <xs:group name="AnyExtension">
29
+ <xs:sequence>
30
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
31
+ <xs:any namespace="##other" processContents="lax"/>
32
+ </xs:choice>
33
+ </xs:sequence>
34
+ </xs:group>
35
+ <xs:attributeGroup name="AnyExtension">
36
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
37
+ </xs:attributeGroup>
38
+ </xs:schema>
@@ -0,0 +1,30 @@
1
+ #
2
+ # GENIPUBLIC-COPYRIGHT
3
+ # Copyright (c) 2011 University of Utah and the Flux Group.
4
+ # All rights reserved.
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining
7
+ # a copy of this software and/or hardware specification (the "Work") to
8
+ # deal in the Work without restriction, including without limitation the
9
+ # rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Work, and to permit persons to whom the Work
11
+ # is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Work.
15
+ #
16
+ # THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
23
+ # IN THE WORK.
24
+
25
+ default namespace rs = "http://www.geni.net/resources/rspec/3"
26
+
27
+ AnyExtension =
28
+ attribute * - rs:* { text }* &
29
+ element * - rs:* { text }* &
30
+ element * - rs:* { AnyExtension }*