Commit 62e41532 authored by Tarun Prabhu's avatar Tarun Prabhu

All the .rnc files have usages of &= removed and policies moved out.

parent 6ac3afb8
......@@ -10,15 +10,15 @@
default namespace = "http://emulab.net/resources/ptop/0.1"
include "top.rnc"
## A simple policy specification - it may end up that policy does not belong in
## the ptop file directly
TypeLimitSpec = element type_limit {
## Name of the type we are limiting
element type_name { text },
## Limit as to the number of nodes of this type the experiment can use
element type_limit { xsd:integer { minInclusive = "0" } }
include "top.rnc" {
## There are no node attributes unique to ptop
AdditionalNodeAttributeSpec = empty
## Adding an additional optional trivial_bandwidth flag only for ptop
AdditionalNodeFlagSpec = element trivial_bandwidth { xsd:integer }?
## Adding addition flags which are unique to vtop links
AdditionalLinkFlagSpec = empty
}
start = element ptop {
......@@ -27,9 +27,5 @@ start = element ptop {
attribute testbed { text },
## Nodes in the topology - zero or more
## Links in the topology - zero or more
(NodeSpec | LinkSpec)*,
# LinkSpec*,
## Any limits on how many nodes of a particular type this experiment can
## use.
TypeLimitSpec*
(NodeSpec | LinkSpec)*
}
......@@ -32,6 +32,8 @@ NodeContents =
## Name of the node - each node name must be unique within the
## top element
attribute name { text },
## Additional attributes if any
AdditionalNodeAttributeSpec,
## 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
......@@ -48,6 +50,10 @@ NodeContents =
## A node can (by default) have one or more types
NodeSpec.NodeType = NodeTypeSpec+
## Default additional flag spec to empty for the moment.
## It will be overridden in the ptop and vtop files
AdditionalNodeAttributeSpec = empty
## Link types are currently just a siple string. They will almost certainly
## have to get more complicated, for two reasons:
## First, I want to allow virtual links to specify more than one type, so
......@@ -73,6 +79,8 @@ LinkContents =
## that it can be overriden in the virtual topology schema, where you are
## only allowed to have one
LinkSpec.LinkType,
## Add additional specs for a link if necessary
AdditionalLinkFlagSpec,
## Properties of this link
PropertySpec*
......@@ -99,6 +107,10 @@ LinkCharacteristics =
## A link can (by default) have zero or more types
LinkSpec.LinkType = LinkTypeSpec*
## Set the additional link flag spec to empty for now.
## It will be overridden in the ptop and vtop files if required
AdditionalLinkFlagSpec = empty
## "Legacy" assign features and desires - will be phased out in favor of
## properties
FeatureDesireSpec = element fd {
......@@ -124,11 +136,8 @@ LocalSpec = element local {
## "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 additional flags which are only valid in a particular topoplogy
AdditionalNodeFlagSpec,
## 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
......@@ -141,6 +150,10 @@ NodeFlagSpec =
## none of them must be. Possibly expressible with properties?
element disallow_trivial_mix { empty }?
## Set the additional node flag spec to empty for now.
## It will be overridden if required in the ptop and vtop files
AdditionalNodeFlagSpec = empty
## Interfaces
InterfaceSpec = element interface { InterfaceContents }
......@@ -148,7 +161,7 @@ InterfaceContents =
## Name of the node, which must match one of the nodes in this topology
element node_name { text },
## Name of the interface itself
element interface { text },
element interface_name { text },
## Properties of the interface
PropertySpec*
......
......@@ -16,18 +16,27 @@ default namespace = "http://emulab.net/resources/vtop/0.2"
include "top.rnc" {
## In the vtop file, a node is only allowed to have a single type
NodeSpec.NodeType = NodeTypeSpec
## In the vtop file, a link is only allowed to have a single type (which
## is optional)
LinkSpec.LinkType = LinkTypeSpec?
## There are no additional flags specific to vtop
AdditionalNodeFlagSpec = empty
## The assigned_to and hint_to attributes are unique to vtop
AdditionalNodeAttributeSpec =
## Add an atribute to the 'node' tag that allows you to fix it to a specific
## physical node
attribute assigned_to { text }?,
## 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
attribute hint_to { text }?
## Adding addition flags which are unique to vtop links
AdditionalLinkFlagSpec = LinkFlagSpec
}
## Add an atribute to the 'node' tag that allows you to fix it to a specific
## physical node
NodeSpec &= attribute assigned_to { text }?
## 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
NodeSpec &= attribute hint_to { text }?
## 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
......@@ -61,10 +70,6 @@ LinkFlagSpec =
## Same as fixsrciface, for destination of the link
element fixdstiface { string }?
## Add LinkFlagSpec to the base link specification, since it is only legal
## in the vtop file
LinkSpec &= LinkTypeSpec
## Virtual topology
start = element vtop {
## Project ID
......@@ -75,10 +80,6 @@ start = element vtop {
attribute gid { text }?,
## User ID owning the experiment (optional)
attribute uid { text }?,
## Nodes in the topology - zero or more
NodeSpec*,
## Links in the topology - zero or more
LinkSpec*,
## Vclasses
VclassSpec*
## Nodes, links and vclasses in the topology - zero or more
(NodeSpec | LinkSpec | VclassSpec)*
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment