| 1 |
# |
|---|
| 2 |
# EMULAB-COPYRIGHT |
|---|
| 3 |
# Copyright (c) 2008 University of Utah and the Flux Group. |
|---|
| 4 |
# All rights reserved. |
|---|
| 5 |
# |
|---|
| 6 |
|
|---|
| 7 |
# |
|---|
| 8 |
# Common definitions for advertisements, requests, and tickets |
|---|
| 9 |
# |
|---|
| 10 |
|
|---|
| 11 |
include "../../assign/top.rnc" |
|---|
| 12 |
|
|---|
| 13 |
NodeSpec = element node { NodeContents } |
|---|
| 14 |
|
|---|
| 15 |
LinkSpec = element link { LinkContents } |
|---|
| 16 |
|
|---|
| 17 |
NodeContents = |
|---|
| 18 |
# Each node has exactly one virtualization technology, which we simply |
|---|
| 19 |
# enumerate here |
|---|
| 20 |
attribute virtualization_type { "raw" | "trellis-vserver" | |
|---|
| 21 |
"planetlab-vserver" | "emulab-vnode" | "bgpmux" }? & |
|---|
| 22 |
|
|---|
| 23 |
# Node type list |
|---|
| 24 |
NodeTypeList & |
|---|
| 25 |
|
|---|
| 26 |
# List of interfaces on this node. Interfaces are declared here. So |
|---|
| 27 |
# all information about a particular interface including types |
|---|
| 28 |
# belongs in the declaration. Other references to interfaces |
|---|
| 29 |
# should just uniquely identify them and refer back here. |
|---|
| 30 |
element interface { |
|---|
| 31 |
InterfaceDecl |
|---|
| 32 |
}* |
|---|
| 33 |
|
|---|
| 34 |
LinkContents = |
|---|
| 35 |
# Each link has exactly one virtualization technology, which we simply |
|---|
| 36 |
# enumerate here |
|---|
| 37 |
attribute virtualization_type { "raw" | "trellis-vserver" | |
|---|
| 38 |
"planetlab-vserver" | "emulab-vnode" }? & |
|---|
| 39 |
# Link types |
|---|
| 40 |
LinkType+ & |
|---|
| 41 |
# The interfaces which this link spans. |
|---|
| 42 |
element interface_ref { |
|---|
| 43 |
InterfaceRef |
|---|
| 44 |
}* |
|---|
| 45 |
|
|---|
| 46 |
NodeTypeList = NodeTypeSpec+ |
|---|
| 47 |
|
|---|
| 48 |
NodeTypeContents &= TypeField* |
|---|
| 49 |
|
|---|
| 50 |
LinkType = element link_type { |
|---|
| 51 |
attribute name { text } & |
|---|
| 52 |
TypeField* |
|---|
| 53 |
} |
|---|
| 54 |
|
|---|
| 55 |
TypeField = element field { |
|---|
| 56 |
attribute key { text } & |
|---|
| 57 |
attribute value { text } |
|---|
| 58 |
} |
|---|
| 59 |
|
|---|
| 60 |
VirtualName = attribute virtual_id { text } |
|---|
| 61 |
|
|---|
| 62 |
ComponentName = |
|---|
| 63 |
# This is the uuid of the aggregate that this node or link belongs |
|---|
| 64 |
# to. It is required in an advertisement. |
|---|
| 65 |
attribute component_manager_uuid { text } & |
|---|
| 66 |
# User-readable name for the component |
|---|
| 67 |
attribute component_name { text }? & |
|---|
| 68 |
# The uuid of the physical component. |
|---|
| 69 |
attribute component_uuid { text } |
|---|
| 70 |
|
|---|
| 71 |
ComponentInterfaceDeclName = attribute component_id { text } |
|---|
| 72 |
|
|---|
| 73 |
ComponentInterfaceRefName = |
|---|
| 74 |
attribute component_node_uuid { text } & |
|---|
| 75 |
attribute component_interface_id { text } |
|---|
| 76 |
|
|---|
| 77 |
InterfaceDecl = empty |
|---|
| 78 |
|
|---|
| 79 |
InterfaceRef = empty |
|---|
| 80 |
|
|---|
| 81 |
Location = element location { |
|---|
| 82 |
# The two-letter ISO 3166 code for the country the node is in. |
|---|
| 83 |
attribute country { text } & |
|---|
| 84 |
# Longitude and Latitude coordinates of the node using the |
|---|
| 85 |
# WGS 84 standard. |
|---|
| 86 |
attribute longitude { text }? & |
|---|
| 87 |
attribute latitude { text }? |
|---|
| 88 |
} |
|---|
| 89 |
|
|---|
| 90 |
RSpec = element rspec { |
|---|
| 91 |
RSpecContents |
|---|
| 92 |
} |
|---|
| 93 |
|
|---|
| 94 |
RSpecContents = |
|---|
| 95 |
# When this RSpec was generated - optional, can be used for determining |
|---|
| 96 |
# staleness |
|---|
| 97 |
attribute generated { xsd:dateTime }? & |
|---|
| 98 |
# Who/what generated the rspec. This is purely informative and |
|---|
| 99 |
# should not be used for any policy consideration. The format is |
|---|
| 100 |
# not fixed. |
|---|
| 101 |
attribute generated_by { text }? & |
|---|
| 102 |
# How long this rspec is valid - in the case of a ticket, this indicates |
|---|
| 103 |
# how long the holder may use the resources. For a resource request, it's |
|---|
| 104 |
# how long we want the resources. For an advertisement, it might be a hint |
|---|
| 105 |
# as to how long it's okay to cache this rspec. |
|---|
| 106 |
attribute valid_until { xsd:dateTime }? & |
|---|
| 107 |
# One or more nodes/links |
|---|
| 108 |
NodeSpec* & |
|---|
| 109 |
LinkSpec* |
|---|