protogeni-rspec-common.rnc 3.78 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_uuid { 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

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

39
    LinkContents =
40 41
        # Semantic change - the 'name' of a link is now
        # solely for human-readability.
42
        attribute virtual_name { text }?,
43
        attribute virtual_uuid { text }?,
44
	(LinkComponentSpec | PathComponentSpec)?,
45 46 47 48 49 50
        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
51
        LinkSpec.LinkType+
52

53
    InterfaceContents = 
54 55
	# In an advertisement, the component_uuid is mandatory.
	# In a request, the virtual_uuid is mandatory.
56
        element virtual_node_uuid { text }?,
57
	element virtual_interface_name { text }?,
58
	element component_node_uuid { text }?,
59
        element component_interface_name { text }?
60 61 62
}

InterfaceDecl = element interface {
63 64
	attribute virtual_name { text }?,
	attribute component_name { text }?
65 66
}

67
ComponentSpec =
68 69
    # This is the uuid of the aggregate that this node or link belongs
    # to. It is required in an advertisement.
70
    attribute component_manager_uuid { text },
71 72
    # User-readable name for the component
    attribute component_name { text }?,
73 74 75 76 77 78 79
    # 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
    # virtual_uuid requests and the actual slivers instantiated.
    attribute sliver_uuid { text }?

80
LinkComponentSpec = element component_link { ComponentSpec }
81

82
PathComponentSpec = element component_path {
83
    element link { ComponentSpec, LinkEndPoints },
84
    (element link { ComponentSpec, LinkEndPoints},
85 86
     element node
     {
87
	ComponentSpec
88
     }
89
    )*
Robert Ricci's avatar
Robert Ricci committed
90 91
}

92
RSpec = element rspec {
93
    attribute type { "advertisement" | "request" },
94 95 96 97 98 99 100 101
    # 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 },
102 103
    # One or more nodes/links
    (NodeSpec | LinkSpec)*
104
}