Merge xsd from upstream.
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Mon, 12 Jan 2009 21:03:24 +0000 (21:03 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Mon, 12 Jan 2009 21:03:24 +0000 (21:03 +0000)
rspec/planetlab.xsd

index 6be14cb..c607602 100644 (file)
@@ -1,61 +1,85 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <xsd:schema xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:pl="http://www.planet-lab.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ecore:nsPrefix="pl" ecore:package="planetlab.planetlab" targetNamespace="http://www.planet-lab.org">
-  <xsd:import namespace="http://www.eclipse.org/emf/2002/Ecore" schemaLocation="../../../plugin/org.eclipse.emf.ecore/model/Ecore.xsd"/>
-  <xsd:element ecore:ignore="true" name="Network" type="pl:Network"/>
-  <xsd:element ecore:ignore="true" name="Node" type="pl:Node"/>
-  <xsd:element ecore:ignore="true" name="Link" type="pl:Link"/>
-  <xsd:element ecore:ignore="true" name="Interface" type="pl:Interface"/>
+  <xsd:import namespace="http://www.eclipse.org/emf/2002/Ecore" schemaLocation="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.xsd"/>
   <xsd:element ecore:ignore="true" name="RSpec" type="pl:RSpec"/>
-  <xsd:complexType name="Network">
-    <xsd:sequence>
-      <xsd:element ecore:resolveProxies="true" maxOccurs="unbounded" minOccurs="0" name="links" type="pl:Link"/>
-    </xsd:sequence>
-    <xsd:attribute ecore:reference="pl:Node" name="nodes" use="required">
+  <xsd:element ecore:ignore="true" name="NetSpec" type="pl:NetSpec"/>
+  <xsd:element ecore:ignore="true" name="NodeSpec" type="pl:NodeSpec"/>
+  <xsd:element ecore:ignore="true" name="LinkSpec" type="pl:LinkSpec"/>
+  <xsd:element ecore:ignore="true" name="IfSpec" type="pl:IfSpec"/>
+  <xsd:element ecore:ignore="true" name="SwitchSpec" type="pl:SwitchSpec"/>
+  <xsd:complexType name="RSpec">
+    <xsd:attribute ecore:reference="pl:NetSpec" name="networks" use="required">
       <xsd:simpleType>
         <xsd:list itemType="xsd:anyURI"/>
       </xsd:simpleType>
     </xsd:attribute>
+    <xsd:attribute ecore:name="start_time" name="start_time" type="ecore:EDate"/>
+    <xsd:attribute name="duration" type="ecore:EDate"/>
   </xsd:complexType>
-  <xsd:complexType name="Node">
-    <xsd:attribute default="&quot;&quot;" ecore:changeable="false" ecore:unsettable="false" name="name" type="ecore:EString"/>
-    <xsd:attribute default="&quot;&quot;" ecore:unsettable="false" name="type" type="ecore:EString"/>
-    <xsd:attribute default="&quot;&quot;" ecore:name="init_script" ecore:unsettable="false" name="init_script" type="ecore:EString"/>
-    <xsd:attribute default="0" ecore:name="cpu_min" ecore:unsettable="false" name="cpu_min" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="cpu_share" ecore:unsettable="false" name="cpu_share" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="cpu_pct" ecore:unsettable="false" name="cpu_pct" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="disk_max" ecore:unsettable="false" name="disk_max" type="ecore:EBigInteger"/>
-    <xsd:attribute ecore:name="net_if" ecore:reference="pl:Interface" name="net_if" use="required">
+  <xsd:complexType name="NetSpec">
+    <xsd:sequence>
+      <xsd:element ecore:resolveProxies="true" maxOccurs="unbounded" minOccurs="0" name="links" type="pl:LinkSpec"/>
+    </xsd:sequence>
+    <xsd:attribute name="name" type="ecore:EString"/>
+    <xsd:attribute ecore:reference="pl:NodeSpec" name="nodes" use="required">
       <xsd:simpleType>
         <xsd:list itemType="xsd:anyURI"/>
       </xsd:simpleType>
     </xsd:attribute>
+    <xsd:attribute ecore:name="start_time" name="start_time" type="ecore:EDate"/>
+    <xsd:attribute name="duration" type="ecore:EDate"/>
   </xsd:complexType>
-  <xsd:complexType name="Link">
-    <xsd:attribute default="&quot;&quot;" ecore:changeable="false" ecore:unsettable="false" name="type" type="ecore:EString"/>
-    <xsd:attribute default="0" ecore:unsettable="false" name="bw" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="min_alloc" ecore:unsettable="false" name="min_alloc" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="max_alloc" ecore:unsettable="false" name="max_alloc" type="ecore:EBigInteger"/>
-    <xsd:attribute ecore:changeable="false" ecore:reference="pl:Interface" name="endpoint" use="required">
+  <xsd:complexType name="NodeSpec">
+    <xsd:sequence>
+      <xsd:element ecore:unique="true" maxOccurs="1000" name="name" nillable="true" type="ecore:EString"/>
+    </xsd:sequence>
+    <xsd:attribute default="&quot;&quot;" ecore:unsettable="false" name="type" type="ecore:EString"/>
+    <xsd:attribute default="" ecore:name="init_params" ecore:unsettable="false" name="init_params" type="ecore:EByteArray"/>
+    <xsd:attribute default="0" ecore:name="cpu_min" ecore:unsettable="false" name="cpu_min" type="ecore:EInt"/>
+    <xsd:attribute default="0" ecore:name="cpu_share" ecore:unsettable="false" name="cpu_share" type="ecore:EInt"/>
+    <xsd:attribute default="0" ecore:name="cpu_pct" ecore:unsettable="false" name="cpu_pct" type="ecore:EInt"/>
+    <xsd:attribute default="0" ecore:name="disk_max" ecore:unsettable="false" name="disk_max" type="ecore:EInt"/>
+    <xsd:attribute ecore:name="net_if" ecore:reference="pl:IfSpec" name="net_if" use="required">
       <xsd:simpleType>
         <xsd:list itemType="xsd:anyURI"/>
       </xsd:simpleType>
     </xsd:attribute>
+    <xsd:attribute ecore:name="start_time" name="start_time" type="ecore:EDate"/>
+    <xsd:attribute name="duration" type="ecore:EDate"/>
   </xsd:complexType>
-  <xsd:complexType name="Interface">
-    <xsd:attribute default="&quot;&quot;" ecore:changeable="false" ecore:unsettable="false" name="name" type="ecore:EString"/>
+  <xsd:complexType name="LinkSpec">
+    <xsd:sequence>
+      <xsd:element default="0" ecore:unique="true" maxOccurs="unbounded" minOccurs="0" name="bw" type="ecore:EInt"/>
+      <xsd:element default="0" ecore:name="max_alloc" ecore:unique="true" maxOccurs="unbounded" minOccurs="0" name="max_alloc" type="ecore:EInt"/>
+    </xsd:sequence>
     <xsd:attribute default="&quot;&quot;" ecore:changeable="false" ecore:unsettable="false" name="type" type="ecore:EString"/>
-    <xsd:attribute default="&quot;&quot;" ecore:changeable="false" ecore:unsettable="false" name="addr" type="ecore:EString"/>
-    <xsd:attribute default="0" ecore:name="min_rate" ecore:unsettable="false" name="min_rate" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="max_rate" ecore:unsettable="false" name="max_rate" type="ecore:EBigInteger"/>
-    <xsd:attribute default="0" ecore:name="max_kbyte" ecore:unsettable="false" name="max_kbyte" type="ecore:EBigInteger"/>
-  </xsd:complexType>
-  <xsd:complexType name="RSpec">
-    <xsd:attribute ecore:reference="pl:Network" name="networks" use="required">
+    <xsd:attribute ecore:name="init_params" name="init_params" type="ecore:EByteArray"/>
+    <xsd:attribute default="0" ecore:name="min_alloc" ecore:unsettable="false" name="min_alloc" type="ecore:EInt"/>
+    <xsd:attribute ecore:changeable="false" ecore:reference="pl:IfSpec" name="endpoint" use="required">
       <xsd:simpleType>
         <xsd:list itemType="xsd:anyURI"/>
       </xsd:simpleType>
     </xsd:attribute>
-    <xsd:attribute ecore:name="start_time" name="start_time" type="ecore:EBigInteger"/>
-    <xsd:attribute name="duration" type="ecore:EBigInteger"/>
+    <xsd:attribute ecore:name="start_time" name="start_time" type="ecore:EDate"/>
+    <xsd:attribute name="duration" type="ecore:EDate"/>
+  </xsd:complexType>
+  <xsd:complexType name="IfSpec">
+    <xsd:sequence>
+      <xsd:element default="5452595" ecore:name="max_kbyte" ecore:unique="true" ecore:unsettable="true" maxOccurs="unbounded" minOccurs="0" name="max_kbyte" type="ecore:EInt"/>
+    </xsd:sequence>
+    <xsd:attribute name="name" type="ecore:EString"/>
+    <xsd:attribute name="addr" type="ecore:EString"/>
+    <xsd:attribute default="" ecore:changeable="false" ecore:unsettable="false" name="type" type="ecore:EString"/>
+    <xsd:attribute default="" ecore:name="init_params" ecore:unsettable="false" name="init_params" type="ecore:EByteArray"/>
+    <xsd:attribute default="0" ecore:name="min_rate" ecore:unsettable="false" name="min_rate" type="ecore:EInt"/>
+    <xsd:attribute default="12207" ecore:name="max_rate" ecore:unsettable="false" name="max_rate" type="ecore:EInt"/>
+    <xsd:attribute default="false" ecore:name="ip_spoof" ecore:unsettable="false" name="ip_spoof" type="ecore:EBoolean"/>
+  </xsd:complexType>
+  <xsd:complexType name="SwitchSpec">
+    <xsd:complexContent>
+      <xsd:extension base="pl:NodeSpec">
+        <xsd:attribute default="0" ecore:name="fib_max" ecore:unsettable="false" name="fib_max" type="ecore:EInt"/>
+      </xsd:extension>
+    </xsd:complexContent>
   </xsd:complexType>
 </xsd:schema>