vtop.rng 6.08 KB
Newer Older
1 2 3
<?xml version="1.0" encoding="UTF-8"?>
<!--
  
Robert Ricci's avatar
Robert Ricci committed
4
  Copyright (c) 2007-2009 University of Utah and the Flux Group.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
  
  {{{EMULAB-LICENSE
  
  This file is part of the Emulab network testbed software.
  
  This file is free software: you can redistribute it and/or modify it
  under the terms of the GNU Affero General Public License as published by
  the Free Software Foundation, either version 3 of the License, or (at
  your option) any later version.
  
  This file is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
  License for more details.
  
  You should have received a copy of the GNU Affero General Public License
  along with this file.  If not, see <http://www.gnu.org/licenses/>.
  
  }}}
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 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 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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
  
-->
<!--
  
  Description of a virtual topology
  
-->
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" ns="http://emulab.net/resources/vtop/0.2" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <!--
    
    We include the common topology specification schema, but override a few
    elements
    
  -->
  <include href="top.rng">
    <define name="NodeSpec.NodeType">
      <a:documentation>In the vtop file, a node is only allowed to have a single type</a:documentation>
      <ref name="NodeTypeSpec"/>
    </define>
    <define name="LinkSpec.LinkType">
      <a:documentation>In the vtop file, a link is only allowed to have a single type (which
is optional)</a:documentation>
      <optional>
        <ref name="LinkTypeSpec"/>
      </optional>
    </define>
  </include>
  <define name="NodeSpec" combine="interleave">
    <a:documentation>Add an atribute to the 'node' tag that allows you to fix it to a specific
physical node</a:documentation>
    <optional>
      <attribute name="assigned_to"/>
    </optional>
  </define>
  <define name="NodeSpec" combine="interleave">
    <a:documentation>Add an atribute to the 'node' tag that allows you to hint that it might
be a good idea to assign it to a specific physical node</a:documentation>
    <optional>
      <attribute name="hint_to"/>
    </optional>
  </define>
  <define name="VclassSpec">
    <a:documentation>Specify a virtual class - assign allows you to define classes for virtual
nodes, and specify that all nodes using that class should, or must, be
assigned to physical nodes of the same type</a:documentation>
    <element name="vclass">
      <attribute name="name">
        <a:documentation>Name of the virtual class</a:documentation>
      </attribute>
      <choice>
        <a:documentation>Specify whether the vclass is hard (ie. all nodes *must* be of the same
type) or soft (ie. violating it is allowed, but penalize)</a:documentation>
        <element name="hard">
          <empty/>
        </element>
        <group>
          <element name="soft">
            <empty/>
          </element>
          <element name="weight">
            <data type="float">
              <param name="minInclusive">0.0</param>
            </data>
          </element>
        </group>
      </choice>
    </element>
  </define>
  <define name="LinkFlagSpec">
    <a:documentation>"Legacy" link flags used by assign. Will be replaced by properties</a:documentation>
    <optional>
      <element name="nodelay">
        <a:documentation>Indicates that it is not okay to use a delay node to artificially
shape/delay traffic for this link. Replace by using type system.</a:documentation>
        <empty/>
      </element>
    </optional>
    <optional>
      <element name="multiplex_ok">
        <a:documentation>Indicates whether it is okay to multiplex this link with other virtual
links onto the same physical link (old name: emulated) Probably replace
by using the type system (ie. have an 'Ethernet' type that can only
hold one slot,  and an 'Ethernet-tagged' type that can hold more).</a:documentation>
        <empty/>
      </element>
    </optional>
    <optional>
      <element name="trivial_ok">
        <a:documentation>Indicates whether it is okay to satisfy this link with a trivial
(loopback) link. Replace using type system.</a:documentation>
        <empty/>
      </element>
    </optional>
    <optional>
      <element name="fixsrciface">
        <a:documentation>Gives the name of the interface that must be used to satisfy the source
of this link - note that the interface name is given, not the node name</a:documentation>
        <data type="string" datatypeLibrary=""/>
      </element>
    </optional>
    <optional>
      <element name="fixdstiface">
        <a:documentation>Same as fixsrciface, for destination of the link</a:documentation>
        <data type="string" datatypeLibrary=""/>
      </element>
    </optional>
  </define>
  <define name="LinkSpec" combine="interleave">
    <a:documentation>Add LinkFlagSpec to the base link specification, since it is only legal
in the vtop file</a:documentation>
    <ref name="LinkTypeSpec"/>
  </define>
  <start>
    <a:documentation>Virtual topology</a:documentation>
    <element name="vtop">
      <attribute name="pid">
        <a:documentation>Project ID</a:documentation>
      </attribute>
      <attribute name="eid">
        <a:documentation>Experiment ID</a:documentation>
      </attribute>
      <optional>
        <attribute name="gid">
          <a:documentation>Group ID (optional)</a:documentation>
        </attribute>
      </optional>
      <optional>
        <attribute name="uid">
          <a:documentation>User ID owning the experiment (optional)</a:documentation>
        </attribute>
      </optional>
      <zeroOrMore>
        <ref name="NodeSpec">
          <a:documentation>Nodes in the topology - zero or more</a:documentation>
        </ref>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="LinkSpec">
          <a:documentation>Links in the topology - zero or more</a:documentation>
        </ref>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="VclassSpec">
          <a:documentation>Vclasses</a:documentation>
        </ref>
      </zeroOrMore>
    </element>
  </start>
</grammar>