Orchestrator CLI

Agents

The vnfm agents command is used to manage VNFM agents on existing deployments.

See agents for more information.

Commands

Common agents arguments:

  • -d, --deployment-id TEXT - The unique identifier for the deployment
  • --node-id TEXT - The node id to filter to be used for filtering
  • --node-instance-id TEXT - The node instance id to be used for filtering
  • --install-method TEXT - Only show agents installed with this install_method
  • -a, --all-tenants - Include resources from all tenants associated with the user. This option cannot be used simultaneously with the tenant-name argument.

The filtering flags can be passed multiple times or take comma separated values.

list

List agents configured with the Manager. When preparing to upgrade agents, if using the filtering options with vnfm agents install, use vnfm agents list first with the same filtering options to verify which agents are going to be installed.

Usage

vnfm agents list [OPTIONS]

This command supports the common agent flags and the common CLI flags.

install

After restoring a manager on a new host using a snapshot, this command installs new agents on the hosts for the new manager while also leaving the previous agents installed and running.

Caution

This should only be used in very specific circumstances and should not be used to install agents for deployments using an existing manager. Instead, vnfm agents install is to be used for upgrading the agents after the corresponding Manager upgrade.

Usage

vnfm agents install [OPTIONS] [DEPLOYMENT_ID]

Install agents on the hosts of existing deployments.

DEPLOYMENT_ID - The ID of the deployment you would like to install agents for.

Optional Flags

This command supports the common agent flags and the and the common CLI flags.

  • --include-logs / --no-logs - Include logs in returned events [default: true]
  • --stop-old-agent - If set, after installing the new agent the old agent will be stopped
  • -s, --install-script TEXT - Alternative location of the install_agents.py script
  • -t, --tenant-name TEXT - The name of the tenant of the relevant deployment(s). If not specified, the current tenant is used.
  • --manager-ip TEXT - The private IP of the current leader (master) Manager. This IP is used to connect to the Manager’s RabbitMQ. (relevant only in HA cluser)
  • --manager_certificate TEXT - A path to a file containing the SSL certificate of the current leader Manager. The certificate is available on the Manager: /etc/vnfm/ssl/vnfm_internal_ca_cert.pem
  • --wait / --no-wait - Wait for agents operations to end, and show execution logs
  • --install-agent-timeout INTEGER - Agent installation timeout

validate

Validates the connection between the VNF Manager and the live VNFM Agents (installed on remote hosts).

Usage

vnfm agents validate [OPTIONS] [DEPLOYMENT_ID]

DEPLOYMENT_ID - The ID of the deployment you would like to validate agents for.

Optional Flags

This command supports the common agent flags and the and the common CLI flags.

  • --include-logs / --no-logs - Include logs in returned events [default: true]
  • -s, --install-script TEXT - Alternative location of the install_agents.py script
  • -t, --tenant-name TEXT - The name of the tenant of the relevant deployment(s). If not specified, the current tenant is used.

BLUEPRINTS

The vnfm blueprints command is used to manage blueprints on a VNF Manager instance.

You can use the command to upload, delete, download, validate and list blueprints and to retrieve information for a specific blueprint.

Use of spaces is not supported in file names.

Optional Flags

These commands support the common CLI flags.

Commands

upload

Usage

vnfm blueprints upload [options] BLUEPRINT_PATH

Upload a blueprint to a VNF Manager.

BLUEPRINT_PATH can be either a local blueprint yaml file or blueprint archive; a url to a blueprint archive or an organization/blueprint_repo[:tag/branch] (to be retrieved from GitHub) Supported archive types are: zip, tar, tar.gz and tar.bz2

Optional Flags

  • -b, --blueprint-id=BLUEPRINT_ID - The unique identifier for the blueprint
  • -n, --blueprint-filename TEXT - The name of the archive’s main blueprint file. Only relevant if uploading an archive.
  • --validate - Validate the blueprint before uploading it to the manager
  • -t --tenant-name TEXT - The name of the tenant of the blueprint. If not specified, the current tenant is used.
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’] [default: tenant].

When you upload a local blueprint yaml, the CLI compresses the directory that contains the blueprint file and uploads the entire directory to the VNF Manager.

Make sure that:

  • Blueprint directory contains all resources required by the blueprint, such as scripts
  • Blueprint directory does NOT contain unnecessary files
  • All files in the directory are readable by others (at least permission level 404)

Example

$ vnfm blueprint upload simple-blueprint.yaml

...

Uploading blueprint simple-blueprint.yaml...
 simple-blueprint.... |################################################| 100.0%
Blueprint uploaded. The blueprint's id is vnfm-nodecellar-example

...

$ vnfm blueprints upload simple-python-webserver-blueprint/blueprint.yaml --validate

...

Validating blueprint: simple-python-webserver-blueprint/blueprint.yaml
Blueprint validated successfully

...

delete

Usage

vnfm blueprints delete [OPTIONS] BLUEPRINT_ID

Delete a blueprint. It’s important to note that deleting a blueprint does not delete the deployments created from that blueprint and resources of those deployments.

Optional Flags

  • --tenant-name TEXT - The name of the tenant of the relevant deployment(s). If not specified, the current tenant is used
  • -f, --force - Delete the blueprint, even if there are blueprints that are currently using it. [default: True]

Example

$ vnfm blueprints delete simple-python-webserver-blueprint

...

Deleting blueprint simple-python-webserver-blueprint...
Blueprint deleted

...

package

Usage

vnfm blueprints package [OPTIONS] BLUEPRINT_PATH

Create a blueprint archive.

BLUEPRINT_PATH - The path to the blueprint yaml or to the directory in which the blueprint yaml files resides.

Optional Flags

  • -o, --output-path TEXT - The local path to download to
  • --validate - Validate the blueprint first

Example

$ vnfm blueprints package simple-python-webserver-blueprint/blueprint.yaml

...

Creating blueprint archive simple-python-webserver-blueprint...
Packaging complete!

...

download

Usage

vnfm blueprints download [OPTIONS] BLUEPRINT_ID

Download a blueprint from VNF Manager.

BLUEPRINT_ID - The ID of the blueprint to download.

Optional Flags

  • -o, --output-path TEXT - The local path to download to
  • -t --tenant-name TEXT - The name of the tenant of the blueprint. If not specified, the current tenant is used.

Example

$ vnfm blueprints download simple-python-webserver-blueprint

...

Downloading blueprint simple-python-webserver-blueprint...
 simple-python-web... |################################################| 100.0%
Blueprint downloaded as simple-python-webserver-blueprint.tar.gz

...

validate

Usage

vnfm blueprints validate [OPTIONS] BLUEPRINT_PATH

Validate a blueprint. Checks that the blueprint’s syntax is valid and that all imports are accessible.

Import validation is done only on the client side. That means that if, for some reason, the imports are accessible by the client but not on the manager, this validation will still pass.

BLUEPRINT_PATH - The path of the blueprint to validate.

Example

$ vnfm blueprints validate simple-python-webserver-blueprint/blueprint.yaml

...

Validating blueprint: simple-python-webserver-blueprint/blueprint.yaml
Blueprint validated successfully

...

create-requirements

Usage

vnfm blueprints create-requirements [OPTIONS] BLUEPRINT_PATH

Generate a pip-compliant requirements file for a specific blueprint.

BLUEPRINT_PATH - The path to the blueprint for which the file will be generated.

Optional Flags

  • -o, --output-path TEXT - The local path to download to

Example

$ vnfm blueprints create-requirements nodecellar-blueprint/aws-ec2-blueprint.yaml

...

-https://github.com/F5Networks/f5-nfv-solutions/blob/master/supported/blueprints/gilan/v1.4.0/F5-VNF-Service-Layer-GiLAN.yaml.zip
-https://github.com/F5Networks/f5-nfv-solutions/blob/master/supported/plugins/f5-gilan-plugin/v02.53/f5-gilan-plugin_0.2.53.zip

...

install-plugins

Usage

vnfm blueprints install-plugins [OPTIONS] BLUEPRINT_PATH

Install the necessary plugins for a specific blueprint in the local environment.

Only supports passing the YAML of the blueprint directly.

BLUEPRINT_PATH - The path to the blueprint to install plugins for.

Example

$ vnfm blueprints install-plugins nodecellar-blueprint/aws-ec2-blueprint.yaml

...

Installing plugins...
Collecting _https://github...
.
.
.
Installing collected packages: boto, vnfm-aws-plugin
  Running setup.py install for vnfm-aws-plugin ... done
Successfully installed boto-2.38.0 vnfm-aws-plugin-1.4.3

...

list

Usage

vnfm blueprints list [OPTIONS]

List all existing blueprints.

Optional Flags

  • --sort-by TEXT - Key for sorting the list
  • --descending - Sort list in descending order [default: False]
  • -t --tenant-name TEXT - The name of the tenant for which to list the blueprints. If not specified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a --all-tenants - Include resources from all tenants associated with the user. This option cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search blueprints by id. The returned list will include only blueprints that contain the given search pattern.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm blueprints list

...

Listing all blueprints...

Blueprints:
+------------------------------+----------------------+---------------------------+--------------------------+--------------------------+------------+----------------+------------+
|              id              |     description      |       main_file_name      |        created_at        |        updated_at        | visibility |  tenant_name   | created_by |
+------------------------------+----------------------+---------------------------+--------------------------+--------------------------+------------+----------------+------------+
| vnfm-nodecellar-example      | This Blueprint ins.. |   simple-blueprint.yaml   | 2017-04-04 05:52:32.634  | 2017-04-04 05:52:32.634  |   private  | default_tenant |   admin    |
| vnfm-hello-world-example     | This blueprint ins.. | singlehost-blueprint.yaml | 2017-04-04 06:48:53.255  | 2017-04-04 06:48:53.255  |   tenant   | default_tenant |   admin    |
+------------------------------+----------------------+---------------------------+--------------------------+--------------------------+------------+----------------+------------+

...

summary

Usage

vnfm blueprints summary <field> [optional sub-field] [OPTIONS]

Summarizes blueprints, giving a count of elements with each distinct value for the selected field. If a sub-field is selected then a count will be given for each distinct field and sub-field combination, as well as totals for each field.

For valid field/sub-field names, invoke vnfm blueprints summary

Example

$ vnfm blueprints summary --all-tenants tenant_name
Retrieving summary of blueprints on field tenant_name

Blueprint summary by tenant_name
+----------------+------------+
|  tenant_name   | blueprints |
+----------------+------------+
|     test1      |     3      |
|     test2      |     3      |
| default_tenant |     3      |
+----------------+------------+

...

