protogeni-rspec-common.rnc 4.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# All rights reserved.
#

#
# Simple prototype of an RSpec, to be used by ProtoGENI
#

11
include "../../assign/top.rnc" {
12
    NodeContents =
13 14
    
	# The virtual id of an element may be human readable.
15 16
	# In an advertisement, the component_uuid provides a primary
	# key which uniquely designates a node.
17
	# In a request, the virtual_id is the primary key.
18 19
	# The primary key must be globally unique.
	# The primary key is used when identifying link inputs, for example.
20

21
	attribute virtual_id { text }?,
22 23 24 25 26 27
	
	# Each node has exactly one virtualization technology, which we simply
	# enumerate here
	attribute virtualization_type { "raw" | "trellis-vserver" |
	"planetlab-vserver" | "emulab-vnode" }?,
    
28
	# The mapping to components/slivers. Required for advertisements.
29
	ComponentSpec?,    
30

31
	NodeSpec.NodeType,
32

33 34 35
	# Information about the physical location of the node.
	LocationSpec?,

36 37 38 39 40 41 42
	# Indicate whether or not this node is available - the idea is that a
	# full dump of the static physical topology will not include this, but
	# that we can later get updates that include only this attribute (and a
	# UUID) Just binary for now - probably will include more things, such
	# as a number of "free slots", later
	element available { xsd:boolean }?,
	
43 44
	InterfaceDecl*

45
    LinkContents =
46
    # The virtual id of an element may be human readable.
47
        attribute virtual_id { text }?,
48 49
		attribute virtualization_type { "raw" | "trellis-vserver" |
        			"planetlab-vserver" | "emulab-vnode" }?,
50 51
	ComponentSpec?,
	    LinkEndPoints,
52 53 54 55 56
        ## The characteristics (bandwidth, latency, loss) which affect traffic.
        LinkCharacteristics,
        ## Type of this link - we use a named pattern here (defined below), so
        ## that it can be overriden in the virtual topology schema, where you are
        ## only allowed to have one
57 58 59
        LinkSpec.LinkType+,
		# These will only be present in annotated rspecs
		(SingleHopComponentSpec | MultiHopComponentSpec)?
60

61
    InterfaceContents = 
62
	# In an advertisement, the component_uuid is mandatory.
63
	# In a request, the virtual_id is mandatory.
64 65 66 67
		attribute virtual_node_id { text }?,
		attribute virtual_interface_name { text }?,
		attribute component_node_uuid { text }?,
		attribute component_interface_name { text }?
68 69
}

70 71 72 73 74 75 76 77 78
LocationSpec = element location {
	# The two-letter ISO 3166 code for the country the node is in.
	attribute country { text },
	# Longitude and Lattitude coordinates of the node using the
	# WGS 84 standard.
	attribute longitude { text }?,
	attribute lattitude { text }?
}

79
InterfaceDecl = element interface {
80
	attribute virtual_name { text }?,
81 82
	attribute component_name { text }?,
	element monitoring { attribute user_traffic { text }? }?
83 84
}

85
ComponentSpec =
86 87
    # This is the uuid of the aggregate that this node or link belongs
    # to. It is required in an advertisement.
88
    attribute component_manager_uuid { text },
89 90
    # User-readable name for the component
    attribute component_name { text }?,
91 92 93 94
    # The uuid of the physical component.
    attribute component_uuid { text },
    # The sliver_uuid is an annotation added when a ticket is
    # redeemed to notify the client of the association between the
95
    # virtual_id requests and the actual slivers instantiated.
96 97
    attribute sliver_uuid { text }?

98
SingleHopComponentSpec = element single_hop_link { element link { ComponentSpec, LinkEndPoints } }
99

100
MultiHopComponentSpec = element multi_hop_link {
101 102
	(element link { ComponentSpec, LinkEndPoints} 
    	| element node { ComponentSpec })+
Robert Ricci's avatar
Robert Ricci committed
103 104
}

105
RSpec = element rspec {
106
    attribute type { "advertisement" | "request" },
107 108 109 110 111 112 113 114
    # When this RSpec was generated - optional, can be used for determining
    # staleness
    attribute generated { xsd:dateTime },
    # How long this rspec is valid - in the case of a ticket, this indicates
    # how long the holder may use the resources. For a resource request, it's
    # how long we want the resources. For an advertisement, it might be a hint
    # as to how long it's okay to cache this rspec.
    attribute valid_until { xsd:dateTime },
115 116
    # One or more nodes/links
    (NodeSpec | LinkSpec)*
117
}