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

#
8
# Common definitions for advertisements, requests, and tickets
9 10
#

11 12 13 14 15 16 17
include "../../assign/top.rnc" 

NodeSpec = element node { NodeContents }

LinkSpec = element link { LinkContents }

NodeContents =
18 19 20
    # Each node has exactly one virtualization technology, which we simply
    # enumerate here
    attribute virtualization_type { "raw" | "trellis-vserver" |
21
      "planetlab-vserver" | "emulab-vnode" | "bgpmux" }? &
22

23 24 25 26 27
    # Each node may be the subnode of (physically located within) another.
    # In advertisements, this is the URN of the other component.
    # In requests, this is the virtual_id of the other sliver.
    element subnode_of { text }? &

28 29
    # Node type list
    NodeTypeList &
30

31 32 33 34 35 36 37 38 39
    # List of interfaces on this node. Interfaces are declared here. So
    # all information about a particular interface including types
    # belongs in the declaration. Other references to interfaces
    # should just uniquely identify them and refer back here.
    element interface {
      InterfaceDecl
    }*

  LinkContents =
40
    # Each link has exactly one virtualization technology, which we simply
41 42 43
    # enumerate here
    attribute virtualization_type { "raw" | "trellis-vserver" |
      "planetlab-vserver" | "emulab-vnode" }? &
44
    # Link types
45
    LinkType+ &
46
    # The interfaces which this link spans.
47
    element interface_ref {
48 49
      InterfaceRef
    }*
50

51
NodeTypeList = NodeTypeSpec+
52

53 54
NodeTypeContents &= TypeField*

55
LinkType = element link_type {
56 57
    attribute name { text }? &
    attribute type_name { text }? &
58
    TypeField*
59 60
    }

61
TypeField = element field {
62 63 64
    attribute key { text } &
    attribute value { text }
    }
65 66 67 68 69 70

VirtualName = attribute virtual_id { text }

ComponentName =
  # This is the uuid of the aggregate that this node or link belongs
  # to. It is required in an advertisement.
71 72
  attribute component_manager_uuid { text }? &
  attribute component_manager_urn { text }? &
73 74 75
  # User-readable name for the component
  attribute component_name { text }? &
  # The uuid of the physical component.
76 77
  attribute component_uuid { text }? &
  attribute component_urn { text }?
78

79
ComponentInterfaceDeclName = attribute component_id { text }
80 81

ComponentInterfaceRefName =
82 83
  attribute component_node_uuid { text }? &
  attribute component_node_urn { text }? &
84
  attribute component_interface_id { text }
85 86 87 88 89 90 91 92

InterfaceDecl = empty

InterfaceRef = empty

Location = element location {
  # The two-letter ISO 3166 code for the country the node is in.
  attribute country { text } &
93
  # Longitude and Latitude coordinates of the node using the
94 95
  # WGS 84 standard.
  attribute longitude { text }? &
96
  attribute latitude { text }?
Robert Ricci's avatar
Robert Ricci committed
97 98
}

99
RSpec = element rspec {
100
  RSpecContents
101
}
102 103 104 105

RSpecContents =
  # When this RSpec was generated - optional, can be used for determining
  # staleness
106
  attribute generated { xsd:dateTime }? &
107 108 109 110
  # Who/what generated the rspec. This is purely informative and
  # should not be used for any policy consideration. The format is
  # not fixed.
  attribute generated_by { text }? &
111 112 113 114
  # 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.
115
  attribute valid_until { xsd:dateTime }? &
116 117 118
  # One or more nodes/links
  NodeSpec* &
  LinkSpec*