118 | | Once the FOAM services are started generated a simple RSPEC using instructions from the [https://openflow.stanford.edu/display/FOAM/rspec Example RSPEC] and [http://groups.geni.net/geni/wiki/HowTo/ConvertExpedientToFoamRspecs Convert Expedient to FOAM RSPEC] page: |
| 118 | Once the FOAM services are started was able to query for a list of resources: |
| 119 | {{{ |
| 120 | $ ./src/omni.py -n -a https://mallorea.gpolab.bbn.com:3626/foam/gapi listresources |
| 121 | INFO:omni:Loading config file omni_config |
| 122 | INFO:omni:Using control framework pgeni |
| 123 | INFO:omni:Listed resources on 1 out of 1 possible aggregates. |
| 124 | INFO:omni:<?xml version="1.0" ?> |
| 125 | INFO:omni:<!-- Resources at AM: |
| 126 | URN: unspecified_AM_URN |
| 127 | URL: https://mallorea.gpolab.bbn.com:3626/foam/gapi |
| 128 | --> |
| 129 | INFO:omni: |
| 130 | <rspec type="advertisement" xmlns="http://www.protogeni.net/resources/rspec/2" xmlns:openflow="http://www.protogeni.net/resources/rspec/ext/openflow/2.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/ad.xsd http://www.protogeni.net/resources/rspec/ext/openflow/2.1 http://www.protogeni.net/resources/rspec/ext/openflow/2.1/of-ad.xsd"> |
| 131 | <node component_id="urn:publicid:IDN+openflow:foam:mallorea.gpolab.bbn.com+datapath:04:4d:00:12:e2:b8:a5:d0" component_manager_id="urn:publicid:IDN+openflow:foam:mallorea.gpolab.bbn.com+authority+am" component_name="04:4d:00:12:e2:b8:a5:d0" exclusive="false"> |
| 132 | <hardware_type name="openflow-switch"/> |
| 133 | <available now="true"/> |
| 134 | </node> |
| 135 | <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:mallorea.gpolab.bbn.com+datapath:04:4d:00:12:e2:b8:a5:d0" dpid="04:4d:00:12:e2:b8:a5:d0"> |
| 136 | <openflow:port name="GBE0/16" num="16"/> |
| 137 | <openflow:port name="GBE0/19" num="19"/> |
| 138 | <openflow:port name="GBE0/21" num="21"/> |
| 139 | <openflow:port name="GBE0/22" num="22"/> |
| 140 | </openflow:datapath> |
| 141 | <node component_id="urn:publicid:IDN+openflow:foam:mallorea.gpolab.bbn.com+datapath:04:4d:00:26:f1:3f:3b:00" component_manager_id="urn:publicid:IDN+openflow:foam:mallorea.gpolab.bbn.com+authority+am" component_name="04:4d:00:26:f1:3f:3b:00" exclusive="false"> |
| 142 | <hardware_type name="openflow-switch"/> |
| 143 | <available now="true"/> |
| 144 | </node> |
| 145 | <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:mallorea.gpolab.bbn.com+datapath:04:4d:00:26:f1:3f:3b:00" dpid="04:4d:00:26:f1:3f:3b:00"> |
| 146 | <openflow:port name="43" num="43"/> |
| 147 | <openflow:port name="44" num="44"/> |
| 148 | <openflow:port name="45" num="45"/> |
| 149 | <openflow:port name="46" num="46"/> |
| 150 | <openflow:port name="47" num="47"/> |
| 151 | <openflow:port name="local" num="65534"/> |
| 152 | </openflow:datapath> |
| 153 | </rspec> |
| 154 | |
| 155 | INFO:omni: ------------------------------------------------------------ |
| 156 | INFO:omni: Completed listresources: |
| 157 | |
| 158 | Options as run: |
| 159 | aggregate: https://mallorea.gpolab.bbn.com:3626/foam/gapi |
| 160 | framework: pgeni |
| 161 | native: True |
| 162 | |
| 163 | Args: listresources |
| 164 | Result Summary: Retrieved resources from 1 aggregates. |
| 165 | Wrote rspecs from 1 aggregates. |
| 166 | INFO:omni: ============================================================ |
| 167 | |
| 168 | }}} |
| 169 | |
| 170 | Generated a simple RSPEC using instructions from the [https://openflow.stanford.edu/display/FOAM/rspec Example RSPEC] and [http://groups.geni.net/geni/wiki/HowTo/ConvertExpedientToFoamRspecs Convert Expedient to FOAM RSPEC] page: |
| 289 | }}} |
| 290 | |
| 291 | On the FOAM server verified that the sliver was created: |
| 292 | {{{ |
| 293 | $ foamctl list-slivers |
| 294 | Password: |
| 295 | { |
| 296 | "slivers": [ |
| 297 | { |
| 298 | "status": "Pending", |
| 299 | "slice_urn": "urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1", |
| 300 | "enabled": false, |
| 301 | "id": 3, |
| 302 | "flowvisor_slice": "2140384d-48fa-447c-930d-13c2066777bc", |
| 303 | "sliver_urn": "urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1:2140384d-48fa-447c-930d-13c2066777bc", |
| 304 | "email": "lnevers@bbn.com", |
| 305 | "desc": "Luisa sliver description" |
| 306 | } |
| 307 | ] |
| 308 | } |
| 309 | }}} |
| 310 | |
| 311 | Approved the sliver: |
| 312 | {{{ |
| 313 | $ foamctl approve-sliver -u urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1:2140384d-48fa-447c-930d-13c2066777bc |
| 314 | Password: |
| 315 | true |
| 316 | }}} |
| 317 | |
| 318 | Confirmed the approval: |
| 319 | {{{ |
| 320 | $ foamctl list-slivers |
| 321 | Password: |
| 322 | { |
| 323 | "slivers": [ |
| 324 | { |
| 325 | "status": "Approved", |
| 326 | "slice_urn": "urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1", |
| 327 | "enabled": true, |
| 328 | "id": 3, |
| 329 | "flowvisor_slice": "2140384d-48fa-447c-930d-13c2066777bc", |
| 330 | "sliver_urn": "urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1:2140384d-48fa-447c-930d-13c2066777bc", |
| 331 | "email": "lnevers@bbn.com", |
| 332 | "desc": "Luisa sliver description" |
| 333 | } |
| 334 | ] |
| 335 | } |
| 336 | }}} |
| 337 | |
| 338 | A pasword file can be created to store the foam password and used as an argument. Following is an example disable-sliver that uses a password file: |
| 339 | |
| 340 | {{{ |
| 341 | $ foamctl disable-sliver --passwd-file=/opt/foam/etc/foampasswd disable-sliver -u urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1:2140384d-48fa-447c-930d-13c2066777bc |
| 342 | "" |
| 343 | }}} |
| 344 | Disabling puts the sliver back in pending state: |
| 345 | {{{ |
| 346 | $ foamctl list-slivers --passwd-file=/opt/foam/etc/foampasswd |
| 347 | { |
| 348 | "slivers": [ |
| 349 | { |
| 350 | "status": "Pending", |
| 351 | "slice_urn": "urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1", |
| 352 | "enabled": false, |
| 353 | "id": 3, |
| 354 | "flowvisor_slice": "2140384d-48fa-447c-930d-13c2066777bc", |
| 355 | "sliver_urn": "urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+foamslice1:2140384d-48fa-447c-930d-13c2066777bc", |
| 356 | "email": "lnevers@bbn.com", |
| 357 | "desc": "Luisa sliver description" |
| 358 | } |
| 359 | ] |
| 360 | } |