Monday, November 25, 2024

youtube

   
Text Size

Broker Rspecs

NITOS RSpecs

The AM of the NITOS is accessible through:

  • GENI AM v2: https://nitlab.inf.uth.gr:8001/RPC2
  • GENI AM v3: under development

Advertisement of available resources

The first step in completing a reservation using SFA, is getting an advertisement of the available resources. Below we quote a sample advertisement. The RSpecs are based on GENI v3 with extensions regarding WiFi channels and reservations.

<?xml version="1.0"?>
<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ol="http://nitlab.inf.uth.gr/schema/sfa/rspec/1" xmlns:omf="http://schema.mytestbed.net/sfa/rspec/1" type="advertisement" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/ad.xsd http://nitlab.inf.uth.gr/schema/sfa/rspec/1 http://nitlab.inf.uth.gr/schema/sfa/rspec/1/ad-reservation.xsd" generated="2013-12-09T17:13:36+02:00" expires="2013-12-09T17:23:36+02:00">
 <ol:lease id="8749d9cc-2a0c-452d-84fe-5601800cb55f" valid_from="2013-12-09T17:11:13+02:00" valid_until="2013-12-09T18:11:13+02:00"/>
 <ol:lease id="eaba325f-27b8-44aa-baa2-dd4945c142cd" valid_from="2013-12-09T18:11:13+02:00" valid_until="2013-12-09T19:11:13+02:00"/>
 <ol:channel component_id="urn:publicid:IDN+omf:nitos+ol:channel+1" component_manager_id="urn:publicid:IDN+omf:nitos+authority+am" component_name="1" frequency="2.412GHZ"/>
 <node component_id="urn:publicid:IDN+omf:nitos.outdoor+node+node0" component_manager_id="urn:publicid:IDN+omf:nitos+authority+am" component_name="node0" exclusive="true">
   <available now="true"/>
   <interface component_id="urn:publicid:IDN+omf:nitos.outdoor+interface+node0:if0" component_name="node0:if0">
     <ip address="10.0.1.0" ip_type="ipv4" netmask="255.255.255.0"/>
   </interface>
   <ol:lease_ref id_ref="8749d9cc-2a0c-452d-84fe-5601800cb55f"/>
 </node>
 <node component_id="urn:publicid:IDN+omf:nitos.outdoor+node+node1" component_manager_id="urn:publicid:IDN+omf:nitos+authority+am" component_name="node1" exclusive="true">
   <available now="true"/>
   <interface component_id="urn:publicid:IDN+omf:nitos.outdoor+interface+node1:if0" component_name="node1:if0">
     <ip address="10.0.1.1" ip_type="ipv4" netmask="255.255.255.0"/>
   </interface>
   <ol:lease_ref id_ref="8749d9cc-2a0c-452d-84fe-5601800cb55f"/>
   <ol:lease_ref id_ref="eaba325f-27b8-44aa-baa2-dd4945c142cd"/>
 </node>
</rspec>

In the advertisement above we can come to the conclusion that:

  1. Two nodes are available (node0 and node1)
    • node0 has one interface with ip 10.0.1.0
    • node1 has one interface with ip 10.0.1.1
  2. Channel 1 is available with frequency '2.412GHZ'
  3. There are two leases active,  that are being referred by node0 and node1. Node0 is reserved during the dates that are listed in the first lease whereas node1 is also reserved during the dates of the second lease. 

Reservation Request

After inspecting an advertisement, we have all the required information to generate a request to make a new reservation with the available resources. For example, if we want to create a new lease that reserves node1 from "2013-01-08T19:00:00Z" to "2013-01-08T20:00:00Z", we have to generate and send the following RSpec:

<?xml version="1.0"?>
<rspec type="request" xmlns="http://www.geni.net/resources/rspec/3" xmlns:ol="http://nitlab.inf.uth.gr/schema/sfa/rspec/1" xmlns:omf="http://schema.mytestbed.net/sfa/rspec/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd http://nitlab.inf.uth.gr/schema/sfa/rspec/1 http://nitlab.inf.uth.gr/schema/sfa/rspec/1/request-reservation.xsd">  
 <ol:lease client_id="l1" valid_from="2013-01-08T19:00:00Z" valid_until="2013-01-08T20:00:00Z"/>
 <node component_id="urn:publicid:IDN+omf:nitos.outdoor+node+node1" component_manager_id="urn:publicid:IDN+omf:nitos+authority+am" component_name="node1" exclusive="true" client_id="my_node">    
   <interface component_id="urn:publicid:IDN+omf:nitos+interface+control" component_name="control">      
     <ip address="10.0.0.1"/>      
   </interface>
   <ol:lease_ref id_ref="l1"/>
 </node>
</rspec>

In the Request RSpec we make use of temporary IDs with the help of the attribute "client_id" in the lease and node elements. We make use of this temporary ID in the lease element in order to reference it in every node we want to reserve.

Manifest

After a request is sent, a response comes back in the form of a manifest, the manifest of the above request is:

<?xml version="1.0"?>
<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ol="http://nitlab.inf.uth.gr/schema/sfa/rspec/1" xmlns:omf="http://schema.mytestbed.net/sfa/rspec/1" type="manifest" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/manifest.xsd http://nitlab.inf.uth.gr/schema/sfa/rspec/1 http://nitlab.inf.uth.gr/schema/sfa/rspec/1/request-reservation.xsd" generated="2013-12-09T17:15:19+02:00">
 <ol:lease id="9e2893b9-af8e-4d60-9b5d-4d1836475a39" client_id="l1" valid_from="2013-01-08T21:00:00+02:00" valid_until="2013-01-08T22:00:00+02:00"/>
 <node client_id="my_node" component_id="urn:publicid:IDN+omf:nitos.outdoor+node+node1" component_manager_id="urn:publicid:IDN+omf:nitos+authority+am" component_name="node1" exclusive="true">
   <available now="true"/>
   <interface component_id="urn:publicid:IDN+omf:nitos.outdoor+interface+node1:if0" component_name="node1:if0">
     <ip address="10.0.1.1" ip_type="ipv4" netmask="255.255.255.0"/>
   </interface>
   <ol:lease_ref id_ref="9e2893b9-af8e-4d60-9b5d-4d1836475a39"/>
 </node>
</rspec>

This informs us that the request successfully created a lease from "2013-01-08T21:00:00+02:00" until "2013-01-08T22:00:00+02:00" for node1. We can also see the client_id tags we have sent with the request RSpec but now assosciated with unique IDs assigned by the AM itself.

Who's Online

We have 30 guests and no members online

VIDEO DEMONSTRATIONS