Commit 0106a600 authored by Jonathon Duerig's avatar Jonathon Duerig

The dividing of the rspecs is complete. There are now two different rspec...

The dividing of the rspecs is complete. There are now two different rspec schemas, one for advertisements and one for requests. I still need to reconcile this new change with tickets. Did some testing, especially on advertisements. Need to excercise the request rspec more.
parent 3e3a4ea1
......@@ -5,113 +5,89 @@
#
#
# Simple prototype of an RSpec, to be used by ProtoGENI
# Common definitions for advertisements, requests, and tickets
#
include "../../assign/top.rnc" {
NodeContents =
# The virtual id of an element may be human readable.
# In an advertisement, the component_uuid provides a primary
# key which uniquely designates a node.
# In a request, the virtual_id is the primary key.
# The primary key must be globally unique.
# The primary key is used when identifying link inputs, for example.
attribute virtual_id { text }?,
# Each node has exactly one virtualization technology, which we simply
# enumerate here
attribute virtualization_type { "raw" | "trellis-vserver" |
"planetlab-vserver" | "emulab-vnode" }?,
# The mapping to components/slivers. Required for advertisements.
ComponentSpec?,
NodeSpec.NodeType,
# Information about the physical location of the node.
LocationSpec?,
# Indicate whether or not this node is available - the idea is that a
# 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
element available { xsd:boolean }?,
InterfaceDecl*
LinkContents =
# The virtual id of an element may be human readable.
attribute virtual_id { text }?,
attribute virtualization_type { "raw" | "trellis-vserver" |
"planetlab-vserver" | "emulab-vnode" }?,
ComponentSpec?,
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
LinkSpec.LinkType+,
# These will only be present in annotated rspecs
(SingleHopComponentSpec | MultiHopComponentSpec)?
InterfaceContents =
# In an advertisement, the component_uuid is mandatory.
# In a request, the virtual_id is mandatory.
attribute virtual_node_id { text }?,
attribute virtual_interface_name { text }?,
attribute component_node_uuid { text }?,
attribute component_interface_name { text }?
}
NodeContents =
# Each node has exactly one virtualization technology, which we simply
# enumerate here
attribute virtualization_type { "raw" | "trellis-vserver" |
"planetlab-vserver" | "emulab-vnode" }? &
LocationSpec = 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 }?
}
# Node type list
NodeTypeList &
InterfaceDecl = element interface {
attribute virtual_name { text }?,
attribute component_name { text }?,
element monitoring { attribute user_traffic { text }? }?
# 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
}*
}
ComponentSpec =
# 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 },
# 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 }?
SingleHopComponentSpec = element single_hop_link { element link { ComponentSpec, LinkEndPoints } }
MultiHopComponentSpec = element multi_hop_link {
(element link { ComponentSpec, LinkEndPoints}
| element node { ComponentSpec })+
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 }?
}
RSpec = element rspec {
attribute type { "advertisement" | "request" },
# 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)*
RSpecContents
}
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*
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<xs:include schemaLocation="top.xsd"/>
<!--
......@@ -15,13 +15,12 @@
-->
<xs:complexType name="NodeContents">
<xs:sequence>
<xs:group ref="NodeSpec.NodeType"/>
<xs:element minOccurs="0" ref="location"/>
<xs:element minOccurs="0" ref="available"/>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="InterfaceDecl"/>
<xs:group ref="rspec:NodeSpec.NodeType"/>
<xs:element minOccurs="0" ref="rspec:location"/>
<xs:element minOccurs="0" ref="rspec:available"/>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="rspec:InterfaceDecl"/>
</xs:sequence>
<xs:attribute name="virtual_name"/>
<xs:attribute name="virtual_uuid"/>
<xs:attribute name="virtual_id"/>
<xs:attribute name="component_manager_uuid"/>
<xs:attribute name="component_name"/>
<xs:attribute name="component_uuid"/>
......@@ -41,25 +40,18 @@
<xs:complexType name="LinkContents">
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="single_hop_link"/>
<xs:element ref="multi_hop_link"/>
<xs:element ref="rspec:single_hop_link"/>
<xs:element ref="rspec:multi_hop_link"/>
</xs:choice>
<xs:group ref="LinkEndPoints"/>
<xs:group ref="LinkCharacteristics">
<xs:group ref="rspec:LinkEndPoints"/>
<xs:group ref="rspec:LinkCharacteristics">
<xs:annotation>
<xs:documentation>The characteristics (bandwidth, latency, loss) which affect traffic.</xs:documentation>
</xs:annotation>
</xs:group>
<xs:element maxOccurs="unbounded" ref="LinkSpec.LinkType">
<xs:annotation>
<xs:documentation>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</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" ref="rspec:LinkSpec.LinkType"/>
</xs:sequence>
<xs:attribute name="virtual_name"/>
<xs:attribute name="virtual_uuid"/>
<xs:attribute name="virtual_id"/>
<xs:attribute name="virtualization_type">
<xs:simpleType>
<xs:restriction base="xs:token">
......@@ -73,13 +65,13 @@ only allowed to have one</xs:documentation>
</xs:complexType>
<xs:complexType name="InterfaceContents">
<xs:sequence>
<xs:element minOccurs="0" ref="virtual_node_uuid"/>
<xs:element minOccurs="0" ref="virtual_interface_name"/>
<xs:element minOccurs="0" ref="component_node_uuid"/>
<xs:element minOccurs="0" ref="component_interface_name"/>
<xs:element minOccurs="0" ref="rspec:virtual_node_id"/>
<xs:element minOccurs="0" ref="rspec:virtual_interface_name"/>
<xs:element minOccurs="0" ref="rspec:component_node_uuid"/>
<xs:element minOccurs="0" ref="rspec:component_interface_name"/>
</xs:sequence>
</xs:complexType>
<xs:element name="virtual_node_uuid" type="xs:string"/>
<xs:element name="virtual_node_id" type="xs:string"/>
<xs:element name="virtual_interface_name" type="xs:string"/>
<xs:element name="component_node_uuid" type="xs:string"/>
<xs:element name="component_interface_name" type="xs:string"/>
......@@ -94,12 +86,20 @@ only allowed to have one</xs:documentation>
<xs:sequence>
<xs:element name="interface">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="rspec:monitoring"/>
</xs:sequence>
<xs:attribute name="virtual_name"/>
<xs:attribute name="component_name"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:element name="monitoring">
<xs:complexType>
<xs:attribute name="user_traffic"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="ComponentSpec">
<xs:attribute name="component_manager_uuid" use="required"/>
<xs:attribute name="component_name"/>
......@@ -108,8 +108,14 @@ only allowed to have one</xs:documentation>
</xs:attributeGroup>
<xs:element name="single_hop_link">
<xs:complexType>
<xs:group ref="LinkEndPoints"/>
<xs:attributeGroup ref="ComponentSpec"/>
<xs:sequence>
<xs:element name="link">
<xs:complexType>
<xs:group ref="rspec:LinkEndPoints"/>
<xs:attributeGroup ref="rspec:ComponentSpec"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="multi_hop_link">
......@@ -117,20 +123,20 @@ only allowed to have one</xs:documentation>
<xs:sequence>
<xs:element name="link">
<xs:complexType>
<xs:group ref="LinkEndPoints"/>
<xs:attributeGroup ref="ComponentSpec"/>
<xs:group ref="rspec:LinkEndPoints"/>
<xs:attributeGroup ref="rspec:ComponentSpec"/>
</xs:complexType>
</xs:element>
<xs:sequence maxOccurs="unbounded">
<xs:element name="node">
<xs:complexType>
<xs:attributeGroup ref="ComponentSpec"/>
<xs:attributeGroup ref="rspec:ComponentSpec"/>
</xs:complexType>
</xs:element>
<xs:element name="link">
<xs:complexType>
<xs:group ref="LinkEndPoints"/>
<xs:attributeGroup ref="ComponentSpec"/>
<xs:group ref="rspec:LinkEndPoints"/>
<xs:attributeGroup ref="rspec:ComponentSpec"/>
</xs:complexType>
</xs:element>
</xs:sequence>
......@@ -140,8 +146,8 @@ only allowed to have one</xs:documentation>
<xs:element name="rspec">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="node"/>
<xs:element ref="link"/>
<xs:element ref="rspec:node"/>
<xs:element ref="rspec:link"/>
</xs:choice>
<xs:attribute name="type" use="required">
<xs:simpleType>
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Prototype of an advertisement RSpec, to be used by ProtoGENI
#
default namespace = "http://www.protogeni.net/resources/rspec/0.1"
include "protogeni-rspec-common.rnc"
NodeContents &=
# Component identifiers
ComponentName &
# Information about the physical location of the node.
Location? &
# Indicate whether or not this node is available - the idea is that a
# 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
element available { xsd:boolean }
LinkContents &=
# Component identifiers
ComponentName &
# Characteristics (bandwidth, latency, loss) which affect traffic.
LinkCharacteristics?
InterfaceDecl &=
ComponentInterfaceDeclName &
element monitoring { attribute user_traffic { text }? }?
InterfaceRef &=
ComponentInterfaceRefName
RSpecContents &=
attribute type { "advertisement" }
start = RSpec
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Prototype of a request RSpec, to be used by ProtoGENI
#
include "protogeni-rspec-common.rnc"
NodeContents &=
VirtualName &
ComponentName &
SliverName
LinkContents &=
VirtualName &
LinkMapping &
SliverName
InterfaceDecl &=
ComponentInterfaceDeclName &
VirtualName
InterfaceRef &=
ComponentInterfaceRefName &
VirtualName
RSpecContents &=
attribute type { "request" }
# A request link is mapped to an arbitrary topology which represents
# the virtual LAN/link which embodies it. Note that nodes do not
# provide any additional information and can be derived from the
# interface mapping.
LinkMapping =
element component_hop { ComponentName, InterfaceMapping* }*
# Each interface represents a particular physical interface. If that
# interface is one of the link end points, it is also mapped to that
# virtual interface name.
InterfaceMapping = element interface {
ComponentInterfaceRefName &
VirtualName ?
}
start = RSpec
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment