Server maintenance CLI

CLUSTER

The vnf cluster command is used to manage VNF Manager cluster.

Option Flags

These commands support the common CLI flags.

Commands

Status

Usage

vnf cluster status [OPTIONS]

Display the current status of the VNF Manager cluster

Example

$ vnf cluster status Retrieving VNFM cluster status…
[ip=10.239.1.160] Current cluster status is OK:

Cluster status services:
+--------------------------------+----------+
|            service             |  status  |
+--------------------------------+----------+
| manager                        |    OK    |
| db                             |    OK    |
| broker                         |    OK    |
+--------------------------------+----------+

Detailed status

For a JSON formatted detailed cluster status use

vnf cluster status --json

Update Profile

Usage

vnf cluster update-profile

Fetch the list of cluster nodes and update the current CLI profile.

Use this to update the profile if nodes are added to the cluster from another machine.

Example

$ vnf cluster update-profile
...

Remove Manager Node

Usage

vnf cluster remove [OPTIONS] HOSTNAME

Unregister a node from the cluster.

Note

This will not teardown the removed node, only remove it from the cluster, it will still contact the cluster’s DB and RabbitMQ. Removed replicas are not usable as VNF Managers, so it is left to the user to examine and teardown the node.

List Managers

Usage

vnf cluster managers list [OPTIONS]

List managers associated with the cluster.

Example

$ vnf cluster managers list

HA Cluster manager nodes
+----------+------------+------------+---------+---------+--------------+----------------+--------------------------------------+--------------------------+-----------------------------+
| hostname | private_ip | public_ip  | version | edition | distribution | distro_release |               node_id                |        last_seen         |           networks          |
+----------+------------+------------+---------+---------+--------------+----------------+--------------------------------------+--------------------------+-----------------------------+
| manager1 | 10.0.0.217 | 10.0.0.217 |  5.0.5  | premium |    centos    |      Core      | 3d5d4977-d2c6-46ef-9871-263f43df52f8 | 2020-02-18 13:55:15.234  | {u'default': u'10.0.0.217'} |
| manager2 | 10.0.0.218 | 10.0.0.218 |  5.0.5  | premium |    centos    |      Core      | 34cd3fbb-f461-44b2-94ed-50b724746483 | 2020-02-18 13:52:45.130  | {u'default': u'10.0.0.218'} |
| manager3 | 10.0.0.219 | 10.0.0.219 |  5.0.5  | premium |    centos    |      Core      | cdb5d801-85d0-446e-a34e-30d3daf6f9c9 | 2020-02-18 13:59:21.530  | {u'default': u'10.0.0.219'} |
+----------+------------+------------+---------+---------+--------------+----------------+--------------------------------------+--------------------------+-----------------------------+

List Databases

Usage

vnf cluster db-nodes list [OPTIONS]

List databases associated with the cluster.

Example

$ vnf cluster managers list

HA Cluster db nodes
+----------+--------------------------------------+------------+-------------+
|   name   |               node_id                |    host    | is_external |
+----------+--------------------------------------+------------+-------------+
| db1      | 3d5d4977-d2c6-46ef-9871-263f43df52f8 | 10.0.0.220 |    False    |
| db2      | 58f0693d-7350-4034-a3d3-c1b10fe8db3a | 10.0.0.221 |    False    |
| db3      | 824597d2-ded3-4d97-8d0d-7f5c8e5d8119 | 10.0.0.222 |    False    |
+----------+--------------------------------------+------------+-------------+

List Brokers

Usage

vnf cluster brokers list [OPTIONS]

List brokers associated with the cluster.

Example

$ vnf cluster brokers list

Cluster brokers
+---------+------+---------------------------+
|   name  | port |          networks         |
+---------+------+---------------------------+
| rabbit1 | 5671 | {"default": "10.0.0.132"} |
| rabbit2 | 5671 | {"default": "10.0.0.133"} |
| rabbit3 | 5671 | {"default": "10.0.0.134"} |
+---------+------+---------------------------+

Add Broker

Usage

vnf cluster brokers add [OPTIONS] NAME ADDRESS [PORT] [NETWORKS]

Register a broker with the cluster.

Note that this will not create the broker itself. The broker should have been created before running this command.

Example

$ vnf cluster brokers add new_rabbit 10.0.0.22
‘{“new_network”: “10.0.0.222”}’
...

Get Broker

Usage

vnf cluster brokers get [OPTIONS] NAME

Get full details of a specific broker associated with the cluster.

Remove Broker

Usage

vnf cluster brokers remove [OPTIONS] NAME

Unregister a broker from the cluster.

Note that this will not uninstall the broker itself. The broker should be removed and then disassociated from the broker cluster using vnf_manager after being removed from the cluster.

CONFIG

The vnf config command is used to manage VNF Manager’s configuration.

Option Flags

vnf config commands support the common CLI flags.

Commands

List

Usage

vnf config list [OPTIONS]

List all configurations

Example

