4. API/CLI Documentation

4.1. Introduction

OpenStack API Access endpoints
Service Service Endpoint
S3 http://192.168.1.54:3333
Identity http://192.168.1.54:5000/v2.0
Object Store http://192.168.1.54:8080/v1/AUTH_c82f6beeb0a9459bbab0b72dcba637d2
EC2 http://192.168.1.54:8773/services/Cloud
Compute http://192.168.1.54:8774/v2/c82f6beeb0a9459bbab0b72dcba637d2
Computev3 http://192.168.1.54:8774/v3
Volume http://192.168.1.54:8776/v1/c82f6beeb0a9459bbab0b72dcba637d2
Volumev2 http://192.168.1.54:8776/v2/c82f6beeb0a9459bbab0b72dcba637d2
Image http://192.168.1.54:9292
Workloads http://192.168.1.123:8780/v1/c82f6beeb0a9459bbab0b72dcba637d2

Trilio Data’s OpenStack Backup and Recovery Offering (“TrilioVault”) is implemented as a native OpenStack Service called Workload Manager. Like other services in OpenStack, workload manager has two components: workloadmgr service and workloadmgr cli. The Command Line Interface (“CLI”) is a thin Python wrapper around the workloadmgr RESTful API. This service is responsible for creating backup jobs, scheduling backup jobs for execution and uploading VM images to backup media and restoring backup images.

During workloadmgr configuration, workloadmanager endpoints are registered with the Keystone OpenStack Service. These endpoints are discovered by workloadmgr cli and other OpenStack applications and invoke RESTful API.

4.2. Architecture

Workload Manager is built on a shared-nothing, messaging-based architecture. All the major components can be run on multiple virtual machines. This means that most component-to-component communication must go via message queue. To avoid blocking each component while waiting for a response, we use deferred objects, with a callback that gets triggered when a response is received. Workload Manager uses a SQL-based central database that is deployed on the workload manager controller node and other nodes in the TrilioVault deployments uses the database over sql connection. The amount and depth of the TrilioVault data fits into a SQL database quite well.

4.2.1. Main Components

OpenStack API Access endpoints!
Component Description
Web/Horizon Dashboard Potential external component that talks to the api. Api component that receives
http requests converts commands and communicates with other components via the queue or http
(in the case of objectstore).  
Auth Manager/Keystone Component responsible for users/projects/and roles. Can backend to a DB or LDAP. This is not a separate binary, but rather a Python class that is used by most components in the system.
objectstore http server that replicates the s3 api and allows storage and retrieval of backup images.
NFS NFS backup for storing and retrieving backup images.
Scheduler Decides which TrilioVault executes the next backup job.
Workload Manages communication with hypervisor and virtual machines.

4.3. RESTful API

workloadmgr API and CLI are designed very similar to other OpenStack services like nova, cinder etc. which means you can use your rc file that you use to source tenant/admin credentials to call workloadmgr cli. workloadmgr cli also supports –debug option that provides the RESTful api call sequence so you can understand the request and response payloads associated with each CLI. Though we try to provide documentation on both API/CLI, your most reliable source of such information is using –debug option and discover the RESTful API payload by yourselves.

[centos@centos7 ~]$ workloadmgr --debug workload-list

REQ: curl -i http://192.168.1.104:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-workloadmgrclient" -d '{"auth": {"tenantName": "demo", "passwordCredentials": {"username": "demo", "password": "project1"}}}'