$ vnfm blueprints summary --all-tenants tenant_name visibility
Retrieving summary of blueprints on field tenant_name

Blueprint summary by tenant_name
+----------------+------------+------------+
|  tenant_name   | visibility | blueprints |
+----------------+------------+------------+
|     test1      |   tenant   |     3      |
|     test1      |   TOTAL    |     3      |
|     test2      |   tenant   |     3      |
|     test2      |   TOTAL    |     3      |
| default_tenant |   tenant   |     3      |
| default_tenant |   TOTAL    |     3      |
+----------------+------------+------------+

...

get

Usage

vnfm blueprints get [OPTIONS] BLUEPRINT_ID

Retrieve information for a specific blueprint.

BLUEPRINT_ID - The ID of the blueprint for which to retrieve information.

Optional Flags

-t --tenant-name TEXT - The name of the tenant for which to retrieve the blueprint information. If not specified, the current tenant is used.

Example

$ vnfm blueprints get vnfm-nodecellar-example

 ...

 Blueprint:
 +-----------------------------+----------------------------------------------------+-----------------------+--------------------------+--------------------------+------------+----------------+------------+--------------+
 |              id             |                    description                     |     main_file_name    |        created_at        |        updated_at        | visibility |  tenant_name   | created_by | #deployments |
 +-----------------------------+----------------------------------------------------+-----------------------+--------------------------+--------------------------+------------+----------------+------------+--------------+
 | vnfm-nodecellar-example     | This Blueprint installs the nodecellar application | simple-blueprint.yaml | 2017-04-04 05:52:32.634  | 2017-04-04 05:52:32.634  |   tenant   | default_tenant |   admin    |      1       |
 |                             |                on an existing host.                |                       |                          |                          |            |                |            |              |
 |                             |                                                    |                       |                          |                          |            |                |            |              |
 +-----------------------------+----------------------------------------------------+-----------------------+--------------------------+--------------------------+------------+----------------+------------+--------------+

 Description:
 This Blueprint installs the nodecellar application on an existing host.


 Existing deployments:

 ["vnfm-nodecellar-example"]
 ...

inputs

Usage

vnfm blueprints inputs [OPTIONS] BLUEPRINT_ID

Retrieve inputs for a specific blueprint

BLUEPRINT_ID - The path of the blueprint for which to retrieve inputs.

Optional Flags

-t --tenant-name TEXT - The name of the tenant from which to retrieve the blueprints. If not specified, the current tenant is used.

Example

$ vnfm blueprints inputs vnfm-hello-world-example

...

Retrieving inputs for blueprint vnfm-hello-world-example...

Inputs:
+------------------------+------+-------------+-------------+
|          name          | type |   default   | description |
+------------------------+------+-------------+-------------+
|     webserver_port     |  -   |     8080    |      -      |
|       agent_user       |  -   |    centos   |      -      |
|       server_ip        |  -   | 172.16.0.49 |      -      |
| agent_private_key_path |  -   |   /key.pem  |      -      |
+------------------------+------+-------------+-------------+

...

set-visibility

Usage

vnfm blueprints set-visibility [OPTIONS] BLUEPRINT_ID

Set the blueprint’s visibility.

BLUEPRINT_ID - The id of the blueprint to update.

Mandatory flags

-l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘tenant’, ‘global’] [required].

Example

$ vnfm blueprints set-visibility vnfm-nodecellar-example -l global

...

Blueprint `vnfm-nodecellar-example` was set to global

...

DEPLOYMENTS

The vnfm deployments command is used to manage running deployments on a VNF manager.

You can use the command to create, delete, update and list deployments and to show the outputs for a specific deployment.

Use of spaces is not supported in file names.

For more information, see deployment update process.

Optional Flags

These commands support the common CLI flags.

Commands

create

Usage

vnfm deployments create [OPTIONS] [DEPLOYMENT_ID]

Create a deployment on the Manager.

DEPLOYMENT_ID - The ID of the deployment to be created.

Mandatory flags

  • -b, --blueprint-id TEXT - The unique identifier for the blueprint [required]

Optional Flags

  • -d, --deployment-id=DEPLOYMENT_ID - A unique ID for the deployment
  • -s, --site-name TEXT - Deployment’s site name
  • -i, --inputs=INPUTS - Inputs for the deployment (Can be provided as wildcard-based paths (.yaml, etc..) to YAML files, a JSON string or as key1=value1;key2=value2). This argument can be used multiple times.
  • --skip-plugins-validation - A boolean flag that specifies whether to validate if the required deployment plugins exist on the Manager. [Default: false]
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’] [default: tenant].
  • --runtime-only-evaluation - If set, all intrinsic functions will only be evaluated at runtime, and no intrinsic functions will be evaluated at parse time (such as get_input, get_property).

Example

$ vnfm deployments create -b simple-python-webserver-blueprint

...

Creating new deployment from blueprint simple-python-webserver-blueprint...
Deployment created. The deployment's id is simple-python-webserver-blueprint

...

update

Usage

vnfm deployments update [OPTIONS] DEPLOYMENT_ID

Update a specified deployment according to the specified blueprint.

DEPLOYMENT_ID - is the deployment’s ID to update.

Consult the Deployment maintenance guide for more information.

Mandatory flags

-b, --blueprint-id TEXT - The unique identifier of the blueprint to use for deployment update.

Optional Flags

  • -i, --inputs TEXT - Inputs for the deployment (Can be provided as wildcard-based paths (*.yaml, /my_inputs/, etc.) to YAML files, a JSON string or as key1=value1;key2=value2). This argument can be used multiple times.
  • --skip-install - Skip install lifecycle operations.
  • --skip-uninstall - Skip uninstall lifecycle operations.
  • --skip-reinstall - Skip automatic reinstall of node-instances whose properties are modified in the deployment update. Node instances explicitly included in the reinstall list are not skipped.
  • -r, --reinstall-list TEXT - Node instances IDs to reinstall. This argument can be used multiple times.
  • --ignore-failure - Pass ignore-failure option to uninstall workflow.
  • --install-first - First run the install workflow and then run the uninstall workflow.
  • --preview - If set, does not perform the update and returns the steps this update would make.
  • --dont-update-plugins - If set, does not perform any of the plugin updates.
  • -f, --force - Force an update to run, in the event that a previous update on this deployment did not complete successfully.
  • --include-logs / --no-logs - Include logs in returned events [default: True]
  • --json-output - Output events in a consumable JSON format
  • -t, --tenant-name TEXT - The name of the tenant of the deployment. If unspecified, the current tenant is used.
  • --runtime-only-evaluation - If set, all intrinsic functions will only be evaluated at runtime, and no intrinsic functions will be evaluated at parse time (such as get_input, get_property).

For more information, see deployment update process.

Example

$ vnfm deployments update simple-python-webserver-blueprint -p simple-python-webserver-blueprint/blueprint.yaml

...

Updating deployment vnfm-nodecellar-example using blueprint vnfm-nodecellar-example/simple-blueprint.yaml
2017-03-30 10:26:12.723  CFY <vnfm-nodecellar-example> Starting 'update' workflow execution
2017-03-30 10:26:13.201  CFY <vnfm-nodecellar-example> 'update' workflow execution succeeded
Finished executing workflow 'update' on deployment 'vnfm-nodecellar-example'
Successfully updated deployment vnfm-nodecellar-example. Deployment update id: vnfm-nodecellar-example-d53a26e8-a10a-4545-956b-8bad45b90966. Execution id: dcf2dc2f-dc4f-4036-85a6-e693196e6331

...

history

Usage

vnfm deployments history [OPTIONS]

List deployment updates history.

Optional Flags

  • -d, --deployment-id TEXT - The ID of the deployment for which you want to show the history of deployment updates.
  • --sort-by TEXT - Key for sorting the list
  • --descending - Sort list in descending order [default: False]
  • -t, --tenant-name TEXT - The name of the tenant for which you want to show the history of deployment updates. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This option cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search deployments by ID. The returned list will include only deployments that contain the given search pattern.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0].
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

get-update

Usage

vnfm dep get-up [OPTIONS] DEPLOYMENT_UPDATE_ID

List deployment update details.

Optional Flags

  • -t, --tenant-name TEXT - The name of the tenant for which you want to show the history of deployment updates. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.

delete

Usage

vnfm deployments delete [OPTIONS] DEPLOYMENT_ID

Delete a deployment from VNF Manager.

Deleting a deployment does not delete the resources of an application. To delete the resources, run the uninstall workflow (unless a custom uninstall workflow is provided).

DEPLOYMENT_ID - The ID of the deployment to delete

Optional Flags

  • -f, --force - Delete the deployment even if there are existing live nodes for it
  • -l, --with-logs - If set, then the deployment’s management workers logs are deleted as well [default: False]
  • -t, --tenant-name TEXT - The name of the tenant of the deployment. If unspecified, the current tenant is used.

Example

$ vnfm deployments delete simple-python-webserver-blueprint

...

Deleting deployment simple-python-webserver-blueprint...
Deployment deleted

...

list

Usage

vnfm deployments list [OPTIONS]

List deployments.

If --blueprint-id is provided, list deployments for that blueprint. Otherwise, list deployments for all blueprints.

Optional Flags

  • -b, --blueprint-id TEXT - The ID of the blueprint for which you want to list deployments.
  • --sort-by TEXT - Key for sorting the list
  • --descending - Sort list in descending order [default: False]
  • -t, --tenant-name TEXT - The name of the tenant for which you want to list deployments. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This option cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search deployments by id. The returned list will include only deployments that contain the given search pattern.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0].
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm deployments list

...

Listing all deployments...

Deployments:
+-----------------------------+-----------------------------+--------------------------+--------------------------+------------+----------------+------------+
|              id             |         blueprint_id        |        created_at        |        updated_at        | visibility |  tenant_name   | created_by |
+-----------------------------+-----------------------------+--------------------------+--------------------------+------------+----------------+------------+
| vnfm-nodecellar-example     | vnfm-nodecellar-example     | 2017-03-30 10:14:40.556  | 2017-03-30 10:14:40.556  |   tenant   | default_tenant |   admin    |
+-----------------------------+-----------------------------+--------------------------+--------------------------+------------+----------------+------------+

...

summary

Usage

vnfm deployments summary <field> [optional sub-field] [OPTIONS]

Summarizes deployments, giving a count of elements with each distinct value for the selected field. If a sub-field is selected then a count will be given for each distinct field and sub-field combination, as well as totals for each field.

For valid field/sub-field names, invoke vnfm deployments summary.

Example

$ vnfm deployments summary blueprint_id
Retrieving summary of deployments on field blueprint_id

