Skip to content
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.
Umar Toseef edited this page Jul 2, 2015 · 1 revision

##Installation

OMNI is a command-line interface that comes shipped with the GENI Control Framework. You can download the latest GENI Control Framework source from the website and configure it.

Configuration

  • Get user certificate and private key. You may get them using Expedient or C-BAS Admin Tool.

    • Expedient (Assuming user already exists)
      • Log in as a user (Let's assume bob) at the Expedient
      • Go to 'Account > Manage certificates'
      • Press 'Regenerate' to create a certificate and key pair. Download both the certificate and the certificate key. NOTE: Certificate key is not stored on the server and therefore can be downloaded only once.
      • Place downloaded certificate (e.g., bob-cert.pem) and certificate key (e.g., bob-key.pem) under ~/.gcf/ folder
    • C-BAS Admin Tool (Assuming user does not exist)
      • Go to Members tab
      • Press New Member button and provide required details to create a new user (Let's assume bob). You will be prompted to save the certificate and key on the local machine.
      • Copy saved the certificate (e.g., bob-cert.pem) and certificate key (e.g., bob-key.pem) under ~/.gcf/ folder
  • Append the following block to the OMNI config file typically found at ~/.gcf/omni_config

     [my_cbas]
     type=chapi
     speakv2=true
     default_project=default
     # (use the same authority you set up when configuring cbas)
     authority=cbas.eict.de
     ch=https://localhost:8008/reg/2
     cert=~/.gcf/bob-cert.pem
     key=~/.gcf/bob-key.pem

In the listing above, First line gives a reference name to this set of configuration values which is provided as an argument when executing OMNI commands. Second and thrid lines specify the control framework type as FAPI version 2. Afterwards, the host name of the clearinghouse authority is declared that is followed by an address pointer to the Service Registry of C-BAS. Finally, last two lines provide paths to user certificate and private key files issued by C-BAS.

  • Use getusercred command to retrieve user credentials and place them under ~/.gcf/ folder
    • python src/omni -f my_cbas --usercredfile ~/.gcf/bob-cred.xml -o getusercred
    • NOTE By using -f my_cbas option we are telling omni to use my_cbas framework configuration from ~/.gcf/omni_config file

OMNI commands

After your environment is properly set up and configured, you will be able to send requests against the GENI APIs of aggregate managers. See OMNI help for a list of supported commands. The following are few typical calls made to an AM that supports GENI AM API version 3. Please, take care to change $am_address/$endpoint by:

  1. $am_address: the URI of aggregate manager
  2. $endpoint: path where the AM's GENIv3 server runs, e.g., /xmlrpc/geni/3/
# Retrieve version and meta information of the AM
python src/omni.py -f my_cbas -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   getversion 

# Retrieve list of resources provided by the AM
python src/omni.py -f my_cbas -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   --no-compress listresources

# Create a slice and save its credentials under `~/.gcf/mySliceCred.json`
python src/omni.py -f my_cbas -V3 createslice "testslice" \ 
      "2015-12-31T15:00:00+01:00" --cred ~/.gcf/bob-cred.xml  \ 
      --debug -o --slicecredfile ~/.gcf/mySliceCred.json

# Retrieve contents (slivers) belonging to a given slice
python src/omni.py -f my_cbas -V3 -o -a $am_address/xmlrpc/geni/3/ -V 3 --debug \
                   describe "testslice" --cred ~/.gcf/bob-cred.xml

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

NOTE:

  • Use --cred ~/.gcf/bob-cred.xml option wherever user credentials needed to be passed. User credentials can be obtained any time using getusercred command as explained above. In general user credentials are required for clearinghouse related operations, e.g., to create a slice etc.
  • Use --slicecredfile ~/.gcf/mySliceCred.json option to pass slice credentials when calling AM API functions. Slice credentials can be obtained any time using getslicecred command, e.g.,
python src/omni.py -a $am_address/xmlrpc/geni/3/ -V3 -f my_cbas getslicecred "testXP" -o --slicecredfile ~/.gcf/mySliceCred.json

OMNI does not overwrite existing files, therefore it is recommended to delete the credential file if it already exists before running the above command.

Clone this wiki locally