$ vnf config list

  Config:

  +-----------------------------------+--------------------------------------------------+------------+------------+-------------+
  |                name               |                      value                       |   scope    | updated_at | is_editable |
  +-----------------------------------+--------------------------------------------------+------------+------------+-------------+
  |        account_lock_period        |                        -1                        |    rest    |            |     True    |
  |            broker_port            |                       5671                       |   agent    |            |     True    |
  |         default_page_size         |                       1000                       |    rest    |            |     True    |
  | failed_logins_before_account_lock |                        4                         |    rest    |            |     True    |
  |          file_server_root         |              /opt/manager/resources              |    rest    |            |    False    |
  |          file_server_url          |        https://172.20.0.2:53333/resources        |    rest    |            |    False    |
  |             heartbeat             |                        30                        |   agent    |            |     True    |
  |    insecure_endpoints_disabled    |                       True                       |    rest    |            |    False    |
  |           ldap_dn_extra           |                                                  |    rest    |            |     True    |
  |            ldap_domain            |                                                  |    rest    |            |     True    |
  |      ldap_is_active_directory     |                       True                       |    rest    |            |     True    |
  |         ldap_nested_levels        |                        1                         |    rest    |            |     True    |
  |           ldap_password           |                                                  |    rest    |            |     True    |
  |            ldap_server            |                                                  |    rest    |            |     True    |
  |            ldap_timeout           |                       5.0                        |    rest    |            |     True    |
  |           ldap_username           |                                                  |    rest    |            |     True    |
  |             log_level             |                       INFO                       |   agent    |            |     True    |
  |         maintenance_folder        |             /opt/manager/maintenance             |    rest    |            |    False    |
  |            max_workers            |                        5                         |   agent    |            |     True    |
  |            max_workers            |                       100                        | mgmtworker |            |     True    |
  |      min_available_memory_mb      |                       100                        |    rest    |            |     True    |
  |            min_workers            |                        2                         |   agent    |            |     True    |
  |            min_workers            |                        2                         | mgmtworker |            |     True    |
  |             public_ip             |                    172.20.0.2                    |    rest    |            |    False    |
  |       rest_service_log_level      |                       INFO                       |    rest    |            |     True    |
  |       rest_service_log_path       | /var/log/vnfm/rest/vnfm-rest-service.log         |    rest    |            |    False    |
  +-----------------------------------+--------------------------------------------------+------------+------------+-------------+

INIT

The vnf init command is used to initialize a working VNFM directory.

Before you can use vnf, you must initialize a working directory for it, in which relevant functional information will be stored.

Note

Running vnf intall or vnf profiles use initializes an environment automatically.

Usage

vnf init [OPTIONS] [BLUEPRINT_PATH]

Initialize a VNFM environment.

This is required to perform many actions and should be the first action performed after installing VNFM.

Providing a BLUEPRINT_PATH also initializes a blueprint to work on.

After initialization, the CLI’s configuration can be found under ~/.vnfm/config.yaml.

Option Flags

This command supports the common CLI flags.

  • -n, --blueprint-filename TEXT - The name of the archive’s main blueprint file. This is only relevant if uploading an archive.
  • -b, --blueprint-id TEXT - The unique identifier for the blueprint
  • -r, --reset-config - Reset the working environment. This allows to reset configuration.
  • -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.
  • --install-plugins - Install the necessary plugins for the specified blueprint.
  • --hard - Hard reset the configuration, including coloring and loggers.
  • --enable-colors - Enable colors in logger. (Use –hard when working with an initialized environment.) [default: False]

Example

$ vnf init
...

Initializing profile local...
Initialization completed successfully

...

LDAP

The vnf ldap command is used to set LDAP authentication to enable you to integrate your LDAP users and groups with VNFM.

Option Flags

These commands support the common CLI flags.

Commands

set

Usage

vnf LDAP set [OPTIONS]

Set VNF Manager to use the LDAP authenticator.

Required flags

  • -s, --ldap-server TEXT - The LDAP address against which to authenticate, for example: ldaps://ldap.domain.com.
  • -u, --ldap-username TEXT - The LDAP admin username to be set on the VNF Manager.
  • -p, --ldap-password TEXT - The LDAP admin password to be set on the VNF Manager.
  • -d, --ldap-domain TEXT - The LDAP domain to be used by the server.

Option Flags

  • -a, --ldap-is-active-directory - Specify whether the LDAP used for authentication is Active-Directory.
  • -e, --ldap-dn-extra TEXT - Additional LDAP DN options.

Example

$ vnf ldap set -s [LDAP SERVER ADDRESS] -u [LDAP ADMIN USERNAME] -p [LDAP ADMIN PASSWORD] -d [DOMAIN NAME]

LICENSE

The vnf license command is used to manage VNFM licenses on the VNF Manager.

Option Flags

vnf license commands support the common CLI flags.

Commands

Upload

Usage

vnf license upload [OPTIONS] <license-path>

Upload a VNFM license to a VNF Manager.

Example

$ vnf license upload vnfm_license.yaml

...

Uploading BIG-IP VE License `vnfm_license.yaml` to the VNF Manager...
VNFM license successfully uploaded.

...

list

Usage

vnf license list [OPTIONS]

List details of the VNFM license.

Example

$ vnf license list
...

