HP Enactor Adaptor

The HP Cells adaptor is an OCCI adaptor. In the case of the OCCI adaptors, the Enactor Core receives OCCI requests from the Resource Manager and transforms them onto suitable OCCI requests for the respective testbeds. This transformation is needed because most the OCCI specification is not stable and different implementations can have important differences. The transformed request is then sent back to the testbeds and when the response is received, it is then transformed into BonFIRE OCCI interface and passed to the Resource Manager.

The following document details one by one each of the different messages that can be sent through the Enactor Core to the HP Cells testbed detailing their transformations.

This documents describes the translations that the Enactor performs from BonFIRE OCCI to each one of the OCCI implementations specific for each one of the testbeds.

Note

It is important to mention that all urls with this format: /locations/{{location_id}}/{{resources}}/{{resource_id}} will be transformed inside the OCCI message to https://{{url_to_the_testbed_location}}/{{resource}}//{{resource_id}} (yes, there is a conversion from plural: resources to singular: resource)

Note

This adaptor uses a set of HP libraries provided by HP Cells team. Those testbeds are embebed into the code of the Enactor.

Configurations / Instance Types

List of available configurations / instance types

The Resource Manager sends the following request to the Enactor Core

GET path/to/enactor/locations/{{location_id}}/configurations
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

The Enactor Core sends the following request to the HP Cells site

accept:*/*
x_bonfire_asserted_id:{{user_id}}
x_bonfire_asserted_groups: {{comma_separated_list_of_user_groups}}

GET https://{{url_to_HP_testbed}}/configurations

It gets the following response from the HP Cells site

200

Content-Type: application/vnd.bonfire+xml

 <collection>
        <items>
                <configuration>
                        <name>lite</name>
                        <memory>256</memory>
                        <cpu>0.5</cpu>
                </configuration>
                <configuration>
                        <name>medium</name>
                        <memory>2048</memory>
                        <cpu>2</cpu>
                </configuration>
                <configuration>
                        <name>small</name>
                        <memory>1024</memory>
                        <cpu>1</cpu>
                </configuration>
                <configuration>
                        <name>custom</nam>
                        <memory />
                        <cpu />
                </configuration>
        </items>
 </collection>

The Enactor Core parses this response and sends the following one back to the Resource Manager

 200

 Content-Type: application/vnd.bonfire+xml

 <collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
        <items>
                <configuration>
                        <name>lite</name>
                        <memory>256</memory>
                        <cpu>0.5</cpu>
                </configuration>
                <configuration>
                        <name>medium</name>
                        <memory>2048</memory>
                        <cpu>2</cpu>
                </configuration>
                <configuration>
                        <name>small</name>
                        <memory>1024</memory>
                        <cpu>1</cpu>
                </configuration>
                <configuration>
                        <name>custom</nam>
                        <memory />
                        <cpu />
                </configuration>
        </items>
</collection>

Computes

List of available computes

The Resource Manager sends the following request to the Enactor Core

GET path/to/enactor/locations/{{location_id}}/computes
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

The Enactor Core sends the following request to the ONE site

accept:*/*
x_bonfire_asserted_id:{{user_id}}
x_bonfire_asserted_groups: {{comma_separated_list_of_user_groups}}

GET https://{{url_to_HP_testbed}}/compute/

It gets the following response from the ONE site

200

<collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
  <items>
    <compute href="/locations/uk-hplabs/computes/1" name="compute1" />
    <compute href="/locations/uk-hplabs/computes/2" name="compute2" />
    <compute href="/locations/uk-hplabs/computes/3" name="compute3" />
  </items>
</collection>

The Enactor Core parses this response and sends the following one back to the Resource Manager

200

Content-Type: application/vnd.bonfire+xml

<collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
  <items>
    <compute href="/locations/uk-hplabs/computes/1" name="compute1" />
    <compute href="/locations/uk-hplabs/computes/2" name="compute2" />
    <compute href="/locations/uk-hplabs/computes/3" name="compute3" />
  </items>
</collection>

List specific compute

The Resource Manager sends the following request to the Enactor Core

The Enactor Core sends the following request to the HP Cells site

It gets the following response from the HP site

