ptop.rnc 3.54 KB
Newer Older
1
#
Robert Ricci's avatar
Robert Ricci committed
2
# Copyright (c) 2007-2009 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# 
# {{{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/>.
# 
# }}}
22 23 24 25 26 27 28 29
#

#
# Description of a physical topology
#

default namespace = "http://emulab.net/resources/ptop/0.1"

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
include "top.rnc"

## "Legacy" assign node flags - will be replaced with properties, and in some
## cases, explicit links
NodeFlagSpec =
    ## Gives the amount of bandwidth this node can forward through its loopback
    ## interface. In the future, we will make the loopback interface/link
    ## explicit in the topology
    ## Valid only for physical nodes
    (element trivial_bandwidth { xsd:integer })?,
    ## Specify that this node is a subnode of another node. We MIGHT
    ## try to do this with properties in the future
    ## Valid for both virtual and physical nodes
    element subnode_of { text }?,
    ## Indicates that this node should never be considered identical to any
    ## other node. Could be done with a property
    ## Valid only for physical nodes
    element unique { empty }?,
    ## Indicates that virtual links must either all be trivial (loopback), or
    ## none of them must be. Possibly expressible with properties?
    element disallow_trivial_mix { empty }?

## A node in the topology
NodeSpec = element node { NodeContents }
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
NodeContents =
    ## Name of the node - each node name must be unique within the 
    ## top element
        attribute name { text },
    ## Type specification - we use a named pattern here (defined below), so
    ## that it can be overriden in the virtual topology schema, where you are
    ## only allowed to have one
        NodeTypeSpec+,
    ## Legacy flags
        NodeFlagSpec,
    ## Legacy features and desires
        FeatureDesireSpec*,
    ## Types of virtual nodes that this physical node can satisfy
    ## Desires of this node, which should (or must) be matched by the
    ## physical node we are assigned to
        PropertySpec*

## Links in the topology - zero or more
LinkSpec = element link { LinkContents }

LinkContents =
    ## Name of the link - must be unique in the top
        attribute name { text },
    ## The two interfaces which form the endpoints of this link.
        LinkEndPoints,
    ## The characteristics (bandwidth, latency, loss) which affect traffic.
        LinkCharacteristics,
    ## Type of this link - we use a named pattern here (defined below), so
    ## that it can be overriden in the virtual topology schema, where you are
    ## only allowed to have one
        LinkTypeSpec+,
    ## Properties of this link
        PropertySpec*

## A link can (by default) have zero or more types
## LinkSpec.LinkType = LinkTypeSpec*

92 93 94 95 96 97
start = element ptop {
    ## The testbed that this physical topology came from - will be used for
    ## federation
    attribute testbed { text },
    ## Nodes in the topology - zero or more
    ## Links in the topology - zero or more
98
    (NodeSpec | LinkSpec)*
99
}