Life Cycle Management of VNFs from the RO (Release TWO)

From OSM Public Wiki
Jump to: navigation, search

From the RO container, it is possible to use the CLI to do some LCM operations in VNFs of running NS instances.

Enter into RO container:

lxc exec RO bash
export OPENMANO_TENANT=osm     #in case that env variable was not set

Use the following command to list the running NS instances in the RO (the name should match the one in the UI):

openmano instance-scenario-list
2e8e2112-e31c-11e6-8c1b-00163e3fa023   MyNS

Use the following command to get more details on a specific running NS instance in the RO:

openmano instance-scenario-list MyNS
2e8e2112-e31c-11e6-8c1b-00163e3fa023   MyNS                 2017-01-25T16:34:46
Description: a description for 487f41ee-d1ab-47f0-9b73-698aa2d052f2
Template scenario id: 26321ff3-e31c-11e6-8c1b-00163e3fa023
Template scenario name: cirros_2vnf_nsd
---------------------------------------
VNF instances: 2
    2e8e2114-e31c-11e6-8c1b-00163e3fa023   cirros_vnfd__1       Template vnf id: 26321ff0-e31c-11e6-8c1b-00163e3fa023
    2e8e2117-e31c-11e6-8c1b-00163e3fa023   cirros_vnfd__2       Template vnf id: 26321ff0-e31c-11e6-8c1b-00163e3fa023
---------------------------------------
Internal nets:
---------------------------------------
External nets:
    2e8e2113-e31c-11e6-8c1b-00163e3fa023   ACTIVE       VIM ID: 13065909-d302-46a5-bddb-f16b39c3b0f4
---------------------------------------
VM instances:
    2e8e2115-e31c-11e6-8c1b-00163e3fa023   cirros_vnfd__1       cirros_vnfd-VM       ACTIVE       VIM ID: c8835fb5-5123-4c78-bd99-1ba5961d13d7
    2e8e2118-e31c-11e6-8c1b-00163e3fa023   cirros_vnfd__2       cirros_vnfd-VM       ACTIVE       VIM ID: 28c6510c-1075-43d1-9c8b-cb5f15fd5b75

Then you can run the following commands:

#To shutdown a specific VNF instance
openmano instance-scenario-action MyNS shutdown --vnf cirros_vnfd__1
#To start a specific VNF instance
openmano instance-scenario-action MyNS start --vnf cirros_vnfd__1
#To shutdown a specific VM instance using its ID
openmano instance-scenario-action MyNS shutdown --vm 2e8e2115-e31c-11e6-8c1b-00163e3fa023
#To start a specific VM instance using its ID
openmano instance-scenario-action MyNS start --vm 2e8e2115-e31c-11e6-8c1b-00163e3fa023

You can check other available actions with the command:

openmano instance-scenario-action -h