protogeni-rspec-common.rnc 2.63 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
include "../../assign/top.rnc" {
12 13 14 15 16
  NodeContents =
    # Each node has exactly one virtualization technology, which we simply
    # enumerate here
    attribute virtualization_type { "raw" | "trellis-vserver" |
      "planetlab-vserver" | "emulab-vnode" }? &
17

18 19
    # Node type list
    NodeTypeList &
20

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    # 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 =
    # Link types
    LinkTypeList &
    # The interfaces which this link spans.
    element interface {
      InterfaceRef
    }*
36 37
}

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
NodeTypeList = NodeSpec.NodeType

LinkTypeList = LinkSpec.LinkType+

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 }

ComponentInterfaceDeclName = attribute component_name { text }

ComponentInterfaceRefName =
  attribute component_node_uuid { text } &
  attribute component_interface_name { text }

SliverName =
  # The sliver_uuid is an annotation added when a ticket is
  # redeemed to notify the client of the association between the
  # virtual_id requests and the actual slivers instantiated.
  attribute sliver_uuid { text }?

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
76 77
}

78
RSpec = element rspec {
79
  RSpecContents
80
}
81 82 83 84 85 86 87 88 89 90 91 92 93

RSpecContents =
  # 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 } &
  # One or more nodes/links
  NodeSpec* &
  LinkSpec*