| 1 |
# |
|---|
| 2 |
# EMULAB-COPYRIGHT |
|---|
| 3 |
# Copyright (c) 2005-2007 University of Utah and the Flux Group. |
|---|
| 4 |
# All rights reserved. |
|---|
| 5 |
# |
|---|
| 6 |
|
|---|
| 7 |
# |
|---|
| 8 |
# Definition of common data structures used for representing topologies - |
|---|
| 9 |
# shared between vtop (virtual topology) and ptop (physical topology) |
|---|
| 10 |
# formats. |
|---|
| 11 |
# |
|---|
| 12 |
|
|---|
| 13 |
## Representation of a single node type |
|---|
| 14 |
NodeTypeSpec = element node_type { |
|---|
| 15 |
## Name of the type - will almost certainly not be unique |
|---|
| 16 |
attribute type_name { text } & |
|---|
| 17 |
## How many virtual nodes of this type this physical node can |
|---|
| 18 |
## handle. |
|---|
| 19 |
attribute type_slots { xsd:integer { minInclusive = "0" } | "unlimited" } & |
|---|
| 20 |
##element unlimited { empty }?, |
|---|
| 21 |
## A flag that indicates that this physical node *always* |
|---|
| 22 |
## has this type - a node is only allowed to have one dynamic |
|---|
| 23 |
## (ie. not flagged as static) type at a time, but any number |
|---|
| 24 |
## of static types at a time |
|---|
| 25 |
## element static { empty }? |
|---|
| 26 |
attribute static { "true" }? & |
|---|
| 27 |
NodeTypeContents |
|---|
| 28 |
} |
|---|
| 29 |
|
|---|
| 30 |
NodeTypeContents = empty |
|---|
| 31 |
|
|---|
| 32 |
## Link types are currently just a siple string. They will almost certainly |
|---|
| 33 |
## have to get more complicated, for two reasons: |
|---|
| 34 |
## First, I want to allow virtual links to specify more than one type, so |
|---|
| 35 |
## that we can ask for links that are, say, 'ethernet or loopback' |
|---|
| 36 |
## Second, I want to have a lot more control over links that get mapped to |
|---|
| 37 |
## multi-hop paths |
|---|
| 38 |
## TODO: MAYBE this should be combined with NodeTypeSpec |
|---|
| 39 |
LinkTypeSpec = element link_type { |
|---|
| 40 |
attribute type_name { text } |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
## A link has two endpoints. Right now, they are order |
|---|
| 44 |
## independent. But they might become order-dependant later. |
|---|
| 45 |
LinkEndPoints = |
|---|
| 46 |
## First interface for this link |
|---|
| 47 |
element source_interface { InterfaceSpec }, |
|---|
| 48 |
## Second interface for this link |
|---|
| 49 |
element destination_interface { InterfaceSpec } |
|---|
| 50 |
|
|---|
| 51 |
## Link characterstics which affect traffic. |
|---|
| 52 |
## TODO: In the future, the bandwidth, latency, and packet loss will be |
|---|
| 53 |
## moved to features and/or properties |
|---|
| 54 |
LinkCharacteristics = |
|---|
| 55 |
## Bandwidth of the link in kbps |
|---|
| 56 |
element bandwidth { xsd:float { minExclusive = "0.0" } }, |
|---|
| 57 |
## Latency of the link in ms |
|---|
| 58 |
element latency { xsd:float { minInclusive = "0.0" } }, |
|---|
| 59 |
## Static packet loss probability of the link as a fraction |
|---|
| 60 |
## (ie. 0.01 == 1%) |
|---|
| 61 |
element packet_loss { xsd:float { minInclusive = "0.0" } } |
|---|
| 62 |
|
|---|
| 63 |
## "Legacy" assign features and desires - will be phased out in favor of |
|---|
| 64 |
## properties |
|---|
| 65 |
FeatureDesireSpec = element fd { |
|---|
| 66 |
## Name of this feature or desire |
|---|
| 67 |
## element fd_name { text }, |
|---|
| 68 |
attribute fd_name { text }, |
|---|
| 69 |
## Weight assocated with the feature or desire |
|---|
| 70 |
## element fd_weight { xsd:float }, |
|---|
| 71 |
attribute fd_weight { text }, |
|---|
| 72 |
## A flag indicating whether or not a failure to match the desire with a |
|---|
| 73 |
## a feature is a constraint violation |
|---|
| 74 |
##element violatable { empty }?, |
|---|
| 75 |
attribute violatable { "true" }?, |
|---|
| 76 |
## Type information expressed in features and desires |
|---|
| 77 |
(GlobalSpec | LocalSpec)? |
|---|
| 78 |
} |
|---|
| 79 |
|
|---|
| 80 |
## GlobalSpec = element global { |
|---|
| 81 |
## element operator { "OnceOnly" | "FirstFree" } |
|---|
| 82 |
##} |
|---|
| 83 |
GlobalSpec = attribute global_operator { "OnceOnly" | "FirstFree" } |
|---|
| 84 |
|
|---|
| 85 |
## LocalSpec = element local { |
|---|
| 86 |
## element operator { "+" } |
|---|
| 87 |
## attribute local_operator { "+" } |
|---|
| 88 |
##} |
|---|
| 89 |
LocalSpec = attribute local_operator { "+" } |
|---|
| 90 |
|
|---|
| 91 |
## Interfaces |
|---|
| 92 |
## InterfaceSpec = element interface { InterfaceContents } |
|---|
| 93 |
InterfaceSpec = |
|---|
| 94 |
attribute node_name { text }, |
|---|
| 95 |
attribute interface_name { text }, |
|---|
| 96 |
attribute physical_node_name { text }?, |
|---|
| 97 |
attribute physical_interface_name { text }?, |
|---|
| 98 |
PropertySpec* |
|---|
| 99 |
|
|---|
| 100 |
InterfaceContents = |
|---|
| 101 |
## Name of the node, which must match one of the nodes in this topology |
|---|
| 102 |
element node_name { text }, |
|---|
| 103 |
## Name of the interface itself |
|---|
| 104 |
element interface_name { text }, |
|---|
| 105 |
## Properties of the interface |
|---|
| 106 |
PropertySpec* |
|---|
| 107 |
|
|---|
| 108 |
## Properties - new: replacements for features and desires. Not yet implemented |
|---|
| 109 |
## in assign, and not yet fully fleshed out in this schema. |
|---|
| 110 |
PropertySpec = element property { |
|---|
| 111 |
## Name of this property |
|---|
| 112 |
element property_name { text }, |
|---|
| 113 |
## Value associated with this property |
|---|
| 114 |
## TODO: Add ranges and other types from rspec |
|---|
| 115 |
element property_value { text | xsd:float }, |
|---|
| 116 |
## The penalty associated with this property |
|---|
| 117 |
element property_penalty { xsd:float { minInclusive = "0.0" } }, |
|---|
| 118 |
## If this flag is present, not having the property is considered a violation |
|---|
| 119 |
element violatable { empty }?, |
|---|
| 120 |
## TODO: Add more operators - equality, range test, etc |
|---|
| 121 |
## Flags for special types of operators |
|---|
| 122 |
(GlobalSpec | LocalSpec)? |
|---|
| 123 |
} |
|---|