Workloads

List Workloads

GET https://$(tvm_address):8780/v1/$(tenant_id)/workloads

Provides the list of all workloads for the given tenant/project id

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Tenant/Project to fetch the workloads from

Query Parameters

NameTypeDescription

nfs_share

string

lists workloads located on a specific nfs-share

all_workloads

boolean

admin role required - True lists workloads of all tenants/projects

Headers

NameTypeDescription

X-Auth-Project-Id

string

project to run the authentication against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Thu, 29 Oct 2020 14:55:40 GMT
Content-Type: application/json
Content-Length: 3480
Connection: keep-alive
X-Compute-Request-Id: req-a2e49b7e-ce0f-4dcb-9e61-c5a4756d9948

{
   "workloads":[
      {
         "project_id":"4dfe98a43bfa404785a812020066b4d6",
         "user_id":"adfa32d7746a4341b27377d6f7c61adb",
         "id":"8ee7a61d-a051-44a7-b633-b495e6f8fc1d",
         "name":"worklaod1",
         "snapshots_info":"",
         "description":"no-description",
         "workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
         "status":"available",
         "created_at":"2020-10-26T12:07:01.000000",
         "updated_at":"2020-10-29T12:22:26.000000",
         "scheduler_trust":null,
         "links":[
            {
               "rel":"self",
               "href":"http://wlm_backend/v1/4dfe98a43bfa404785a812020066b4d6/workloads/8ee7a61d-a051-44a7-b633-b495e6f8fc1d"
            },
            {
               "rel":"bookmark",
               "href":"http://wlm_backend/4dfe98a43bfa404785a812020066b4d6/workloads/8ee7a61d-a051-44a7-b633-b495e6f8fc1d"
            }
         ]
      },
      {
         "project_id":"4dfe98a43bfa404785a812020066b4d6",
         "user_id":"adfa32d7746a4341b27377d6f7c61adb",
         "id":"a90d002a-85e4-44d1-96ac-7ffc5d0a5a84",
         "name":"workload2",
         "snapshots_info":"",
         "description":"no-description",
         "workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
         "status":"available",
         "created_at":"2020-10-20T09:51:15.000000",
         "updated_at":"2020-10-29T10:03:33.000000",
         "scheduler_trust":null,
         "links":[
            {
               "rel":"self",
               "href":"http://wlm_backend/v1/4dfe98a43bfa404785a812020066b4d6/workloads/a90d002a-85e4-44d1-96ac-7ffc5d0a5a84"
            },
            {
               "rel":"bookmark",
               "href":"http://wlm_backend/4dfe98a43bfa404785a812020066b4d6/workloads/a90d002a-85e4-44d1-96ac-7ffc5d0a5a84"
            }
         ]
      }
   ]
}

Create Workload

POST https://$(tvm_address):8780/v1/$(tenant_id)/workloads

Creates a workload in the provided Tenant/Project with the given details.

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Tenant/Project to create the workload in

Headers

NameTypeDescription

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Thu, 29 Oct 2020 15:42:02 GMT
Content-Type: application/json
Content-Length: 703
Connection: keep-alive
X-Compute-Request-Id: req-443b9dea-36e6-4721-a11b-4dce3c651ede

{
   "workload":{
      "project_id":"c76b3355a164498aa95ddbc960adc238",
      "user_id":"ccddc7e7a015487fa02920f4d4979779",
      "id":"c4e3aeeb-7d87-4c49-99ed-677e51ba715e",
      "name":"API created",
      "snapshots_info":"",
      "description":"API description",
      "workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
      "status":"creating",
      "created_at":"2020-10-29T15:42:01.000000",
      "updated_at":"2020-10-29T15:42:01.000000",
      "scheduler_trust":null,
      "links":[
         {
            "rel":"self",
            "href":"http://wlm_backend/v1/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
         },
         {
            "rel":"bookmark",
            "href":"http://wlm_backend/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
         }
      ]
   }
}

Body format

Workload create requires a Body in json format, to provide the requested information.

Using a policy-id will pull the following information from the policy. Values provided in the Body will be overwritten with the values from the Policy.

retention_policy_type
retention_policy_value
interval
{
   "workload":{
      "name":"<name of the Workload>",
      "description":"<description of workload>",
      "workload_type_id":"<ID of the chosen Workload Type",
      "source_platform":"openstack",
      "instances":[
         {
            "instance-id":"<Instance ID>"
         },
         {
            "instance-id":"<Instance ID>"
         }
      ],
      "jobschedule":{
         "retention_policy_type":"<'Number of Snapshots to Keep'/'Number of days to retain Snapshots'>",
         "retention_policy_value":"<Integer>"
         "timezone":"<timezone>",
         "start_date":"<Date format: MM/DD/YYYY>"
         "end_date":"<Date format MM/DD/YYYY>",
         "start_time":"<Time format: HH:MM AM/PM>",
         "interval":"<Format: Integer hr",
         "enabled":"<True/False>"
      },
      "metadata":{
         <key>:<value>,
         "policy_id":"<policy_id>"
      }
   }
}

