Skip to content

GENI usage

CarolinaFernandez edited this page Dec 4, 2014 · 7 revisions

Home > Experimenting > Using GENI


Introduction

SFA, GENIv2 and GENIv3 APIs are currently used to standardize the access to several kind of resources provided by experimental testbeds. The Aggregate Managers in OFELIA are compatible with this APIs (source code currently available in the ofelia.development branch).

Guides

GENIv2 manual GENIv2 RSpecs GENIv2 manual
GENIv3 tutorial GENIv3 RSpecs GENIv2 manual

Quick introduction to OMNI

OMNI is a command-line interface that allows reserving resources at GENI aggregate managers. After configuring it, you will be able to send requests against the GENI APIs of the OFELIA AMs as follows.

Also, take care to change $am_address/$endpoint by:

  1. $am_address: the URI of each OFELIA AM. This information is provided in the previous documentation
  2. $endpoint: path for each GENI version:
  • GENIv2: /xmlrpc/sfa/
  • GENIv3: /xmlrpc/geni/3/

GENIv2

# Retrieve version and meta information of the AM
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   getversion

# Retrieve list of resources provided by the AM
# (e.g. servers for VTAM, switches for OFAM)
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   --no-compress listresources

# Create slivers in a slice
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   createsliver slicename rspec-req.xml

# Renew time where reserved/allocated resources are kept from 
# other users
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   renewsliver slicename 2013-02-07T15:00:50.52Z

# Retrieve status of a given slice
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   sliverstatus slicename

# Delete a given slice and all its contents
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   deletesliver slicename

# Shut down a given slice and all its contents
# Intended for admin/operator use only
python src/omni.py -o -a $am_address/xmlrpc/sfa/ -V 2 --debug \
                   shutdown slicename

GENIv3

# Retrieve version and meta information of the AM
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   getversion

# Retrieve list of resources provided by the AM
# (e.g. servers for VTAM, switches for OFAM)
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   --no-compress listresources

# Retrieve contents (slivers) belonging to a given slice
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   describe slicename

# Reserve/Allocate resources within a slice.
# (Parameter "--end-time" optional)
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   allocate slicename rspec-req.xml \
                   --end-time=2014-04-12T23:20:50.52Z

# Renew time where reserved/allocated resources are kept from 
# other users
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   renew slicename 2013-02-07T15:00:50.52Z

# Provision the resources previously allocated
# (Parameter "--end-time" optional)
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   provision slicename \
                   --end-time=2014-04-12T23:20:50.52Z

# Retrieve status of a given slice
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   status slicename

# Perform action over a resource or sliver
# Actions are usually: [geni_start | geni_stop | geni_restart]
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   performoperationalaction slicename geni_start

# Delete a given slice and all its contents
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   delete slicename

# Shut down a given slice and all its contents
# Intended for admin/operator use only
python src/omni.py -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   shutdown slicename

Example of the VTAM RSpec for rspec-req.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rspec type="request"
    xs:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd"
    xmlns="http://www.geni.net/resources/rspec/3"
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1">
  <node client_id="Verdaguer" component_id="urn:publicid:IDN+ocf:i2cat:vtam+node+Verdaguer" component_manager_id="urn:publicid:IDN+ocf:i2cat:vtam+authority+cm" exclusive="true">
      <sliver_type name="emulab-xen">
        <emulab:xen cores="3" ram="1024" disk="10"/>
        <disk_image name="urn:publicid:IDN+wall2.ilabt.iminds.be+image+emulab-ops//DEB60_64-VLAN"/>
     </sliver_type>
  </node>
         <node client_id="Rodoreda" component_id="urn:publicid:IDN+ocf:i2cat:vtam+node+Rodoreda" component_manager_id="urn:publicid:IDN+ocf:i2cat:vtam+authority+cm" exclusive="true">
      <sliver_type name="emulab-xen">
        <emulab:xen cores="3" ram="1024" disk="10"/>
        <disk_image name="urn:publicid:IDN+wall2.ilabt.iminds.be+image+emulab-ops//DEB60_64-VLAN"/>
     </sliver_type>
  </node>
</rspec>

If everything is working properly you should see something like this (example for GENIv3):

Result Summary: Slice urn:publicid:IDN+geni:gpo:gcf+slice+slicename expires in <= 3 hours on ... UTC
Saved allocation of slivers in slice urn:publicid:IDN+geni:gpo:gcf+slice+slicename at AM $am_address/xmlrpc/geni/3/ to file slicename-allocate-$am_address/xmlrpc/geni/3/.json. 
All slivers expire on: ... 
You can’t perform that action at this time.