200

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/">
  <id>3585</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my-vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/LITE">LITE</instance_type>
  <state>created</state>
  <disk id="0">
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vbda</target>
  </disk>
  <disk id="1">
    <storage href="/locations/uk-hplabs/storages/167" name="My datablock" />
    <type>DATABLOCK</type>
    <target>/dev/vbdb</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/47" name="BonFIRE WAN" />
    <ip>172.18.1.242</ip>
    <mac>02:00:ac:12:01:f2</mac>
  </nic>
  <nic>
    <network href="/locations/uk-hplabs/networks/48" name="My private subnet" />
    <ip>10.0.0.4</ip>
    <mac>02:00:ac:12:01:f3</mac>
  </nic>
  <context>
    <item>
      <key>bonfire_provider</key>
      <value>uk-hplabs</value>
    </item>
    <item>
      <key>bonfire_resource_name</key>
      <value>asdfasd</value>
    </item>
  </context>
</compute>

The Enactor Core parses this response and sends the following one back to the Resource Manager (all OCCI tags are lowercased and to the name the structure -{{experiment_id}}-{{uuid}} is removed in the storages names if necessary)

200

Content-Type: application/vnd.bonfire+xml

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/3585">
  <id>3585</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my-vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/LITE">LITE</instance_type>
  <state>created</state>
  <disk id="0">
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vbda</target>
  </disk>
  <disk id="1">
    <storage href="/locations/uk-hplabs/storages/167" name="My datablock" />
    <type>DATABLOCK</type>
    <target>/dev/vbdb</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/47" name="BonFIRE WAN" />
    <ip>172.18.1.242</ip>
    <mac>02:00:ac:12:01:f2</mac>
  </nic>
  <nic>
    <network href="/locations/uk-hplabs/networks/48" name="My private subnet" />
    <ip>10.0.0.4</ip>
    <mac>02:00:ac:12:01:f3</mac>
  </nic>
  <context>
    <item>
      <key>bonfire_provider</key>
      <value>uk-hplabs</value>
    </item>
    <item>
      <key>bonfire_resource_name</key>
      <value>asdfasd</value>
    </item>
  </context>
</compute>

Creating specific compute

The Resource Manager sends the following request to the Enactor Core

 POST path/to/enactor/locations/{{location_id}}/computes
 Accept: application/vnd.bonfire+xml
 X-Bonfire-Asserted-Id: {{user_id}}
 X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
 X-Bonfire-Experiment-Id: {{experiment_id}}

 <compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
        <name>my-vm</name>
        <instance_type>lite</instance_type>
        <disk>
                <storage href="/locations/uk-hplabs/storages/165"/>
        </disk>
        <nic>
                <network href="/locations/uk-hplabs/networks/47" />
        </nic>
</compute>

The Enactor Core sends the following code to HP Cells (pay attention that the adaptor is creating a random id... this id is necessary for the HP Cells server, but it is only temporary)

POST https://{{url_to_HP_testbed}}/compute/
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

<compute>
  <disk>
    <storage href="http://localhost:54165/storage/165" />
  </disk>
  <nic>
    <network href="http://localhost:54165/network/47" />
  </nic>
  <context />
  <name>my-vm</name>
  <owner>jenkins</owner>
  <type>lite</type>
  <uname>jenkins</uname>
  <id>hp-dc3c8ed2-95ed-4462-bfef-dbeab9dd4077</id>
</compute>

HP Cells returns the following message to the Enactor Core

201

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/3585">
  <id>3585</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my-vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>created</state>
  <disk id="0">
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vbda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/47" name="BonFIRE WAN" />
    <ip>172.18.1.242</ip>
    <mac>02:00:ac:12:01:f2</mac>
  </nic>
</compute>

The Enactor Core parses this response and sends the following one back to the Resource Manager

201

Content-Type: application/vnd.bonfire+xml

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/3585">
  <id>3585</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my-vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>created</state>
  <disk id="0">
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vbda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/47" name="BonFIRE WAN" />
    <ip>172.18.1.242</ip>
    <mac>02:00:ac:12:01:f2</mac>
  </nic>
</compute>

Modification specific compute

The Resource Manager sends the following request to the Enactor Core

PUT path/to/enactor/locations/{{location_id}}/computes/{{compute_id}}
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<compute>
    <disk id="0">
        <save_as name="sdfgs"/>
        <storage href="http://localhost:54167/storage/165"/>
        <target>xvda</target>
        <type>OS</type>
    </disk>
    <context/>
    <owner>jenkins</owner>
    <uname>jenkins</uname>
</compute>

The Enactor Core sends the following code to HP Cells

