| 1 |
# |
|---|
| 2 |
# EMULAB-COPYRIGHT |
|---|
| 3 |
# Copyright (c) 2008 University of Utah and the Flux Group. |
|---|
| 4 |
# All rights reserved. |
|---|
| 5 |
# |
|---|
| 6 |
|
|---|
| 7 |
# |
|---|
| 8 |
# Simple prototype of an RSpec, to be used by ProtoGENI |
|---|
| 9 |
# |
|---|
| 10 |
|
|---|
| 11 |
include "../../assign/top.rnc" { |
|---|
| 12 |
NodeContents = |
|---|
| 13 |
# Semantic change - the 'name' of a node is now |
|---|
| 14 |
# solely for human-readability. |
|---|
| 15 |
# In an advertisement, the component_uuid provides a primary |
|---|
| 16 |
# key which uniquely designates a node. |
|---|
| 17 |
# In a request, the virtual_uuid is the primary key. |
|---|
| 18 |
# The primary key must be globally unique. |
|---|
| 19 |
# The primary key is used when identifying link inputs, for example. |
|---|
| 20 |
attribute virtual_name { text }?, |
|---|
| 21 |
attribute virtual_uuid { text }?, |
|---|
| 22 |
# The mapping to components/slivers. Required for advertisements. |
|---|
| 23 |
ComponentSpec?, |
|---|
| 24 |
|
|---|
| 25 |
# Each node has exactly one virtualization technology, which we simply |
|---|
| 26 |
# enumerate here |
|---|
| 27 |
attribute virtualization_type { "raw" | "trellis-vserver" | |
|---|
| 28 |
"planetlab-vserver" | "emulab-vnode" }?, |
|---|
| 29 |
NodeSpec.NodeType, |
|---|
| 30 |
|
|---|
| 31 |
# Indicate whether or not this node is available - the idea is that a |
|---|
| 32 |
# full dump of the static physical topology will not include this, but |
|---|
| 33 |
# that we can later get updates that include only this attribute (and a |
|---|
| 34 |
# UUID) Just binary for now - probably will include more things, such |
|---|
| 35 |
# as a number of "free slots", later |
|---|
| 36 |
element available { xsd:boolean }?, |
|---|
| 37 |
InterfaceDecl* |
|---|
| 38 |
|
|---|
| 39 |
LinkContents = |
|---|
| 40 |
# Semantic change - the 'name' of a link is now |
|---|
| 41 |
# solely for human-readability. |
|---|
| 42 |
attribute virtual_name { text }?, |
|---|
| 43 |
attribute virtual_uuid { text }?, |
|---|
| 44 |
(LinkComponentSpec | PathComponentSpec)?, |
|---|
| 45 |
LinkEndPoints, |
|---|
| 46 |
## The characteristics (bandwidth, latency, loss) which affect traffic. |
|---|
| 47 |
LinkCharacteristics, |
|---|
| 48 |
## Type of this link - we use a named pattern here (defined below), so |
|---|
| 49 |
## that it can be overriden in the virtual topology schema, where you are |
|---|
| 50 |
## only allowed to have one |
|---|
| 51 |
LinkSpec.LinkType |
|---|
| 52 |
|
|---|
| 53 |
InterfaceContents = |
|---|
| 54 |
# In an advertisement, the component_uuid is mandatory. |
|---|
| 55 |
# In a request, the virtual_uuid is mandatory. |
|---|
| 56 |
element virtual_uuid { text }?, |
|---|
| 57 |
element virtual_interface_name { text }?, |
|---|
| 58 |
element component_uuid { text }?, |
|---|
| 59 |
element component_interface_name { text }? |
|---|
| 60 |
} |
|---|
| 61 |
|
|---|
| 62 |
InterfaceDecl = element interface { |
|---|
| 63 |
attribute name { text } |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
ComponentSpec = |
|---|
| 67 |
# This is the uuid of the aggregate that this node or link belongs |
|---|
| 68 |
# to. It is required in an advertisement. |
|---|
| 69 |
attribute component_manager_uuid { text }, |
|---|
| 70 |
# User-readable name for the component |
|---|
| 71 |
attribute component_name { text }?, |
|---|
| 72 |
# The uuid of the physical component. |
|---|
| 73 |
attribute component_uuid { text }, |
|---|
| 74 |
# The sliver_uuid is an annotation added when a ticket is |
|---|
| 75 |
# redeemed to notify the client of the association between the |
|---|
| 76 |
# virtual_uuid requests and the actual slivers instantiated. |
|---|
| 77 |
attribute sliver_uuid { text }? |
|---|
| 78 |
|
|---|
| 79 |
LinkComponentSpec = element component_link { ComponentSpec } |
|---|
| 80 |
|
|---|
| 81 |
PathComponentSpec = element component_path { |
|---|
| 82 |
(element link { ComponentSpec, LinkEndPoints}, |
|---|
| 83 |
element node |
|---|
| 84 |
{ |
|---|
| 85 |
ComponentSpec |
|---|
| 86 |
} |
|---|
| 87 |
)*, |
|---|
| 88 |
element link { ComponentSpec, LinkEndPoints } |
|---|
| 89 |
} |
|---|
| 90 |
|
|---|
| 91 |
RSpec = element rspec { |
|---|
| 92 |
attribute type { "advertisement" | "request" }, |
|---|
| 93 |
# When this RSpec was generated - optional, can be used for determining |
|---|
| 94 |
# staleness |
|---|
| 95 |
attribute generated { xsd:dateTime }, |
|---|
| 96 |
# How long this rspec is valid - in the case of a ticket, this indicates |
|---|
| 97 |
# how long the holder may use the resources. For a resource request, it's |
|---|
| 98 |
# how long we want the resources. For an advertisement, it might be a hint |
|---|
| 99 |
# as to how long it's okay to cache this rspec. |
|---|
| 100 |
attribute valid_until { xsd:dateTime }, |
|---|
| 101 |
# One or more nodes/links |
|---|
| 102 |
(NodeSpec | LinkSpec)* |
|---|
| 103 |
} |
|---|