Commit 74f3a79e authored by Robert Ricci's avatar Robert Ricci
Browse files

Merge the ticket in with credentials

parent 17659ffc
......@@ -14,16 +14,21 @@
# blob will be signed. So, there will be multiple signatures in the
# document, each with a reference to the credential it signs.
#
default namespace = "http://www.protogeni.net/resources/credential/0.1"
namespace sig = "http://www.w3.org/2000/09/xmldsig#"
datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes"
anyelementbody = (attribute * {text} | text | element * {anyelementbody} )*
# This is where we get the definition of RSpec from
include "../rspec/protogeni-rspec-common.rnc"
## Representation of a single capability.
CapabilitySpec = element capability {
# Name of the capability.
element capability_name { xsd:string { minLength = "1" }},
# Flag indicating this capability can be delegated
element can_delegate { "0" | "1" }
element can_delegate { xsd:boolean }
}
## A set of capabilities.
......@@ -34,8 +39,14 @@ CapabilitiesSpec = element capabilities {
## Define a stub for future ticket.
TicketSpec = element ticket {
## Can the ticket be delegated?
element can_delegate { "0" | "1" },
anyelementbody
element can_delegate { xsd:boolean },
## The ticket must be "cashed in" by this date
element redeem_before { xsd:dateTime },
## A desciption of the resources that are being promised
# Note: What I really want to do here is reference RSpec as being
# in a separate namespace. But, it's not clear to me how to do this,
# so we basically just use by inclusion
RSpec
}
## A list of signatures.
......@@ -61,8 +72,9 @@ credentials = element credential {
element parent { credentials }?
}
start = element signed-credential {
SignedCredential = element signed-credential {
credentials,
signatures
}
start = SignedCredential
......@@ -18,29 +18,23 @@
document, each with a reference to the credential it signs.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:sig="http://www.w3.org/2000/09/xmldsig#">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/credential/0.1" xmlns:sig="http://www.w3.org/2000/09/xmldsig#" xmlns:credential="http://www.protogeni.net/resources/credential/0.1" xmlns:top="http://emulab.net/resources/top/0.2">
<xs:include schemaLocation="protogeni-rspec-common.xsd"/>
<xs:import namespace="http://emulab.net/resources/top/0.2" schemaLocation="top.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="sig.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:group name="anyelementbody">
<xs:complexType name="anyelementbody" mixed="true">
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xs:sequence>
</xs:group>
<xs:attributeGroup name="anyelementbody">
<xs:anyAttribute processContents="skip"/>
</xs:attributeGroup>
</xs:complexType>
<!-- This is where we get the definition of RSpec from -->
<xs:element name="capability">
<xs:complexType>
<xs:sequence>
<xs:element ref="capability_name"/>
<xs:element name="can_delegate">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element ref="credential:capability_name"/>
<xs:element name="can_delegate" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
......@@ -54,29 +48,32 @@
<xs:element name="capabilities">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="capability"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="credential:capability"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ticket">
<xs:complexType mixed="true">
<xs:complexType>
<xs:sequence>
<xs:element name="can_delegate">
<xs:element name="can_delegate" type="xs:boolean">
<xs:annotation>
<xs:documentation>Can the ticket be delegated?</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:group ref="anyelementbody"/>
<xs:element ref="credential:redeem_before"/>
<xs:element ref="credential:rspec">
<xs:annotation>
<xs:documentation>A desciption of the resources that are being promised</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="anyelementbody"/>
</xs:complexType>
</xs:element>
<xs:element name="redeem_before" type="xs:dateTime">
<xs:annotation>
<xs:documentation>The ticket must be "cashed in" by this date </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="signatures">
<xs:complexType>
<xs:sequence>
......@@ -89,24 +86,24 @@
<xs:documentation>A credential granting capabilities or a ticket.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="credential"/>
<xs:element ref="credential:credential"/>
</xs:sequence>
</xs:complexType>
<xs:element name="credential">
<xs:complexType>
<xs:sequence>
<xs:element ref="type"/>
<xs:element ref="serial"/>
<xs:element ref="owner_uuid"/>
<xs:element ref="this_uuid"/>
<xs:element ref="credential:type"/>
<xs:element ref="credential:serial"/>
<xs:element ref="credential:owner_uuid"/>
<xs:element ref="credential:this_uuid"/>
<xs:choice>
<xs:annotation>
<xs:documentation>Capabilities or a ticket</xs:documentation>
</xs:annotation>
<xs:element ref="capabilities"/>
<xs:element ref="ticket"/>
<xs:element ref="credential:capabilities"/>
<xs:element ref="credential:ticket"/>
</xs:choice>
<xs:element minOccurs="0" ref="parent"/>
<xs:element minOccurs="0" ref="credential:parent"/>
</xs:sequence>
<xs:attribute ref="xml:id" use="required"/>
</xs:complexType>
......@@ -137,7 +134,7 @@
<xs:documentation>UUID of this credential</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="parent" type="credentials">
<xs:element name="parent" type="credential:credentials">
<xs:annotation>
<xs:documentation>Parent that delegated to us</xs:documentation>
</xs:annotation>
......@@ -145,9 +142,9 @@
<xs:element name="signed-credential">
<xs:complexType>
<xs:complexContent>
<xs:extension base="credentials">
<xs:extension base="credential:credentials">
<xs:sequence>
<xs:element ref="signatures"/>
<xs:element ref="credential:signatures"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
......
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.protogeni.net/resources/credential/0.1" xmlns:sig="http://www.w3.org/2000/09/xmldsig#" xmlns:credential="http://www.protogeni.net/resources/credential/0.1" xmlns:top="http://emulab.net/resources/top/0.2">
<xs:import namespace="http://emulab.net/resources/top/0.2" schemaLocation="top.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="sig.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<!--
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
-->
<!-- Add some more stuff to nodes -->
<xs:group name="NodeSpec">
<xs:sequence>
<xs:element minOccurs="0" ref="credential:avaiable"/>
</xs:sequence>
</xs:group>
<xs:element name="avaiable" type="xs:boolean"/>
<xs:attributeGroup name="NodeSpec">
<xs:attribute name="uuid" use="required"/>
<xs:attribute name="name"/>
<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="credential:NodeSpec"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="top:link"/>
</xs:sequence>
<xs:attribute name="generated" use="required" type="xs:dateTime"/>
<xs:attribute name="valid_until" use="required" type="xs:dateTime"/>
<xs:attribute name="uuid"/>
<xs:attribute name="name"/>
<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:attribute name="uuid"/>
<xs:attribute name="name"/>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2000/09/xmldsig#" xmlns:sig="http://www.w3.org/2000/09/xmldsig#">
<xs:import schemaLocation="credential.xsd"/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2000/09/xmldsig#" xmlns:sig="http://www.w3.org/2000/09/xmldsig#" xmlns:credential="http://www.protogeni.net/resources/credential/0.1" xmlns:top="http://emulab.net/resources/top/0.2">
<xs:import namespace="http://emulab.net/resources/top/0.2" schemaLocation="top.xsd"/>
<xs:import namespace="http://www.protogeni.net/resources/credential/0.1" schemaLocation="credential.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:element name="Signature">
<xs:complexType mixed="true">
<xs:group ref="anyelementbody"/>
<xs:attributeGroup ref="anyelementbody"/>
</xs:complexType>
</xs:element>
<xs:element name="Signature" type="credential:anyelementbody"/>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2005-2007 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Definition of common data structures used for representing topologies -
shared between vtop (virtual topology) and ptop (physical topology)
formats.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://emulab.net/resources/top/0.2" xmlns:sig="http://www.w3.org/2000/09/xmldsig#" xmlns:credential="http://www.protogeni.net/resources/credential/0.1" xmlns:top="http://emulab.net/resources/top/0.2">
<xs:import namespace="http://www.protogeni.net/resources/credential/0.1" schemaLocation="credential.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="sig.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:element name="node_type">
<xs:complexType>
<xs:sequence>
<xs:element name="type_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the type - will almost certainly not be unique</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element ref="top:type_slots"/>
<xs:element ref="top:unlimited"/>
</xs:choice>
<xs:element minOccurs="0" ref="top:static"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="type_slots">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="unlimited">
<xs:complexType/>
</xs:element>
<xs:element name="static">
<xs:complexType/>
</xs:element>
<xs:group name="NodeSpec.NodeType">
<xs:annotation>
<xs:documentation>A node can (by default) have one or more types</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="top:node_type"/>
</xs:sequence>
</xs:group>
<xs:element name="link_type">
<xs:complexType>
<xs:sequence>
<xs:element name="type_name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="link">
<xs:complexType>
<xs:sequence>
<xs:element ref="top:source_interface"/>
<xs:element ref="top:destination_interface"/>
<xs:element ref="top:bandwidth"/>
<xs:element ref="top:latency"/>
<xs:element ref="top:packet_loss"/>
<xs:group ref="top:LinkSpec.LinkType"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="top:property">
<xs:annotation>
<xs:documentation>Properties of this link</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation>Name of the link - must be unique in the top</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="source_interface" type="top:InterfaceSpec"/>
<xs:element name="destination_interface" type="top:InterfaceSpec">
<xs:annotation>
<xs:documentation>Second interface for this link</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="bandwidth">
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minExclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="latency">
<xs:annotation>
<xs:documentation>Latency of the link in ms</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="packet_loss">
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:attributeGroup name="LinkSpec">
<xs:annotation>
<xs:documentation>Links in the topology - zero or more</xs:documentation>
</xs:annotation>
<xs:attribute name="uuid" use="required"/>
<xs:attribute name="name"/>
</xs:attributeGroup>
<xs:group name="LinkSpec.LinkType">
<xs:annotation>
<xs:documentation>A link can (by default) have zero or more types</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="top:link_type"/>
</xs:sequence>
</xs:group>
<xs:element name="fd">
<xs:complexType>
<xs:sequence>
<xs:element ref="top:fd_name"/>
<xs:element ref="top:fd_weight"/>
<xs:element minOccurs="0" name="violatable">
<xs:complexType/>
</xs:element>
<xs:choice minOccurs="0">
<xs:annotation>
<xs:documentation>Type information expressed in features and desires</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="top:global"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element ref="top:local"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="fd_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of this feature or desire</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="fd_weight" type="xs:float">
<xs:annotation>
<xs:documentation>Weight assocated with the feature or desire</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="global">
<xs:complexType/>
</xs:element>
<xs:element name="local">
<xs:complexType/>
</xs:element>
<xs:group name="NodeFlagSpec">
<xs:sequence>
<xs:element ref="top:trivial_bandwidth"/>
<xs:element minOccurs="0" ref="top:subnode_of"/>
<xs:element minOccurs="0" ref="top:unique"/>
<xs:element minOccurs="0" ref="top:disallow_trivial_mix"/>
</xs:sequence>
</xs:group>
<xs:element name="trivial_bandwidth" type="xs:integer"/>
<xs:element name="subnode_of" type="xs:string"/>
<xs:element name="unique">
<xs:complexType/>
</xs:element>
<xs:element name="disallow_trivial_mix">
<xs:complexType/>
</xs:element>
<xs:complexType name="InterfaceSpec">
<xs:annotation>
<xs:documentation>Interfaces</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="top:interface"/>
</xs:sequence>
<xs:attribute name="node_uuid" use="required"/>
<xs:attribute name="node_name"/>
</xs:complexType>
<xs:element name="interface">
<xs:complexType>
<xs:sequence>
<xs:element ref="top:node_name"/>
<xs:element name="interface" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the interface itself</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="top:property">
<xs:annotation>
<xs:documentation>Properties of the interface</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="node_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the node, which must match one of the nodes in this topology</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:sequence>
<xs:element ref="top:property_name"/>
<xs:element ref="top:property_value"/>
<xs:element ref="top:property_penalty"/>
<xs:element minOccurs="0" name="violatable">
<xs:annotation>
<xs:documentation>If this flag is present, not having the property is considered a violation</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:choice minOccurs="0">
<xs:sequence>
<xs:element ref="top:global"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element ref="top:local"/>
<xs:element name="operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="="/>
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="property_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of this property</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="property_value" type="xs:string"/>
<xs:element name="property_penalty">
<xs:annotation>
<xs:documentation>The penalty associated with this property</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:sig="http://www.w3.org/2000/09/xmldsig#">
<xs:import schemaLocation="credential.xsd"/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:sig="http://www.w3.org/2000/09/xmldsig#" xmlns:credential="http://www.protogeni.net/resources/credential/0.1" xmlns:top="http://emulab.net/resources/top/0.2">
<xs:import namespace="http://emulab.net/resources/top/0.2" schemaLocation="top.xsd"/>
<xs:import namespace="http://www.protogeni.net/resources/credential/0.1" schemaLocation="credential.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="sig.xsd"/>
<xs:attribute name="id" type="xs:ID">
<xs:annotation>
......
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