PUT https://{{url_to_HP_testbed}}/compute/{{compute_id}}
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<compute>
    <disk id="0">
        <save_as name="sdfgs"/>
        <storage href="http://localhost:54167/storage/165"/>
        <target>xvda</target>
        <type>OS</type>
    </disk>
    <context/>
    <owner>jenkins</owner>
    <uname>jenkins</uname>
</compute>

HP Cells returns the following message to the Enactor Core

202

Content-Type: text/html;charset=utf-8

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/1469">
  <id>1469</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>up</state>
  <disk id="0">
    <save_as href="/locations/uk-hplabs/storages/264" />
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/20" name="Bonfire WAN@HP" />
    <ip>131.254.204.187</ip>
    <mac>02:00:83:fe:cc:bb</mac>
  </nic>
</compute>

The Enactor Core parses this response and sends the following one back to the Resource Manager

202

Content-Type: application/vnd.bonfire+xml

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/1469">
  <id>1469</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>up</state>
  <disk id="0">
    <save_as href="/locations/uk-hplabs/storages/264" />
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/20" name="Bonfire WAN@HP" />
    <ip>131.254.204.187</ip>
    <mac>02:00:83:fe:cc:bb</mac>
  </nic>
</compute>

Deletion specific compute

The Resource Manager sends the following request to the Enactor Core

DELETE path/to/enactor/locations/{{location_id}}/computes/{{compute_id}}
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
    X-Bonfire-Experiment-Id: {{experiment_id}}

The Enactor sends the following message to HP

    DELETE https://{{url_to_HP_testbed}}/compute/{{compute_id}}
Accept: */*
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
    X-Bonfire-Experiment-Id: {{experiment_id}}

HP Cells returns the following message to the Enactor Core

204

The Enactor Core parses this response and sends the following one back to the Resource Manager

204

Special PUT modifications for Computes

save_as

The Resource Manager sends the following request to the Enactor Core

PUT path/to/enactor/locations/{{location_id}}/computes/{{compute_id}}
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<compute>
    <disk id="0">
        <groups>dperez,users</groups>
        <save_as name="sdfgs"/>
        <storage href="http://localhost:54167/storage/165"/>
        <target>xvda</target>
        <type>OS</type>
    </disk>
    <context/>
    <owner>jenkins</owner>
    <uname>jenkins</uname>
</compute>

The Enactor Core sends the following code to HP Cells

PUT https://{{url_to_HP_testbed}}/compute/{{compute_id}}
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<compute>
    <disk id="0">
        <groups>dperez,users</groups>
        <save_as name="sdfgs"/>
        <storage href="http://localhost:54167/storage/165"/>
        <target>xvda</target>
        <type>OS</type>
    </disk>
    <context/>
    <owner>jenkins</owner>
    <uname>jenkins</uname>
</compute>

HP Cells returns the following message to the Enactor Core

202

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/1469">
  <id>1469</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>up</state>
  <disk id="0">
    <save_as href="/locations/uk-hplabs/storages/264" />
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/20" name="Bonfire WAN@HP" />
    <ip>131.254.204.187</ip>
    <mac>02:00:83:fe:cc:bb</mac>
  </nic>
</compute>

The Enactor Core parses this response and sends the following one back to the Resource Manager (all OCCI tags are lowercased)

201

Content-Type: application/vnd.bonfire+xml

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/1469">
  <id>1469</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>up</state>
  <disk id="0">
    <save_as href="/locations/uk-hplabs/storages/264" />
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/20" name="Bonfire WAN@HP" />
    <ip>131.254.204.187</ip>
    <mac>02:00:83:fe:cc:bb</mac>
  </nic>
</compute>

shutdown

Although HP Cells OCCI implementation it is nearly identical to BonFIRE one, it changes a bit the shutdown command to a compute

The Resource Manager sends the following request to the Enactor Core

 PUT path/to/enactor/locations/{{location_id}}/computes/{{compute_id}}
 Accept: application/vnd.bonfire+xml
 X-Bonfire-Asserted-Id: {{user_id}}
 X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
 X-Bonfire-Experiment-Id: {{experiment_id}}

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
        <state>shutdown</state>
</compute>

The Enactor Core sends the following code to HP Cells

PUT https://{{url_to_HP_testbed}}/compute/{{compute_id}}
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<compute>
    <context/>
    <owner>jenkins</owner>
    <state>off</state>
    <uname>jenkins</uname>
</compute>

HP Cells returns the following message to the Enactor Core

202

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/1469">
  <id>1469</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>off</state>
  <disk id="0">
    <save_as href="/locations/uk-hplabs/storages/264" />
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/20" name="Bonfire WAN@HP" />
    <ip>131.254.204.187</ip>
    <mac>02:00:83:fe:cc:bb</mac>
  </nic>
</compute>

The Enactor Core parses this response and sends the following one back to the Resource Manager (all OCCI tags are lowercased)

201

Content-Type: application/vnd.bonfire+xml

<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/computes/1469">
  <id>1469</id>
  <cpu>1</cpu>
  <memory>256</memory>
  <name>my vm</name>
  <instance_type href="/locations/uk-hplabs/configurations/lite">lite</instance_type>
  <state>off</state>
  <disk id="0">
    <save_as href="/locations/uk-hplabs/storages/264" />
    <storage href="/locations/uk-hplabs/storages/165" name="BonFIRE Debian Squeeze v2" />
    <type>OS</type>
    <target>/dev/vda</target>
  </disk>
  <nic>
    <network href="/locations/uk-hplabs/networks/20" name="Bonfire WAN@HP" />
    <ip>131.254.204.187</ip>
    <mac>02:00:83:fe:cc:bb</mac>
  </nic>
</compute>

Storages

List of available storages

The Resource Manager sends the following request to the Enactor Core

GET path/to/enactor/locations/{{location_id}}/storages
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

The Enactor Core sends the following request to the ONE site

accept:*/*
x_bonfire_asserted_id:{{user_id}}
x_bonfire_asserted_groups: {{comma_separated_list_of_user_groups}}

