Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Rspecrequesttunnelexample

Rspecrequesttunnelexample

RSpec V2 Example

Example of an RSpec request for two nodes connected by a a GRE tunnel.

Connections between component managers are currently handled exclusively using GRE tunnels. You can specify a tunnel in your rspec by setting the link_type on a link to tunnel. Note that the nodes in the given example are at different component managers:

RSpec V2 Example

<?xml version="1.0" encoding="UTF-8"?>
<rspec xmlns="http://www.protogeni.net/resources/rspec/2"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2
http://www.protogeni.net/resources/rspec/2/request.xsd"
       type="request">
  <node client_id="left"
        exclusive="true"
        component_manager_id="urn:publicid:IDN+emulab.net+authority+cm">
    <sliver_type name="raw-pc" />
    <interface client_id="left:if0">
      <ip address="192.168.44.1" netmask="255.255.255.0" type="ipv4"/>
    </interface>
  </node>
  <node client_id="right"
        exclusive="true"
        component_manager_id="urn:publicid:IDN+uky.emulab.net+authority+cm">
    <sliver_type name="raw-pc" />
    <interface client_id="right:if0">
      <ip address="192.168.44.2" netmask="255.255.255.0" type="ipv4"/>
    </interface>
  </node>
  <link client_id="center">
    <component_manager name="urn:publicid:IDN+emulab.net+authority+cm" />
    <component_manager name="urn:publicid:IDN+uky.emulab.net+authority+cm" />
    <link_type name="gre-tunnel" />
    <interface_ref client_id="left:if0" />
    <interface_ref client_id="right:if0" />
  </link>
</rspec>

RSpec V0.1 Example (Deprecated)

<?xml version="1.0" encoding="UTF-8"?>
<rspec xmlns="http://www.protogeni.net/resources/rspec/0.1"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/0.1 http://www.protogeni.net/resources/rspec/0.1/request.xsd"
       type="request">
  <node component_uuid="urn:publicid:IDN+emulab.net+node+pc4"
        component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm"
        virtual_id="pc4"
        virtualization_type="emulab-vnode"
        exclusive="1">
    <node_type type_name="pc" type_slots="1"/>
    <interface virtual_id="control"/>
  </node>
  <node component_uuid="urn:publicid:IDN+uky.emulab.net+node+pc10"
        component_manager_uuid="urn:publicid:IDN+uky.emulab.net+authority+cm"
        virtual_id="pc10"
        virtualization_type="emulab-vnode"
        exclusive="1">
    <node_type type_name="pc" type_slots="1"/>
    <interface virtual_id="control"/>
  </node>
  <link virtual_id="link0"
        link_type="tunnel">
    <interface_ref virtual_node_id="pc10"
                   virtual_interface_id="control"
                   tunnel_ip="192.168.0.1" />
    <interface_ref virtual_node_id="pc4" 
                   virtual_interface_id="control"
                   tunnel_ip="192.168.0.2" />
  </link>
</rspec>