This is an archive of the ONOS 1.5 wiki. For the current ONOS wiki, look here.

CORD-Specific Tenancy Objects

XOS include three tenancy objects in support of CORD. These objects are VOLTTenant, VCPETenant, and VBNGTenant, which correspond to vOLT, vCPE, and vBNG respectively. These data objects are arranged in a hierarchical fashion. The vOLT object subscribers to the vCPE service which in turn subscribes to the vBNG service. Each one of these objects holds a service_specific_id attribute which may be used by ONOS to place a handle back to the ONOS-specific object.

The entrypoint for ONOS is intented to be the VOLTTenant object. ONOS will call XOS with the (service_specific_id, vlan_id) that corresponds to a new vOLT subscriber. XOS will then create the VOLTTenant and the remaining objects in the hierarchy. A sliver will be created that will boot the VM that runs the vCPE virtual machine image.

Prerequisites / Necessary Configuration

The following must be configured in XOS for the CORD objects to work correctly.

  • A service of type "vOLT"
  • A service of type "vCPE"
    • One slice must be connected to this service. XOS will instantiated vCPE slivers on this slice.
  • A service of type "vBNG"
  • One or more nodes
    • In the case where there is more than one node, XOS will try to pick the node with the fewest slivers each time a vCPE sliver needs to be instantiated.
  • An image named "Ubuntu-14.04-LTS" or "Ubuntu 14.04 LTS"  (eventually we'll use a vCPE-specific image)

REST API

The REST API may be used to create, read, update, and delete objects.

Create a new VOLTTenant Object

The following example uses Curl to invoke the REST API from the Linux command line:

HOST=10.254.1.22:8000
AUTH=padmin@vicci.org:letmein
SERVICE_SPECIFIC_ID=5678
VLAN_ID=1234

curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "{\"service_specific_id\": \"$SERVICE_SPECIFIC_ID\", \"vlan_id\": \"$VLAN_ID\"}" $HOST/xoslib/volttenant/

Note that XOS enforces a uniqueness constraint on the service_specific_id argument, and it is an error to attempt to create two VOLTTenant objects with the same service_specific_id.

 

List all VOLTTenant Objects

HOST=10.254.1.22:8000
AUTH=padmin@vicci.org:letmein

curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH $HOST/xoslib/volttenant/

 

Delete a VOLTTenant Object

HOST=10.254.1.22:8000
AUTH=padmin@vicci.org:letmein
ID=974

curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X DELETE $HOST/xoslib/volttenant/$ID/

Note that the ID used is the XOS ID of the VOLTTenant object, not the service_specific_id or the vlan_id. If you've forgotten the XOS ID that goes with a particular service_specific_id, then you can query for it.

Query for a specific service_specific_id

HOST=10.254.1.22:8000
AUTH=padmin@vicci.org:letmein
SERVICE_SPECIFIC_ID=1234

curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH $HOST/xoslib/volttenant/?service_specific_id=$SERVICE_SPECIFIC_ID

  • No labels