Deployment summary by blueprint_id
+--------------+-------------+
| blueprint_id | deployments |
+--------------+-------------+
|     sga      |      3      |
|      s       |      5      |
|      sg      |      1      |
+--------------+-------------+

...

$ vnfm deployments summary --all-tenants tenant_name blueprint_id
Retrieving summary of deployments on field tenant_name

Deployment summary by tenant_name
+----------------+--------------+-------------+
|  tenant_name   | blueprint_id | deployments |
+----------------+--------------+-------------+
|     test1      |      s       |      1      |
|     test1      |      sg      |      3      |
|     test1      |     sga      |      5      |
|     test1      |    TOTAL     |      9      |
|     test2      |     sga      |      1      |
|     test2      |      s       |      3      |
|     test2      |      sg      |      5      |
|     test2      |    TOTAL     |      9      |
| default_tenant |     sga      |      3      |
| default_tenant |      s       |      5      |
| default_tenant |      sg      |      1      |
| default_tenant |    TOTAL     |      9      |
+----------------+--------------+-------------+

...

inputs

Usage

vnfm deployments inputs [OPTIONS] DEPLOYMENT_ID

Retrieve inputs for a specific deployment.

DEPLOYMENT_ID - The ID of the deployment for which you want to list inputs.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant for which you want to list inputs. If unspecified, the current tenant is used.

Example

$ vnfm deployments inputs vnfm-nodecellar-example

...

Retrieving inputs for deployment vnfm-nodecellar-example...
 - "agent_private_key_path":
  Value: /key.pem
 - "agent_user":
  Value: centos
 - "host_ip":
  Value: 172.16.0.7

...

outputs

Usage

vnfm deployments outputs [OPTIONS] DEPLOYMENT_ID

Lists all outputs for a deployment. Note that not every deployment has outputs and it depends on whether or not outputs were defined in the blueprint from which the deployment was created

DEPLOYMENT_ID - The ID of the deployment for which you want to list outputs.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant for which you want to list outputs. If unspecified, the current tenant is used.

Example

$ vnfm deployments outputs vnfm-nodecellar-example

...

Retrieving outputs for deployment vnfm-nodecellar-example...
 - "endpoint":
     Description: Web application endpoint
     Value: {u'ip_address': u'172.16.0.7', u'port': 8080}

...

capabilities

Usage

vnfm deployments capabilities [OPTIONS] DEPLOYMENT_ID

Lists all capabilities for a deployment. Note that not every deployment has capabilities and it depends on whether or not capabilities were defined in the blueprint from which the deployment was created

DEPLOYMENT_ID - The ID of the deployment for which you want to list capabilities.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant for which you want to list capabilities. If unspecified, the current tenant is used.

Example

$ vnfm deployments capabilities vnfm-nodecellar-example

...

Retrieving capabilities for deployment vnfm-nodecellar-example...
 - "endpoint":
     Description: Web application endpoint
     Value: {u'ip_address': u'172.16.0.7', u'port': 8080}

...

set-visibility

Usage

vnfm deployments set-visibility [OPTIONS] DEPLOYMENT_ID

Set the deployment’s visibility to tenant.

DEPLOYMENT_ID - The id of the deployment to update.

Mandatory flags

-l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘tenant’, ‘global’] [required].

Example

$ vnfm deployments set-visibility vnfm-nodecellar-example -l tenant

...

Deployment `vnfm-nodecellar-example` was set to tenant

...

set-site

Usage

vnfm depployments set-site [OPTIONS] DEPLOYMENT_ID

Set the deployment’s site.

DEPLOYMENT_ID is the id of the deployment to update

Optional Flags

  • -s, --site-name TEXT - Deployment’s site name
  • -d, --detach-site - If set, detach the current site, making the deployment siteless [default: False]. You cannot use this argument with arguments: [site_name]

DEV

The vnfm dev command is used to run fabric tasks on a VNF manager via SSH.

This supplies an easy way to run personalized, complex ssh scripts on the manager without having to manually connect to it.

The tasks do not have to be decorated with the @task decorator, because they are directly called from the CLI code, as with any other python function. Also, as fabric is one of the CLI’s dependencies, you do not need to install it separately unless you are using the CLI as a binary, in which case you must install fabric yourself.

For example, you could write a task that deploys and upgrades a monitoring agent you use to monitor your systems. During that manager’s lifecycle, you could rerun the same task to update that agent.

Usage

vnfm dev [options] -p TASKS_FILE -t TASK

Run fabric tasks on the manager.

Required Flags

  • -t, --task=TASK - The name of fabric task to run
  • -p, --tasks-file=TASKS_FILE - The path to the tasks file

Optional Flags

-a ..., --args ... - Arguments for the fabric task

Examples

$ vnfm dev --tasks-file my_tasks.py -v -t my_task -a --arg1=something --arg2=otherthing ...
$ vnfm dev -v -t my_task -a arg1_value arg2_value ...
...
  • --tasks-file my_tasks.py - can be omitted if a tasks.py file exists in your current working directory.

For example, to echo something in your currently running Manager, you need only supply a tasks.py file with the following:

from fabric.api import run

def echo(text):
   run('echo {0}'.format(text))
 $ vnfm dev -t echo -a something

VNFM provides a tasks repository from which users can obtain tasks and to which developers should contribute for the benefit of all.

EVENTS

The vnfm events command is used to view events of a specific execution.

Optional Flags

These commands support the common CLI flags.

Commands

list

Usage

vnfm events list [OPTIONS]

Display events for an execution

  • -e, --execution-id TEXT - The unique identifier for the execution. Mandatory.

Optional Flags

  • --include-logs / --no-logs - Include logs in returned events. [default: True]
  • --json - Output events in a consumable JSON format.
  • --tail - Tail the events of the specified execution until it ends.
  • -t, --tenant-name TEXT - The name of the tenant on which the execution occurred. If unspecified, the current tenant is used.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm events list -e dcf2dc2f-dc4f-4036-85a6-e693196e6331
...

Listing events for execution id dcf2dc2f-dc4f-4036-85a6-e693196e6331 [include_logs=True]
 2017-03-30 10:26:12.723  CFY <vnfm-nodecellar-example> Starting 'update' workflow execution
2017-03-30 10:26:13.201  CFY <vnfm-nodecellar-example> 'update' workflow execution succeeded

Total events: 2

...

delete

Usage

vnfm events delete [OPTIONS] EXECUTION_ID

Delete events attached to a deployment.

EXECUTION_ID is the ID of the execution events to delete.

Optional Flags

  • --include-logs / --no-logs - Include logs in returned events [default: True]
  • -t, --tenant-name TEXT - The name of the tenant on which the execution occurred. If unspecified, the current tenant is used.

Example

$ vnfm events delete vnfm-nodecellar-example

...

Deleting events for deployment id vnfm-nodecellar-example [include_logs=True]

Deleted 344 events

...

EXECUTIONS

The vnfm executions command is used to manage workflow executions on VNF Manager.

You can use the command to start, cancel and list executions and to retrieve information about a single execution.

You can also schedule executions to start in a specific date and time in the future (using the –schedule flag).

Optional Flags

These commands support the common CLI flags.

Commands

start

Usage

vnfm executions start [OPTIONS] WORKFLOW_ID

Execute a workflow on a given deployment

WORKFLOW_ID is the ID of the workflow to execute (for example, uninstall)

