All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

rspec-ad-common.xsd 6.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?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-ad-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:choice>
        <xs:group ref="rspec:NodeTypeList"/>
        <xs:element ref="rspec:interface"/>
      </xs:choice>
      <xs:choice>
        <xs:element ref="rspec:location"/>
        <xs:element ref="rspec:available"/>
27
        <xs:element ref="rspec:exclusive"/>
28
        <xs:element ref="rspec:cloud"/>
29 30 31 32 33 34 35 36 37
      </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"/>
38
          <xs:enumeration value="bgpmux"/>
39 40 41 42 43 44 45
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attributeGroup ref="rspec:ComponentName"/>
  </xs:complexType>
  <xs:element name="interface" type="rspec:InterfaceDecl"/>
  <xs:element name="available" type="xs:boolean"/>
46
  <xs:element name="exclusive" type="xs:boolean"/>
47 48 49
  <xs:element name="cloud">
    <xs:complexType/>
  </xs:element>
50 51 52
  <xs:complexType name="LinkContents">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:choice>
53
        <xs:group ref="rspec:LinkType"/>
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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:element ref="rspec:interface_ref"/>
      </xs:choice>
      <xs:choice>
        <xs:element ref="rspec:bandwidth"/>
        <xs:element ref="rspec:latency"/>
        <xs:element ref="rspec:packet_loss"/>
      </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:attributeGroup ref="rspec:ComponentName"/>
  </xs:complexType>
  <xs:element name="interface_ref">
    <xs:complexType>
      <xs:attributeGroup ref="rspec:InterfaceRef"/>
    </xs:complexType>
  </xs:element>
  <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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
  <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:complexType name="InterfaceDecl">
    <xs:sequence>
      <xs:element minOccurs="0" ref="rspec:monitoring"/>
    </xs:sequence>
    <xs:attributeGroup ref="rspec:ComponentInterfaceDeclName"/>
150 151 152 153 154 155 156
    <xs:attribute name="role">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="control"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
157
    <xs:attribute name="public_ipv4"/>
158 159 160 161 162 163 164 165 166 167 168 169 170
  </xs:complexType>
  <xs:element name="monitoring">
    <xs:complexType>
      <xs:attribute name="user_traffic"/>
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="InterfaceRef">
    <xs:attributeGroup ref="rspec:ComponentInterfaceRefName"/>
  </xs:attributeGroup>
  <xs:element name="location">
    <xs:complexType>
      <xs:attribute name="country" use="required"/>
      <xs:attribute name="longitude"/>
171
      <xs:attribute name="latitude"/>
172 173 174 175 176
    </xs:complexType>
  </xs:element>
  <xs:element name="rspec" type="rspec:RSpecContents"/>
  <xs:complexType name="RSpecContents">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
177 178 179 180
      <xs:choice>
        <xs:element ref="rspec:node"/>
        <xs:element ref="rspec:link"/>
      </xs:choice>
181 182 183 184
      <xs:choice>
        <xs:element ref="rspec:external_ref"/>
        <xs:element ref="rspec:bgp_prefix"/>
      </xs:choice>
185 186
    </xs:choice>
    <xs:attribute name="generated" type="xs:dateTime"/>
187
    <xs:attribute name="generated_by"/>
188 189 190 191 192 193 194 195 196 197
    <xs:attribute name="valid_until" type="xs:dateTime"/>
    <xs:attribute name="type" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="advertisement"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
</xs:schema>