protogeni-rspec-common.rnc 2.67 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 21
    # Each node has exactly one virtualization technology, which we simply
    # enumerate here
    attribute virtualization_type { "raw" | "trellis-vserver" |
      "planetlab-vserver" | "emulab-vnode" }? &
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 40 41
    # Link types
    LinkTypeList &
    # The interfaces which this link spans.
42
    element interface_ref {
43 44
      InterfaceRef
    }*
45

46
NodeTypeList = NodeTypeSpec+
47

48
LinkTypeList = LinkTypeSpec+
49 50 51 52 53 54 55 56 57 58 59 60

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 }

61
ComponentInterfaceDeclName = attribute component_id { text }
62 63 64

ComponentInterfaceRefName =
  attribute component_node_uuid { text } &
65
  attribute component_interface_id { text }
66 67 68 69 70 71 72 73 74 75 76 77

InterfaceDecl = empty

InterfaceRef = empty

Location = 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 }?
Robert Ricci's avatar
Robert Ricci committed
78 79
}

80
RSpec = element rspec {
81
  RSpecContents
82
}
83 84 85 86

RSpecContents =
  # When this RSpec was generated - optional, can be used for determining
  # staleness
87
  attribute generated { xsd:dateTime }? &
88 89 90 91
  # 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.
92
  attribute valid_until { xsd:dateTime }? &
93 94 95
  # One or more nodes/links
  NodeSpec* &
  LinkSpec*