Retrieving VNFM License
...

VNFM License

+--------------+--------------------------+-----------------+-------+------------------+--------------+---------+
| customer_id  |     expiration_date      | license_edition | trial | vnfm_version     | capabilities | expired |
+--------------+--------------------------+-----------------+-------+------------------+--------------+---------+
| VNFMMock     | 2019-05-27 00:00:00.000  |      Spire      |  True |       4.6        | Mock1,Mock2  |  False  |
+--------------+--------------------------+-----------------+-------+------------------+--------------+---------+

...

PROFILES

The vnf profiles command is used to manage VNFM profiles.

Each profile can have its own credentials for managers and VNFM various environmental settings

Option Flags

These commands support the common CLI flags.

Commands

list

Usage

vnf profiles list [OPTIONS]

List all profiles.

Example

$ vnf profiles list

...

Listing all profiles

...

Profiles:
+---------------+--------------+----------+-------------------------------------+----------+-----------+---------------+------------------+----------------+-----------------+
|      name     |  manager_ip  | ssh_user |             ssh_key_path            | ssh_port | rest_port | rest_protocol | manager_username | manager_tenant | bootstrap_state |
+---------------+--------------+----------+-------------------------------------+----------+-----------+---------------+------------------+----------------+-----------------+
| *10.239.2.241 | 10.239.2.241 |  centos  | /Users/user/rackspace/key.pem       |    22    |     80    |      http     |      admin       | default_tenant |     Complete    |
+---------------+--------------+----------+-------------------------------------+----------+-----------+---------------+------------------+----------------+-----------------+

...

show-current

Usage

vnf profiles show-current [OPTIONS]

Displays your current active profile and its properties.

Example

$ vnf profiles show-current

...

Active profile:
+---------------+--------------+----------+-------------------------------------+----------+-----------+---------------+------------------+----------------+-----------------+
|      name     |  manager_ip  | ssh_user |             ssh_key_path            | ssh_port | rest_port | rest_protocol | manager_username | manager_tenant | bootstrap_state |
+---------------+--------------+----------+-------------------------------------+----------+-----------+---------------+------------------+----------------+-----------------+
| *10.239.2.241 | 10.239.2.241 |  centos  | /Users/user/rackspace/key.pem       |    22    |     80    |      http     |      admin       | default_tenant |     Complete    |
+---------------+--------------+----------+-------------------------------------+----------+-----------+---------------+------------------+----------------+-----------------+

...

export

Usage

vnf profiles export [OPTIONS]

Export all profiles to a file

Caution

Including the ssh keys of your profiles in the archive means that once the profiles are imported, the ssh keys will be put back in their original locations!

If -o / --output-path is omitted, the archive’s name will be vnf- profiles.tar.gz.

Option Flags

  • --include-keys - Include SSH key files in the archive.
  • -o, --output-path TEXT - The local path for the download.

Example

$ vnf profiles export

...

Exporting profiles to /Users/assi/Work/repos/vnf-profiles.tar.gz...
Export complete!
You can import the profiles by running `vnf profiles import PROFILES_ARCHIVE`

 ...

import

Usage

vnf profiles import [OPTIONS] ARCHIVE_PATH

Import profiles from a profiles archive.

Caution

If a profile exists both in the archive and locally it will be overwritten (any other profiles will be left intact).

ARCHIVE_PATH is the path to the profiles archive to import.

Option Flags

--include-keys

Caution

Imports exported keys to their original locations.

Example

$ vnf profiles import vnf-profiles.tar.gz

...

Importing profiles from vnf-profiles.tar.gz...
Import complete!
You can list profiles using `vnf profiles list`

...

delete

Usage

vnf profiles delete [OPTIONS] PROFILE_NAME

Delete a profile.

PROFILE_NAME is the IP of the VNF Manager the profile manages.

Example

$ vnf profiles delete 10.239.2.241

...

Deleting profile 10.239.2.241...
Profile deleted

...

use

Usage

vnf profiles use [OPTIONS] MANAGER_IP

Control a specific VNF Manager.

PROFILE_NAME is the IP of the manager the profile manages.

Additional CLI commands are added after a VNF Manager is used. To stop using VNF Manager, you can run vnf init -r.

Option Flags

  • --profile-name TEXT - Name of the profile to use.
  • -s, --ssh-user TEXT - The SSH user on the host machine with which to SSH into the manager.
  • -k, --ssh-key TEXT - The path to the SSH key-file to use when connecting.
  • --ssh-port INTEGER - The SSH port to use when connecting to the Manager.
  • -u, --manager-username TEXT - Manager username used to run commands on the Manager.
  • -p, --manager-password TEXT - Manager password used to run commands on the Manager.
  • -t, --manager-tenant TEXT - The tenant associated with the user currently operating the Manager.
  • --rest-port INTEGER - The REST server’s port.
  • --ssl - Connect to REST server using SSL
  • -c, --rest-certificate TEXT - The REST server’s external certificate file location (implies –ssl)
  • --kerberos-env TEXT - Whether or not to use kerberos while connecting to the manager
  • --skip-credentials-validation - Do not check that the passed credentials are correct (default: False)

