Commit 85ab92d5 authored by Leigh Stoller's avatar Leigh Stoller

Convert rspec to submodule

parent 4cb50ced
[submodule "protogeni/rspec-geni"]
path = protogeni/rspec-geni
url = git-public.flux.utah.edu:/flux/git/geni-rspec.git
......@@ -12,7 +12,7 @@ SUBDIR = protogeni/rspec-emulab/0.1
#
# Switch our VPATH over to where the actual files live.
#
MOSTLY_SRCDIRS = $(subst rspec-emulab,rspec,$(SRCDIR))
MOSTLY_SRCDIRS = $(subst rspec-emulab,rspec-geni,$(SRCDIR))
include $(OBJDIR)/Makeconf
......
......@@ -12,7 +12,7 @@ SUBDIR = protogeni/rspec-emulab/0.2
#
# Switch our VPATH over to where the actual files live.
#
MOSTLY_SRCDIRS = $(subst rspec-emulab,rspec,$(SRCDIR))
MOSTLY_SRCDIRS = $(subst rspec-emulab,rspec-geni,$(SRCDIR))
include $(OBJDIR)/Makeconf
......
......@@ -12,7 +12,7 @@ SUBDIR = protogeni/rspec-emulab/2
#
# Switch our VPATH over to where the actual files live.
#
MOSTLY_SRCDIRS = $(subst rspec-emulab,rspec,$(SRCDIR))
MOSTLY_SRCDIRS = $(subst rspec-emulab,rspec-geni,$(SRCDIR))
include $(OBJDIR)/Makeconf
......
rspec-geni @ 2fddf099
Subproject commit 2fddf0990a12a0b33b02752fb77b3a79427cabad
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2011 University of Utah and the Flux Group.
# All rights reserved.
#
ifdef TRANG
TRANGCMD = java -jar ${TRANG}
else
TRANGCMD = java -jar /usr/local/share/java/classes/trang.jar
endif
SCHEMAS = ad.xsd request.xsd manifest.xsd
all: $(SCHEMAS)
clean:
rm $(SCHEMAS)
%.xsd: %.rnc
mkdir -p tmp
$(TRANGCMD) $< tmp/$@
mv tmp/top.xsd $(@:.xsd=)-top.xsd
sed "s/top.xsd/$(@:.xsd=)-top.xsd/" tmp/common.xsd > $(@:.xsd=)-common.xsd
rm tmp/common.xsd
sed "s/common.xsd/$(@:.xsd=)-common.xsd/" tmp/$@ > $@
rm tmp/$@
if [ $< = manifest.rnc ]; then \
sed "s/common.xsd/manifest-common.xsd/" tmp/request.xsd > manifest-request.xsd; \
rm tmp/request.xsd; \
sed "s/request.xsd/manifest-request.xsd/" manifest.xsd > manifest.tmp; \
mv manifest.tmp manifest.xsd; \
fi
rmdir tmp
.PHONY: clean
<?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/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<xs:include schemaLocation="ad-top.xsd"/>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2008 University of Utah and the Flux Group.
All rights reserved.
-->
<!--
Common definitions for advertisements, requests, and tickets
Version 0.1
-->
<xs:element name="node" type="rspec:NodeContents"/>
<xs:element name="link" type="rspec:LinkContents"/>
<xs:complexType name="NodeContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="rspec:subnode_of"/>
<xs:group ref="rspec:NodeTypeList"/>
<xs:element ref="rspec:interface"/>
</xs:choice>
<xs:choice>
<xs:element ref="rspec:location"/>
<xs:element ref="rspec:available"/>
<xs:element ref="rspec:exclusive"/>
<xs:element ref="rspec:cloud"/>
<xs:element ref="rspec:services"/>
</xs:choice>
</xs:choice>
<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:enumeration value="bgpmux"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="rspec:ComponentName"/>
</xs:complexType>
<xs:element name="subnode_of" type="xs:string"/>
<xs:element name="interface" type="rspec:InterfaceDecl"/>
<xs:element name="available" type="xs:boolean"/>
<xs:element name="exclusive" type="xs:boolean"/>
<xs:element name="cloud">
<xs:complexType/>
</xs:element>
<xs:element name="services" type="rspec:ServiceContents"/>
<xs:complexType name="LinkContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:group ref="rspec:LinkType"/>
<xs:element ref="rspec:interface_ref"/>
</xs:choice>
<xs:choice>
<xs:element ref="rspec:bandwidth"/>
<xs:element ref="rspec:latency"/>
<xs:element ref="rspec:packet_loss"/>
</xs:choice>
</xs:choice>
<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 ref="rspec:ComponentName"/>
</xs:complexType>
<xs:element name="interface_ref">
<xs:complexType>
<xs:attributeGroup ref="rspec:InterfaceRef"/>
</xs:complexType>
</xs:element>
<xs:element name="bandwidth">
<xs:annotation>
<xs:documentation>Bandwidth of the link in kbps</xs:documentation>
</xs:annotation>
<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:annotation>
<xs:documentation>Static packet loss probability of the link as a fraction
(ie. 0.01 == 1%)</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:group name="NodeTypeList">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="rspec:node_type"/>
</xs:sequence>
</xs:group>
<xs:group name="LinkType">
<xs:sequence>
<xs:element name="link_type">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:field"/>
</xs:sequence>
<xs:attribute name="name"/>
<xs:attribute name="type_name"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:element name="field">
<xs:complexType>
<xs:attribute name="key" use="required"/>
<xs:attribute name="value" use="required"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="VirtualName">
<xs:attribute name="virtual_id" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="ComponentName">
<xs:attribute name="component_manager_uuid"/>
<xs:attribute name="component_manager_urn"/>
<xs:attribute name="component_name"/>
<xs:attribute name="component_uuid"/>
<xs:attribute name="component_urn"/>
</xs:attributeGroup>
<xs:attributeGroup name="ComponentInterfaceDeclName">
<xs:attribute name="component_id" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="ComponentInterfaceRefName">
<xs:attribute name="component_node_uuid"/>
<xs:attribute name="component_node_urn"/>
<xs:attribute name="component_interface_id" use="required"/>
</xs:attributeGroup>
<xs:complexType name="InterfaceDecl">
<xs:sequence>
<xs:element minOccurs="0" ref="rspec:monitoring"/>
</xs:sequence>
<xs:attributeGroup ref="rspec:ComponentInterfaceDeclName"/>
<xs:attribute name="role">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="control"/>
<xs:enumeration value="experimental"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="public_ipv4"/>
</xs:complexType>
<xs:element name="monitoring">
<xs:complexType>
<xs:attribute name="user_traffic"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="InterfaceRef">
<xs:attributeGroup ref="rspec:ComponentInterfaceRefName"/>
</xs:attributeGroup>
<xs:element name="location">
<xs:complexType>
<xs:attribute name="country" use="required"/>
<xs:attribute name="longitude"/>
<xs:attribute name="latitude"/>
</xs:complexType>
</xs:element>
<xs:element name="rspec" type="rspec:RSpecContents"/>
<xs:complexType name="RSpecContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="rspec:node"/>
<xs:element ref="rspec:link"/>
</xs:choice>
<xs:choice>
<xs:element ref="rspec:external_ref"/>
<xs:element ref="rspec:bgp_prefix"/>
</xs:choice>
</xs:choice>
<xs:attribute name="generated" type="xs:dateTime"/>
<xs:attribute name="generated_by"/>
<xs:attribute name="valid_until" type="xs:dateTime"/>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="advertisement"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:schema>
<?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/rspec/0.1" xmlns:rspec="http://www.protogeni.net/resources/rspec/0.1">
<!--
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.
Version 0.1
-->
<xs:element name="node_type">
<xs:complexType>
<xs:complexContent>
<xs:extension base="rspec:NodeTypeContents">
<xs:attribute name="type_name" use="required">
<xs:annotation>
<xs:documentation>Name of the type - will almost certainly not be unique</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type_slots" use="required">
<xs:annotation>
<xs:documentation>How many virtual nodes of this type this physical node can
handle.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="unlimited"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="static">
<xs:annotation>
<xs:documentation>element unlimited { empty }?,
A flag that indicates that this physical node *always*
has this type - a node is only allowed to have one dynamic
(ie. not flagged as static) type at a time, but any number
of static types at a time
element static { empty }?</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="NodeTypeContents">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:field"/>
</xs:sequence>
</xs:complexType>
<xs:group name="LinkTypeSpec">
<xs:annotation>
<xs:documentation>Link types are currently just a siple string. They will almost certainly
have to get more complicated, for two reasons:
First, I want to allow virtual links to specify more than one type, so
that we can ask for links that are, say, 'ethernet or loopback'
Second, I want to have a lot more control over links that get mapped to
multi-hop paths
TODO: MAYBE this should be combined with NodeTypeSpec</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="link_type">
<xs:complexType>
<xs:attribute name="type_name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="LinkEndPoints">
<xs:annotation>
<xs:documentation>A link has two endpoints. Right now, they are order
independent. But they might become order-dependant later.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="rspec:source_interface"/>
<xs:element ref="rspec:destination_interface"/>
</xs:sequence>
</xs:group>
<xs:element name="source_interface" type="rspec:InterfaceSpec">
<xs:annotation>
<xs:documentation>First interface for this link</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="destination_interface" type="rspec:InterfaceSpec">
<xs:annotation>
<xs:documentation>Second interface for this link</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group name="LinkCharacteristics">
<xs:annotation>
<xs:documentation>Link characterstics which affect traffic.
TODO: In the future, the bandwidth, latency, and packet loss will be
moved to features and/or properties</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="rspec:bandwidth"/>
<xs:element ref="rspec:latency"/>
<xs:element ref="rspec:packet_loss"/>
</xs:sequence>
</xs:group>
<xs:element name="fd">
<xs:complexType>
<xs:attribute name="fd_name" use="required">
<xs:annotation>
<xs:documentation>Name of this feature or desire
element fd_name { text },</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fd_weight" use="required">
<xs:annotation>
<xs:documentation>Weight assocated with the feature or desire
element fd_weight { xsd:float },</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="violatable">
<xs:annotation>
<xs:documentation>A flag indicating whether or not a failure to match the desire with a
a feature is a constraint violation
element violatable { empty }?,</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="global_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="local_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="GlobalSpec">
<xs:annotation>
<xs:documentation>GlobalSpec = element global {
element operator { "OnceOnly" | "FirstFree" }
}</xs:documentation>
</xs:annotation>
<xs:attribute name="global_operator" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="LocalSpec">
<xs:annotation>
<xs:documentation>LocalSpec = element local {
element operator { "+" }
attribute local_operator { "+" }
}</xs:documentation>
</xs:annotation>
<xs:attribute name="local_operator" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="InterfaceSpec">
<xs:annotation>
<xs:documentation>Interfaces
InterfaceSpec = element interface { InterfaceContents }</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:property"/>
</xs:sequence>
<xs:attribute name="node_name" use="required"/>
<xs:attribute name="interface_name" use="required"/>
<xs:attribute name="physical_node_name"/>
<xs:attribute name="physical_interface_name"/>
</xs:complexType>
<xs:group name="InterfaceContents">
<xs:sequence>
<xs:element ref="rspec:node_name"/>
<xs:element ref="rspec:interface_name"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="rspec:property">
<xs:annotation>
<xs:documentation>Properties of the interface</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<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="interface_name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the interface itself</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:sequence>
<xs:element ref="rspec:property_name"/>
<xs:element ref="rspec:property_value"/>
<xs:element ref="rspec:property_penalty"/>
<xs:element minOccurs="0" ref="rspec:violatable"/>
</xs:sequence>
<xs:attribute name="global_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OnceOnly"/>
<xs:enumeration value="FirstFree"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="local_operator">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</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:annotation>
<xs:documentation>Value associated with this property
TODO: Add ranges and other types from rspec</xs:documentation>
</xs:annotation>
</xs:element>
<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:element 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:schema>
#
# 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
# Version 0.1
#
default namespace = "http://www.protogeni.net/resources/rspec/0.1"
include "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 } &
# Indicates whether the node is in sharing mode: exclusive is true if
# the component manager will agree to promise not to share it.
element exclusive { xsd:boolean } &
# Marks this node as a stand-in for a large network rather than a
# single machine. This means that other CMs can make external
# references to this node without a corresponding external reference
# in this advertisement. It also means that it makes sense for
# multiple physical links to connect to the same interface.
element cloud { empty } &
# Lists services provided by the CM for this node.
element services { ServiceContents }
LinkContents &=
# Component identifiers
ComponentName &
# Characteristics (bandwidth, latency, loss) which affect traffic.
LinkCharacteristics?
InterfaceDecl &=
ComponentInterfaceDeclName &
element monitoring { attribute user_traffic { text }? }? &
attribute role { "control" | "experimental" }? &
attribute public_ipv4 { text }?
InterfaceRef &=
ComponentInterfaceRefName
# Reference to components managed by other component managers.
# TODO: Merge ComponentInterfaceRefName into just component_id when
# length restrictions on URNs end.
ExternalReference = element external_ref {
ComponentInterfaceRefName &
attribute component_manager_uuid { text }? &
attribute component_manager_urn { text }?
}
ServiceContents &=
# Login services include ssh-services, serial consoles, etc.
element login { LoginServiceContents }* &
# Install services include download and extraction of a file at
# experiment startup.
element install { InstallServiceContents }* &
# Execute services include initialization scripts
element execute { ExecuteServiceContents }*
LoginServiceContents &=
# Authentication mechanism
attribute authentication { "ssh-keys" } &
# Access mechanism
attribute hostname { text } &
attribute port { text }
InstallServiceContents &=
# Type(s) of archives supported
attribute file_type { "tar.gz" | "tar.bz2" }
ExecuteServiceContents &=
# Shell environment allowed
attribute shell { "sh" }
RSpecContents &=
attribute type { "advertisement" } &
ExternalReference* &
BgpPrefix*
BgpPrefix = element bgp_prefix {
attribute address { text } &
attribute netmask { text }
}
start = RSpec
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
Version 0.1
-->
<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="ad-common.xsd"/>
<!--
Reference to components managed by other component managers.
TODO: Merge ComponentInterfaceRefName into just component_id when
length restrictions on URNs end.
-->
<xs:element name="external_ref">
<xs:complexType>
<xs:attributeGroup ref="rspec:ComponentInterfaceRefName"/>
<xs:attribute name="component_manager_uuid"/>
<xs:attribute name="component_manager_urn"/>
</xs:complexType>
</xs:element>
<xs:complexType name="ServiceContents">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="rspec:login"/>
<xs:element ref="rspec:install"/>
<xs:element ref="rspec:execute"/>
</xs:choice>
</xs:complexType>
<xs:element name="login">
<xs:complexType>
<xs:attributeGroup ref="rspec:LoginServiceContents"/>
</xs:complexType>
</xs:element>
<xs:element name="install">
<xs:complexType>
<xs:attributeGroup ref="rspec:InstallServiceContents"/>
</xs:complexType>
</xs:element>
<xs:element name="execute">
<xs:complexType></