GET https://{{url_to_HP_testbed}}/storage/

It gets the following response from the HP Cells site

200

<collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
  <items>
    <storage href="/locations/uk-hplabs/storages/1" name="BonFIRE Debian Squeeze v2" />
    <storage href="/locations/uk-hplabs/storages/2" name="saved-client-experiment#257-image" />
  </items>
</collection>

The Enactor Core parses this response and sends the following one back to the Resource Manager

200

Content-Type: application/vnd.bonfire+xml

<collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
  <items>
    <storage href="/locations/uk-hplabs/storages/1" name="BonFIRE Debian Squeeze v2" />
    <storage href="/locations/uk-hplabs/storages/2" name="saved-client-experiment#257-image" />
  </items>
</collection>

List specific storage

The Resource Manager sends the following request to the Enactor Core

Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

GET path/to/enactor/locations/{{location_id}}/storages/{{storage_id}}

The Enactor Core sends the following request to the HP Cells site

accept:*/*
x_bonfire_asserted_id:{{user_id}}
x_bonfire_asserted_groups: {{comma_separated_list_of_user_groups}}

GET https://{{url_to_HP_testbed}}/storage/{{storage_id}}

It gets the following response from the HP Cells site

200

<storage xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/storages/234">
  <id>234</id>
  <name>Storage name</name>
  <type>DATABLOCK</type>
  <description>Storage description</description>
  <size>1024</size>
  <persistent>NO</persistent>
  <public>YES</public>
</storage>

The Enactor Core parses this response and sends the following one back to the Resource Manager

200

Content-Type: application/vnd.bonfire+xml

<storage xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/storages/234">
  <id>234</id>
  <name>Storage name</name>
  <type>DATABLOCK</type>
  <description>Storage description</description>
  <size>1024</size>
  <persistent>NO</persistent>
  <public>YES</public>
</storage>

Creating specific storage

The Resource Manager sends the following request to the Enactor Core

 POST path/to/enactor/locations/{{location_id}}/storages
 Accept: application/vnd.bonfire+xml
 X-Bonfire-Asserted-Id: {{user_id}}
 X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
 X-Bonfire-Experiment-Id: {{experiment_id}}

 <storage href='http://api.bonfire-project.eu/locations/uk-hplabs/storages/'>
        <name>Storage name</name>
        <groups>pepe,pepito</groups>
        <description>Storage description</description>
        <type>DATABLOCK</type>
        <size>1024</size>
        <public>YES</public>
        <persistent>NO</persistent>
</storage>

The Enactor Core sends the following code to HP Cells (the HP Cells testbed requires the generation of one unique ID before submitting a POST command)

POST https://{{url_to_ONE_testbed}}/storage/
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<storage>
  <description>Storage description</description>
  <groups>pepe,pepito</groups>
  <name>Storage name</name>
  <owner>jenkins</owner>
  <persistent>NO</persistent>
  <public>YES</public>
  <size>1024</size>
  <type>DATABLOCK</type>
  <uname>jenkins</uname>
  <id>hp-03f2520b-3943-4643-8996-f2f030b6f67a</id>
</storage>

HP Cells returns the following message to the Enactor Core

201

<storage xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/storages/5">
  <id>5</id>
  <name>Storage name</name>
  <groups>pepe,pepito</groups>
  <type>DATABLOCK</type>
  <description>Storage description</description>
  <size>1024</size>
  <persistent>NO</persistent>
  <public>YES</public>
</storage>

The Enactor Core parses this response and sends the following one back to the Resource Manager (all OCCI tags are lowercased and to the name the structure -{{experiment_id}}-{{uuid}} is removed)

201

Content-Type: application/vnd.bonfire+xml

<storage xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/storages/5">
  <id>5</id>
  <name>Storage name</name>
  <groups>pepe,pepito</groups>
  <type>DATABLOCK</type>
  <description>Storage description</description>
  <size>1024</size>
  <persistent>NO</persistent>
  <public>YES</public>
</storage>

Modification specific storage

The Resource Manager sends the following request to the Enactor Core

 PUT path/to/enactor/locations/{{location_id}}/storages/{{storage_id}}
 Accept: application/vnd.bonfire+xml
 X-Bonfire-Asserted-Id: {{user_id}}
 X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
 X-Bonfire-Experiment-Id: {{experiment_id}}

 <storage href='http://api.bonfire-project.eu/locations/uk-hplabs/storages/'>
        <persistent>YES</persistent>
</storage>

The Enactor Core sends the following code to HP Cells (the HP Cells testbed requires the generation of one unique ID before submitting a POST command)

PUT https://{{url_to_ONE_testbed}}/storage/{{storage_id}}
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<storage href='http://api.bonfire-project.eu/locations/uk-hplabs/storages/'>
        <persistent>YES</persistent>
</storage>

HP Cells returns the following message to the Enactor Core

201

<storage xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/storages/5">
  <id>5</id>
  <name>Storage name</name>
  <groups>pepe,pepito</groups>
  <type>DATABLOCK</type>
  <description>Storage description</description>
  <size>1024</size>
  <persistent>YES</persistent>
  <public>YES</public>
</storage>

The Enactor Core parses this response and sends the following one back to the Resource Manager

201

Content-Type: application/vnd.bonfire+xml

<storage xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/storages/5">
  <id>5</id>
  <name>Storage name</name>
  <groups>pepe,pepito</groups>
  <type>DATABLOCK</type>
  <description>Storage description</description>
  <size>1024</size>
  <persistent>YES</persistent>
  <public>YES</public>
</storage>

Deletion specific storage

The Resource Manager sends the following request to the Enactor Core

DELETE path/to/enactor/locations/{{location_id}}/storages/{{storage_id}}
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
    X-Bonfire-Experiment-Id: {{experiment_id}}

The Enactor sends the following message to HP Cells

    DELETE https://{{url_to_ONE_testbed}}/storage/{{storage_id}}
Accept: */*
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
    X-Bonfire-Experiment-Id: {{experiment_id}}