Example

vnf profiles use 10.239.2.241 -t default_tenant -u admin -p admin

...

Initializing local profile ...
Initialization completed successfully
Attempting to connect...
Initializing profile 10.239.2.241...
Initialization completed successfully
Using manager 10.239.2.241 with port 80

...

set

Usage

vnf profiles set [OPTIONS]

Set the profile name, manager username and/or password and/or tenant in the current profile

Option Flags

  • --profile-name TEXT - Name of the profile to use.
  • -u, --manager-username TEXT - Manager username used to run commands on the manager.
  • -p, --manager-password TEXT - Manager password used to run commands on the manager.
  • -t, --manager-tenant TEXT - The tenant associated with the current user
  • -s, --ssh-user TEXT - The SSH user on the manager host machine operating the manager.
  • -k, --ssh-key TEXT - The path to the ssh key-file to use when connecting
  • --ssh-port TEXT - The SSH port to use when connecting to the manager
  • --ssl TEXT - Required SSL state (on/off)
  • -c, --rest-certificate TEXT - The REST server’s external certificate file location (implies –ssl)
  • --kerberos-env TEXT - Whether or not to use kerberos while connecting to the manager
  • --skip-credentials-validation - Do not check that the passed credentials are correct (default:False)

Example

$ vnf profiles set -u admin

...

Validating credentials...
Credentials validated
Setting username to `admin`
Settings saved successfully

...

unset

Usage

vnf profiles unset [OPTIONS]

Clear the manager username and/or password and/or tenant from the current profile.

Option Flags

  • -u, --manager-username - Manager username used to run commands on the manager.
  • -p, --manager-password - Manager password used to run commands on the manager.
  • -t, --manager-tenant - The tenant associated with the current user operating the manager.
  • -s, --ssh-user - The SSH user on the manager host machine
  • -k, --ssh-key - The path to the ssh key-file to use when connecting
  • -c, --rest-certificate - The REST server’s external certificate file location (implies –ssl)
  • --kerberos-env - Whether or not to use kerberos while connecting to the manager
  • --skip-credentials-validation - Do not check that the passed credentials are correct. (default:False)

Example

$ vnf profiles unset -u
...

Validating credentials...
Credentials validated
Clearing manager username
Settings saved successfully

...

set-cluster

Usage

vnf profiles set-cluster [OPTIONS] CLUSTER_NODE_NAME

Set connection options for a cluster node.

Option Flags

  • -s, --ssh-user TEXT - The SSH user on the manager host machine
  • -k, --ssh-key TEXT - The path to the ssh key-file to use when connecting
  • --ssh-port TEXT - The SSH port to use when connecting to the manager
  • -c, --rest-certificate TEXT - The REST server’s external certificate file location (implies –ssl)

SITES

The vnf sites command is used to manage sites and their location in VNF Manager.

Option Flags

vnf sites commands support the common CLI flags.

Commands

List

Usage

vnf sites list [OPTIONS]

List all sites

Option 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 sites. 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 sites by name. The returned list will include only sites 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

$ vnf sites list
Listing all sites...

Sites:
+----------+------------------------+------------+----------------+--------------------------+------------+
|   name   |        location        | visibility |  tenant_name   |        created_at        | created_by |
+----------+------------------------+------------+----------------+--------------------------+------------+
| Chicago  | 41.8333925,-88.0121478 |   tenant   | default_tenant | 2019-05-19 12:00:20.843  |   admin    |
|  Miami   | 25.7823404,-80.3695441 |   tenant   | default_tenant | 2019-05-19 12:00:52.143  |   admin    |
| Tel-Aviv | 32.0879122,34.7272058  |   tenant   | default_tenant | 2019-05-19 12:00:12.073  |   admin    |
+----------+------------------------+------------+----------------+--------------------------+------------+

Showing 3 of 3 sites

Create

Usage

Create a new site:

vnf sites create [OPTIONS] NAME

Where:

NAME is the new site’s name

Option Flags

  • --location TEXT - The location of the site, expected format: latitude,longitude such as 32.071072,34.787274
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’] [default: tenant]
  • -t, --tenant-name TEXT - The name of the tenant of the site. If not specified, the current tenant will be used

Example

$ vnf sites create --location 32.0879122,34.7272058 --visibility global Tel-Aviv

...

Get

Usage

vnf sites get [OPTIONS] NAME

Get details for a single site

NAME is the site’s name

Option Flags

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

Example

$ vnf sites get Tel-Aviv

...

Delete

Usage

vnf site delete [OPTIONS] NAME

Delete a site

NAME is the site’s name

Option Flags

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

Example

$ vnf sites delete Tel-Aviv

...

Update

Usage

vnf sites update [OPTIONS] NAME

Update an existing site

NAME is the site’s name

Option Flags

  • --location TEXT - The location of the site, expected format: latitude,longitude such as 32.071072,34.787274
  • -l, --visibility TEXT - Defines who can see the resource, can be set to one of [‘private’, ‘tenant’, ‘global’]
  • -n, --new-name TEXT - The new name of the site

Example