Show Workload

GET https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>

Shows all details of a specified workload

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Project/Tenant where to find the Workload

workload_id

string

ID of the Workload to show

Headers

NameTypeDescription

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 12:08:42 GMT
Content-Type: application/json
Content-Length: 1536
Connection: keep-alive
X-Compute-Request-Id: req-afb76abb-aa33-427e-8219-04fc2b91bce0

{
   "workload":{
      "created_at":"2020-10-29T15:42:01.000000",
      "updated_at":"2020-10-29T15:42:18.000000",
      "id":"c4e3aeeb-7d87-4c49-99ed-677e51ba715e",
      "user_id":"ccddc7e7a015487fa02920f4d4979779",
      "project_id":"c76b3355a164498aa95ddbc960adc238",
      "availability_zone":"nova",
      "workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
      "name":"API created",
      "description":"API description",
      "interval":null,
      "storage_usage":{
         "usage":0,
         "full":{
            "snap_count":0,
            "usage":0
         },
         "incremental":{
            "snap_count":0,
            "usage":0
         }
      },
      "instances":[
         {
            "id":"08dab61c-6efd-44d3-a9ed-8e789d338c1b",
            "name":"cirros-4",
            "metadata":{
               
            }
         },
         {
            "id":"7c1bb5d2-aa5a-44f7-abcd-2d76b819b4c8",
            "name":"cirros-3",
            "metadata":{
               
            }
         }
      ],
      "metadata":{
         "hostnames":"[]",
         "meta":"data",
         "policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
         "preferredgroup":"[]",
         "workload_approx_backup_size":"6"
      },
      "jobschedule":{
         "retention_policy_type":"Number of Snapshots to Keep",
         "end_date":"15/27/2020",
         "start_time":"3:00 PM",
         "interval":"5",
         "enabled":false,
         "retention_policy_value":"10",
         "timezone":"UTC+2",
         "start_date":"10/27/2020",
         "fullbackup_interval":"-1",
         "appliance_timezone":"UTC",
         "global_jobscheduler":true
      },
      "status":"available",
      "error_msg":null,
      "links":[
         {
            "rel":"self",
            "href":"http://wlm_backend/v1/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
         },
         {
            "rel":"bookmark",
            "href":"http://wlm_backend/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
         }
      ],
      "scheduler_trust":null
   }
}

Modify Workload

PUT https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>

Modifies a workload in the provided Tenant/Project with the given details.

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Tenant/Project where to find the workload in

workload_id

string

ID of the Workload to modify

Headers

NameTypeDescription

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 12:31:42 GMT
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
X-Compute-Request-Id: req-674a5d71-4aeb-4f99-90ce-7e8d3158d137

Body format

Workload modify requires a Body in json format, to provide the information about the values to modify.

All values in the body are optional.

Using a policy-id will pull the following information from the policy. Values provided in the Body will be overwritten with the values from the Policy.

retention_policy_type
retention_policy_value
interval
{
   "workload":{
      "name":"<name>",
      "description":"<description>"
      "instances":[
         {
            "instance-id":"<instance_id>"
         },
         {
            "instance-id":"<instance_id>"
         }
      ],
      "jobschedule":{
         "retention_policy_type":"<'Number of Snapshots to Keep'/'Number of days to retain Snapshots'>",
         "retention_policy_value":"<Integer>",
         "timezone":"<timezone>",
         "start_time":"<HH:MM AM/PM>",
         "end_date":"<MM/DD/YYYY>",
         "interval":"<Integer hr>",
         "enabled":"<True/False>"
      },
      "metadata":{
         "meta":"data",
         "policy_id":"<policy_id>"
      },
   }
}

Delete Workload

DELETE https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>

Deletes the specified Workload.

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Tenant where to find the Workload in

workload_id

string

ID of the Workload to delete

Query Parameters

NameTypeDescription

database_only

boolean

True leaves the Workload data on the Backup Target

Headers

NameTypeDescription

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication Token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 13:31:00 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive

Unlock Workload

POST https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>/unlock

Unlocks the specified Workload

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Tenant where to find the Workload in

workload_id

string

ID of the Workload to unlock

Headers

NameTypeDescription

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication Token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 13:41:55 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive

Reset Workload

POST https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>/reset

Resets the defined workload

Path Parameters

NameTypeDescription

tvm_address

string

IP or FQDN of Trilio Service

tenant_id

string

ID of the Tenant where to find the Workload in

workload_id

string

ID of the Workload to reset

Headers

NameTypeDescription

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication Token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 13:52:30 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive

Last updated