HP Cells returns the following message to the Enactor Core

204

The Enactor Core parses this response and sends the following one back to the Resource Manager

204

Networks

List of available networks

The Resource Manager sends the following request to the Enactor Core

GET path/to/enactor/locations/{{location_id}}/networks
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

The Enactor Core sends the following request to the HP Cells site

accept:*/*
x_bonfire_asserted_id:{{user_id}}
x_bonfire_asserted_groups: {{comma_separated_list_of_user_groups}}

GET https://{{url_to_HO_testbed}}/network/

It gets the following response from the HP Cells site

200

<collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
  <items>
    <network href="/locations/uk-hplabs/networks/1" name="Internet @ HP" />
    <network href="/locations/uk-hplabs/networks/2" name="BonFIRE WAN @HP" />
    <network href="/locations/uk-hplabs/networks/3" name="Private subnet #1" />
  </items>
</collection>

The Enactor Core parses this response and sends the following one back to the Resource Manager

200

Content-Type: application/vnd.bonfire+xml

<collection xmlns="http://api.bonfire-project.eu/doc/schemas/occi">
  <items>
    <network href="/locations/uk-hplabs/networks/1" name="Internet @ HP" />
    <network href="/locations/uk-hplabs/networks/2" name="BonFIRE WAN @HP" />
    <network href="/locations/uk-hplabs/networks/3" name="Private subnet #1" />
  </items>
</collection>

List specific network

The Resource Manager sends the following request to the Enactor Core

Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}

GET path/to/enactor/locations/{{location_id}}/networks/{{network_id}}

The Enactor Core sends the following request to the HP Cells site

accept:*/*
x_bonfire_asserted_id:{{user_id}}
x_bonfire_asserted_groups: {{comma_separated_list_of_user_groups}}

