protogeni-rspec-common.rnc 3.03 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
    # Node type list
    NodeTypeList &
25

26 27 28 29 30 31 32 33 34
    # 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 =
35
    # Each link has exactly one virtualization technology, which we simply
36 37 38
    # enumerate here
    attribute virtualization_type { "raw" | "trellis-vserver" |
      "planetlab-vserver" | "emulab-vnode" }? &
39
    # Link types
40
    LinkType+ &
41
    # The interfaces which this link spans.
42
    element interface_ref {
43 44
      InterfaceRef
    }*
45

46
NodeTypeList = NodeTypeSpec+
47

48 49
NodeTypeContents &= TypeField*

50 51
LinkType = element link_type {
    attribute name { text } &
52
    TypeField*
53 54
    }

55
TypeField = element field {
56 57 58
    attribute key { text } &
    attribute value { text }
    }
59 60 61 62 63 64 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.
  attribute component_manager_uuid { text } &
  # User-readable name for the component
  attribute component_name { text }? &
  # The uuid of the physical component.
  attribute component_uuid { text }

71
ComponentInterfaceDeclName = attribute component_id { text }
72 73 74

ComponentInterfaceRefName =
  attribute component_node_uuid { text } &
75
  attribute component_interface_id { text }
76 77 78 79 80 81 82 83

InterfaceDecl = empty

InterfaceRef = empty

Location = element location {
  # The two-letter ISO 3166 code for the country the node is in.
  attribute country { text } &
84
  # Longitude and Latitude coordinates of the node using the
85 86
  # WGS 84 standard.
  attribute longitude { text }? &
87
  attribute latitude { text }?
Robert Ricci's avatar
Robert Ricci committed
88 89
}

90
RSpec = element rspec {
91
  RSpecContents
92
}
93 94 95 96

RSpecContents =
  # When this RSpec was generated - optional, can be used for determining
  # staleness
97
  attribute generated { xsd:dateTime }? &
98 99 100 101
  # 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 }? &
102 103 104 105
  # 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.
106
  attribute valid_until { xsd:dateTime }? &
107 108 109
  # One or more nodes/links
  NodeSpec* &
  LinkSpec*