$ vnf sites update --location 32.0879122,34.7272058 --visibility global --new-name Tel-Aviv-Yafo Tel-Aviv

...

SNAPSHOTS

The vnf snapshots command is used to manage data snapshots of VNF manager. You must have admin credentials to create and restore snapshots. You can use the command to create, upload, download, delete and list snapshots and also to restore a Manager using a snapshot archive. For more consult the Create snapshot topic.

Option Flags

These commands support the common CLI flags.

Commands

create

Usage

vnf snapshots create [OPTIONS] [SNAPSHOT_ID]

Create a snapshot on VNF Manager.

The snapshot will contain the relevant data to restore a VNF Manager to its previous state.

SNAPSHOT_ID is the ID to attach to the snapshot.

Option Flags

  • --exclude-credentials - Exclude credentials from the snapshot
  • --exclude-logs - Exclude logs from the snapshot
  • --exclude-events - Exclude events from the snapshot
  • --queue - If set, snapshot-creation-workflows that can`t currently run will be queued and run automatically when possible

Example

$ vnf snapshots create

...

Creating snapshot snapshot_XLHCNV...
Started workflow execution. The execution's id is 2219928b-69fd-49f1-8982-c42da5f82a63

...

delete

Usage

vnf snapshots delete [OPTIONS] SNAPSHOT_ID

Delete a snapshot from VNF Manager.

SNAPSHOT_ID is the ID of the snapshot to delete.

Option Flags

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

Example

$ vnf snapshots delete snapshot_XLHCNV

...

Deleting snapshot snapshot_XLHCNV...
Snapshot deleted successfully

...

download

Usage

vnf snapshots download [OPTIONS] SNAPSHOT_ID

Download a snapshot from VNF Manager.

SNAPSHOT_ID is the ID of the snapshot to download.

Option Flags

  • -o, --output-path TEXT - The local path which to download.
  • -t, --tenant-name TEXT - The name of the tenant of the snapshot. If unspecified, the current tenant is used.

Example

$ vnf snapshots download snapshot_XLHCNV

...

Downloading snapshot snapshot_XLHCNV...
 snapshot_XLHCNV |#####################################################| 100.0%
Snapshot downloaded as snapshot_XLHCNV.zip

...

list

Usage

vnf snapshots list [OPTIONS]

List all snapshots on VNF Manager.

Option 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 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 snapshots by id. The returned list will include only snapshots 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

$ vnf snapshots list

...

Listing snapshots

...

Snapshots:
+-----------------+--------------------------+---------+-------+------------+----------------+------------+
|        id       |        created_at        |  status | error | visibility |  tenant_name   | created_by |
+-----------------+--------------------------+---------+-------+------------+----------------+------------+
| snapshot_XLHCNV | 2017-04-04 09:33:39.315  | created |       |  tenant    | default_tenant |   admin    |
+-----------------+--------------------------+---------+-------+------------+----------------+------------+

Showing 1 of 1 snapshots

restore

Usage

vnf snapshots restore [OPTIONS] SNAPSHOT_ID

Restore VNF Manager to its previous state, or migrate a version 3.x snapshot to a tenant on VNF Manager 4.x (i.e migration).

SNAPSHOT_ID is the ID of the snapshot to use for restoration

More detailed description of a snapshot-restore procedure for scheduled executions is available at VNFM Backup and Restore Guide.

Option Flags

  • --without-deployments-envs - Restore without recreating the currently existing deployments
  • -f, --force - Force restoring the snapshot on a Manager with existing blueprints or deployments
  • --restore-certificates - Restore the certificates from the snapshot, using them to replace the current Manager certificates. If the certificates’ metadata (I.E: the Manager IP address) from the snapshot does not match the Manager metadata, the certificates cannot work on this Manager and will not be restored. In the event that the certificates have been restored, the Manager will be automatically rebooted at the end of the execution. To avoid automatic reboot, use the flag –no-reboot (not recommended).
  • --ignore-plugin-failure - if set, plugin installation errors during snapshot restore will only be logged as warnings, and will not fail the snapshot restore workflow
  • --no-reboot - Do not perform an automatic reboot to the Manager VM after restoring certificates a from snapshot (not recommended). Only relevant if the –restore-certificates flag was supplied

Example

$ vnf snapshots restore snapshot_CAMWZ5

...

Restoring snapshot snapshot_XLHCNV...
Started workflow execution. The execution's id is 53921762-2b72-430b-b6fe-d6f1faced8e1

...

upload

Usage

vnf snapshots upload [OPTIONS] SNAPSHOT_PATH

Upload a snapshot to VNF Manager.

SNAPSHOT_PATH is the path of the snapshot to upload.

Option Flags

  • -s, --snapshot-id TEXT - The unique identifier for the snapshot
  • -t, --tenant-name TEXT - The name of the tenant of the snapshot. If unspecified, the current tenant is used.

Example

$ vnf snapshots upload snapshot_XLHCNV.zip

...

Uploading snapshot snapshot_XLHCNV.zip...
 snapshot_XLHCNV.zip |#################################################| 100.0%
Snapshot uploaded. The snapshot's id is snapshot_76E7LB

...

status

Usage

vnf snapshots status

Return the status of the r``estore_snapshot`` workflow (whether or not it’s in progress).

Example

$ vnf snapshots status

...

Retrieving snapshot restore status...
No `restore_snapshot` workflow currently running.

...

SSH

The vnf ssh command is used to connect to a VNF manager via SSH.

You can use the command to create a new terminal session, run a command, or connect to a shared tmux-based session.

Usage

vnf ssh [OPTIONS]

Connects to a running manager via SSH.

host starts a tmux session (for example, tmux new -s “ssh_session_vi120m”) after which a command for a client is printed in the tmux session for the host to send to the client (i.e. vnf ssh –sid ssh_session_vi120m).

When starting a new session, the host creates an alias for “exit” so that when a client connects and exits, it will run “tmux detach” instead and not terminate the session.

When the host exits the tmux session, a command will be executed to terminate the session.

Passing a command simply executes it on VNF Manager, whereas omitting a command connects to an interactive shell.

Option Flags

  • -c, --command TEXT - Execute a command on the manager over SSH
  • --host - Host an SSH tmux session
  • --sid TEXT - Join an SSH tmux session
  • -l, --list-sessions - List available SSH tmux sessions

Example

$ vnf ssh

...

Connecting to centos@10.239.2.241...
Last login: Tue Apr  4 05:51:20 2017 from 192.168.8.195
[centos@vnfm ~]$

...

TENANTS

The vnf tenants command is used to create and manage tenants on VNF Manager. You can run commands on a tenant other than the one that you are logged into by specifying the name of the tenant to which the command applies. For example, vnf tenants add-user USERNAME -t TENANT_NAME can be used to add a user to a different tenant.

Requirements

To use the command you must have VNFM sys_admin credentials. Tenant names must conform to the following requirements:

  • Minimum number of characters - 5
  • Maximum number of characters - 255
  • Valid characters are alphanumeric, or -, _, or ..
  • Value must begin with a letter
  • Cannot be empty

Option Flags

These commands support the common CLI flags.

Commands

Each of the tenants related commands are detailed below in alphabetical order.

add-user

Usage

vnf tenants add-user [OPTIONS] USERNAME

Add an individual user to a tenant. If your system is integrated with LDAP/AD, ensure that the username matches that specified in LDAP.

USERNAME is the name of the user to add to the tenant.

Required flag

  • -t, --tenant-name TEXT - The name of the tenant.
  • -r, --role TEXT - The name of the role.

Valid tenant roles are:

  • manager - User that can manage tenants
  • operations - User that can deploy and execute workflows, but cannot manage blueprints or plugins
  • user - Regular user, can perform actions on tenants resources
  • viewer - User that can only view tenant resources

Example

$ vnf tenants add-user my-user -t my-tenant -r user

...

User `my-user` added successfully to tenant `my-tenant`

...

add-user-group

Usage

vnf tenants add-user-group [OPTIONS] USER_GROUP_NAME

Add a user group to a tenant.

USER_GROUP_NAME is the name of the user group to add to the tenant.

If your system is integrated with LDAP/AD, ensure that the group name matches that specified in LDAP.

Required flags

  • -t, --tenant-name TEXT - The name of the tenant.
  • -r, --role TEXT - The name of the role.

Valid tenant roles are:

  • manager - User that can manage tenants
  • operations - User that can deploy and execute workflows, but cannot manage blueprints or plugins
  • user - Regular user, can perform actions on tenants resources
  • viewer - User that can only view tenant resources

Example

$ vnf tenants add-user-group my-user-group -t my-tenant -r user

...

User group `my-user-group` added successfully to tenant `my-tenant`

...

create

Usage

vnf tenants create [OPTIONS] TENANT_NAME

Add a tenant to VNF Manager.

TENANT_NAME is the name of the new tenant

The tenant name must be unique in VNF Manager.

Required flags

-t, --tenant-name TEXT - The name of the tenant.

Example

$ vnf tenants create my-tenant

...

Tenant `my-tenant` created

...

delete

Usage

vnf tenants delete [OPTIONS] TENANT_NAME

Delete a tenant from VNF Manager. TENANT_NAME is the name of the tenant

Example

$ vnf tenants delete my-tenant

...

Deleting tenant `my-tenant`...

Tenant removed

...

get

Usage

vnf tenants get [OPTIONS] TENANT_NAME

View information for a specific tenant, including its users.

TENANT_NAME is the name of the tenant

Optional flag

--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

$ vnf tenants get my-tenant

...

Getting info for tenant `my-tenant`...

Requested tenant info:
+-----------+--------+-------+
|    name   | groups | users |
+-----------+--------+-------+
| my-tenant |   1    |   2   |
+-----------+--------+-------+

...

list

Usage

vnf tenants list [OPTIONS]

Provides a list of all tenants in this instance of VNF Manager. By default, when you generate the list of tenants, only the number of linked resources is displayed. You can retrieve full details with the use of a –get-data flag.

Option Flags

  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • --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)
  • --search TEXT - Search tenants by name. The returned list will include only tenants 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

$ vnf tenants list

...

Listing all tenants...

Tenants:
+----------------+--------+-------+
|      name      | groups | users |
+----------------+--------+-------+
| default_tenant |        |   1   |
|   my-tenant    |   1    |   2   |
+----------------+--------+-------+

...

remove-user

Usage

vnf tenants remove-user [OPTIONS] USERNAME

Remove an individual user from a tenant.

USERNAME is the name of the user to remove from the tenant.

Note

If the user is part of one or more user groups that are assigned to the tenant, you need to remove the user from each group, in order for them to be prevented from accessing the tenant.

Required flags

-t, --tenant-name TEXT - The name of the tenant.

Example

$ vnf tenants remove-user my-user -t my-tenant

...

User `my-user` removed successfully from tenant `my-tenant`

...

remove-user-group

Usage

vnf tenants remove-user-group [OPTIONS] USER_GROUP_NAME

Remove a user group from a tenant.

USER_GROUP_NAME is the name of the user group to remove from the tenant.

Required flags

-t, --tenant-name TEXT - The name of the tenant.

Example

$ vnf tenants remove-user-group my-user-group -t my-tenant

...

User group `my-user-group` removed successfully from tenant `my-tenant`

...

update-user

Usage

vnf tenants update-user [OPTIONS] USERNAME

Update the user role in a tenant.

USERNAME is the name of the user for which the role needs to be updated.

Required flags

  • -t, --tenant-name TEXT - The name of the tenant.
  • -r, --role TEXT - The name of the role.

Example

$ vnf tenants update-user my-user -t my-tenant -r viewer
User `my-user` updated successfully in tenant `my-tenant`

update-user-group

Usage

vnf tenants update-user-group [OPTIONS] USERNAME

Update the user role in a tenant.

USERNAME is the name of the user for which the role needs to be updated.

Required flags

  • -t, --tenant-name TEXT - The name of the tenant.
  • -r, --role TEXT - The name of the role.

Example

$ vnf tenants update-user-group my-user-group -t my-tenant -r viewer
Group `my-user-group` updated successfully in tenant `my-tenant`

USER-GROUPS

The vnf user-groups command is used to define and manage user groups on VNF Manager.

To use the command you must have VNFM admin credentials. If your VNF Manager is integrated with LDAP/AD. ensure that the group names that you define exactly match those defined in LDAP.

Requirements

To use the command you must have VNFM admin credentials.

User names and passwords must conform to the following requirements:

  • Minimum number of characters - 5
  • Maximum number of characters - 255
  • Valid characters are alphanumeric, or -, _, or ..
  • Value must begin with a letter
  • Cannot be empty

Optional flag

These commands support the common CLI flags.

Commands

create

Usage

vnf user-group create [OPTIONS] USER_GROUP_NAME

Create a new user group on the manager

USER_GROUP_NAME is the name of the new user group

Option Flags

-l, --ldap-distinguished-name TEXT - The ldap group’s distinguished name. This option is required when using ldap. The format must be CN=GroupName, OU=OUName,DC=Domaincomponent, DC= DomainComponent. for example: CN=ldapwiki,OU=groups,DC=example,DC=com.

Example

$ vnf user-groups create users

...

Group `users` created

...

add-user

Usage

vnf user-groups add-user [OPTIONS] USERNAME

Add a user group. USERNAME is the name of the user to add to the user group

Required flags

-g, --group-name TEXT - The name of the user group.

Example

$ vnf user-groups add-user sue -g users

...

User `sue` added successfully to user group `users`

...

delete

Usage

vnf user-groups delete [OPTIONS] USER_GROUP_NAME

Delete a user group from VNF Manager. USER_GROUP_NAME is the name of the user group

Example

$ vnf user-group del users2

...

Deleting user group `users2`...
User group removed

...

list

Usage

vnf user-groups list [OPTIONS]

List all users assigned to this users’ group. By default, when you generate the list of user groups, only the number of linked resources are displayed. You can retrieve full details with the use of a –get-data flag.

Option Flags

  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • --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)
  • --search TEXT - Search user-groups by name. The returned list will include only user-groups 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

 $ vnf user-group list

 ...

 Listing all user groups...

 User groups:
 +-------+---------+-------+
 |  name | tenants | users |
 +-------+---------+-------+
 | users |         |   2   |
 +-------+---------+-------+

...

get

Usage

vnf user-groups get [OPTIONS] USER_GROUP_NAME

Get details for a specific user group. USER_GROUP_NAME is the name of the user group.

Option Flags

--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

$ vnf user-group get users

...

Getting info for user group `users`...

Requested user group info:
+-------+---------+-------+
|  name | tenants | users |
+-------+---------+-------+
| users |         |   2   |
+-------+---------+-------+

...

USERS

The vnf users command is used to manage users and passwords on VNF Manager. If you choose not to integrate VNF Manager with LDAP-based user management system, you must add each user individually with a unique username and a password. You can also create user groups and add users to them. The users and user groups can be assigned to one or more tenants, with different roles in each tenant.

Requirements

To use the command you must have VNFM admin credentials.

Usernames must conform to the following requirements:

  • Valid characters are alphanumeric, or -, _, or ..
  • Value must begin with a letter
  • Cannot be empty

Passwords must conform to the following requirements:

  • Minimum number of characters - 5
  • Maximum number of characters - 255
  • Valid characters are alphanumeric, or -, _, or ..
  • Value must begin with a letter
  • Cannot be empty

Option Flags

These commands support the common CLI flags.

Commands

create

Usage

vnf users create [OPTIONS] USERNAME

Create a new user on VNF Manager.

USERNAME is the user name for the user.

Required flags

-p, --password TEXT - The password for the user.

Option Flags

  • -r, --security-role [sys_admin|default] - A role that defines the user as a ‘sys-admin’ (admin user) or ‘default’ (non-admin user). A ‘default’ user must be explicitly assigned to tenants in order to perform actions and access resources. (default: default)
  • -t, --tenant-name - The name of the tenant to add the user to.
  • -l, --user-tenant-role - The role of the user in the specified tenant.

Example

$ vnf users create sue -p test1

...

User `sue` created as a non-admin user in the system with password 'test1'.

...

set-password

Usage

vnf users set-password [OPTIONS] USERNAME

Set the password for a specific user. You can use this command in a non-LDAP setup to change each of the users’ passwords, and in LDAP mode to change only the password of the bootstrap-admin (the user created by default upon Manager’s installation) .

USERNAME is the username of the user.

Required flags

-p, --password TEXT - The new password for the password.

Example

$ vnf users set-password sue -p new_pass

...

Setting new password for user sue...
New password set

...

set-role

Usage

vnf users set-role [OPTIONS] USERNAME

Set the system-wide (security) role for a specific user.

USERNAME is the username of the user.

The system-wide role defines the user as a ‘sys-admin’ (admin user) or ‘default’ (non-admin user). To give the user sys-admin permissions, set this role to ‘sys_admin’. Otherwise, the user has the system-wide role ‘default’. A ‘default’ user must be explicitly assigned to tenants in order to perform actions and access resources.

Option Flags

-r, --security-role [sys_admin|default] - A role to specifies the user’s permissions on the manager. (default: default)

Example

$ vnf users set-role sue -r sys_admin

...

Setting new role for user sue...
New role `sys_admin` set

...

delete

Usage

vnf users delete [OPTIONS] USERNAME

Delete a user from VNF Manager. You can delete a user only if the user is:

  • Not assigned to any tenants
  • Not a member of any user groups
  • Not the creator of any VNFM resources (Blueprint, Deployment, Plugin, Secret) on the Manager.

USERNAME is the username of the user.

Example

$ vnf users delete sue

...

Deleting user `sue`...
User removed

...

list

Usage

vnf users list

In non-LDAP mode, this command lists all of the users defined in this VNF Manager. In LDAP mode, this command lists all of the users who logged in to VNFM and successfully authenticated with the LDAP system. By default, when you generate the list of users, only the number of user groups and tenants each user is associated with are displayed. You can retrieve full details with the use of a –get-data flag.

Option Flags

  • --sort-by TEXT - Key for sorting the list.
  • --descending - Sort list in descending order. [default: False]
  • --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)
  • --search TEXT - Search users by username. The returned list will include only users 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

$ vnf users list

...

Listing all users...

Users:
+----------+--------+------------------+------------------------------+--------+--------------------------+---------+
| username | groups | system wide role | system wide roles via groups | active |      last_login_at       | tenants |
+----------+--------+------------------+------------------------------+--------+--------------------------+---------+
|  admin   |        |    sys_admin     |                              |  True  | 2018-03-05 16:03:56.726  |    1    |
|   sue    |        |     default      |                              |  True  |                          |         |
+----------+--------+------------------+------------------------------+--------+--------------------------+---------+

...

get

Usage

vnf users get [OPTIONS] USERNAME

Get details for a single user.

USERNAME is the username of the user.

Option Flags

--get-data - When set to True, displays the full list of tenants and/or user groups the user is associated with. When set to False displays only their total number. (default:False)

Example

$ vnf users get sue2

...

Getting info for user `sue2`...

Requested user info:
+----------+--------+------------------+------------------------------+--------+---------------+---------+
| username | groups | system wide role | system wide roles via groups | active | last_login_at | tenants |
+----------+--------+------------------+------------------------------+--------+---------------+---------+
|   sue    |        |     default      |                              |  True  |               |         |
+----------+--------+------------------+------------------------------+--------+---------------+---------+

...

deactivate

Usage

vnf users deactivate [OPTIONS] USERNAME

Deactivate a user. Deactivated users cannot login to VNFM, but are in the list of users. To let the user login to VNFM, reactivate the user. USERNAME is the username of the user.

Example

$ vnf users deactivate assi2

...

Deactivating user `assi2`...
User deactivated

...

activate

Usage

vnf users activate [OPTIONS] USERNAME

Activate a user.

USERNAME is the username of the user.

Example

$ vnf users activate sue2

...

Activating user `sue2`...
User activated

...

What’s Next?

VNFM CLI Orchestrator

REST API