GET https://{{url_to_HP_testbed}}/network/{{network_id}}

It gets the following response from the HP Cells site

200

<network xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/networks/1">
  <id>1</id>
  <groups>pepe,pepito</groups>
  <name>Internet @ HP</name>
  <address>192.170.103.0</address>
  <size>24</size>
</network>

The Enactor Core parses this response and sends the following one back to the Resource Manager

200

Content-Type: application/vnd.bonfire+xml

<network xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/uk-hplabs/networks/1">
  <id>1</id>
  <groups>pepe,pepito</groups>
  <name>Internet @ HP</name>
  <address>192.170.103.0</address>
  <size>24</size>
</network>

Creating specific network

The Resource Manager sends the following request to the Enactor Core

POST path/to/enactor/locations/{{location_id}}/networks
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<network href='http://api.bonfire-project.eu/locations/{{location_id}}/networks/'>
       {{network_characteristics}}
</network>

Enactor Core sends the following message to the HP Cells (the HP Cells testbed requires the generation of one unique ID before submitting a POST command)

POST https://{{url_to_VW_testbed}}/network/
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id:{{experiment_id}}

<network href="https://{{url_to_HP_testbed}}/network">
    {{network_characteristics}}
        <id>hp-0f04e448-b949-4ee7-99ee-a375a669c49d</id>
</network>

HP Cells returns the following message to the Enactor Core

201

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network name="{{network_name}}" href="https://{{url_to_HP_testbed}}/network/{{network_id}}">
    {{network_characteristics}}
</network>

Enactor Core returns the following message to the Resource Manager

201

Content-Type: application/vnd.bonfire+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network name="{{network_name}}" href="https://{{url_to_VW_testbed}}/network/{{network_id}}">
    {{network_characteristics}}
</network>

Modification specific network

The Resource Manager sends the following request to the Enactor Core

PUT path/to/enactor/locations/{{location_id}}/networks/{{network_id}}
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

<network href='http://api.bonfire-project.eu/locations/{{location_id}}/networks/{{network_id}}'>
       {{network_changes}}
</network>

Enactor Core sends the following message to the HP Cells

PUT https://{{url_to_HP_testbed}}/network/{{network_id}}
accept:*/*
X-Bonfire-Asserted-Id:{{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id:{{experiment_id}}

<network href="https://{{url_to_VW_testbed}}/network/{{network_id}}">
    {{network_changes}}
</network>

HP Cells returns the following message to the Enactor Core

200

Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network name="{{network_name}}" href="https://{{url_to_HP_testbed}}/network/{{network_id}}">
    {{network_characteristics}}
</network>

Enactor Core returns the following message to the Resource Manager

201

Content-Type: application/vnd.bonfire+xml

<network xmlns="http://api.bonfire-project.eu/doc/schemas/occi" name="{{network_name}}" href="/locations/{{location_id}}/networks/{{network_id}}">
  {{network_characteristics}}
  <state>{{network_state}}</state>
</network>

Deletion specific network

The Resource Manager sends the following request to the Enactor Core

DELETE path/to/enactor/locations/{{location_id}}/networks/{{network_id}}
Accept: application/vnd.bonfire+xml
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
X-Bonfire-Experiment-Id: {{experiment_id}}

The Enactor sends the following message to HP Cells

    DELETE https://{{url_to_HP_testbed}}/network/{{network_id}}
Accept: */*
X-Bonfire-Asserted-Id: {{user_id}}
X-Bonfire-Asserted-Groups: {{comma_separated_list_of_user_groups}}
    X-Bonfire-Experiment-Id: {{experiment_id}}

HP Cells returns the following message to the Enactor Core

202

The Enactor Core parses this response and sends the following one back to the Resource Manager

204

Table Of Contents

Previous topic

Virtual Wall Enactor Adaptor

Next topic

Federica Enactor Adaptor

This Page