Commit 319eba0a authored by Robert Ricci's avatar Robert Ricci

First, rough cut, of schemas for rspec and tickets, plus very simple

examples.

Note that these depend on the top schema from the assign directory.
parent 93640e1d
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Example RSpec used to request for a ticket on a "regular" emulab node -->
<!-- TODO: Do we want to include how long we're requesting it for?
Probably. -->
<rspec xmlns:"http://protogeni.net/resources/rspec/0.1">
<node uuid="00000000-0000-0000-0000-000000000002"
virtualization_type="raw">
</node>
</rspec>
<!-- Example RSpec used to request for a ticket on a VINI-like node -->
<rspec>
<node uuid="00000000-0000-0000-0000-000000000002"
virtualization_type="trellis-vserver">
</node>
</rspec>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- What might be returned by a query asking for which resources are
currently available -->
<rspec xmlns:"http://protogeni.net/resources/rspec/0.1">
<node uuid="00000000-0000-0000-0000-000000000002">
<available>true</available>
</node>
<node uuid="00000000-0000-0000-0000-000000000003">
<available>false</available>
</node>
<node uuid="00000000-0000-0000-0000-000000000004">
<available>true</available>
</node>
</rspec>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Example ticket for a "regular" emulab node -->
<!-- Note, I'm using the 'standard' UUID text representation, we need to
agree on exactly what we're going to use -->
<ticket xmlns="http://protogeni.net/resources/ticket/0.1"
redeem_before="2008-05-08T09:00:00"
valid_until="2008-05-10T09:00:00"
issued_to="00000000-0000-0000-0000-000000000001">
<rspec>
<node uuid="00000000-0000-0000-0000-000000000002"
virtualization_type="raw">
</node>
</rspec>
</top>
<!-- Example ticket for a VINI-like node -->
<ticket xmlns="http://protogeni.net/resources/ticket/0.1"
redeem_before="2008-05-08T09:00:00"
valid_until="2008-05-10T09:00:00"
issued_to="00000000-0000-0000-0000-000000000001">
<rspec>
<node uuid="00000000-0000-0000-0000-000000000002"
virtualization_type="trellis-vserver">
</node>
</rspec>
</top>
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Simple prototype of an RSpec, to be used by ProtoGENI
# Some decisions to make:
# Right now, requests, etc. all are part of the same schema - is
# this right?
#
default namespace = "http://www.protogeni.net/resources/rspec/0.1"
include "top.rnc" {
# Add some more stuff to nodes
NodeSpec &=
# Major semantic change - the 'name' of a (physical) node is now its
# UUID. Not sure if we want to include another field that is the testbed's
# own human-readable name for the node
# Each node has exactly one virtualization technology, which we simply
# enumerate here
attribute virtualization_type { "raw" | "trellis-vserver" |
"planetlab-vserver" | "emulab-vnode" }?,
# Inidicate 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 avaiable { "true" | "false" }?
}
start = element rspec {
# TODO: Include something about who generated this rspec?
# When this RSpec was generated - optional, can be used for determining staleness
attribute generated { xsd:dateTime },
# One or more nodes
NodeSpec*,
# One or more links
LinkSpec*
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2008 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Simple prototype of an RSpec, to be used by ProtoGENI
Some decisions to make:
Right now, requests, etc. all are part of the same schema - is
this right?
-->
<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" xmlns:top="http://emulab.net/resources/top/0.2">
<xs:import namespace="http://emulab.net/resources/top/0.2" schemaLocation="top.xsd"/>
<!-- Add some more stuff to nodes -->
<xs:group name="NodeSpec">
<xs:sequence>
<xs:element minOccurs="0" ref="rspec:avaiable"/>
</xs:sequence>
</xs:group>
<xs:element name="avaiable">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:attributeGroup name="NodeSpec">
<xs:attribute name="virtualization_type">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="raw"/>
<xs:enumeration value="trellis-vserver"/>
<xs:enumeration value="planetlab-vserver"/>
<xs:enumeration value="emulab-vnode"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="rspec">
<xs:complexType>
<xs:sequence>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="rspec:NodeSpec"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="top:link"/>
</xs:sequence>
<xs:attribute name="generated" use="required" type="xs:dateTime"/>
<xs:attributeGroup ref="rspec:NodeSpec"/>
</xs:complexType>
</xs:element>
</xs:schema>
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Simple prototype of an ticket, to be used by ProtoGENI
#
default namespace = "http://www.protogeni.net/resources/ticket/0.1"
#
# Include the whole rspec, in its own namespace
#
namespace rs = "http://www.protogeni.net/resources/rspec/0.1"
start = element ticket {
# If this ticket is not "cashed in" by this time (UTC), it is invalid
attribute redeem_before { xsd:dateTime },
# How long the holder may keep the specified resources
attribute valid_until { xsd:dateTime},
# The slice this ticket has been issued to (UUID)
attribute issued_to { text },
# The set of resources being promised by this ticket
element rs:rspec
# Question: Do we need a unqiue identifer for the ticket itself?
# Question: Do we need to include information about who issued this ticket?
# TODO: Need to include an XML signature, don't know quite what that looks
# like
}
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