# # EMULAB-COPYRIGHT # Copyright (c) 2005-2007 University of Utah and the Flux Group. # All rights reserved. # # # Definition of common data structures used for representing topologies - # shared between vtop (virtual topology) and ptop (physical topology) # formats. # ## Representation of a single node type NodeTypeSpec = element node_type { ## Name of the type - will almost certainly not be unique attribute type_name { text } & ## How many virtual nodes of this type this physical node can ## handle. attribute type_slots { xsd:integer { minInclusive = "0" } | "unlimited" } & ##element unlimited { empty }?, ## A flag that indicates that this physical node *always* ## has this type - a node is only allowed to have one dynamic ## (ie. not flagged as static) type at a time, but any number ## of static types at a time ## element static { empty }? attribute static { "true" }? & NodeTypeContents } NodeTypeContents = 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 ## that we can ask for links that are, say, 'ethernet or loopback' ## Second, I want to have a lot more control over links that get mapped to ## multi-hop paths ## TODO: MAYBE this should be combined with NodeTypeSpec LinkTypeSpec = element link_type { attribute type_name { text } } ## A link has two endpoints. Right now, they are order ## independent. But they might become order-dependant later. LinkEndPoints = ## First interface for this link element source_interface { InterfaceSpec }, ## Second interface for this link element destination_interface { InterfaceSpec } ## Link characterstics which affect traffic. ## TODO: In the future, the bandwidth, latency, and packet loss will be ## moved to features and/or properties LinkCharacteristics = ## Bandwidth of the link in kbps element bandwidth { xsd:float { minExclusive = "0.0" } }, ## Latency of the link in ms element latency { xsd:float { minInclusive = "0.0" } }, ## Static packet loss probability of the link as a fraction ## (ie. 0.01 == 1%) element packet_loss { xsd:float { minInclusive = "0.0" } } ## "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 { "+" } ## Interfaces ## InterfaceSpec = element interface { InterfaceContents } InterfaceSpec = attribute node_name { text }, attribute interface_name { text }, attribute physical_node_name { text }?, attribute physical_interface_name { text }?, PropertySpec* 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_name { text }, ## Properties of the interface PropertySpec* ## 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 element property_name { text }, ## Value associated with this property ## TODO: Add ranges and other types from rspec element property_value { text | xsd:float }, ## The penalty associated with this property element property_penalty { xsd:float { minInclusive = "0.0" } }, ## If this flag is present, not having the property is considered a violation element violatable { empty }?, ## TODO: Add more operators - equality, range test, etc ## Flags for special types of operators (GlobalSpec | LocalSpec)? }