==================================================== Block Storage API v2 StarlingX extensions ==================================================== StarlingX extensions to the OpenStack Block Storage API such as backup status and export/import actions for volumes and snapshots. The typical port used for the Block Storage REST API is 8776. However, proper technique would be to look up the cinderv2 service endpoint in keystone. ----------- Extensions ----------- The Extensions entity lists all available extensions ********************** Lists all extensions ********************** .. rest_method:: GET /v2/{tenant_id}/extensions **Normal response codes** 200 **Error response codes** computeFault (400, 500, ...), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404) **Request parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "tenant_id", "URI", "csapi:UUID", "The ID for the tenant or account in a multi-tenancy cloud." **Response parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "namespace (Optional)", "plain", "xsd:string", "Indicates namespace of the extension." "name (Optional)", "plain", "xsd:string", "Indicates name of the extension." "updated (Optional)", "plain", "xsd:string", "Indicates updated time of the extension." "description (Optional)", "plain", "xsd:string", "Indicates description of the extension." "alias (Optional)", "plain", "xsd:string", "Indicates alias of the extension." "links (Optional)", "plain", "xsd:list", "A list of links for the extension." :: { "extensions" : [ ... { "namespace" : "http://docs.windriver.com/volume/ext/wrs-snapshot/api/v1.0", "name" : "WrsSnapshotExportAction", "updated" : "2014-08-16T00:00:00+00:00", "description" : "Enable snapshot export to file", "alias" : "wrs-snapshot", "links" : [] }, { "namespace" : "http://docs.windriver.com/volume/ext/wrs-volume/api/v1.0", "name" : "WrsVolumeExport", "updated" : "2014-08-11T00:00:00+00:00", "description" : "Enable volume export/import", "alias" : "wrs-volume", "links" : [] }, ... ] } This operation does not accept a request body. ********************************************** Gets information about a specified extension ********************************************** .. rest_method:: GET /v2/{tenant_id}/extensions/{extension_alias} **Normal response codes** 200 **Error response codes** computeFault (400, 500, ...), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404) **Request parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "tenant_id", "URI", "csapi:UUID", "The ID for the tenant or account in a multi-tenancy cloud." "extension_alias", "URI", "xsd:string", "The alias for the extension to list." **Response parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "namespace (Optional)", "plain", "xsd:string", "Indicates namespace of the extension." "name (Optional)", "plain", "xsd:string", "Indicates name of the extension." "updated (Optional)", "plain", "xsd:string", "Indicates updated time of the extension." "description (Optional)", "plain", "xsd:string", "Indicates description of the extension." "alias (Optional)", "plain", "xsd:string", "Indicates alias of the extension." "links (Optional)", "plain", "xsd:list", "A list of links for the extension." :: { "extension" : { "namespace" : "http://docs.windriver.com/volume/ext/wrs-volume/api/v1.0", "name" : "WrsVolumeExport", "updated" : "2014-08-11T00:00:00+00:00", "description" : "Enable volume export/import", "alias" : "wrs-volume", "links" : [] } } OR { "extension" : { "namespace" : "http://docs.windriver.com/volume/ext/wrs-snapshot/api/v1.0", "name" : "WrsSnapshotExportAction", "updated" : "2014-08-16T00:00:00+00:00", "description" : "Enable snapshot export to file", "alias" : "wrs-snapshot", "links" : [] } } This operation does not accept a request body. -------- Volumes -------- StarlingX extensions include export and import actions for performing backup and restores of volumes, and a backup status attribute to indicate the status of the new actions. ************************************** Get information about system volumes ************************************** .. rest_method:: GET /v2/{tenant_id}/volumes/detail Preconditions - The specified volume must exist in all case. **Normal response codes** 200 **Request parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "tenant_id", "URI", "csapi:UUID", "The ID for the tenant or account in a multi-tenancy cloud." **Response parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "wrs-volume:backup_status", "plain", "xsd:string", "Indicates backup status." :: { "volumes" : [ { "wrs-volume:backup_status" : "Export completed at 2015-02-27 16:35:53.545339", "volume_type" : "None", "status" : "available", "size" : 1, "created_at" : "2015-02-27T16:26:08.164607", "id" : "b7db512f-463e-4720-8fbd-154c0f2bc2ae", "metadata" : {}, "attachments" : [], "os-volume-replication:driver_data" : null, "os-vol-mig-status-attr:migstat" : null, "display_name" : null, "availability_zone" : "nova", "display_description" : null, "encrypted" : false, "os-vol-mig-status-attr:name_id" : null, "os-vol-host-attr:host" : "controller@lvm#lvm", "os-volume-replication:extended_status" : null, "snapshot_id" : null, "os-vol-tenant-attr:tenant_id" : "e0741109067649a8899936e9fefda95b", "bootable" : "false", "source_volid" : null }, { "wrs-volume:backup_status" : "Import completed at 2015-02-27 15:04:29.135579", "volume_type" : "None", "status" : "available", "size" : 1, "created_at" : "2015-02-27T14:04:34.763953", "id" : "27080551-9d88-4cf0-aa85-c1392dbf38f4", "metadata" : {}, "attachments" : [], "os-volume-replication:driver_data" : null, "os-vol-mig-status-attr:migstat" : null, "display_name" : null, "availability_zone" : "nova", "display_description" : null, "encrypted" : false, "os-vol-mig-status-attr:name_id" : null, "os-vol-host-attr:host" : "controller@lvm#lvm", "os-volume-replication:extended_status" : null, "snapshot_id" : null, "os-vol-tenant-attr:tenant_id" : "e0741109067649a8899936e9fefda95b", "bootable" : "false", "source_volid" : null }, { "wrs-volume:backup_status" : "Snapshot export completed at 2015-02-27 20:57:29.323714", "volume_type" : "None", "status" : "available", "size" : 1, "created_at" : "2015-02-27T13:44:55.317995", "id" : "2c4f094b-f6d8-4ff6-800e-e5998cb4d6fa", "metadata" : {}, "attachments" : [], "os-volume-replication:driver_data" : null, "os-vol-mig-status-attr:migstat" : null, "display_name" : null, "availability_zone" : "nova", "display_description" : null, "encrypted" : false, "os-vol-mig-status-attr:name_id" : null, "os-vol-host-attr:host" : "controller@lvm#lvm", "os-volume-replication:extended_status" : null, "snapshot_id" : null, "os-vol-tenant-attr:tenant_id" : "e0741109067649a8899936e9fefda95b", "bootable" : "false", "source_volid" : null } ] } ****************************************** Get information about a specified volume ****************************************** .. rest_method:: GET /v2/{tenant_id}/volumes/{volume_id} Preconditions - The specified volume must exist in all case. **Normal response codes** 200 **Request parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "tenant_id", "URI", "csapi:UUID", "The ID for the tenant or account in a multi-tenancy cloud." "volume_id", "URI", "csapi:UUID", "The ID for the volume to list." **Response parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "wrs-volume:backup_status", "plain", "xsd:string", "Indicates backup status." :: { "volumes" : [ { "wrs-volume:backup_status" : "Import completed at 2015-02-27 15:04:29.135579", "volume_type" : "None", "status" : "available", "size" : 1, "created_at" : "2015-02-27T14:04:34.763953", "id" : "27080551-9d88-4cf0-aa85-c1392dbf38f4", "metadata" : {}, "attachments" : [], "os-volume-replication:driver_data" : null, "os-vol-mig-status-attr:migstat" : null, "display_name" : null, "availability_zone" : "nova", "display_description" : null, "encrypted" : false, "os-vol-mig-status-attr:name_id" : null, "os-vol-host-attr:host" : "controller@lvm#lvm", "os-volume-replication:extended_status" : null, "snapshot_id" : null, "os-vol-tenant-attr:tenant_id" : "e0741109067649a8899936e9fefda95b", "bootable" : "false", "source_volid" : null }, ] } ****************************************************************** Executes the specified action or command on the specified volume ****************************************************************** .. rest_method:: POST /v2/{tenant_id}/volumes/{volume_id}/action Preconditions - The specified volume must exist in all case. **Normal response codes** 200 **Request parameters** .. csv-table:: :header: "Parameter", "Style", "Type", "Description" :widths: 20, 20, 20, 60 "tenant_id", "URI", "csapi:UUID", "The ID for the tenant or account in a multi-tenancy cloud." "volume_id", "URI", "csapi:UUID", "The ID for the volume to list." "wrs-volume:os-volume_export", "plain", "xsd:string", "Export volume to a file" "wrs-volume:os-volume_import", "plain", "xsd:string", "Import a volume from a file