protogeni-rspec-common.rnc 4.3 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 15 16 17 18 19
        # Semantic change - the 'name' of a node is now
        # solely for human-readability.
	# In an advertisement, the component_uuid provides a primary
	# key which uniquely designates a node.
	# In a request, the virtual_uuid is the primary key.
	# The primary key must be globally unique.
	# The primary key is used when identifying link inputs, for example.
20
	attribute virtual_name { text }?,
21
	attribute virtual_id { text }?,
22
	# The mapping to components/slivers. Required for advertisements.
23
	ComponentSpec?,
24

25 26 27 28
        # Each node has exactly one virtualization technology, which we simply
        # enumerate here
        attribute virtualization_type { "raw" | "trellis-vserver" |
        "planetlab-vserver" | "emulab-vnode" }?,
29
        NodeSpec.NodeType,
30

31 32 33
	# Information about the physical location of the node.
	LocationSpec?,

34
        # Indicate whether or not this node is available - the idea is that a
35 36 37 38
        # 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
39
        element available { xsd:boolean }?,
40 41
	InterfaceDecl*

42
    LinkContents =
43 44
        # Semantic change - the 'name' of a link is now
        # solely for human-readability.
45
        attribute virtual_name { text }?,
46
        attribute virtual_id { text }?,
47 48 49
		attribute virtualization_type { "raw" | "trellis-vserver" |
        			"planetlab-vserver" | "emulab-vnode" }?,
	(SingleHopComponentSpec | MultiHopComponentSpec)?,
50 51 52 53 54 55
        LinkEndPoints,
        ## 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
56
        LinkSpec.LinkType+
57

58
    InterfaceContents = 
59
	# In an advertisement, the component_uuid is mandatory.
60 61
	# In a request, the virtual_id is mandatory.
		element virtual_node_id { text }?,
62 63 64
		element virtual_interface_name { text }?,
		element component_node_uuid { text }?,
		element component_interface_name { text }?
65 66
}

67 68 69 70 71 72 73 74 75
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 }?
}

76
InterfaceDecl = element interface {
77
	attribute virtual_name { text }?,
78 79
	attribute component_name { text }?,
	element monitoring { attribute user_traffic { text }? }?
80 81
}

82
ComponentSpec =
83 84
    # This is the uuid of the aggregate that this node or link belongs
    # to. It is required in an advertisement.
85
    attribute component_manager_uuid { text },
86 87
    # User-readable name for the component
    attribute component_name { text }?,
88 89 90 91
    # 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
92
    # virtual_id requests and the actual slivers instantiated.
93 94
    attribute sliver_uuid { text }?

95
SingleHopComponentSpec = element single_hop_link { element link {ComponentSpec, LinkEndPoints } }
96

97 98 99 100
MultiHopComponentSpec = element multi_hop_link {
	element link { ComponentSpec, LinkEndPoints},
    (element node { ComponentSpec },
    	element link { ComponentSpec, LinkEndPoints})+
Robert Ricci's avatar
Robert Ricci committed
101 102
}

103
RSpec = element rspec {
104
    attribute type { "advertisement" | "request" },
105 106 107 108 109 110 111 112
    # 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 },
113 114
    # One or more nodes/links
    (NodeSpec | LinkSpec)*
115
}