Commit 5ee4c96f authored by Tarun Prabhu's avatar Tarun Prabhu

Created a new folder for the extension schemas and updated xsdgen to compile them during install.

parent 1158b739
# The default namespace for the ptop extension
default namespace = "http://www.emulab.net/resources/rspec/ext/ptop/1"
include "top_extension.rnc"
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 }?
start = NodeFlagSpec | FeatureDesireSpec
\ No newline at end of file
#
# EMULAB-COPYRIGHT
# Copyright (c) 2010 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Definition of common extensions in topologies -
# shared between vtop (virtual topology) and ptop (physical topology)
# extensions.
#
TypeSlotsSpec = element ext_node_type {
attribute type_slots { text },
attribute static { "true" }?
}
## "Legacy" assign features and desires - will be phased out in favor of
## properties
FeatureDesireSpec = element fd {
## Name of this feature or desire
## element fd_name { text },
attribute fd_name { text },
## Weight assocated with the feature or desire
## element fd_weight { xsd:float },
attribute fd_weight { text },
## A flag indicating whether or not a failure to match the desire with a
## a feature is a constraint violation
##element violatable { empty }?,
attribute violatable { "true" }?,
## Type information expressed in features and desires
(GlobalSpec | LocalSpec)?
}
## GlobalSpec = element global {
## element operator { "OnceOnly" | "FirstFree" }
##}
GlobalSpec = attribute global_operator { "OnceOnly" | "FirstFree" }
## LocalSpec = element local {
## element operator { "+" }
## attribute local_operator { "+" }
##}
LocalSpec = attribute local_operator { "+" }
## Properties - new: replacements for features and desires. Not yet implemented
## in assign, and not yet fully fleshed out in this schema.
PropertySpec = element property {
## Name of this property
attribute property_name { text },
## Value associated with this property
## TODO: Add ranges and other types from rspec
attribute property_value { text | xsd:float },
## The penalty associated with this property
attribute property_penalty { xsd:float { minInclusive = "0.0" } },
## If this flag is present, not having the property is considered a violation
attribute violatable { "true" }?,
## TODO: Add more operators - equality, range test, etc
## Flags for special types of operators
(GlobalSpec | LocalSpec)?
}
#
# EMULAB-COPYRIGHT
# Copyright (c) 2010 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Description of Emulab-specific extensions for a virtual topology
#
default namespace = "http://www.emulab.net/resources/rspec/ext/vtop/1"
#
# We include the common topology extension specification schema,
#
include "top_extension.rnc"
# For a fixed node - th
AssignedToSpec = element node_assigned_to { text }?
HintToSpec = element node_hint_to { text }?
## "Legacy" assign node flags - will be replaced with properties, and in some
## cases, explicit links
NodeFlagSpec =
## 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 node_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 node_unique { empty }?,
## Indicates that virtual links must either all be trivial (loopback), or
## none of them must be. Possibly expressible with properties?
element node_disallow_trivial_mix { empty }?
## "Legacy" link flags used by assign. Will be replaced by properties
LinkFlagSpec =
## Indicates that it is not okay to use a delay node to artificially
## shape/delay traffic for this link. Replace by using type system.
element link_nodelay { empty }?,
## 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).
element link_multiplex_ok { empty }?,
## Indicates whether it is okay to satisfy this link with a trivial
## (loopback) link. Replace using type system.
element link_trivial_ok { empty }?,
## 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
element link_fixsrciface { string }?,
## Same as fixsrciface, for destination of the link
element link_fixdstiface { string }?
## 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
VclassSpec = element vtop_vclass {
## Name of the virtual class
attribute name { text },
## Specify whether the vclass is hard (ie. all nodes *must* be of the same
## type) or soft (ie. violating it is allowed, but penalize)
(element hard { empty } |
(element soft { empty },
element weight { xsd:float { minInclusive = "0.0" } } )),
element physical_type { text }+
}
## The path to which a link has been mapped
## For the moment only 2 interface mappings are specified because
## every link only has 2 interfaces for the moment.
LinkMapping =
element link_component_hop {
attribute assigned_to { text },
InterfaceMapping,
InterfaceMapping
}+
# Each interface represents a particular physical interface. If that
# interface is one of the link end points, it is also mapped to that
# virtual node and its interface name.
InterfaceMapping = element interface {
attribute physical_node_name { text },
attribute physical_interface_name { text },
attribute virtual_node_name { text }?,
attribute virtual_interface_name { text }?
}
start = AssignedToSpec | HintToSpec | NodeFlagSpec | LinkFlagSpec | VclassSpec
| LinkMapping
\ No newline at end of file
......@@ -51,6 +51,16 @@ for path in ext/gre-tunnel/1; do
done
done
# Compile extensions
for path in ext/emulab/1/; do
for schema in top_extension ptop_extension vtop_extension; do
if [ -e ${path}/${schema}.rnc ]; then
$TRANGCMD ${path}/${schema}.rnc ${path}/${schema}.xsd
sudo scp ${path}/${schema}.xsd ${path}/${schema}.rnc ops.emulab.net:/usr/local/www.geni/data/trac/resources/rspec/${path}/
fi
done
done
cd ../security
for path in ext/policy/1; do
......@@ -59,3 +69,4 @@ for path in ext/policy/1; do
sudo scp ${path}/policy.xsd ${path}/policy.rnc ops.emulab.net:/usr/local/www.geni/data/trac/resources/credential/${path}/
fi
done
......@@ -2988,7 +2988,7 @@ sub PrintRspec($;$)
$root->setAttribute("xmlns", "http://www.protgeni.net/resources/rspec/2");
$root->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
$root->setAttribute("xsi:schemaLocation",
"http://www.protogeni.net/resources/rspec/2");
"http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd");
$root->setAttribute("type", "request");
$root->setAttribute("generated",
POSIX::strftime("20%y-%m-%dT%H:%M:%S", gmtime($creation)));
......
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