Optional Flags

  • -d, --deployment-id TEXT - The deployment ID to execute the workflow on
  • -p, --parameters TEXT - Parameters for the workflow execution (Can be provided as wildcard based paths (*.yaml, etc.) to YAML files, a JSON string or as “key1=value1;key2=value2”). This argument can be used multiple times.
  • --allow-custom-parameters - Allow passing custom parameters (which were not defined in the workflow’s schema in the blueprint) to the execution
  • -f, --force - Execute the workflow even if there is an ongoing execution for the given deployment
  • --timeout INTEGER - Operation timeout in seconds (The execution itself will keep going, but the CLI will stop waiting for it to terminate) (default: 900)
  • -l, --include-logs / --no-logs - Include logs in returned events
  • --json - Output events in a consumable JSON format
  • -t, --tenant-name TEXT - The name of the tenant on which the execution will be executed. If unspecified, the current tenant is used.
  • --dry-run - Execute the workflow as a dry-run so that the execution is shown step-by-step but the workflow is not implemented and no changes are made.
  • --queue - If set, executions that can`t currently run will be queued and run automatically when possible. You cannot use this argument with arguments: [force, dry_run]
  • --schedule TEXT - The time (including timezone) this workflow will be executed at; expected format: YYYYMMDDHHMM+HHMM or YYYYMMDDHHMM-HHMM. i.e: 201801032230-0500 (Jan-03-18 10:30pm EST). You cannot use this argument with arguments: [queue]

Example

$ vnfm executions start install -d vnfm-nodecellar-example
...

Executing workflow install on deployment vnfm-nodecellar-example [timeout=900 seconds]
2017-03-29 11:34:11.704  CFY <vnfm-nodecellar-example> Starting 'install' workflow execution
2017-03-29 11:34:12.204  CFY <vnfm-nodecellar-example> [hos...
.
.
.
2017-03-29 11:36:47.537  CFY <vnfm-nodecellar-example> 'install' workflow execution succeeded
Finished executing workflow install on deployment vnfm-nodecellar-example
* Run 'vnfm events list -e f38ad989-d09e-4b68-b041-ac63aeacb9ae' to retrieve the execution's events/logs

...

cancel

Usage

vnfm executions cancel [OPTIONS] EXECUTION_ID

Cancel a workflow’s execution.

EXECUTION_ID - The ID of the execution to be canceled.

Optional Flags

  • -f, --force - Terminate the execution abruptly, rather than request an orderly termination.
  • --kill - Terminate the execution abruptly and stop currently running tasks. This stops all processes running operations and workflows for the given execution.
  • -t, --tenant-name TEXT - The name of the tenant on which the execution is to be canceled. If unspecified, the current tenant is used.

Example

$ vnfm executions cancel eba71d2b-2456-4423-acb0-f8fc7324e793
...

Cancelling execution eba71d2b-2456-4423-acb0-f8fc7324e793
A cancel request for execution eba71d2b-2456-4423-acb0-f8fc7324e793 has been sent. To track the execution's status, use:
vnfm executions get eba71d2b-2456-4423-acb0-f8fc7324e793

...

list

Usage

vnfm executions list [options]

List executions.

If DEPLOYMENT_ID is provided, lists executions for that deployment. Otherwise, lists executions for all deployments.

Optional Flags

  • -d, --deployment-id TEXT - The ID of the deployment for which executions are to be listed.
  • --include-system-workflows - Include executions of system workflows.
  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • -t, --tenant-name TEXT - The name of the tenant on which the executions occurred. If unspecified, the current tenant is used.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm executions list

...

Listing all executions...

Executions:
+--------------------------------------+-------------------------------+------------+---------------+--------------------------+-------+------------+----------------+------------+
|                  id                  |          workflow_id          |   status   | deployment_id |        created_at        | error | permission |  tenant_name   | created_by |
+--------------------------------------+-------------------------------+------------+---------------+--------------------------+-------+------------+----------------+------------+
| fa330011-1f33-4e6c-82cb-a4537e13c950 |            install            | terminated |   nodecellar  | 2017-03-28 07:47:04.733  |       |  creator   | default_tenant |   admin    |
| 261ac6f8-c75d-4e28-9c62-646925cd326c |           uninstall           | terminated |   nodecellar  | 2017-03-28 07:55:02.582  |       |  creator   | default_tenant |   admin    |
+--------------------------------------+-------------------------------+------------+---------------+--------------------------+-------+------------+----------------+------------+

...

summary

Usage

vnfm executions summary <field> [optional sub-field] [OPTIONS]

Summarizes executions, giving a count of elements with each distinct value for the selected field. If a sub-field is selected then a count will be given for each distinct field and sub-field combination, as well as totals for each field.

For valid field/sub-field names, invoke vnfm executions summary

Example

$ vnfm executions summary deployment_id

Retrieving summary of executions on field deployment_id

Execution summary by deployment_id
+---------------+------------+
| deployment_id | executions |
+---------------+------------+
|      sga1     |     2      |
|      sga3     |     2      |
|      sga2     |     2      |
|       s3      |     2      |
|       s2      |     2      |
|       s1      |     2      |
|       s5      |     2      |
|       s4      |     2      |
|      sg1      |     2      |
+---------------+------------+

...

$ vnfm executions summary workflow_id status
Retrieving summary of executions on field workflow_id

Execution summary by workflow_id
+-------------------------------+------------+------------+
|          workflow_id          |   status   | executions |
+-------------------------------+------------+------------+
|        create_snapshot        | terminated |     1      |
|        create_snapshot        |   TOTAL    |     1      |
| create_deployment_environment | terminated |     9      |
| create_deployment_environment |   TOTAL    |     9      |
|            install            | terminated |     9      |
|            install            |   TOTAL    |     9      |
|        restore_snapshot       |  started   |     1      |
|        restore_snapshot       |   TOTAL    |     1      |
+-------------------------------+------------+------------+

...

get

Usage

vnfm executions get [OPTIONS] EXECUTION_ID

Retrieve information for a specific execution.

EXECUTION_ID is the execution about which to retrieve information.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant on which the execution occurred. If unspecified, the current tenant is used.

Example

$ vnfm executions get f38ad989-d09e-4b68-b041-ac63aeacb9ae

...

Retrieving execution f38ad989-d09e-4b68-b041-ac63aeacb9ae

Execution:
+--------------------------------------+-------------------------------+-----------+------------+--------------------------+--------------+--------------------------+--------------------------+-------+------------+----------------+------------+--------------------------+---------------+
|                  id                  |          workflow_id          |   status  | is_dry_run | deployment_id            | blueprint_id |        created_at        |         ended_at         | error | visibility |  tenant_name   | created_by |        started_at        | scheduled_for |
+--------------------------------------+-------------------------------+-----------+------------+--------------------------+--------------+--------------------------+--------------------------+-------+------------+----------------+------------+--------------------------+---------------+
| f38ad989-d09e-4b68-b041-ac63aeacb9ae | install                       | completed |   False    | vnfm-nodecellar-example  | blueprint    | 2019-08-25 11:41:16.158  | 2019-08-25 11:41:18.749  |       |   tenant   | default_tenant |   admin    | 2019-08-25 11:41:16.161  |               |
+--------------------------------------+-------------------------------+-----------+------------+--------------------------+--------------+--------------------------+--------------------------+-------+------------+----------------+------------+--------------------------+---------------+

Execution Parameters:
...

resume

vnfm executions resume [OPTIONS] EXECUTION_ID

Resume the execution of a workflow in a failed or cancelled state.

EXECUTION_ID is the ID of the execution to resume. The workflow will run again, restoring the tasks graph from the storage, and retrying failed tasks when necessary. If reset-operations is passed, tasks that were started but didn’t fail will be retried as well.

Optional Flags

  • --reset-operations - Reset operations in started state, so that they are run again unconditionally
  • -t, --tenant-name TEXT - The name of the tenant of the execution. If not specified, the current tenant will be used

Example

$ vnfm executions resume 19280e9a-7163-4066-b4f4-a09aaed6dd0e

...

Resuming execution 19280e9a-7163-4066-b4f4-a09aaed6dd0e
A resume request for execution 19280e9a-7163-4066-b4f4-a09aaed6dd0e has been sent. To track the execution's status, use:
vnfm executions get 19280e9a-7163-4066-b4f4-a09aaed6dd0e

GROUPS

The vnfm groups command is used to view information on the different groups in a deployment.

You can use the command to list all groups.

Optional Flags

These commands support the common CLI flags.

Commands

list

Usage

vnfm groups list [OPTIONS]

Lists all groups for a deployment.

DEPLOYMENT_ID is the ID of the deployment for which to list groups.

Required Flags

  • -d, --deployment-id TEXT - The ID of the deployment for which to list groups.
  • -t, tenant-name TEXT - The name of the tenant on which the deployment is made. If unspecified, the current tenant is used.

Example

$ vnfm groups list -d hello_world

...

Listing groups for deployment hello_world...
No groups defined for deployment hello_world

...

INSTALL

The vnfm install command is used to install an application using a VNF manager without having to manually go through the process of uploading a blueprint, creating a deployment and executing a workflow.

Usage

vnfm install [OPTIONS] [BLUEPRINT_PATH]

Install an application via the manager.

BLUEPRINT_PATH can be either a local blueprint yaml file or blueprint archive; a url to a blueprint archive or an organization/blueprint_repo[:tag/branch] (to be retrieved from GitHub)

This will upload the blueprint, create a deployment and execute the install workflow.

Optional Flags

This command supports the common CLI flags.

  • -b, --blueprint-id TEXT - The unique identifier for the blueprint [manager only]
  • -n, --blueprint-filename TEXT - The name of the archive’s main blueprint file. This is only relevant if uploading an archive
  • --validate - Validate the blueprint first
  • -d, --deployment-id TEXT - The unique identifier for the deployment [manager only]
  • -i, --inputs TEXT - Inputs for the deployment (Can be provided as wildcard based paths (*.yaml, /my_inputs/, etc.) to YAML files, a JSON string or as key1=value1;key2=value2). This argument can be used multiple times
  • -w, --workflow-id TEXT - The workflow to execute [default: install]
  • -p, --parameters TEXT - Parameters for the workflow (Can be provided as wildcard based paths (*.yaml, /my_inputs/, etc.) to YAML files, a JSON string or as key1=value1;key2=value2). This argument can be used multiple times
  • --allow-custom-parameters - Allow passing custom parameters (which were not defined in the workflow’s schema in the blueprint) to the execution
  • --timeout INTEGER - Operation timeout in seconds (The execution itself will keep going, but the CLI will stop waiting for it to terminate) [default: {0}] [manager only]
  • --include-logs / --no-logs - Include logs in returned events [default: True] [manager only]

Example

$ vnfm install -p vnfm-hello-world-example-master/ec2-blueprint.yaml

...

Uploading blueprint vnfm-hello-world-example-master/ec2-blueprint.yaml...
Blueprint uploaded. The blueprint's id is vnfm-hello-world-example-master
Creating new deployment from blueprint vnfm-hello-world-example-master...
Deployment created. The deployment's id is vnfm-hello-world-example-master
Executing workflow install on deployment vnfm-hello-world-example-master [timeout=900 seconds]
Deployment environment creation is in progress...
2016-06-28T12:19:35 CFY <vnfm-hello-world-example-master> Starting 'create_deployment_environment' workflow execution
.
.
.
2016-06-28T12:21:18 CFY <vnfm-hello-world-example-master> [vm_8573e] Configuring Agent
2016-06-28T12:21:18 CFY <vnfm-hello-world-example-master> [vm_8573e.configure] Sending task 'vnfm_agent.installer.operations.configure'
2016-06-28T12:21:18 CFY <vnfm-hello-world-example-master> [vm_8573e.configure] Task started 'vnfm_agent.installer.operations.configure'
2016-06-28T12:21:18 CFY <vnfm-hello-world-example-master> [vm_8573e.configure] Task started 'vnfm_agent.installer.operations.configure'
2016-06-28T12:21:24 CFY <vnfm-hello-world-example-master> [vm_8573e.configure] Task succeeded 'vnfm_agent.installer.operations.configure
.
.
.
2016-06-28T12:21:49 CFY <vnfm-hello-world-example-master> [http_web_server_d776e.start] Task succeeded 'script_runner.tasks.run'
2016-06-28T12:21:49 CFY <vnfm-hello-world-example-master> 'install' workflow execution succeeded
Finished executing workflow install on deployment vnfm-hello-world-example-master
* Run 'vnfm events list --include-logs --execution-id acc1a58d-108b-4a10-84c5-abbabfa5cd2f' to retrieve the execution's events/logs

...

LOGS

The vnfm logs command is used to manage log files on VNF Manager.

You can use the command to download, backup and purge VNF Manager service logs.

To use the command you must have the credentials (user and key) set in the local context and must run vnfm use -t MANAGEMENT_IP prior to running the command.

Optional Flags

These commands support the common CLI flags.

Commands

backup

Usage

vnfm logs backup [OPTIONS]

Create a backup of all logs under a single archive and save it on VNF Manager under /var/log.

Example

$ vnfm logs backup

...

Creating logs archive in manager: /tmp/vnfm-manager-logs_20170330T122201_10.239.0.208.tar.gz
Backing up manager logs to /var/log/vnfm-manager-logs_20170330T122201_10.239.0.208.tar.gz

...

download

Usage

vnfm logs download [OPTIONS]

Download an archive containing all of the VNF Manager service logs.

Optional Flags

  • -o, --output-path TEXT - The local path to which to save the download.
  • --all-nodes - Download logs from all nodes in a cluster. CLI cluster profile must be updated with SSH users and keys. Use Cluster Update Profile and Profile Set Cluster to update the profile.

Example

$ vnfm logs download

...

Creating logs archive in manager: /tmp/vnfm-manager-logs_20160623T070559_10.10.1.10.tar.gz
Downloading archive to: /home/nir0s/work/local-bootstrap-env
Removing archive from manager...

...

purge

Usage

vnfm logs purge [OPTIONS]

Purge all log files on VNF Manager.

Truncate all logs files under /var/log/vnfm.

This enables you to take extreme measures to clean up data from VNF Manager. For example, you might choose to run this command when the disk is full due to a bug that has caused the logs to bloat.

The -f, --force flag is mandatory as a safety measure.

Optional Flags

--backup-first - Creates a backup before purging.

Forced Prerequisites Installation USE WITH CARE! Log files in VNF Manager are rotated. vnfm purge is a safety measure in case disk space on VNF Manager runs out, and should only be used in extreme situations.

Example

$ vnfm logs purge -f

...

Purging manager logs...

...

MAINTENANCE-MODE

The vnfm maintenance-mode command is used to restrict REST access to the manager.

This is required, for instance, when you upgrade a manager.

Putting the manager in maintenance-mode prevents it from running any executions.

Optional Flags

These commands support the common CLI flags.

Commands

activate

Usage

vnfm maintenance-mode activate [OPTIONS]

Enter maintenance-mode on VNF Manager, rejecting further REST requests.

Optional Flags

  • --wait - Wait until there are no running executions and automatically activate maintenance-mode.
  • --timeout INTEGER - Operation timeout in seconds. (The execution will keep going, but the CLI will stop waiting for it to terminate.) [default: {0}]

Example

$ vnfm maintenance-mode activate

...

Entering maintenance mode...
Run 'vnfm maintenance-mode status' to check the maintenance mode's status.

...

deactivate

Usage

vnfm maintenance-mode deactivate

Deactivate maintenance-mode on the VNF Manager, to accept REST requests.

Example

$ vnfm maintenance-mode deactivate

...

Turning off maintenance mode...
Maintenance mode is off.

...

status

Usage

vnfm maintenance-mode status

Retrieve the current maintenance-mode status.

Example

$ vnfm maintenance-mode status

...

Maintenance Mode Status:
        Status:      activated
        Requested By:        admin
        Activated At:        2017-04-04T05:16:21.407Z
        Activation Requested At:     2017-04-04T05:16:21.407Z

INFO - VNF Manager is currently in maintenance mode. Most requests will be blocked.

...

NODE-INSTANCES

The vnfm node-instances command is used to view information about the different node-instances of a deployment.

You can use the command to list the node-instances of a specific deployment or of all deployments, and to retrieve information about a single node-instance.

Optional Flags

These commands support the common CLI flags.

Commands

list

Usage

vnfm node-instances list [OPTIONS]

List node-instances.

If DEPLOYMENT_ID is provided, lists node-instances for that deployment. Otherwise, lists node-instances for all deployments.

Optional Flags

  • -d, --deployment-id TEXT - The unique identifier for the deployment
  • -n, --node-name TEXT - The node’s name
  • --sort-by TEXT - Key for sorting the list
  • --descending - Sort list in descending order [default: False]
  • -t, --tenant-name TEXT - The name of the tenant from which to list node-instance. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This argument cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search node-instances by id. The returned list will include only node-instances that contain the given search pattern.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm node-instances list

...

Listing all instances...

Node-instances:
+------------------------+------------------------------+-------------+-----------------+---------+------------+----------------+------------+
|           id           |        deployment_id         |   host_id   |     node_id     |  state  | visibility |  tenant_name   | created_by |
+------------------------+------------------------------+-------------+-----------------+---------+------------+----------------+------------+
|      host_gkxr6j       | vnfm-nodecellar-example      | host_gkxr6j |       host      | started |  creator   | default_tenant |   admin    |
| http_web_server_mwtpct | vnfm-hello-world-example     |  vm_qu2t7i  | http_web_server | started |  creator   | default_tenant |   admin    |
|     mongod_nps479      | vnfm-nodecellar-example      | host_gkxr6j |      mongod     | started |  creator   | default_tenant |   admin    |
|   nodecellar_gj0mj2    | vnfm-nodecellar-example      | host_gkxr6j |    nodecellar   | started |  creator   | default_tenant |   admin    |
|     nodejs_gsy2zz      | vnfm-nodecellar-example      | host_gkxr6j |      nodejs     | started |  creator   | default_tenant |   admin    |
|       vm_qu2t7i        | vnfm-hello-world-example     |  vm_qu2t7i  |        vm       | started |  creator   | default_tenant |   admin    |
+------------------------+------------------------------+-------------+-----------------+---------+------------+----------------+------------+

...

summary

Usage

vnfm node-instances summary <field> [optional sub-field] [OPTIONS]

Summarizes node-instances, giving a count of elements with each distinct value for the selected field. If a sub-field is selected then a count will be given for each distinct field and sub-field combination, as well as totals for each field.

For valid field/sub-field names, invoke vnfm node-instances summary

Example

$ vnfm node-instances summary deployment_id
Retrieving summary of node instances on field deployment_id

Node instance summary by deployment_id
+---------------+----------------+
| deployment_id | node_instances |
+---------------+----------------+
|      sga1     |       51       |
|      sga3     |       51       |
|      sga2     |       51       |
|       s3      |       2        |
|       s2      |       2        |
|       s1      |       2        |
|       s5      |       2        |
|       s4      |       2        |
|      sg1      |       35       |
+---------------+----------------+

...


$ vnfm node-instances summary deployment_id state
Retrieving summary of node instances on field deployment_id

Node instance summary by deployment_id
+---------------+---------+----------------+
| deployment_id |  state  | node_instances |
+---------------+---------+----------------+
|      sga1     | started |       51       |
|      sga1     |  TOTAL  |       51       |
|      sga3     | started |       51       |
|      sga3     |  TOTAL  |       51       |
|      sga2     | started |       51       |
|      sga2     |  TOTAL  |       51       |
|       s3      | started |       2        |
|       s3      |  TOTAL  |       2        |
|       s2      | started |       2        |
|       s2      |  TOTAL  |       2        |
|       s1      | started |       2        |
|       s1      |  TOTAL  |       2        |
|       s5      | started |       2        |
|       s5      |  TOTAL  |       2        |
|       s4      | started |       2        |
|       s4      |  TOTAL  |       2        |
|      sg1      | started |       35       |
|      sg1      |  TOTAL  |       35       |
+---------------+---------+----------------+

...

get

Usage

vnfm node-instances get [OPTIONS] NODE_INSTANCE_ID

Retrieve information for a specific node-instance.

NODE_INSTANCE_ID is the ID of the node-instance for which to retrieve information.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant of the node-instance. If unspecified, the current tenant is used.

Example

$ vnfm node-instances get nodecellar_gj0mj2

...

Retrieving node instance nodecellar_gj0mj2

Node-instance:
+-------------------+-----------------------------+-------------+------------+---------+------------+----------------+------------+
|         id        |        deployment_id        |   host_id   |  node_id   |  state  | visibility |  tenant_name   | created_by |
+-------------------+-----------------------------+-------------+------------+---------+------------+----------------+------------+
| nodecellar_gj0mj2 | vnfm-nodecellar-example     | host_gkxr6j | nodecellar | started |  creator   | default_tenant |   admin    |
+-------------------+-----------------------------+-------------+------------+---------+------------+----------------+------------+

Instance runtime properties:
        mongo_port: 27017
        nodejs_binaries_path: /tmp/68672f1b-b49a-4e58-ae6f-b2de63676e4f/nodejs/nodejs-binaries
        pid: 27816
        nodecellar_source_path: /tmp/68672f1b-b49a-4e58-ae6f-b2de63676e4f/nodecellar/nodecellar-source
        mongo_ip_address: localhost

...

update-runtime

Usage

vnfm node-instances update-runtime [OPTIONS] NODE_INSTANCE_ID

Update the runtime properties of a specific node-instance.

NODE_INSTANCE_ID is the id of the node-instance to update.

Mandatory flags

-p, --properties TEXT - Runtime properties for the node instance (Can be provided as wildcard based paths (*.yaml, /my_inputs/, etc.) to YAML files, a JSON string or as ‘key1=value1;key2=value2’).

This argument can be used multiple times.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant of the node-instance. If unspecified, the current tenant is used.

Example

$ vnfm node-instances update-runtime vm_d720jr -p new_property=value -p dict_property.key=value

Successfully updated the runtime properties of "vm_d720jr"

Node-instance:
+-----------+---------------+-----------+---------+---------+------------+----------------+------------+
|     id    | deployment_id |  host_id  | node_id |  state  | visibility |  tenant_name   | created_by |
+-----------+---------------+-----------+---------+---------+------------+----------------+------------+
| vm_d720jr | hello_world   | vm_d720jr |    vm   | started |   tenant   | default_tenant |   admin    |
+-----------+---------------+-----------+---------+---------+------------+----------------+------------+

Instance runtime properties:
    dict_property:   {'key': 'value'}
    new_property:    value
        ipv6_address:    None
        vnfm_agent:  {'broker_ip': ['172.16.3.112'], 'file_server_url': 'https://172.16.3.112:53333/resources', ... }
        external_name:   server_hello_world_2_vm_d720jr
        ip:              172.16.3.114
        ipv6_addresses:  []
        networks:        {'vnfm-management-network': ['172.16.3.114']}
    ...

Notice how using the dot notation dict_property.key has created a property dict_property and within it a sub-property key.

In the same way, we can access sub-properties to update them, e.g. dict_property.key = [value1, value2].

Options for providing the runtime properties

  • Providing the properties to be updated directly:

    vnfm node-instances update-runtime vm_d720jr -p 'a=b; c.d.e=f'

  • Through repeated usage of the –properties flag:

    vnfm node-instances update-runtime vm_d720jr -p a=b -p c.d.e=f

  • In dictionary format:

    vnfm node-instances update-runtime vm_d720jr -p '{a: b, c: {d: {e: f}}}'

  • Providing a path to a YAML file containing the runtime properties to be updated (must end with .yaml):

    vnfm node-instances update-runtime vm_d720jr -p my_yamls/update_runtime_props.yaml

  • Where a YAML file may be formatted as follows:

a: b

c:

   d:

      e: f
  • Providing a path to a directory of YAML files containing the runtime properties to be updated (must end with /):

    vnfm node-instances update-runtime vm_d720jr -p my_yamls/

Usage note:

Updating a sub-property within a runtime property does not affect other sub-properties. For example, running vnfm node-instances update-runtime vm_d720jr -p ‘{a: {b: 5}}’ on a node-instance where:

Instance runtime properties:

   a:  {b: 4, c: 3}

   ...

Will result in:

Instance runtime properties:

   a:  {b: 5, c: 3}

   ...

delete-runtime

Usage

vnfm node-instances delete-runtime [OPTIONS] NODE_INSTANCE_ID

Delete specified runtime properties of a specific node-instance

NODE_INSTANCE_ID is the id of the node-instance to update.

Mandatory flags

-p, --properties TEXT - Runtime properties for the node instance (Can be provided as wildcard based paths (*.yaml, /my_inputs/, etc.) to YAML files, a JSON string or as ‘key1=value1;key2=value2’). This argument can be used multiple times.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant of the node-instance. If unspecified, the current tenant is used.

Example

$ vnfm node-instances delete-runtime vm_d720jr -p 'dict_property.key' -p 'new_property'

Successfully updated the runtime properties of "vm_d720jr"

Node-instance:
+-----------+---------------+-----------+---------+---------+------------+----------------+------------+
|     id    | deployment_id |  host_id  | node_id |  state  | visibility |  tenant_name   | created_by |
+-----------+---------------+-----------+---------+---------+------------+----------------+------------+
| vm_d720jr | hello_world   | vm_d720jr |    vm   | started |   tenant   | default_tenant |   admin    |
+-----------+---------------+-----------+---------+---------+------------+----------------+------------+

Instance runtime properties:
    dict_property:   {}
        ipv6_address:    None
        vnfm_agent:  {'broker_ip': ['172.16.3.112'], 'file_server_url': 'https://172.16.3.112:53333/resources', ... }
        external_name:   server_hello_world_2_vm_d720jr
        ip:              172.16.3.114
        ipv6_addresses:  []
        networks:        {'vnfm-management-network': ['172.16.3.114']}
    ...

Notice how using the dot notation dict_property.key allowed us to delete the sub-property key within the property dict_property.

Options for providing the runtime properties

  • Providing the properties to be deleted directly:

    vnfm node-instances delete-runtime vm_d720jr -p 'a; c.d'

  • Through repeated usage of the –properties flag:

    vnfm node-instances delete-runtime vm_d720jr -p 'a' -p 'c.d'

  • In dictionary format:

    vnfm node-instances delete-runtime vm_d720jr -p '{a, c: {d}}'

  • Providing a path to a YAML file containing the runtime properties to be deleted (must end with .yaml):

    vnfm node-instances delete-runtime vm_d720jr -p my_yamls/update_runtime_props.yaml

  • Where a YAML file may be formatted as follows:

    a:
    
    c:
    
       d:
    

Which will also delete the property a and the property d (which is within another property c).

  • Providing a path to a directory of YAML files containing the runtime properties to be deleted (must end with /):

    vnfm node-instances delete-runtime vm_d720jr -p my_yamls/

Usage note:

Deleting a sub-property within a runtime property does not affect other sub-properties. For example, running vnfm node-instances delete-runtime vm_d720jr -p ‘{a: {b}}’ on a node-instance where:

Instance runtime properties:

    a:  {b: 4, c: 3}

    ...

Will result in:

a:  {c: 3}

...

NODES

The vnfm nodes command is used to view information on the different nodes of a deployment.

You can use the command to list all nodes and get information on a single node.

Optional Flags

These commands support the common CLI flags.

Commands

list

Usage

vnfm nodes list [OPTIONS]

Lists all nodes for a deployment.

If DEPLOYMENT_ID is provided, lists nodes for that deployment. Otherwise, list nodes for all deployments.

Optional Flags

  • -d, --deployment-id TEXT - The unique identifier for the deployment.
  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • -t, --tenant-name TEXT - The name of the tenant from which to list the nodes. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This argument cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search nodes by id. The returned list will include only nodes that contain the given search pattern.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
    • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm nodes list

...

Listing all nodes...

Nodes:
+-----------------+------------------------------+------------------------------+---------+----------------------------------------------+---------------------+-----------------------------+------------+----------------+------------+
|        id       |        deployment_id         |         blueprint_id         | host_id |                     type                     | number_of_instances | planned_number_of_instances | permission |  tenant_name   | created_by |
+-----------------+------------------------------+------------------------------+---------+----------------------------------------------+---------------------+-----------------------------+------------+----------------+------------+
| http_web_server | vnfm-hello-world-example     | vnfm-hello-world-example     |    vm   |           vnfm.nodes.WebServer               |          1          |              1              |  creator   | default_tenant |   admin    |
|        vm       | vnfm-hello-world-example     | vnfm-hello-world-example     |    vm   |            vnfm.nodes.Compute                |          1          |              1              |  creator   | default_tenant |   admin    |
|      mongod     | vnfm-nodecellar-example      | vnfm-nodecellar-example      |   host  |   nodecellar.nodes.MonitoredMongoDatabase    |          1          |              1              |  creator   | default_tenant |   admin    |
|    nodecellar   | vnfm-nodecellar-example      | vnfm-nodecellar-example      |   host  | nodecellar.nodes.NodecellarApplicationModule |          1          |              1              |  creator   | default_tenant |   admin    |
|       host      | vnfm-nodecellar-example      | vnfm-nodecellar-example      |   host  |       nodecellar.nodes.MonitoredServer       |          1          |              1              |  creator   | default_tenant |   admin    |
|      nodejs     | vnfm-nodecellar-example      | vnfm-nodecellar-example      |   host  |        nodecellar.nodes.NodeJSServer         |          1          |              1              |  creator   | default_tenant |   admin    |
+-----------------+------------------------------+------------------------------+---------+----------------------------------------------+---------------------+-----------------------------+------------+----------------+------------+

...

$ vnfm nodes list -d simple_website

...

Listing nodes for deployment vnfm-hello-world-example...

Nodes:
+-----------------+------------------------------+------------------------------+---------+--------------------------+---------------------+-----------------------------+------------+----------------+------------+
|        id       |        deployment_id         |         blueprint_id         | host_id |           type           | number_of_instances | planned_number_of_instances | permission |  tenant_name   | created_by |
+-----------------+------------------------------+------------------------------+---------+--------------------------+---------------------+-----------------------------+------------+----------------+------------+
| http_web_server | vnfm-hello-world-example     | vnfm-hello-world-example     |    vm   | vnfm.nodes.WebServer     |          1          |              1              |  creator   | default_tenant |   admin    |
|        vm       | vnfm-hello-world-example     | vnfm-hello-world-example     |    vm   |  vnfm.nodes.Compute      |          1          |              1              |  creator   | default_tenant |   admin    |
+-----------------+------------------------------+------------------------------+---------+--------------------------+---------------------+-----------------------------+------------+----------------+------------+

...

summary

Usage

vnfm nodes summary <field> [optional sub-field] [OPTIONS]

Summarizes nodes, giving a count of elements with each distinct value for the selected field. If a sub-field is selected then a count will be given for each distinct field and sub-field combination, as well as totals for each field.

For valid field/sub-field names, invoke vnfm nodes summary

Example

$ vnfm nodes summary deployment_id

Retrieving summary of nodes on field deployment_id

Node summary by deployment_id
+---------------+-------+
| deployment_id | nodes |
+---------------+-------+
|      sga1     |   5   |
|      sga3     |   5   |
|      sga2     |   5   |
|       s3      |   1   |
|       s2      |   1   |
|       s1      |   1   |
|       s5      |   1   |
|       s4      |   1   |
|      sg1      |   2   |
+---------------+-------+

...

$ vnfm nodes summary --all-tenants tenant_name deployment_id
Retrieving summary of nodes on field tenant_name

Node summary by tenant_name
+----------------+---------------+-------+
|  tenant_name   | deployment_id | nodes |
+----------------+---------------+-------+
|     test1      |       s1      |   1   |
|     test1      |      sg1      |   2   |
|     test1      |      sg2      |   2   |
|     test1      |      sg3      |   2   |
|     test1      |      sga1     |   5   |
|     test1      |      sga2     |   5   |
|     test1      |      sga3     |   5   |
|     test1      |      sga4     |   5   |
|     test1      |      sga5     |   5   |
|     test1      |     TOTAL     |   32  |
|     test2      |       s1      |   1   |
|     test2      |       s2      |   1   |
|     test2      |       s3      |   1   |
|     test2      |      sg1      |   2   |
|     test2      |      sg2      |   2   |
|     test2      |      sg3      |   2   |
|     test2      |      sg4      |   2   |
|     test2      |      sg5      |   2   |
|     test2      |      sga1     |   5   |
|     test2      |     TOTAL     |   18  |
| default_tenant |       s1      |   1   |
| default_tenant |       s2      |   1   |
| default_tenant |       s3      |   1   |
| default_tenant |       s4      |   1   |
| default_tenant |       s5      |   1   |
| default_tenant |      sg1      |   2   |
| default_tenant |      sga1     |   5   |
| default_tenant |      sga2     |   5   |
| default_tenant |      sga3     |   5   |
| default_tenant |     TOTAL     |   22  |
+----------------+---------------+-------+

...

get

Usage

vnfm nodes get [OPTIONS] NODE_ID

Retrieve information for a specific node of a specific deployment.

NODE_ID is the ID of the node for which to retrieve information.

Required Flags

-d, --deployment-id TEXT - The unique identifier for the deployment. [required]

Optional Flags

-t, --tenant-name TEXT - The name of the tenant of the node. If unspecified, the current tenant is used

Example

$ vnfm nodes get -d vnfm-nodecellar-example nodecellar

...

Retrieving node nodecellar for deployment vnfm-nodecellar-example

Node:
+------------+-----------------------------+-----------------------------+---------+----------------------------------------------+---------------------+-----------------------------+------------+----------------+------------+
|     id     |        deployment_id        |         blueprint_id        | host_id |                     type                     | number_of_instances | planned_number_of_instances | permission |  tenant_name   | created_by |
+------------+-----------------------------+-----------------------------+---------+----------------------------------------------+---------------------+-----------------------------+------------+----------------+------------+
| nodecellar | vnfm-nodecellar-example     | vnfm-nodecellar-example     |   host  | nodecellar.nodes.NodecellarApplicationModule |          1          |              1              |  creator   | default_tenant |   admin    |
+------------+-----------------------------+-----------------------------+---------+----------------------------------------------+---------------------+-----------------------------+------------+----------------+------------+

Node properties:
        application_url: _https://github.com/vnfm-cosmo/nodecellar/archive/master.tar.gz
        port: 8080
        startup_script: server.js

Node instance IDs:
        nodecellar_gj0mj2


   ...

PLUGINS

The vnfm plugins command is used to manage plugins stored on a VNF manager.

You can use the command to upload, download, delete and list plugins and also to get information on a specific plugin.

A VNFM plugin is an archive created by wagon.

Each plugin has a plugin.yaml file that map node lifecycle operations to appropriate plugin functions.

See plugins for more information.

Optional Flags

These commands support the common CLI flags.

Commands

upload

Usage

vnfm plugins upload [OPTIONS] PLUGIN_PATH

Upload a plugin to VNF Manager.

PLUGIN_PATH is the path to the wagon archive to upload.

Wagon (via the --format flag) enables you to create archives in both tar.gz and zip formats. VNFM only supports wagon in the tar.gz format.

Required Flags

-y, --yaml-path TEXT - The path to the yaml file for the plugin

Optional Flags

  • -t, --tenant-name TEXT - The name of the tenant of the plugin. If unspecified, the current tenant is used.
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’] [default: tenant].

Example

$ vnfm plugins upload -y plugin.yaml vnfm_aws_plugin-1.4.4-py27-none-linux_x86_64-centos-Core.wgn

...

Validating plugin vnfm_aws_plugin-1.4.4-py27-none-linux_x86_64-centos-Core.wgn...
Plugin validated successfully
Uploading plugin vnfm_aws_plugin-1.4.4-py27-none-linux_x86_64-centos-Core.wgn...
 vnfm_aws_plug... |################################################| 100.0%
Plugin uploaded. The plugin's id is e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74

...

download

Usage

vnfm plugins download [OPTIONS] PLUGIN_ID

Download a plugin from VNF Manager.

PLUGIN_ID is the ID of the plugin to download.

Optional Flags

-o, --output-path TEXT - The local path for the download. -t, --tenant-name TEXT - The name of the tenant of the plugin. If unspecified, the current tenant is used.

Example

$ vnfm plugins download e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74

...

Downloading plugin e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74...
 e90b1a09-6b56-4a9... |################################################| 100.0%
Plugin downloaded as e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74.tar.gz

...

delete

Usage

vnfm plugins delete [OPTIONS] PLUGIN_ID

Delete a plugin from VNF Manager.

PLUGIN_ID is the ID of the plugin to be deleted.

Optional Flags

  • -f, --force - Delete the plugin, even if there are deployments that are currently using it.
  • -t, --tenant-name TEXT - The name of the tenant of the plugin. If unspecified, the current tenant is used.

Example

$ vnfm plugins delete e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74

...

Deleting plugin e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74...
Plugin deleted

...

list

Usage

vnfm plugins list [OPTIONS]

List all available plugins on VNF Manager. You can use this command to retrieve the IDs of the plugins you want to download or delete.

Optional Flags

  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • -t, --tenant-name TEXT - The name of the tenant from which to list the plugins. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This argument cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search plugins by package-name. The returned list will include only plugins that contain the given search pattern.
  • --get-data - When set to True, displays the full list of connected resources (users/tenants/user-groups), for each listed resource. When set to False displays the total number of connected resources. (default:False)
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm plugins list

...

Listing all plugins...

Plugins:
+--------------------------------------+---------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+
|                  id                  |     package_name    | package_version | distribution | supported_platform | distribution_release |       uploaded_at        | visibility |  tenant_name   | created_by |
+--------------------------------------+---------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+
| e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74 | vnfm-aws-plugin     |      1.4.4      |    centos    |    linux_x86_64    |         core         | 2017-04-04 07:02:54.526  |   tenant   | default_tenant |   admin    |
+--------------------------------------+---------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+

...

get

Usage

vnfm plugins get [OPTIONS] PLUGIN_ID

Retrieve information for a specific plugin.

PLUGIN_ID is the ID of the plugin for which to retrieve information.

Optional Flags

  • -t, --tenant-name TEXT - The name of the tenant of the plugin. If unspecified, the current tenant is used.
  • --get-data - When set to True, displays the full list of connected resources (users/tenants/user-groups), for each listed resource. When set to False displays the total number of connected resources. (default:False)

Example

$ vnfm plugins get e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74

...

Retrieving plugin e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74...

Plugin:
+--------------------------------------+---------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+
|                  id                  |     package_name    | package_version | distribution | supported_platform | distribution_release |       uploaded_at        | visibility |  tenant_name   | created_by |
+--------------------------------------+---------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+
| e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74 | vnfm-aws-plugin     |      1.4.4      |    centos    |    linux_x86_64    |         core         | 2017-04-04 07:02:54.526  |   tenant   | default_tenant |   admin    |
+--------------------------------------+---------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+

...

validate

Usage

vnfm plugins validate [OPTIONS] PLUGIN_PATH

Validate a plugin.

This validates that the plugin’s archive is not corrupted. A valid plugin is a wagon (_http://github.com/vnfm-cosomo/wagon) in the tar.gz format.

PLUGIN_PATH is the path to wagon archive to validate.

Example

$ vnfm plugins validate vnfm_aws_plugin-1.4.4-py27-none-linux_x86_64-centos-Core.wgn

...

Validating plugin vnfm_aws_plugin-1.4.4-py27-none-linux_x86_64-centos-Core.wgn...
Plugin validated successfully

...

set-visibility

Usage

vnfm plugins set-visibility [OPTIONS] PLUGIN_ID

Set the plugin’s visibility

PLUGIN_ID - The id of the plugin to update.

Required Flags

-l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘tenant’, ‘global’].

Example

$ vnfm plugins set-visibility e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74 -l global

...

Plugin `e90b1a09-6b56-4a92-b9cd-5fc4ef32ab74` was set to global

...

bundle-upload

Usage

vnfm plugins bundle-upload [OPTIONS]

Upload a bundle of plugins to VNF Manager.

Optional Flags

-p, --path TEXT - Path to a plugins bundle file or URL. If unspecified, a default URL is used.

Example

$ vnfm plugins bundle-upload -p /dir/vnfm-plugins-bundle.tgz

...

update

Usage

vnfm plugins update [OPTIONS] BLUEPRINT_ID

Update the plugins of all the deployments of the blueprint.

BLUEPRINT_ID the blueprint’s ID to perform the plugins update with.

Optional Flags

  • -q, --quiet - Show only critical logs
  • --format [plain|json]
  • -v, --verbose - Show verbose output. You can supply this up to three times (i.e. -vvv)
  • --json
  • -t, --tenant-name TEXT - The name of the tenant of the plugin. If not specified, the current tenant will be used
  • --include-logs / --no-logs - Include logs in returned events [default: True]
  • --json-output - Output events in a consumable JSON format
  • -f, --force - Force running the update in case a previous update on this blueprint has failed to finished successfully.

Example

$ vnfm plugin update openstack_blueprint

...

Updating the plugins of the deployments of the blueprint openstack_blueprint
2019-06-16 15:59:50.843  CFY <None> Starting 'update_plugin' workflow execution
2019-06-16 15:59:50.845  CFY <None> Executing deployment update for deployment openstack_blueprint_deployment...
2019-06-16 15:59:55.880  CFY <None> update_plugin workflow execution succeeded

...

get-update

Usage

vnfm plugins get-update [OPTIONS] PLUGINS_UPDATE_ID

Retrieve information for a specific plugins update.

PLUGINS_UPDATE_ID is the id of the plugins update to get information on.

Optional Flags

  • -q, --quiet - Show only critical logs
  • --format [plain|json]
  • -v, --verbose - Show verbose output. You can supply this up to three times (i.e. -vvv)
  • --json
  • -t, --tenant-name TEXT - The name of the tenant of the plugins update. If not specified, the current tenant will be used

Example

$ vnfm plugin get-update 'bffee604-7133-43b0-9f5f-7a893bffd238'

...

history

Usage

vnfm plugins history [OPTIONS]

Show blueprint history by listing plugins updates.

If --blueprint-id is provided, list plugins updates for that blueprint. Otherwise, list plugins updates for all blueprints.

Optional Flags

  • -b, --blueprint-id TEXT - The unique identifier for the blueprint
  • --sort-by TEXT - Key for sorting the list
  • --descending - Sort list in descending order [default: False]
  • -t, --tenant-name TEXT - The name of the tenant to list plugins updates from. If not specified, the current tenant will be used. You cannot use this argument with arguments: [all_tenants]
  • -a, --all-tenants - Include resources from all tenants associated with the user. You cannot use this argument with arguments: [tenant_name]
  • --search TEXT - Search resources by name/id. The returned list will include only resources that contain the given search pattern
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]
  • -q, --quiet - Show only critical logs
  • --format [plain|json]
  • -v, --verbose - Show verbose output. You can supply this up to three times (i.e. -vvv)
  • --json

Example

$ vnfm plugins history --blueprint-id 'fdse5u0d-6281-43h0-924f-7z693bflw945'

...

SECRETS

The vnfm secrets command is used to manage VNF secrets (key-value pairs).

Optional Flags

These commands support the common CLI flags.

Commands

create

Usage

vnfm secrets create [OPTIONS] KEY

Create a new secret (key-value pair)

KEY is the new secret’s key.

Required Flags

One of these flags:

  • -s, --secret-string TEXT - The string to use as the secret’s value.
  • -f, --secret-file TEXT - The file with the contents of the secret.

Optional Flags

  • -u, --update-if-exists - Update secret value if secret key already exists. [This option is deprecated; use vnfm secrets update command instead]. You cannot use this argument with arguments: [visibility, hidden_value]
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’] [default: tenant].
  • --hidden-value - The secret value is only shown to the user that created the secret, to the tenant managers, and to sys-admins. Use of the secret is allowed according to user roles and the visibility of the secret.
  • -t, --tenant-name - The name of the tenant of the secret. If not specified, the current tenant will be used.

Example

$ vnfm secrets create test-secret -s test-value

...

Secret `test-secret` created

...

delete

Usage

vnfm secrets delete [OPTIONS] KEY

Delete a secret.

KEY is the secret’s key.

Optional Flags

-t, --tenant-name - The name of the tenant of the secret. If not specified, the current tenant will be used.

Example

$ vnfm secrets delete test-secret

...

Deleting secret `test-secret`...

Secret removed

...

get

Usage

vnfm secrets get [OPTIONS] KEY

Get details for a single secret.

KEY is the secret’s key.

Optional Flags

-t, --tenant-name - The name of the tenant of the secret. If not specified, the current tenant will be used.

Example

$ vnfm secrets get test-secret

...

Getting info for secret `test-secret`...
Requested secret info:
key:             test-secret
tenant_name:     default_tenant
created_at:      2018-05-13 16:01:37.420
updated_at:      2018-05-13 16:01:37.420
created_by:      admin
visibility:      tenant
value:           test-value
is_hidden_value: False

...

list

Usage

vnfm secrets list [OPTIONS]

List all secrets.

Optional Flags

  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • -t, --tenant-name TEXT - The name of the tenant from which to list secrets. If unspecified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This argument cannot be used simultaneously with the tenant-name argument.
  • --search TEXT - Search secrets by key. The returned list will include only secrets that contain the given search pattern.
  • -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0]
  • -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Example

$ vnfm secrets list

...

Listing all secrets...

Secrets:
+-------------+--------------------------+--------------------------+------------+----------------+------------+-----------------+
|     key     |        created_at        |        updated_at        | visibility |  tenant_name   | created_by | is_hidden_value |
+-------------+--------------------------+--------------------------+------------+----------------+------------+-----------------+
| test-secret | 2018-05-13 16:01:37.420  | 2018-05-13 16:01:37.420  |   tenant   | default_tenant |   admin    |      False      |
+-------------+--------------------------+--------------------------+------------+----------------+------------+-----------------+

Showing 1 of 1 secrets

...

export

Usage

vnfm secrets export [OPTIONS]

Export secrets from the manager to a file.

Optional Flags

  • -p, --passphrase TEXT - The passphrase used to encrypt the secrets’ values, must be 8 characters long.
  • --non-encrypted - Use this flag for none encrypted scerets’ values. You cannot use this argument with arguments: [passphrase]
  • -l, --visibility TEXT - Filters the secrets exported according to their visibility, can be set to one of the following [‘private’, ‘tenant’, ‘global’].
  • -t, --tenant-name TEXT - The name of the tenant from which to export secrets. If unspecified, the current tenant will be used. This argument cannot be used simultaneously with the all-tenants argument.
  • -a, --all-tenants - Include resources from all tenants associated with the user. This argument cannot be used simultaneously with the tenant-name argument.
  • --filter-by TEXT - Filters the secrets exported according to a keyword.
  • -o, --output-path TEXT - The local path to download the exported secrets to. If not specified, the secrets’ file will be downloaded to <current directory>/secrets.json

import

Usage

vnfm secrets import [OPTIONS]

Import secrets from a file to the manager.

Optional Flags

  • -p, --passphrase TEXT - The passphrase used to encrypt or decrypt the secrets’ values, must be 8 characters long.
  • -i, --input-path TEXT - Path to secrets file to import.
  • --non-encrypted - Use this flag for none encrypted secrets’ values. You cannot use this argument with arguments: passphrase
  • --override-collisions - If a certain key already exists in the destination manager, its value will be updated with the new imported value.
  • -m, --tenant-map TEXT - Path to a json file containing a from-to tenant names mapping.

Inputs examples

secrets input file:

[
        {
                "key": "key",
                "value": "value",
                "tenant_name": "tenant_name",
                "visibility": "tenant",
                "is_hidden_value": "False",
                "encrypted": false
        }
]
tenant mapping input file:

{
        "source_tenant1": "destination_tenant1",
        "source_tenant2": "destination_tenant2"
}

update

Usage

vnfm secrets update [OPTIONS] KEY

Update an existing secret.

KEY is the secret’s key.

Required Flags

One of these flags:

  • -s, --secret-string TEXT - The string to use as the secret’s value.
  • -f, --secret-file TEXT - The file with the contents of the secret.

Optional Flags

  • --hidden-value / --not-hidden-value - The secret value is only shown to the user that created the secret, to the tenant managers, and to sys-admins. Use of the secret is allowed according to user roles and the visibility of the secret.
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’].
  • -t, --tenant-name TEXT - The name of the tenant of the secret. If not specified, the current tenant will be used.

Example

$ vnfm secrets update test-secret -s test-value2

...

Secret `test-secret` updated.

...

set-visibility

Usage

vnfm secrets set-visibility [OPTIONS] KEY

Set the secret’s visibility.

KEY - The secret’s key.

Required Flags

-l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘tenant’, ‘global’] [required].

Example

$ vnfm secrets set-visibility test-secret -l global

...

Secret `test-secret` was set to global

...

STATUS

The vnfm status command is used to display the status of a running VNF Manager.

To use the command you must vnfm profiles use -t MANAGEMENT_IP first.

Usage

vnfm status

Show a list of the services running on the manager, whether it is in maintenance-mode, and its REST protocol. In cluster mode, PostgreSQL and RabbitMQ don’t run on the manager, so it verifies their connection.

Optional Flags

This command supports the common CLI flags.

Example

$ vnfm status

...

Retrieving manager services status... [ip=10.239.2.241]

Services:
+--------------------------------+--------+
|            service             | status |
+--------------------------------+--------+
| VNFM Console                   | Active |
| PostgreSQL                     | Active |
| AMQP-Postgres                  | Active |
| Manager Rest-Service           | Active |
| RabbitMQ                       | Active |
| Webserver                      | Active |
| VNFM Composer                  | Active |
| Management Worker              | Active |
+--------------------------------+--------+

...

In Cluster Mode

Retrieved manager services status... [ip=10.239.2.162]

Services:
+--------------------------------+--------+
|            service             | status |
+--------------------------------+--------+
| VNFM Console                   | Active |
| Manager Rest-Service           | Active |
| PostgreSQL                     | Active |
| AMQP-Postgres                  | Active |
| File Sync Service              | Active |
| RabbitMQ                       | Active |
| Webserver                      | Active |
| VNFM Composer                  | Active |
| Management Worker              | Active |
+--------------------------------+--------+

...

TOKENS

The vnfm tokens command is used to receive a REST token from the VNF Manager.

Commands

get

Usage

vnfm tokens get [OPTIONS]

Returns a valid REST token from the VNF Manager.

Optional Flags

This command supports the common CLI flags.

UNINSTALL

The vnfm uninstall command is used to uninstall an application using VNF Manager, without having to manually go through the process of executing a workflow, deleting a deployment and deleting a blueprint.

Usage

vnfm uninstall [OPTIONS] DEPLOYMENT_ID

Uninstall an application via VNF Manager.

This command executes the uninstall workflow, deletes the deployment and the blueprint (if there is only one deployment for that blueprint).

DEPLOYMENT_ID is the ID of the deployment to uninstall.

Optional Flags

This command supports the common CLI flags.

  • -w, --workflow-id TEXT - The workflow to execute [default: uninstall]
  • -p, --parameters TEXT - Parameters for the workflow (Can be provided as wildcard-based paths (*.yaml, /my_inputs/, etc.) to YAML files, a JSON string or as key1=value1;key2=value2). This argument can be used multiple times.
  • --allow-custom-parameters - Allow passing custom parameters (that were not defined in the workflow’s schema in the blueprint) to the execution.
  • --timeout INTEGER - Operation timeout in seconds. (The execution continues, but the CLI stops waiting for it to terminate) [default: {0}] [manager only]
  • --include-logs / --no-logs - Include logs in returned events. [default: True]
  • -t, --tenant-name TEXT - The name of the tenant of the deployment. If unspecified, the current tenant is used.

Example

$ vnfm uninstall vnfm-hello-world-example

...

Executing workflow uninstall on deployment vnfm-hello-world-example [timeout=900 seconds]
2017-04-04 09:55:44.071  CFY <vnfm-hello-world-example> Starting 'uninstall' workflow execution
2017-04-04 09:55:44.927  CFY <vnfm-he...
.
.
.
2017-04-04 09:56:01.680  CFY <vnfm-hello-world-example> 'uninstall' workflow execution succeeded
Finished executing workflow uninstall on deployment vnfm-hello-world-example
* Run 'vnfm events list -e 97a0c9af-9927-4189-8b36-5b3fba05347b' to retrieve the execution's events/logs
Deleting deployment vnfm-hello-world-example...
Deployment deleted
Deleting blueprint vnfm-hello-world-example...
Blueprint deleted

...

WORKFLOWS

The vnfm workflows command is used to view information about the different workflows of a deployment.

You can use the command to list the workflows of a specific deployment and to retrieve information about a single workflow.

Optional Flags

These commands support the common CLI flags.

Commands

list

Usage

vnfm workflows list [OPTIONS]

Lists all workflows on the VNF Manager for a specific deployment.

DEPLOYMENT_ID The ID of the deployment for which you want to list the workflows.

Required Flags

-d, --deployment-id TEXT - The unique identifier for the deployment.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant of the deployment. If unspecified, the current tenant is used.

Example

$ vnfm workflows list -d vnfm-nodecellar-example

...

Listing workflows for deployment vnfm-nodecellar-example...

Workflows:
+-----------------------------+-----------------------------+--------------------+------------+
|         blueprint_id        |        deployment_id        |        name        | created_at |
+-----------------------------+-----------------------------+--------------------+------------+
| vnfm-nodecellar-example     | vnfm-nodecellar-example     | execute_operation  |            |
| vnfm-nodecellar-example     | vnfm-nodecellar-example     |        heal        |            |
| vnfm-nodecellar-example     | vnfm-nodecellar-example     |      install       |            |
| vnfm-nodecellar-example     | vnfm-nodecellar-example     | install_new_agents |            |
| vnfm-nodecellar-example     | vnfm-nodecellar-example     |       scale        |            |
| vnfm-nodecellar-example     | vnfm-nodecellar-example     |     uninstall      |            |
| vnfm-nodecellar-example     | vnfm-nodecellar-example     |       update       |            |
+-----------------------------+-----------------------------+--------------------+------------+

...

get

Usage

vnfm workflows get [OPTIONS] WORKFLOW_ID

Retrieves information for a specific workflow of a specific deployment.

WORKFLOW_ID The ID of the workflow for which you want to get information.

Required Flags

-d, --deployment-id TEXT - The ID of the deployment to which the workflow belongs.

Optional Flags

-t, --tenant-name TEXT - The name of the tenant of the deployment. If unspecified, the current tenant is used.

Example

$ vnfm workflows get execute_operation -d vnfm-nodecellar-example

...

Retrieving workflow execute_operation for deployment vnfm-nodecellar-example

Workflows:
+-----------------------------+-----------------------------+-------------------+------------+
|         blueprint_id        |        deployment_id        |        name       | created_at |
+-----------------------------+-----------------------------+-------------------+------------+
| vnfm-nodecellar-example     | vnfm-nodecellar-example     | execute_operation |            |
+-----------------------------+-----------------------------+-------------------+------------+

Workflow Parameters:
        Mandatory Parameters:
                operation
        Optional Parameters:
                operation_kwargs:    {}
                node_ids:    []
                node_instance_ids:   []
                run_by_dependency_order:     False
                allow_kwargs_override:       None
                type_names:  []

...

What’s Next?

REST API

Create HA host in vSphere