RESP: [200] {'Content-Length': '3606', 'Vary': 'X-Auth-Token', 'Keep-Alive': 'timeout=5, max=100', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5', 'Connection': 'Keep-Alive', 'Date': 'Tue, 03 Oct 2017 00:27:38 GMT', 'Content-Type': 'application/json', 'x-openstack-request-id': 'req-241493fe-c3ba-4746-86ca-a4acba2cadd7'}
RESP BODY: {"access": {"token": {"issued_at": "2017-10-03T00:27:44.373169", "expires": "2017-10-03T01:27:44Z", "id": "1b961707c9a94ef596eaeb14896c38d1", "tenant": {"description": "", "enabled": true, "id": "8cc66459d2144d359f88b173557593ab", "name": "demo"}, "audit_ids": ["DjUCzen8RTmRXWRzfyYxtg"]}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://192.168.1.104:8774/v2.1/8cc66459d2144d359f88b173557593ab", "region": "RegionOne", "internalURL": "http://192.168.1.104:8774/v2.1/8cc66459d2144d359f88b173557593ab", "id": "a0320e3c863d41e4b1940a8c5f93e07c", "publicURL": "http://192.168.1.104:8774/v2.1/8cc66459d2144d359f88b173557593ab"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://192.168.1.104:9696/", "region": "RegionOne", "internalURL": "http://192.168.1.104:9696/", "id": "06ae90d872944e35a2f919bff19b2bcd", "publicURL": "http://192.168.1.104:9696/"}], "endpoints_links": [], "type": "network", "name": "neutron"}, {"endpoints": [{"adminURL": "http://192.168.1.104:8776/v2/8cc66459d2144d359f88b173557593ab", "region": "RegionOne", "internalURL": "http://192.168.1.104:8776/v2/8cc66459d2144d359f88b173557593ab", "id": "40b486f68d67460098669b4946442553", "publicURL": "http://192.168.1.104:8776/v2/8cc66459d2144d359f88b173557593ab"}], "endpoints_links": [], "type": "volumev2", "name": "cinderv2"}, {"endpoints": [{"adminURL": "http://192.168.1.104:9292", "region": "RegionOne", "internalURL": "http://192.168.1.104:9292", "id": "7c461d7deefd47df8b7383cb5d3543a6", "publicURL": "http://192.168.1.104:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://192.168.1.104:8774/v2/8cc66459d2144d359f88b173557593ab", "region": "RegionOne", "internalURL": "http://192.168.1.104:8774/v2/8cc66459d2144d359f88b173557593ab", "id": "7f0aa414af5b43c388cabb7dd793a6b4", "publicURL": "http://192.168.1.104:8774/v2/8cc66459d2144d359f88b173557593ab"}], "endpoints_links": [], "type": "compute_legacy", "name": "nova_legacy"}, {"endpoints": [{"adminURL": "http://192.168.1.104:8776/v1/8cc66459d2144d359f88b173557593ab", "region": "RegionOne", "internalURL": "http://192.168.1.104:8776/v1/8cc66459d2144d359f88b173557593ab", "id": "4a4877bd56ad48f8a0d3b88c2c2812ae", "publicURL": "http://192.168.1.104:8776/v1/8cc66459d2144d359f88b173557593ab"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://192.168.1.104:8773/", "region": "RegionOne", "internalURL": "http://192.168.1.104:8773/", "id": "55b2a0659f8f42b1972053f69a1e7856", "publicURL": "http://192.168.1.104:8773/"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab", "region": "RegionOne", "internalURL": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab", "id": "19644a9628da4773942613999b5de67d", "publicURL": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab"}], "endpoints_links": [], "type": "workloads", "name": "TrilioVaultWLM"}, {"endpoints": [{"adminURL": "http://192.168.1.104:35357/v2.0", "region": "RegionOne", "internalURL": "http://192.168.1.104:5000/v2.0", "id": "87fa0e616328469da755204dc1ef2920", "publicURL": "http://192.168.1.104:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "demo", "roles_links": [], "id": "29d7ee699b164b0aa40df38e04ea9670", "roles": [{"name": "Member"}, {"name": "anotherrole"}], "name": "demo"}, "metadata": {"is_admin": 0, "roles": ["159f2e2a3a9740879633db37a242f3cd", "ab9c637b19a6488fa835e1152fe394df"]}}}

REQ: curl -i http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloads -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 1b961707c9a94ef596eaeb14896c38d1"

RESP: [200] {'Date': 'Tue, 03 Oct 2017 00:27:44 GMT', 'X-Compute-Request-Id': 'req-00d94bb2-7553-4fb3-93e0-a8b1b22369e4', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '1354'}
RESP BODY: {"workloads": [{"status": "available", "description": "no-description", "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloads/fd14c357-4f96-427e-a4a9-512993030d9f", "rel": "self"}, {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloads/fd14c357-4f96-427e-a4a9-512993030d9f", "rel": "bookmark"}], "workload_type_id": "f82ce76f-17fe-438b-aa37-7a023058e50d", "updated_at": "2017-09-27T01:31:24.000000", "id": "fd14c357-4f96-427e-a4a9-512993030d9f", "user_id": "29d7ee699b164b0aa40df38e04ea9670", "name": "vm2", "created_at": "2017-09-26T01:15:03.000000", "snapshots_info": "", "project_id": "8cc66459d2144d359f88b173557593ab"}, {"status": "available", "description": "no-description", "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloads/ee290e62-8045-4a07-a7de-ca8fe91321a1", "rel": "self"}, {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloads/ee290e62-8045-4a07-a7de-ca8fe91321a1", "rel": "bookmark"}], "workload_type_id": "f82ce76f-17fe-438b-aa37-7a023058e50d", "updated_at": "2017-09-26T01:16:04.000000", "id": "ee290e62-8045-4a07-a7de-ca8fe91321a1", "user_id": "29d7ee699b164b0aa40df38e04ea9670", "name": "vm", "created_at": "2017-09-23T11:34:03.000000", "snapshots_info": "", "project_id": "8cc66459d2144d359f88b173557593ab"}]}

+--------------------------------------+------+----------------------------------+--------------------------------------+-----------+----------------------------+
|                  ID                  | Name |            Project_ID            |           Workload_Type_ID           |   Status  |         Created_at         |
+--------------------------------------+------+----------------------------------+--------------------------------------+-----------+----------------------------+
| ee290e62-8045-4a07-a7de-ca8fe91321a1 |  vm  | 8cc66459d2144d359f88b173557593ab | f82ce76f-17fe-438b-aa37-7a023058e50d | available | 2017-09-23T11:34:03.000000 |
| fd14c357-4f96-427e-a4a9-512993030d9f | vm2  | 8cc66459d2144d359f88b173557593ab | f82ce76f-17fe-438b-aa37-7a023058e50d | available | 2017-09-26T01:15:03.000000 |
+--------------------------------------+------+----------------------------------+--------------------------------------+-----------+----------------------------+

4.3.1. Workloads List

Lists workloads

curl -i http://192.168.1.64:8780/v1/<project_id>/workloads -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 1b961707c9a94ef596eaeb14896c38d1"

Request Parameters

Name Style Type Description
project_id URI String Unique identifier of project or tenant

Response Payload

{"workloads": [
                {"status": "available", "description": "no-description",
                 "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloads/fd14c357-4f96-427e-a4a9-512993030d9f", "rel": "self"},
                           {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloads/fd14c357-4f96-427e-a4a9-512993030d9f", "rel": "bookmark"}],
                 "workload_type_id": "f82ce76f-17fe-438b-aa37-7a023058e50d", "updated_at": "2017-09-27T01:31:24.000000",
                 "id": "fd14c357-4f96-427e-a4a9-512993030d9f", "user_id": "29d7ee699b164b0aa40df38e04ea9670",
                 "name": "vm2", "created_at": "2017-09-26T01:15:03.000000", "snapshots_info": "", "project_id": "8cc66459d2144d359f88b173557593ab"},

                {"status": "available", "description": "no-description",
                 "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloads/ee290e62-8045-4a07-a7de-ca8fe91321a1", "rel": "self"},
                           {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloads/ee290e62-8045-4a07-a7de-ca8fe91321a1", "rel": "bookmark"}],
                 "workload_type_id": "f82ce76f-17fe-438b-aa37-7a023058e50d", "updated_at": "2017-09-26T01:16:04.000000",
                 "id": "ee290e62-8045-4a07-a7de-ca8fe91321a1", "user_id": "29d7ee699b164b0aa40df38e04ea9670", "name": "vm",
                 "created_at": "2017-09-23T11:34:03.000000", "snapshots_info": "", "project_id": "8cc66459d2144d359f88b173557593ab"}
              ]
}

4.3.2. Workload Show

Detail the specified workload

Request Parameters

curl -i http://192.168.1.64:8780/v1/<tenant-id>/workloads/<workload-id> -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 00e9e640f27548658d66701298318c2e"

Response Payload

{"workload": {"status": "available",
              "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloads/ee290e62-8045-4a07-a7de-ca8fe91321a1", "rel": "self"},
                        {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloads/ee290e62-8045-4a07-a7de-ca8fe91321a1", "rel": "bookmark"}],
              "user_id": "29d7ee699b164b0aa40df38e04ea9670", "name": "vm", "workload_type_id": "f82ce76f-17fe-438b-aa37-7a023058e50d",
              "availability_zone": "nova",
              "storage_usage": {"usage": 47973376, "full": {"usage": 47579136, "snap_count": 2},
                                                   "incremental": {"usage": 394240, "snap_count": 2}},
              "created_at": "2017-09-23T11:34:03.000000", "interval": null,
              "updated_at": "2017-09-26T01:16:04.000000", "error_msg": null,
              "instances": [{"metadata": {"workload_name": "vm", "workload_id": "ee290e62-8045-4a07-a7de-ca8fe91321a1"},
                             "id": "4945985e-f2c1-4829-a3ad-2420c274d9f4", "name": "vm"}],
              "metadata": {"f5585690-d4aa-4073-bcc7-58dab56b58b4": "8695c2c3-5c9e-4f34-9a72-694646db2f60", "pause_at_snapshot": "0",
                           "221f5ac2-7774-475a-a84f-371c2d4008af": "f5585690-d4aa-4073-bcc7-58dab56b58b4",
                           "d2c114fc-5545-499b-a262-95f04fd8e97a": "4945985e-f2c1-4829-a3ad-2420c274d9f4",
                           "19abdcbf-212a-45c0-a8bf-a1f997a29559": "4945985e-f2c1-4829-a3ad-2420c274d9f4", "preferredgroup": "[]",
                           "8695c2c3-5c9e-4f34-9a72-694646db2f60": "4945985e-f2c1-4829-a3ad-2420c274d9f4",
                           "workload_approx_backup_size": "3", "hostnames": "[\"vm\"]",
                           "a66fbb8d-0fb5-44c7-b910-509cbc6cf1a5": "221f5ac2-7774-475a-a84f-371c2d4008af", "topology": "\"\\\"\\\"\"",
                           "8a09737f-2399-425c-9b4b-42152f42bd10": "19abdcbf-212a-45c0-a8bf-a1f997a29559",
                           "c6c0f25c-3da6-44a4-8e89-5ff7247f781d": "a66fbb8d-0fb5-44c7-b910-509cbc6cf1a5",
                           "3064b4af-abc1-4b18-b6d3-39dfb5e3a187": "c6c0f25c-3da6-44a4-8e89-5ff7247f781d"},
              "jobschedule": {"fullbackup_interval": "-1", "retention_policy_type": "Number of Snapshots to Keep",
                              "start_time": "09:00 PM", "interval": "24hr", "enabled": false,
                              "retention_policy_value": 30, "appliance_timezone": "Etc/UTC", "global_jobscheduler": false,
                              "timezone": "UTC", "start_date": "09/23/2017"},
              "project_id": "8cc66459d2144d359f88b173557593ab", "id": "ee290e62-8045-4a07-a7de-ca8fe91321a1",
              "description": "no-description"}
}

4.3.3. Workload Create

Creates new workload

POST – v1/{project_id}/workloads/

Request Payload

{'workload': {'name': '',
              'description': '',
              'workload_type_id': '',
              'source_platform': '',
              'instances': [],
              'jobschedule': {}’,
              'metadata' : {}}}

Request Parameters

Name Style Type Description
project_id URI String unique identifier of project or tenant
name plain string name of workload
description plain string description of workload
workload_type_id plain string unique identifier of workload type
source_platform plain string workload platform
instances plain list list of workload instances
jobschedule plain dict workload schedule to take snapshot
metadata plain dict workload metadata key-values

4.3.4. Workload Types List

Lists all workload types

curl -i http://192.168.1.64:8780/v1/<project_id>/workload_types/detail -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 5b64569f19a24427b920c12269ba23fe"

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant

Response Payload

{"workload_types": [{"status": "available", "user_id": "952d1fe647584f10b91846ed55937a1d",
                     "name": "Parallel",
                     "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloadtypes/2ddd528d-c9b4-4d7e-8722-cc395140255a", "rel": "self"},
                               {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloadtypes/2ddd528d-c9b4-4d7e-8722-cc395140255a", "rel": "bookmark"}],
                     "created_at": "2015-10-08T05:59:41.000000", "updated_at": "2015-10-08T05:59:41.000000",
                     "metadata": [], "is_public": true, "project_id": "f92b71ebf0c149cebee6af4648beeb4c", "id": "2ddd528d-c9b4-4d7e-8722-cc395140255a",
                     "description": "Parallel workload that snapshots all VMs in parallel"},
                    {"status": "available", "user_id": "952d1fe647584f10b91846ed55937a1d",
                     "name": "Serial",
                     "links": [{"href": "http://192.168.1.64:8780/v1/8cc66459d2144d359f88b173557593ab/workloadtypes/f82ce76f-17fe-438b-aa37-7a023058e50d", "rel": "self"},
                               {"href": "http://192.168.1.64:8780/8cc66459d2144d359f88b173557593ab/workloadtypes/f82ce76f-17fe-438b-aa37-7a023058e50d", "rel": "bookmark"}],
                     "created_at": "2015-10-08T05:59:41.000000", "updated_at": "2015-10-08T05:59:41.000000",
                     "metadata": [], "is_public": true, "project_id": "f92b71ebf0c149cebee6af4648beeb4c", "id": "f82ce76f-17fe-438b-aa37-7a023058e50d",
                     "description": "Serial workload that snapshots VMs in the specified order"}
                   ]
}

4.3.5. Workload Delete

Deletes the specified workload

DELETE – v1/{project_id}/workloads/{id}

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
Id URI string Unique identifier of workload

4.3.6. Snapshot Workload

Takes snapshot of workload specified

curl -i http://192.168.1.64:8780/v1/<project_id>/workloads/<id> -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 86b7b466d16647ddbbc9b6277ed1c0f9" -d '{"snapshot": {"name": "cli initiated", "description": "cli initiated"}}'

Query String {project_id}/workloads/{id}?full=1

Request Payload

{"snapshot": {"name": "cli initiated", "description": "cli initiated"}}

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
id URI string unique identifier of workload
name plain string snapshot name
description plain string snapshot description
full plain integer full workload snapshot if value is 1

4.3.7. Snapshots List

Lists snapshots of specified workload

curl -i http://192.168.1.64:8780/v1/<project_id>/snapshots -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 6cd94375dd04476f8b9a3eea949518cb"
curl -i http://192.168.1.64:8780/v1/<project_id>/snapshots?workload_id=<workload_id> -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 16f2e19f86d34e5aa7b7d56c651f77d4"

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
workload_id URI string unique identifier of workload

Response Payload

{"snapshots": [{"status": "available", "name": "snapshot", "created_at": "2017-09-23T11:34:20.000000",
                "snapshot_type": "full", "host": "tvault-104-1",
                "workload_id": "ee290e62-8045-4a07-a7de-ca8fe91321a1",
                "id": "34222726-7f1e-470e-8643-ea4042b9e90c", "description": "-"}
              ]
}

4.3.8. Snapshot Show

Details the specified snapshot

curl -i http://192.168.1.64:8780/v1/<project_id>/snapshots/<id> -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-workloadmgrclient" -H "Accept: application/json" -H "X-Auth-Token: 0a8edd37e5cc41afa76068721c32a884"

Request Parameters

Name Style Type Description
project_id URI String unique identifier of project or tenant
id URI String unique identifier of snapshot

Response Payload

{   'snapshot': {   'created_at': '2017-09-23T11:34:20.000000',
                 'description': '-',
                 'error_msg': None,
                 'finished_at': None,
                 'host': 'tvault-104-1',
                 'id': '34222726-7f1e-470e-8643-ea4042b9e90c',
                 'instances': [   {   'flavor': {   'disk': '1',
                                                    'ephemeral': '0',
                                                    'ram': '512',
                                                    'vcpus': '1'},
                                      'id': 'd2c114fc-5545-499b-a262-95f04fd8e97a',
                                      'metadata': {   'availability_zone': 'nova',
                                                      'data_transfer_time': '0',
                                                      'object_store_transfer_time': '0',
                                                      'root_partition_type': 'Linux',
                                                      'vm_metadata': '{"workload_id": "ee290e62-8045-4a07-a7de-ca8fe91321a1", "workload_name": "vm"}',
                                                      'workload_id': 'ee290e62-8045-4a07-a7de-ca8fe91321a1',
                                                      'workload_name': 'vm'},
                                      'name': 'vm',
                                      'nics': [   {   'ip_address': '10.0.0.51',
                                                      'mac_address': 'fa:16:3e:b9:af:dd',
                                                      'network': {   'cidr': None,
                                                                     'id': '2a04b23e-e1bf-46c2-a99a-9e9a3b3edb3b',
                                                                     'name': 'private',
                                                                     'network_type': 'neutron',
                                                                     'subnet': {   'cidr': 'fdeb:a59c:2392::/64',
                                                                                   'gateway_ip': 'fdeb:a59c:2392::1',
                                                                                   'id': '30d455ce-fa31-417f-899d-b14191005a49',
                                                                                   'ip_version': 6,
                                                                                   'name': 'ipv6-private-subnet'}}}],
                                      'security_group': [   {   'name': 'default',
                                                                'security_group_type': 'neutron'},
                                                            {   'name': 'sgtest',
                                                                'security_group_type': 'neutron'}],
                                      'status': 'available',
                                      'vdisks': [   {   'hw_qemu_guest_agent': None,
                                                        'image_id': '777c15c0-ce12-4bff-827c-9fbfafcea59a',
                                                        'image_name': 'cirros-0.3.4-x86_64-uec',
                                                        'label': None,
                                                        'resource_id': 'ea0be5cf-d7f6-43e5-ab72-00ef25daa636',
                                                        'restore_size': 24969216,
                                                        'vm_id': 'd2c114fc-5545-499b-a262-95f04fd8e97a'}]}],
                 'metadata': [   {   'created_at': '2017-09-23T11:35:21.000000',
                                     'deleted': False,
                                     'deleted_at': None,
                                     'id': '34486d94-cc79-42d8-91c2-aa8271c71560',
                                     'key': 'backup_media_target',
                                     'snapshot_id': '34222726-7f1e-470e-8643-ea4042b9e90c',
                                     'updated_at': None,
                                     'value': '192.168.1.114:/home/centos/nfsshare',
                                     'version': '2.4.76'},
                                 {   'created_at': '2017-09-23T11:34:20.000000',
                                     'deleted': False,
                                     'deleted_at': None,
                                     'id': '85f0ebd2-4d0b-456d-ad8a-019e2878b1a6',
                                     'key': 'cancel_requested',
                                     'snapshot_id': '34222726-7f1e-470e-8643-ea4042b9e90c',
                                     'updated_at': None,
                                     'value': '0',
                                     'version': '2.4.76'},
                                 {   'created_at': '2017-09-23T11:35:18.000000',
                                     'deleted': False,
                                     'deleted_at': None,
                                     'id': 'a03d8fbb-bf30-4bdc-9cf6-88f28ae00124',
                                     'key': 'data_transfer_time',
                                     'snapshot_id': '34222726-7f1e-470e-8643-ea4042b9e90c',
                                     'updated_at': '2017-09-23T11:35:19.000000',
                                     'value': '0',
                                     'version': '2.4.76'},
                                 {   'created_at': '2017-09-23T11:35:21.000000',
                                     'deleted': False,
                                     'deleted_at': None,
                                     'id': '0c0c0715-92ef-42dd-961d-c3fb3e36cb03',
                                     'key': 'hostnames',
                                     'snapshot_id': '34222726-7f1e-470e-8643-ea4042b9e90c',
                                     'updated_at': None,
                                     'value': '[]',
                                     'version': '2.4.76'},
                                 {   'created_at': '2017-09-23T11:35:18.000000',
                                     'deleted': False,
                                     'deleted_at': None,
                                     'id': '8e6b2255-22f4-4934-a3fc-dcab0c480d40',
                                     'key': 'object_store_transfer_time',
                                     'snapshot_id': '34222726-7f1e-470e-8643-ea4042b9e90c',
                                     'updated_at': '2017-09-23T11:35:19.000000',
                                     'value': '0',
                                     'version': '2.4.76'},
                 'name': 'snapshot',
                 'pinned': False,
                 'progress_msg': 'Applying retention policy',
                 'progress_percent': 2,
                 'project_id': '8cc66459d2144d359f88b173557593ab',
                 'restore_size': 24969216,
                 'restores_info': '',
                 'size': 25296896,
                 'snapshot_type': 'full',
                 'status': 'available',
                 'time_taken': 59,
                 'updated_at': '2017-09-23T11:35:19.000000',
                 'uploaded_size': 25296896,
                 'user_id': '29d7ee699b164b0aa40df38e04ea9670',
                 'warning_msg': None,
                 'workload_id': 'ee290e62-8045-4a07-a7de-ca8fe91321a1'}}

4.3.9. Snapshot Delete

Deletes the specified snapshot

DELETE – v1/{project_id}/workloads/{workload_id}/snapshots/{id}

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
workload_id URI string unique identifier of workload
id URI string unique identifier of snapshot

4.3.10. Snapshot Restore

Restores the specified snapshot

POST -   v1/{project_id}/workloads/{workload_id}/snapshots/{id}/restores

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
workload_id URI string unique identifier of workload
id URI string unique identifier of snapshot
name plain string snapshot name
description plain string snapshot description
options plain dict restore options For example – selective or one-click restore

Response Payload

{'restore': { 'name': , 'description': , 'options': {'openstack': {'instances': None, 'zone': ''},
 'type': 'openstack', 'oneclickrestore': True, 'openstack': {}}}}

4.3.11. Restores List

Lists the restores of specified snapshot

GET – v1/{project_id}/workloads/{workload_id}/snapshots/{snapshot_id}/restores

Request Parameters

Name Style Type Description
project_id URI String Unique identifier of project or tenant
workload_id URI String Unique identifier of workload
snapshot_id URI String Unique identifier of snapshot

Response Payload

{'restores': [{'status': u'', 'error_msg': None, 'user_id': u'', 'name': u'',
               : [{'href':u'', 'rel': 'self'}, {'href': u'', 'rel': 'bookmark'}],
               'finished_at': None, 'created_at': datetime.datetime(), 'size': ,
               'updated_at': datetime.datetime(), 'progress_percent': ,
               'metadata': [[<RestoreMetadata object>], 'warning_msg': None, 'host': u'',
               'progress_msg': u'', 'snapshot_id': u'', 'restore_type': u'restore',
               'time_taken': , 'project_id': u'', 'id': u'', 'description': u''}]}

4.3.12. Restore Show

Details the specified restore

GET – v1/{project_id}/workloads/{workload_id}/snapshots/{snapshot_id}/restores/{id}

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
workload_id URI string unique identifier of workload
snapshot_id URI string unique identifier of snapshot
id URI string unique identifier of restore

Response Payload

{'finished_at': datetime.datetime(), 'networks': [], 'updated_at': datetime.datetime(),
 'instances': [{'status': u'available',
                'metadata': {u'datastores': u'[{"_type": "Datastore", "name": "", "value": ""}]', u'resourcepool': u'{"_type": "ResourcePool", "name": "", "value": ""}', u'vmware_moid': u'', u'data_transfer_time': u'', u'parent': u'{"_type": "Folder", "name": "", "value": ""}', u'vdisks': u'[{"capacity": , "label": "", "summary": "", "pathname": "", "datastore": "", "filename": ""}]', u'object_store_transfer_time': u'', u'imported_from_vcenter': u'', u'VM Network Private': u'', u'mac_addresses': u'', u'cluster': u'[{"_type": "ComputeResource", "name": "", "value": ""}]', u'host': u'[{"_type": "HostSystem", "name": "", "value": ""}]', u'vmware_uuid': u'', u'networks': u'[{"macAddress": "", "_type": "Network", "name": "", "value": ""}]', u'vmxpath': u'{"datastore": "", "pathname": ""}'}, 'id': u'', 'name': u''}], 'snapshot_id': u'', 'deleted_at': None, 'id': u'', 'security_groups': [], 'size': , 'flavors': [], 'user_id': u'', 'display_description': u'', 'time_taken': , 'version': u'', 'project_id': u'', 'metadata': [<RestoreMetadata object>, <RestoreMetadata object>], 'status': u'', 'subnets': [], 'deleted': False, 'routers': [], 'warning_msg': None, 'host': u'', 'progress_msg': u'', 'display_name': u'', 'target_platform': u'', 'error_msg': None, 'uploaded_size': , 'created_at': datetime.datetime(), 'progress_percent': , 'snapshot_details': {'finished_at': None, 'updated_at': datetime.datetime(), 'deleted_at': None, 'id': u'', 'size': , 'user_id': u'', 'restore_size': , 'display_description': None, 'time_taken': , 'pinned': False, 'version': u'', 'project_id': u'', 'metadata': [<SnapshotMetadata object>], 'status': u'', 'vault_storage_id': None, 'deleted': False, 'warning_msg': None, 'host': u'', 'progress_msg': u'', 'display_name': u'', 'error_msg': None, 'uploaded_size':, 'created_at': datetime.datetime(), 'snapshot_type': u'incremental', 'progress_percent': , 'data_deleted': False, 'workload_id': u''}, 'workload_id': u'', 'restore_type': u'restore', 'pickle': u"", 'ports': []}

4.3.13. Restore Delete

Deletes the specified restore

DELETE – v1/{project_id}/workloads/{workload_id}/snapshots/{snapshot_id}/restores/{id}

Request Parameters

Name Style Type Description
project_id URI string unique identifier of project or tenant
workload_id URI string unique identifier of workload
snapshot_id URI string unique identifier of snapshot
id URI string unique identifier of restore

4.4. Command Line Interface

workloadmgr utility is workloadmgr client that can be downloaded from a TrilioVault appliance as a Python pip module. It is a thin-client that wraps the Workload Manager RESTful API. There is almost a one-to-one mapping from workloadmgr command to the REST API. This section describes Workload Manager commands, its usage and the arguments to each command.

A typical workloadmgr command line is:

workloadmgr <subcommand> <arguments>

The following sections describe each subcommand in detail.

4.4.1. Workload Types

TrilioVault’s workloadmgr supports the concept called workload types. A workload is a group of related VMs and their associated resources that need to be managed as one unit. The data consistency and data integrity of the underlying application(s) depend on how these VMs are backed up. Workload types define predefined mechanisms to perform consistent snapshots of workloads. TrilioVault comes with two predefined workload types:

Workload Types Description
Serial Serial workloads performs VM snapshots in the workload in the order in which they appear. If there is data dependency between VMs in a workload this is the workload type one must choose. Only snapshot operations are serialized. Data upload is performed in parallel.
Parallel Parallel workload type performs VM snapshots in no specific order. As in Serial workload, all data uploads are performed in parallel. If VMs in a workload do not have data dependency, this is the workload type one should choose

4.4.1.1. Workload Type CLIs

4.4.1.1.1. workload-type-show

Usage

workloadmgr workload-type-show <workload-type-id>

Arguments

<workload-type-id>   ID of the workload type

Description

Shows the detailed description of the workload type.

4.4.1.1.2. workload-type-list

Usage

workloadmgr workload-type-list

Arguments

None

Description

Lists registered workload types

4.4.2. Workloads

4.4.2.1. Workload CLIs

A workload is a collection of VMs that are managed together as one entity for backup and recovery purposes. Each workload includes a workload type and a job scheduler defines how frequently the backup need to be performed and how many backups need to be retained on the backup media.

4.4.2.1.1. workload-create

Usage

workloadmgr workload-create [--display-name <display-name>]
                            [--display-description <display-description>]
                            --workload-type-id <workload-type-id>
                            --source-platform <source-platform>
                            [--instance <instance-id=instance-uuid>]
                            [--jobschedule <key=key-name>]
                            [--metadata <key=key-name>]
                            [--workloadids <workloadid>]

Creates a workload.

Arguments

--display-name <display-name> Optional workload name. (Default=None)

--display-description <display-description> Optional workload description. (Default=None)

--workload-type-id <workload-type-id> Workload Type ID is required
--source-platform <source-platform> Workload source platform is required. Supported platforms are 'openstack' and 'vmware'
--instance <instance-id=instance-uuid> Specify an instance to include in the workload. Specify option multiple times to include multiple instances. instance-id: include the instance with this UUID
--jobschedule <key=key-name> Specify following key value pairs for jobschedule Specify option multiple times to include multiple keys. 'start_date' : '06/05/2014' 'end_date' : '07/15/2014' 'start_time' : '2:30 PM' 'interval' : '1 hr' 'snapshots_to_retain' : '2'
--metadata <key=key-name> Specify a key value pairs to include in the workload_type metadata Specify option multiple times to include multiple keys. key=value
--workloadids <workloadid>

Description

Creates a new workload (a backup group) that includes one more VMs identified by their GUID.

The other workload APIs including workload-list, workload-show and workload-delete are self-explanatory and do not require further explanation.

4.4.2.1.2. workload-unlock

Usage

workloadmgr workload-unlock <workload_id>

Unlocks a workload.

Arguments

<workload_id> ID of the workload to unlock
4.4.2.1.3. workload-list

Usage

workloadmgr workload-list

Lists all workloads of current project. Admin user can list the workloads from all the tenants. Also, there is a provision for listing the workloads per nfs share.

Optional Arguments:

--all {True,False}    List all workloads of all the projects(valid for admin user only)
--nfsshare <nfsshare> List all workloads of nfsshare (valid for admin user only)
4.4.2.1.4. workload-delete

Usage

workloadmgr workload-delete <workload_id>

Deletes a workload.

Arguments

<workload_id> ID/name of the workload to be deleted
4.4.2.1.5. workload-get-auditlog

Usage

workloadmgr workload-get-auditlog [--time_in_minutes <time_in_minutes>][--time_from <time_from>][--time_to <time_to>]

Gets auditlog of workload manager.

Arguments

--time_in_minutes <time_in_minutes>  time in minutes(default is 24 hrs.)
--time_from <time_from> From date time in format 'MM-DD-YYYY'
--time_to <time_to>   To date time in format 'MM-DD-YYYY'(default is current day)
4.4.2.1.6. workload-get-importworkloads-list

Usage

workloadmgr workload-get-importworkloads-list

Get list of workloads to be imported.

4.4.2.1.7. workload-get-nodes

Usage

workloadmgr workload-get-nodes

Get all the nodes of a workload manager.

4.4.2.1.8. workload-get-recentactivities

Usage

workloadmgr workload-get-recentactivities [--time_in_minutes <time_in_minutes>]

Get recentactivities of workload manager.

Arguments

--time_in_minutes <time_in_minutes>  time in minutes
4.4.2.1.9. workload-get-storage-usage

Usage

workloadmgr workload-get-storage-usage

Get total storage used by workload manager per nfs share.

4.4.2.1.10. workload-importworkloads

Usage

workloadmgr workload-importworkloads [--workloadids <workloadid>][--upgrade <upgrade>]

Import all workload records from backup store.

Arguments

--workloadids <workloadid> Specify workload ids to import only specified workloads --workloadids <workloadid>
--upgrade <upgrade>   Specify True or False. Default is True
4.4.2.1.11. workload-get-orphaned-workloads-list

Usage

workloadmgr workload-get-orphaned-workloads-list [--migrate_cloud {True,False}] [--generate_yaml {True,False}]

Discovers the list of workloads that does not belong to current cloud. This API is useful to implement disaster recovery use case where user has setup two clouds and the backup repository is replicated between two clouds. In case the primary cloud goes down and wants to bring the applications on DR cloud, user can use this command to discover all workloads.

Arguments

--migrate_cloud {True,False} True means discover workloads that don’t belong to current cloud.
--generate_yaml {True,False} True means generate a YAML file that can be used as input to workload-reassign-workloads command.
4.4.2.1.12. workload-reassign-workloads

Usage

workloadmgr workload-reassign-workloads [--old_tenant_ids <old_tenant_id>]
                                        [--new_tenant_id <new_tenant_id>]
                                        [--workload_ids <workload_id>]
                                        [--user_id <user_id>]
                                        [--migrate_cloud {True,False}]
                                        [--map_file <map_file>]

Assign workload(s) to a new tenant/user.

Optional arguments:

--old_tenant_ids <old_tenant_id>
                      Specify old tenant ids from which workloads need to
                      reassign to new tenant. --old_tenant_ids
                      <old_tenant_id> --old_tenant_ids <old_tenant_id>
--new_tenant_id <new_tenant_id>
                      Specify new tenant id to which workloads need to
                      reassign from old tenant. --new_tenant_id
                      <new_tenant_id>
--workload_ids <workload_id>
                      Specify workload_ids which need to reassign to new
                      tenant. If not provided then all the workloads from
                      old tenant will get reassigned to new tenant.
                      --workload_ids <workload_id> --workload_ids
                      <workload_id>
--user_id <user_id>   Specify user id to which workloads need to reassign
                      from old tenant. --user_id <user_id>
--migrate_cloud {True,False}
                      Set to True if want to reassign workloads from other
                      clouds as well. Default if False
--map_file <map_file>
                      Provide list of old worloads mapped to new tenants.
                      Format for this file is YAML.

Sample YAML file looks as follows:

reassign_mappings:
               - old_tenant_ids: [] #user can provide list of old_tenant_ids or workload_ids
                 new_tenant_id: new_tenant_id
                 user_id: user_id
                 workload_ids: [] #user can provide list of old_tenant_ids or workload_ids
                 migrate_cloud: {True,False} #Set to True if want to reassign workloads from other
                                             # clouds as well. Default is False

               - old_tenant_ids: [] #user can provide list of old_tenant_ids or workload_ids
                 new_tenant_id: new_tenant_id
                 user_id: user_id
                 workload_ids: [] #user can provide list of old_tenant_ids or workload_ids
                 migrate_cloud: {True,False} #Set to True if want to reassign workloads from other
                                             # clouds as well. Default is False
4.4.2.1.13. workload-modify

Usage

workloadmgr  workload-modify [--display-name <display-name>]
                             [--display-description <display-description>]
                             [--instance <instance-id=instance-uuid>]
                             [--jobschedule <key=key-name>]
                             [--metadata <key=key-name>]
                             <workload_id>

Modify a workload.

Arguments

Required:

<workload_id>         ID of the workload.

Optional:

--display-name <display-name>
                      Optional workload name. (Default=None)
--display-description <display-description>
                      Optional workload description. (Default=None)
--instance <instance-id=instance-uuid>
                      Specify an instance to include in the workload.
                      Specify option multiple times to include multiple
                      instances. instance-id: include the instance with this
                      UUID
--jobschedule <key=key-name>
                      Specify following key value pairs for jobschedule
                      Specify option multiple times to include multiple
                      keys. 'start_date' : '06/05/2014' 'end_date' :
                      '07/15/2014' 'start_time' : '2:30 PM' 'interval' : '1
                      hr' 'retention_policy_type' : 'Number of Snapshots to
                      Keep' or 'Number of days to retain Snapshots'
                      'retention_policy_value' : '30'
--metadata <key=key-name>
                      Specify a key value pairs to include in the
                      workload_type metadata Specify option multiple times
                      to include multiple keys. key=value
4.4.2.1.14. workload-remove-node

Usage

workloadmgr workload-remove-node <ip>

Remove workload node by ipaddress / hostname. To remove additional node, run remove-node command & then delete the vm instance.

Arguments

<ip>  IP or hostname of node to remove
4.4.2.1.15. workload-reset

Usage

workloadmgr workload-reset <workload_id>

Resets a workload. TrilioVault uses storage based snapshots for calculating backup images of application resources. For cinder volumes, it uses cinder snapshots and for ceph based nova backends, it uses ceph snapshots for calculating the backup images. Depending the state of the workload backup operation, each of these resources may have one or more snapshots outstanding. Workload-reset deletes all outstanding snapshots on all resources of the application. Workload-reset is useful if you want to decommission the application, but you still want to keep all the backups of the application.

Note

It is highly recommended to perform workload-reset before deleting any application resources from OpenStack.

Arguments

<workload_id>  ID of the workload to reset
4.4.2.1.16. workload-show

Usage

workloadmgr workload-show <workload_id> [--verbose <verbose>]

Show details about a workload.

Arguments

Required:

<workload_id>  ID/name of the workload

Optional:

--verbose <verbose>  Get detailed information of workload with specifying –verbose

4.4.2.2. Snapshot CLIs

Snapshot or backups are created from workloads. Snapshots can be created on an on-demand basis or by the underlying job scheduler. Each snapshot resource is created by CLI called workload-snapshot.

4.4.2.2.1. workload-snapshot

Usage

workloadmgr workload-snapshot [--full]
                              [--display-name <display-name>]
                              [--display-description <display-description>]
                              <workload_id>

Creates an on demand snapshot for a given workload.

Arguments

--full Specify if a full snapshot is required. By default workloadmgr makes best effort to perform incremental snapshots.
--display-name <display-name> Optional snapshot name. (Default=None)
--display-description <display-description> Optional snapshot description. (Default=None)

Description

Once a snapshot resource is created, Workload Manager supports snapshot-list, snapshot-show and snapshot-delete operations on the snapshot resource; a typical usage pattern of any RESTful resource.

4.4.2.2.2. snapshot-mount

Usage

workloadmgr snapshot-mount [--options <options>] <snapshot_id>

Mounts a workload snapshot for exploring individual files.

Arguments

<snapshot_id>   ID of the workload snapshot to mount.
--options <options>  Mount options. (Default={})

Description

snapshot-mount mounts all volumes/partitions that are present in all VMs and provide an URL for end use to explore the file system contents on each of these volumes partitions in a file manager view. User can download and view individual files. A user cannot modify any contents in the snapshot. Current implementation mounts all Linux file systems and NTFS file system mounted on regular partitions. Dynamic volumes are supported in subsequent releases. Snapshot cannot be mounted multiple times simultaneously.

4.4.2.2.3. snapshot-dismount

Usage

workloadmgr snapshot-dismount <snapshot_id>

Dismount a mounted snapshot. Workloadmgr frees up all mount points and the URL is not accessible any more.

Arguments

<snapshot_id>  ID of the workload snapshot to dismount.

4.4.2.3. Restore CLI

A snapshot can be restored to the target environment. Workloadmgr supports three flavors of restore operation: Selective Restore, In place Restore and One-click Restore. Selective Restore gives the user more control over how the snapshot is restored; whereas, One-click Restore provides a simple way to restore the snapshot in its entirety on the same environment where the snapshot was taken.

4.4.2.3.1. snapshot-selective-restore

Usage

workloadmgr snapshot-selective-restore [--display-name <display-name>]
                                       [--display-description <display-description>]
                                       [--filename <filename>] <snapshot_id>

Selective Restore workload snapshot.

Arguments

<snapshot_id> ID of the workload snapshot to restore.

--display-name <display-name> Optional name for the restore. (Default=None)

--display-description <display-description> Optional description for restore. (Default=None)

--filename <filename> File name in folder /opt/stack/python-workloadmgrclient/input-files (Default=restore.json). Replace values into sample files

Once a snapshot is restored, a restored resource can be managed using standard RESTful verbs like restore-list, restore-show and restore-delete. Restore resource captures all the resources that were created as part of the restore operation. However, restore-delete does not delete any of these restored resources. It merely deletes the restore object in the SQL database.

4.4.2.3.2. snapshot-list

Usage

workloadmgr snapshot-list [--workload_id <workload_id>]
                          [--tvault_node <host>]

List all the workload snapshots. Workload snapshots can be filtered based on date. All tenant snapshots can be listed by admin user using –all option.

Optional Arguments:

--workload_id <workload_id> Filter results by workload_id

--tvault_node <host> List all the snapshot operations scheduled on a tvault node(Default=None)
--date_from <date_from> From date in format 'YYYY-MM-DDTHH:MM:SS' eg 2016-10-10T00:00:00
--date_to <date_to>   To date in format 'YYYY-MM-DDTHH:MM:SS'(defult is current day)
--all {True,False}    List all snapshots of all the projects(valid for admin
                     user only)
4.4.2.3.3. snapshot-cancel

Usage

workloadmgr snapshot-cancel <snapshot_id>

Cancel a snapshot that is running. If the snapshot operation is in the middle of the data transfer of a resource, it waits for the data transfer operation is complete before terminating the snapshot operation.

Arguments

<snapshot_id>  ID of the snapshot to cancel
4.4.2.3.4. snapshot-delete

Usage

workloadmgr snapshot-delete <snapshot_id>

Removes a snapshot.

Arguments

<snapshot_id>  ID/name of the snapshot to delete
4.4.2.3.5. snapshot-oneclick-restore

Usage

workloadmgr snapshot-oneclick-restore [--display-name <display-name>]
                                      [--display-description <display-description>]
                                      [--options <options>]<snapshot_id>

Restore a workload snapshot.

Arguments

Required:

<snapshot_id>  ID of the snapshot to restore

Optional:

--display-name <display-name> Optional name for the restore. (Default=None)

--display-description <display-description> Optional description for restore. (Default=None)

--options <options>   Restore options. (Default={'openstack': {}, 'type':'vmware', 'oneclickrestore': True, 'vmware':{}})
4.4.2.3.6. snapshot-mounted-list

Usage

workloadmgr snapshot-mounted-list [--workloadid <workloadid>]

List of all mounted snapshots.

Arguments

--workloadid <workloadid> Workload id (Default=None)
4.4.2.3.7. snapshot-show

Usage

workloadmgr snapshot-show [--output <output>] <snapshot_id>

Show details about a workload snapshot.

Arguments Required:

<snapshot_id>      ID/name of the workload snapshot

Optional:

--output <output>  Option to get additional snapshot details,

--output metadata for snapshot metadata,
-–output networks for snapshot vms networks,
-–output disks for snapshot vms disks

4.4.2.4. Scheduler CLIs

Scheduler is responsible for taking periodic snapshots of vm’s belong to a workload.

4.4.2.4.1. enable-scheduler

Usage

workloadmgr enable-scheduler <workload_id>

Enables a scheduler

Arguments

<workload_id> ID of the workload whose scheduler is to be enabled.
              –workloadids can be specified multiple times to specify multiple workloads.
4.4.2.4.2. disable-scheduler

Usage

workloadmgr disable-scheduler <workload_id>

Disables a scheduler

Arguments

<workload_id> ID of the workload whose scheduler is to be disabled.
              –workloadids can be specified multiple times to specify multiple workloads.
4.4.2.4.3. enable-global-job-scheduler

Usage

workloadmgr enable-global-job-scheduler

Enables global job scheduler

4.4.2.4.4. disable-global-job-scheduler

Usage

workloadmgr disable-global-job-scheduler

Disables global job scheduler

4.4.2.4.5. get-global-job-scheduler

Usage

workloadmgr get-global-job-scheduler

Gets global job scheduler status

4.4.2.5. Licensing

Licensing CLIs are responsible for applying license information to the product as well list the applied license.

4.4.2.5.1. license-create

Usage

workloadmgr license-create <license_file>

Creates a license (Admin only)

In case the user has a license.key file, license can be applied by using the following command:

workloadmgr license-create license.key

Arguments

<license_file>  License file that is supplied by TrilioData, Inc
4.4.2.5.2. license-list

Usage

workloadmgr license-list

Lists the license (Admin only).

4.4.2.5.3. license-list

Usage

workloadmgr license-check

Check the license. (Admin only)

4.4.2.6. Restore CLI

Restore commands are responsible for performing restores of workload snapshots.

4.4.2.6.1. restore-list

Usage

workloadmgr restore-list [--snapshot_id <snapshot_id>]

List all the restores.

Arguments .. code:: bash

–snapshot_id <snapshot_id> Filter results by snapshot_id
4.4.2.6.2. restore-show

Usage

workloadmgr restore-show [--output <output>] <restore_id>

Show details about a workload snapshot restore.

Arguments

Required:

<restore_id>       ID/name of the restore

Optional:

--output <output> Option to get additional restore details,

--output metadata for restore metadata

--output networks --output subnets

--output routers –output flavors
4.4.2.6.3. restore-cancel

Usage

workloadmgr restore-cancel <restore_id>

Cancel a restore.

Arguments

<restore_id>  ID of restore to cancel
4.4.2.6.4. restore-delete

Usage

workloadmgr restore-delete <restore_id>

Delete a restore.

Arguments

<restore_id>  ID/name of restore to delete

4.4.2.7. OpenStack Configuration Backup

This section describes CLI to manage OpenStack configuration backup. OpenStack configuration includes all services configuration files, configuration database and any data files associated with each of OpenStack services. This is admin only feature.

4.4.2.7.1. config-backup

Usage

workloadmgr config-backup [--display-name <display-name>]
                          [--display-description <display-description>]

Take backup of OpenStack config.

Optional arguments:

--display-name <display-name>
                      Optional backup name. (Default=Config backup)
--display-description <display-description>
                      Optional backup description. (Default=None)

Take backup of OpenStack config

4.4.2.7.2. config-backup-delete

Usage

workloadmgr config-backup-delete <backup_id>

Delete a config backup.

Positional arguments:

<backup_id>  ID of the backup to delete.
4.4.2.7.3. config-backup-list

Usage

workloadmgr config-backup-list

list all config backups.

4.4.2.7.4. config-backup-show

Usage

workloadmgr config-backup-show <backup_id>

Show config backup.

Positional arguments:

<backup_id>  ID of the bakup to show.
  workloadmgr config-backup-show <backup_id>
4.4.2.7.5. config-workload-configure
workloadmgr config-workload-configure [--jobschedule <key=key-name>]
                                      [--config-file <config_file_path>]
                                      [--authorized-key <authorized_key>]

Configure services to backup and scheduler for OpenStack config workload.

Optional arguments:

--jobschedule <key=key-name>
                      Specify following key value pairs for jobschedule
                      Specify option multiple times to include multiple
                      keys. 'start_time' : '2:30 PM' 'interval' : '1 hr'
                      'retention_policy_value' : '30' , For example
                      --jobschedule enabled=TrueIn order to enable/disable
                      scheduler pass enabled True / enabled False
--config-file <config_file_path>
                      Provide file path(relative or absolute) including file
                      name , This file should contain list of services to
                      backup, their respective config, log folders and root
                      credentials for database. This should be in YAML
                      format. For this you can refer to this template file
                      /usr/lib/python2.7/site-packages/workloadmgrclient
                      /input-files/services_to_backup.yaml:
--authorized-key <authorized_key>
                      Provide file path(relative or absolute) including file
                      name , This private key would be used to connect with
                      controller nodesover the SSH.
4.4.2.7.6. config-workload-scheduler-disable

Usage

workloadmgr config-workload-scheduler-disable

Disable scheduler for config workload.

4.4.2.7.7. config-workload-scheduler-enable

Usage

workloadmgr config-workload-scheduler-enable [--jobschedule <key=key-name>]

Enable/update scheduler for config workload.

Optional arguments:

--jobschedule <key=key-name>
                      Specify following key value pairs for jobschedule
                      Specify option multiple times to include multiple
                      keys. 'start_time' : '2:30 PM' 'interval' : '1 hr'
                      'retention_policy_value' : '30' , For example
                      --jobschedule start_time='2:30 PM' --jobschedule
                      retention_policy_value='30'
4.4.2.7.8. config-workload-show

Usage

workloadmgr config-workload-show

Show config backup workload object

4.4.2.8. Trust CLIs

Trust CLIs are responsible for creating a trust for a user role for it to take a workload snapshot.

4.4.2.8.1. trust-create

Usage

workloadmgr trust-create <role_name>

Creates a trust.

Arguments

<role_name>  name of the role that user wants to be trusted
4.4.2.8.2. trust-show

Usage

workloadmgr trust-show <trust_id>

Show details of a trust.

Arguments

<trust_id>  trust ID
4.4.2.8.3. trust-list

Usage

workloadmgr trust-list

Lists all the trusts.

4.4.2.8.4. trust-delete

Usage

workloadmgr trust-delete <trust_id>

Remove a trust.

Arguments

<trust_id>  trust ID

4.4.2.9. Settings CLIs

Settings CLIs help in creating/changing different TrilioVault settings.

4.4.2.9.1. setting-create

Usage

workloadmgr setting-create [--description <description>]
                           [--category <category>] [--type <type>]
                           [--is-public {True,False}]
                           [--is-hidden {True,False}]
                           [--metadata <key=value>]
                           <name> <vaule>

Creates a setting.

Arguments

Required:

<name>               name of the setting
<value>              Value of the setting

Optional:

 --description <description> Optional description. (Default=None)

--category <category> Optional category. (Default=None)

--type <type>         Optional type of setting. (Default=None)

--is-public {True,False} Make setting accessible to the public.

--is-hidden {True,False} Make setting hidden.

--metadata <key=value>
                      Specify a key value pairs to include in the settings
                      metadata Specify option multiple times to include multiple keys. key=value
4.4.2.9.2. setting-list

Usage

workloadmgr setting-list [--get_hidden {True,False}]

List all the settings.

Arguments

--get_hidden {True,False} show hidden settings
4.4.2.9.3. setting-show

Usage

workloadmgr setting-show [--get_hidden {True,False}] <setting_name>

Show details of a setting.

Arguments

Required:

<setting_name>        name of the setting

Optional:

--get_hidden {True,False} show hidden settings
4.4.2.9.4. setting-update

Usage

workloadmgr setting-update [--description <description>]
                           [--category <category>] [--type <type>]
                           [--is-public {True,False}]
                           [--is-hidden {True,False}]
                           [--metadata <key=value>]
                           <name> <vaule>

Updates a setting.

Arguments

Required:

<name>               name of the setting
<value>              Value of the setting

Optional:

--description <description>
                      Optional description. (Default=None)
--category <category>
                      Optional category. (Default=None)
--type <type>         Optional type of setting. (Default=None)
--is-public {True,False}
                      Make setting accessible to the public.
--is-hidden {True,False}
                      Make setting hidden.
--metadata <key=value>
                      Specify a key value pairs to include in the settings
                      metadata Specify option multiple times to include multiple keys. key=value
4.4.2.9.5. setting-delete

Usage

workloadmgr setting-delete <setting_name>

Remove a setting.

Arguments

<setting_name>  name of setting to delete

4.5. Sample restore.json

{'type': 'openstack',
 'openstack': {
    'instances':
        [
           {
             'id': 'ccf24cd7-43f8-4d8f-8768-227b995cd448', # identifies the instance
             'name': 'restored', # new name for the new instance
             'include': True,    # False if you want to exclude this instance from
             'power': {          # the order in which we need to poweron the vm
                 'sequence': 1,
             },
             # if flavor exists, reuse the flavor or
             # create a new flavor
             'flavor': {         # flavor of the vm. If restore flow finds a flavor that
                 'vcpus': 1,     # matches these attributes, it uses the flavor id.
                 'ram': 2048,       # otherwise it creates new flavor
                 'disk': 10,
                 'ephemeral': True,
                 'swap': 8,
             },
             # First try attaching to the following network.
             # Each network is keyed of the mac address of the original VM.
             # if there is no mention of mac address, then it tries to
             # restore the VM to the original network. Otherwise it
             # tries to find the new network from the networks_mapping
             # stanza. If it can't find a network, restore fails
             'nics': [
             ],
           },
           {
             'id': '1e37e409-dffd-47b1-b9e3-be5806c81e88', # identifies the instance
             'name': 'restored', # new name for the new instance
             'include': True,    # False if you want to exclude this instance from
             'power': {          # the order in which we need to poweron the vm
                 'sequence': 1,
             },
             # if flavor exists, reuse the flavor or
             # create a new flavor
             'flavor': {         # flavor of the vm. If restore flow finds a flavor that
                 'vcpus': 1,     # matches these attributes, it uses the flavor id.
                 'ram': 2048,       # otherwise it creates new flavor
                 'disk': 10,
                 'ephemeral': True,
                 'swap': 8,
             },
             # First try attaching to the following network.
             # Each network is keyed of the mac address of the original VM.
             # if there is no mention of mac address, then it tries to
             # restore the VM to the original network. Otherwise it
             # tries to find the new network from the networks_mapping
             # stanza. If it can't find a network, restore fails
             'nics': [
             ],
           },
           {
             'id': '54ae5237-e2ea-4d03-855c-f7c7ec1cda13', # identifies the instance
             'name': 'restored', # new name for the new instance
             'include': True,    # False if you want to exclude this instance from
             'power': {          # the order in which we need to poweron the vm
                 'sequence': 1,
             },
             # if flavor exists, reuse the flavor or
             # create a new flavor
             'flavor': {         # flavor of the vm. If restore flow finds a flavor that
                 'vcpus': 1,     # matches these attributes, it uses the flavor id.
                 'ram': 2048,       # otherwise it creates new flavor
                 'disk': 10,
                 'ephemeral': True,
                 'swap': 8,
             },
             # First try attaching to the following network.
             # Each network is keyed of the mac address of the original VM.
             # if there is no mention of mac address, then it tries to
             # restore the VM to the original network. Otherwise it
             # tries to find the new network from the networks_mapping
             # stanza. If it can't find a network, restore fails
             'nics': [
             ],
           },
        ],
    'networks_mapping': {
        # We only need private networking
        # workload manager need not do anything mappings to
        # router and perhaps to mapping to public networking
        # if the mapping is not found, we fail the restore.
        'private': [
        ],
      }
    }
}