From c5c5c009ffb5b8de42a45a1d78de04d99cc59f9e Mon Sep 17 00:00:00 2001 From: whoami-rajat Date: Mon, 26 Nov 2018 17:56:18 +0530 Subject: [PATCH] Automate generation of API versions api-ref samples This patch adds Tests for the following : 1) API versions 2) API extensions Change-Id: Ieaa1e2768c091b93c7afcbf04ec4a181cb021ec5 Partially-Implements: blueprint generating-sample-files --- api-ref/source/v3/api-versions.inc | 2 +- .../extensions/extensions-list-response.json | 221 ++++++++++++++++++ .../{ => versions}/version-show-response.json | 10 +- .../samples/versions/versions-response.json | 52 +++++ .../encryption-type-create-request.json | 0 .../encryption-type-create-response.json | 0 .../encryption-type-show-response.json | 0 ...ion-type-specific-specs-show-response.json | 0 .../encryption-type-update-request.json | 0 .../encryption-type-update-response.json | 0 ...me-type-all-extra-specs-show-response.json | 0 .../volume-type-create-request.json | 0 .../volume-type-create-response.json | 0 .../volume-type-default-response.json | 0 ...ype-extra-specs-create-update-request.json | 0 ...pe-extra-specs-create-update-response.json | 0 .../volume-type-show-response.json | 0 ...pe-specific-extra-specs-show-response.json | 0 ...e-specific-extra-specs-update-request.json | 0 ...-specific-extra-specs-update-response.json | 0 .../volume-type-update-request.json | 0 .../volume-types-list-response.json | 0 api-ref/source/v3/volumes-v3-extensions.inc | 2 +- api-ref/source/v3/volumes-v3-types.inc | 38 +-- api-ref/source/v3/volumes-v3-versions.inc | 2 +- cinder/tests/functional/api/client.py | 7 +- .../extensions-list-response.json.tpl | 221 ++++++++++++++++++ .../versions/version-show-response.json.tpl | 28 +++ .../versions/versions-response.json.tpl | 12 +- .../encryption-type-create-request.json.tpl | 0 .../encryption-type-create-response.json.tpl | 0 .../encryption-type-show-response.json.tpl | 0 ...type-specific-specs-show-response.json.tpl | 0 .../encryption-type-update-request.json.tpl | 0 .../encryption-type-update-response.json.tpl | 0 ...ype-all-extra-specs-show-response.json.tpl | 0 .../volume-type-create-request.json.tpl | 0 .../volume-type-create-response.json.tpl | 0 .../volume-type-default-response.json.tpl | 0 ...extra-specs-create-update-request.json.tpl | 0 ...xtra-specs-create-update-response.json.tpl | 0 .../volume-type-show-response.json.tpl | 0 ...pecific-extra-specs-show-response.json.tpl | 0 .../volume-types-list-response.json.tpl | 0 .../api_sample_tests/test_extensions.py | 29 +++ .../api_sample_tests/test_versions.py | 35 +++ .../api_sample_tests/test_volume_types.py | 2 +- .../tests/functional/api_samples_test_base.py | 8 +- 48 files changed, 632 insertions(+), 37 deletions(-) create mode 100644 api-ref/source/v3/samples/extensions/extensions-list-response.json rename api-ref/source/v3/samples/{ => versions}/version-show-response.json (80%) create mode 100644 api-ref/source/v3/samples/versions/versions-response.json rename api-ref/source/v3/samples/{ => volume_type}/encryption-type-create-request.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/encryption-type-create-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/encryption-type-show-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/encryption-type-specific-specs-show-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/encryption-type-update-request.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/encryption-type-update-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-all-extra-specs-show-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-create-request.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-create-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-default-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-extra-specs-create-update-request.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-extra-specs-create-update-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-show-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-specific-extra-specs-show-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-specific-extra-specs-update-request.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-specific-extra-specs-update-response.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-type-update-request.json (100%) rename api-ref/source/v3/samples/{ => volume_type}/volume-types-list-response.json (100%) create mode 100644 cinder/tests/functional/api_sample_tests/samples/extensions/extensions-list-response.json.tpl create mode 100644 cinder/tests/functional/api_sample_tests/samples/versions/version-show-response.json.tpl rename api-ref/source/v3/samples/versions-response.json => cinder/tests/functional/api_sample_tests/samples/versions/versions-response.json.tpl (80%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/encryption-type-create-request.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/encryption-type-create-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/encryption-type-show-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/encryption-type-specific-specs-show-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/encryption-type-update-request.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/encryption-type-update-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-all-extra-specs-show-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-create-request.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-create-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-default-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-extra-specs-create-update-request.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-extra-specs-create-update-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-show-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-type-specific-extra-specs-show-response.json.tpl (100%) rename cinder/tests/functional/api_sample_tests/samples/{ => volume_type}/volume-types-list-response.json.tpl (100%) create mode 100644 cinder/tests/functional/api_sample_tests/test_extensions.py create mode 100644 cinder/tests/functional/api_sample_tests/test_versions.py diff --git a/api-ref/source/v3/api-versions.inc b/api-ref/source/v3/api-versions.inc index 07dea00f90e..50c3dfc6eb4 100644 --- a/api-ref/source/v3/api-versions.inc +++ b/api-ref/source/v3/api-versions.inc @@ -37,5 +37,5 @@ Response **Example List Api Versions: JSON request** -.. literalinclude:: ./samples/versions-response.json +.. literalinclude:: ./samples/versions/versions-response.json :language: javascript diff --git a/api-ref/source/v3/samples/extensions/extensions-list-response.json b/api-ref/source/v3/samples/extensions/extensions-list-response.json new file mode 100644 index 00000000000..779230793ff --- /dev/null +++ b/api-ref/source/v3/samples/extensions/extensions-list-response.json @@ -0,0 +1,221 @@ +{ + "extensions": [ + { + "alias": "os-hosts", + "description": "Admin-only host administration.", + "links": [], + "name": "Hosts", + "updated": "2011-06-29T00:00:00+00:00" + }, + { + "alias": "os-vol-tenant-attr", + "description": "Expose the internal project_id as an attribute of a volume.", + "links": [], + "name": "VolumeTenantAttribute", + "updated": "2011-11-03T00:00:00+00:00" + }, + { + "alias": "os-quota-sets", + "description": "Quota management support.", + "links": [], + "name": "Quotas", + "updated": "2011-08-08T00:00:00+00:00" + }, + { + "alias": "os-availability-zone", + "description": "Describe Availability Zones.", + "links": [], + "name": "AvailabilityZones", + "updated": "2013-06-27T00:00:00+00:00" + }, + { + "alias": "os-volume-encryption-metadata", + "description": "Volume encryption metadata retrieval support.", + "links": [], + "name": "VolumeEncryptionMetadata", + "updated": "2013-07-10T00:00:00+00:00" + }, + { + "alias": "backups", + "description": "Backups support.", + "links": [], + "name": "Backups", + "updated": "2012-12-12T00:00:00+00:00" + }, + { + "alias": "os-snapshot-actions", + "description": "Enable snapshot manager actions.", + "links": [], + "name": "SnapshotActions", + "updated": "2013-07-16T00:00:00+00:00" + }, + { + "alias": "os-volume-actions", + "description": "Enable volume actions.", + "links": [], + "name": "VolumeActions", + "updated": "2012-05-31T00:00:00+00:00" + }, + { + "alias": "os-snapshot-manage", + "description": "Allows existing backend storage to be 'managed' by Cinder.", + "links": [], + "name": "SnapshotManage", + "updated": "2014-12-31T00:00:00+00:00" + }, + { + "alias": "os-volume-unmanage", + "description": "Enable volume unmanage operation.", + "links": [], + "name": "VolumeUnmanage", + "updated": "2012-05-31T00:00:00+00:00" + }, + { + "alias": "consistencygroups", + "description": "consistency groups support.", + "links": [], + "name": "Consistencygroups", + "updated": "2014-08-18T00:00:00+00:00" + }, + { + "alias": "os-vol-host-attr", + "description": "Expose host as an attribute of a volume.", + "links": [], + "name": "VolumeHostAttribute", + "updated": "2011-11-03T00:00:00+00:00" + }, + { + "alias": "encryption", + "description": "Encryption support for volume types.", + "links": [], + "name": "VolumeTypeEncryption", + "updated": "2013-07-01T00:00:00+00:00" + }, + { + "alias": "os-vol-image-meta", + "description": "Show image metadata associated with the volume.", + "links": [], + "name": "VolumeImageMetadata", + "updated": "2012-12-07T00:00:00+00:00" + }, + { + "alias": "os-types-manage", + "description": "Types manage support.", + "links": [], + "name": "TypesManage", + "updated": "2011-08-24T00:00:00+00:00" + }, + { + "alias": "capabilities", + "description": "Capabilities support.", + "links": [], + "name": "Capabilities", + "updated": "2015-08-31T00:00:00+00:00" + }, + { + "alias": "cgsnapshots", + "description": "cgsnapshots support.", + "links": [], + "name": "Cgsnapshots", + "updated": "2014-08-18T00:00:00+00:00" + }, + { + "alias": "os-types-extra-specs", + "description": "Type extra specs support.", + "links": [], + "name": "TypesExtraSpecs", + "updated": "2011-08-24T00:00:00+00:00" + }, + { + "alias": "os-used-limits", + "description": "Provide data on limited resources that are being used.", + "links": [], + "name": "UsedLimits", + "updated": "2013-10-03T00:00:00+00:00" + }, + { + "alias": "os-vol-mig-status-attr", + "description": "Expose migration_status as an attribute of a volume.", + "links": [], + "name": "VolumeMigStatusAttribute", + "updated": "2013-08-08T00:00:00+00:00" + }, + { + "alias": "os-volume-type-access", + "description": "Volume type access support.", + "links": [], + "name": "VolumeTypeAccess", + "updated": "2014-06-26T00:00:00Z" + }, + { + "alias": "os-extended-services", + "description": "Extended services support.", + "links": [], + "name": "ExtendedServices", + "updated": "2014-01-10T00:00:00-00:00" + }, + { + "alias": "os-extended-snapshot-attributes", + "description": "Extended SnapshotAttributes support.", + "links": [], + "name": "ExtendedSnapshotAttributes", + "updated": "2012-06-19T00:00:00+00:00" + }, + { + "alias": "os-snapshot-unmanage", + "description": "Enable volume unmanage operation.", + "links": [], + "name": "SnapshotUnmanage", + "updated": "2014-12-31T00:00:00+00:00" + }, + { + "alias": "qos-specs", + "description": "QoS specs support.", + "links": [], + "name": "Qos_specs_manage", + "updated": "2013-08-02T00:00:00+00:00" + }, + { + "alias": "os-quota-class-sets", + "description": "Quota classes management support.", + "links": [], + "name": "QuotaClasses", + "updated": "2012-03-12T00:00:00+00:00" + }, + { + "alias": "os-volume-transfer", + "description": "Volume transfer management support.", + "links": [], + "name": "VolumeTransfer", + "updated": "2013-05-29T00:00:00+00:00" + }, + { + "alias": "os-volume-manage", + "description": "Allows existing backend storage to be 'managed' by Cinder.", + "links": [], + "name": "VolumeManage", + "updated": "2014-02-10T00:00:00+00:00" + }, + { + "alias": "os-admin-actions", + "description": "Enable admin actions.", + "links": [], + "name": "AdminActions", + "updated": "2012-08-25T00:00:00+00:00" + }, + { + "alias": "os-services", + "description": "Services support.", + "links": [], + "name": "Services", + "updated": "2012-10-28T00:00:00-00:00" + }, + { + "alias": "scheduler-stats", + "description": "Scheduler stats support.", + "links": [], + "name": "Scheduler_stats", + "updated": "2014-09-07T00:00:00+00:00" + } + ] +} \ No newline at end of file diff --git a/api-ref/source/v3/samples/version-show-response.json b/api-ref/source/v3/samples/versions/version-show-response.json similarity index 80% rename from api-ref/source/v3/samples/version-show-response.json rename to api-ref/source/v3/samples/versions/version-show-response.json index 6f5be9127a7..6d34b3dfc3e 100644 --- a/api-ref/source/v3/samples/version-show-response.json +++ b/api-ref/source/v3/samples/versions/version-show-response.json @@ -9,20 +9,20 @@ "type": "text/html" }, { - "href": "http://23.253.248.171:8776/v3/", + "href": "http://127.0.0.1:44895/v3/", "rel": "self" } ], "media-types": [ { "base": "application/json", - "type": "application/vnd.openstack.volume+json;version=1" + "type": "application/vnd.openstack.volume+json;version=3" } ], "min_version": "3.0", "status": "CURRENT", - "updated": "2016-02-08T12:20:21Z", - "version": "3.0" + "updated": "2018-07-17T00:00:00Z", + "version": "3.56" } ] -} +} \ No newline at end of file diff --git a/api-ref/source/v3/samples/versions/versions-response.json b/api-ref/source/v3/samples/versions/versions-response.json new file mode 100644 index 00000000000..e90c6165c14 --- /dev/null +++ b/api-ref/source/v3/samples/versions/versions-response.json @@ -0,0 +1,52 @@ +{ + "versions": [ + { + "id": "v2.0", + "links": [ + { + "href": "https://docs.openstack.org/", + "rel": "describedby", + "type": "text/html" + }, + { + "href": "http://127.0.0.1:45697/v2/", + "rel": "self" + } + ], + "media-types": [ + { + "base": "application/json", + "type": "application/vnd.openstack.volume+json;version=2" + } + ], + "min_version": "", + "status": "DEPRECATED", + "updated": "2017-02-25T12:00:00Z", + "version": "" + }, + { + "id": "v3.0", + "links": [ + { + "href": "https://docs.openstack.org/", + "rel": "describedby", + "type": "text/html" + }, + { + "href": "http://127.0.0.1:45697/v3/", + "rel": "self" + } + ], + "media-types": [ + { + "base": "application/json", + "type": "application/vnd.openstack.volume+json;version=3" + } + ], + "min_version": "3.0", + "status": "CURRENT", + "updated": "2018-07-17T00:00:00Z", + "version": "3.56" + } + ] +} \ No newline at end of file diff --git a/api-ref/source/v3/samples/encryption-type-create-request.json b/api-ref/source/v3/samples/volume_type/encryption-type-create-request.json similarity index 100% rename from api-ref/source/v3/samples/encryption-type-create-request.json rename to api-ref/source/v3/samples/volume_type/encryption-type-create-request.json diff --git a/api-ref/source/v3/samples/encryption-type-create-response.json b/api-ref/source/v3/samples/volume_type/encryption-type-create-response.json similarity index 100% rename from api-ref/source/v3/samples/encryption-type-create-response.json rename to api-ref/source/v3/samples/volume_type/encryption-type-create-response.json diff --git a/api-ref/source/v3/samples/encryption-type-show-response.json b/api-ref/source/v3/samples/volume_type/encryption-type-show-response.json similarity index 100% rename from api-ref/source/v3/samples/encryption-type-show-response.json rename to api-ref/source/v3/samples/volume_type/encryption-type-show-response.json diff --git a/api-ref/source/v3/samples/encryption-type-specific-specs-show-response.json b/api-ref/source/v3/samples/volume_type/encryption-type-specific-specs-show-response.json similarity index 100% rename from api-ref/source/v3/samples/encryption-type-specific-specs-show-response.json rename to api-ref/source/v3/samples/volume_type/encryption-type-specific-specs-show-response.json diff --git a/api-ref/source/v3/samples/encryption-type-update-request.json b/api-ref/source/v3/samples/volume_type/encryption-type-update-request.json similarity index 100% rename from api-ref/source/v3/samples/encryption-type-update-request.json rename to api-ref/source/v3/samples/volume_type/encryption-type-update-request.json diff --git a/api-ref/source/v3/samples/encryption-type-update-response.json b/api-ref/source/v3/samples/volume_type/encryption-type-update-response.json similarity index 100% rename from api-ref/source/v3/samples/encryption-type-update-response.json rename to api-ref/source/v3/samples/volume_type/encryption-type-update-response.json diff --git a/api-ref/source/v3/samples/volume-type-all-extra-specs-show-response.json b/api-ref/source/v3/samples/volume_type/volume-type-all-extra-specs-show-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-all-extra-specs-show-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-all-extra-specs-show-response.json diff --git a/api-ref/source/v3/samples/volume-type-create-request.json b/api-ref/source/v3/samples/volume_type/volume-type-create-request.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-create-request.json rename to api-ref/source/v3/samples/volume_type/volume-type-create-request.json diff --git a/api-ref/source/v3/samples/volume-type-create-response.json b/api-ref/source/v3/samples/volume_type/volume-type-create-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-create-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-create-response.json diff --git a/api-ref/source/v3/samples/volume-type-default-response.json b/api-ref/source/v3/samples/volume_type/volume-type-default-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-default-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-default-response.json diff --git a/api-ref/source/v3/samples/volume-type-extra-specs-create-update-request.json b/api-ref/source/v3/samples/volume_type/volume-type-extra-specs-create-update-request.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-extra-specs-create-update-request.json rename to api-ref/source/v3/samples/volume_type/volume-type-extra-specs-create-update-request.json diff --git a/api-ref/source/v3/samples/volume-type-extra-specs-create-update-response.json b/api-ref/source/v3/samples/volume_type/volume-type-extra-specs-create-update-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-extra-specs-create-update-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-extra-specs-create-update-response.json diff --git a/api-ref/source/v3/samples/volume-type-show-response.json b/api-ref/source/v3/samples/volume_type/volume-type-show-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-show-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-show-response.json diff --git a/api-ref/source/v3/samples/volume-type-specific-extra-specs-show-response.json b/api-ref/source/v3/samples/volume_type/volume-type-specific-extra-specs-show-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-specific-extra-specs-show-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-specific-extra-specs-show-response.json diff --git a/api-ref/source/v3/samples/volume-type-specific-extra-specs-update-request.json b/api-ref/source/v3/samples/volume_type/volume-type-specific-extra-specs-update-request.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-specific-extra-specs-update-request.json rename to api-ref/source/v3/samples/volume_type/volume-type-specific-extra-specs-update-request.json diff --git a/api-ref/source/v3/samples/volume-type-specific-extra-specs-update-response.json b/api-ref/source/v3/samples/volume_type/volume-type-specific-extra-specs-update-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-specific-extra-specs-update-response.json rename to api-ref/source/v3/samples/volume_type/volume-type-specific-extra-specs-update-response.json diff --git a/api-ref/source/v3/samples/volume-type-update-request.json b/api-ref/source/v3/samples/volume_type/volume-type-update-request.json similarity index 100% rename from api-ref/source/v3/samples/volume-type-update-request.json rename to api-ref/source/v3/samples/volume_type/volume-type-update-request.json diff --git a/api-ref/source/v3/samples/volume-types-list-response.json b/api-ref/source/v3/samples/volume_type/volume-types-list-response.json similarity index 100% rename from api-ref/source/v3/samples/volume-types-list-response.json rename to api-ref/source/v3/samples/volume_type/volume-types-list-response.json diff --git a/api-ref/source/v3/volumes-v3-extensions.inc b/api-ref/source/v3/volumes-v3-extensions.inc index e90e348cea1..b9e9a0370da 100644 --- a/api-ref/source/v3/volumes-v3-extensions.inc +++ b/api-ref/source/v3/volumes-v3-extensions.inc @@ -51,7 +51,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/extensions-list-response.json +.. literalinclude:: ./samples/extensions/extensions-list-response.json :language: javascript diff --git a/api-ref/source/v3/volumes-v3-types.inc b/api-ref/source/v3/volumes-v3-types.inc index faa0b19c80b..7b5dde4f9fd 100644 --- a/api-ref/source/v3/volumes-v3-types.inc +++ b/api-ref/source/v3/volumes-v3-types.inc @@ -47,7 +47,7 @@ Request Request Example --------------- -.. literalinclude:: ./samples/volume-type-update-request.json +.. literalinclude:: ./samples/volume_type/volume-type-update-request.json :language: javascript @@ -66,7 +66,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-type-show-response.json +.. literalinclude:: ./samples/volume_type/volume-type-show-response.json :language: javascript @@ -98,7 +98,7 @@ Request Request Example --------------- -.. literalinclude:: ./samples/volume-type-extra-specs-create-update-request.json +.. literalinclude:: ./samples/volume_type/volume-type-extra-specs-create-update-request.json :language: javascript @@ -113,7 +113,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-type-extra-specs-create-update-response.json +.. literalinclude:: ./samples/volume_type/volume-type-extra-specs-create-update-response.json :language: javascript @@ -151,7 +151,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-type-all-extra-specs-show-response.json +.. literalinclude:: ./samples/volume_type/volume-type-all-extra-specs-show-response.json :language: javascript @@ -182,7 +182,7 @@ Request Response Example ---------------- -.. literalinclude:: ./samples/volume-type-specific-extra-specs-show-response.json +.. literalinclude:: ./samples/volume_type/volume-type-specific-extra-specs-show-response.json :language: javascript @@ -213,14 +213,14 @@ Request Request Example --------------- -.. literalinclude:: ./samples/volume-type-specific-extra-specs-update-request.json +.. literalinclude:: ./samples/volume_type/volume-type-specific-extra-specs-update-request.json :language: javascript Response Example ---------------- -.. literalinclude:: ./samples/volume-type-specific-extra-specs-update-response.json +.. literalinclude:: ./samples/volume_type/volume-type-specific-extra-specs-update-response.json :language: javascript @@ -290,7 +290,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-type-show-response.json +.. literalinclude:: ./samples/volume_type/volume-type-show-response.json :language: javascript @@ -331,7 +331,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-type-default-response.json +.. literalinclude:: ./samples/volume_type/volume-type-default-response.json :language: javascript @@ -404,7 +404,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-types-list-response.json +.. literalinclude:: ./samples/volume_type/volume-types-list-response.json :language: javascript @@ -438,7 +438,7 @@ Request Request Example --------------- -.. literalinclude:: ./samples/volume-type-create-request.json +.. literalinclude:: ./samples/volume_type/volume-type-create-request.json :language: javascript @@ -458,7 +458,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/volume-type-create-response.json +.. literalinclude:: ./samples/volume_type/volume-type-create-response.json :language: javascript @@ -505,7 +505,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/encryption-type-show-response.json +.. literalinclude:: ./samples/volume_type/encryption-type-show-response.json :language: javascript @@ -536,7 +536,7 @@ Request Response Example ---------------- -.. literalinclude:: ./samples/encryption-type-specific-specs-show-response.json +.. literalinclude:: ./samples/volume_type/encryption-type-specific-specs-show-response.json :language: javascript @@ -596,7 +596,7 @@ Request Request Example --------------- -.. literalinclude:: ./samples/encryption-type-create-request.json +.. literalinclude:: ./samples/volume_type/encryption-type-create-request.json :language: javascript @@ -616,7 +616,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/encryption-type-create-response.json +.. literalinclude:: ./samples/volume_type/encryption-type-create-response.json :language: javascript @@ -652,7 +652,7 @@ Request Request Example --------------- -.. literalinclude:: ./samples/encryption-type-update-request.json +.. literalinclude:: ./samples/volume_type/encryption-type-update-request.json :language: javascript @@ -670,5 +670,5 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/encryption-type-update-response.json +.. literalinclude:: ./samples/volume_type/encryption-type-update-response.json :language: javascript diff --git a/api-ref/source/v3/volumes-v3-versions.inc b/api-ref/source/v3/volumes-v3-versions.inc index 2de89584b46..947b8c2852d 100644 --- a/api-ref/source/v3/volumes-v3-versions.inc +++ b/api-ref/source/v3/volumes-v3-versions.inc @@ -42,7 +42,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: ./samples/version-show-response.json +.. literalinclude:: ./samples/versions/version-show-response.json :language: javascript diff --git a/cinder/tests/functional/api/client.py b/cinder/tests/functional/api/client.py index 3bcfab9a9b3..82d793633b6 100644 --- a/cinder/tests/functional/api/client.py +++ b/cinder/tests/functional/api/client.py @@ -124,12 +124,17 @@ class TestOpenStackClient(object): self.project_id = new_project_id self._authenticate(True) - def api_request(self, relative_uri, check_response_status=None, **kwargs): + def api_request(self, relative_uri, check_response_status=None, + strip_version=False, **kwargs): auth_result = self._authenticate() # NOTE(justinsb): httplib 'helpfully' converts headers to lower case base_uri = auth_result['x-server-management-url'] + if strip_version: + # cut out version number and tenant_id + base_uri = '/'.join(base_uri.split('/', 3)[:-1]) + full_uri = '%s/%s' % (base_uri, relative_uri) headers = kwargs.setdefault('headers', {}) diff --git a/cinder/tests/functional/api_sample_tests/samples/extensions/extensions-list-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/extensions/extensions-list-response.json.tpl new file mode 100644 index 00000000000..765954d5ce3 --- /dev/null +++ b/cinder/tests/functional/api_sample_tests/samples/extensions/extensions-list-response.json.tpl @@ -0,0 +1,221 @@ +{ + "extensions": [ + { + "alias": "os-hosts", + "description": "Admin-only host administration.", + "links": [], + "name": "Hosts", + "updated": "%(extension_update)s" + }, + { + "alias": "os-vol-tenant-attr", + "description": "Expose the internal project_id as an attribute of a volume.", + "links": [], + "name": "VolumeTenantAttribute", + "updated": "%(extension_update)s" + }, + { + "alias": "os-quota-sets", + "description": "Quota management support.", + "links": [], + "name": "Quotas", + "updated": "%(extension_update)s" + }, + { + "alias": "os-availability-zone", + "description": "Describe Availability Zones.", + "links": [], + "name": "AvailabilityZones", + "updated": "%(extension_update)s" + }, + { + "alias": "os-volume-encryption-metadata", + "description": "Volume encryption metadata retrieval support.", + "links": [], + "name": "VolumeEncryptionMetadata", + "updated": "%(extension_update)s" + }, + { + "alias": "backups", + "description": "Backups support.", + "links": [], + "name": "Backups", + "updated": "%(extension_update)s" + }, + { + "alias": "os-snapshot-actions", + "description": "Enable snapshot manager actions.", + "links": [], + "name": "SnapshotActions", + "updated": "%(extension_update)s" + }, + { + "alias": "os-volume-actions", + "description": "Enable volume actions.", + "links": [], + "name": "VolumeActions", + "updated": "%(extension_update)s" + }, + { + "alias": "os-snapshot-manage", + "description": "Allows existing backend storage to be 'managed' by Cinder.", + "links": [], + "name": "SnapshotManage", + "updated": "%(extension_update)s" + }, + { + "alias": "os-volume-unmanage", + "description": "Enable volume unmanage operation.", + "links": [], + "name": "VolumeUnmanage", + "updated": "%(extension_update)s" + }, + { + "alias": "consistencygroups", + "description": "consistency groups support.", + "links": [], + "name": "Consistencygroups", + "updated": "%(extension_update)s" + }, + { + "alias": "os-vol-host-attr", + "description": "Expose host as an attribute of a volume.", + "links": [], + "name": "VolumeHostAttribute", + "updated": "%(extension_update)s" + }, + { + "alias": "encryption", + "description": "Encryption support for volume types.", + "links": [], + "name": "VolumeTypeEncryption", + "updated": "%(extension_update)s" + }, + { + "alias": "os-vol-image-meta", + "description": "Show image metadata associated with the volume.", + "links": [], + "name": "VolumeImageMetadata", + "updated": "%(extension_update)s" + }, + { + "alias": "os-types-manage", + "description": "Types manage support.", + "links": [], + "name": "TypesManage", + "updated": "%(extension_update)s" + }, + { + "alias": "capabilities", + "description": "Capabilities support.", + "links": [], + "name": "Capabilities", + "updated": "%(extension_update)s" + }, + { + "alias": "cgsnapshots", + "description": "cgsnapshots support.", + "links": [], + "name": "Cgsnapshots", + "updated": "%(extension_update)s" + }, + { + "alias": "os-types-extra-specs", + "description": "Type extra specs support.", + "links": [], + "name": "TypesExtraSpecs", + "updated": "%(extension_update)s" + }, + { + "alias": "os-used-limits", + "description": "Provide data on limited resources that are being used.", + "links": [], + "name": "UsedLimits", + "updated": "%(extension_update)s" + }, + { + "alias": "os-vol-mig-status-attr", + "description": "Expose migration_status as an attribute of a volume.", + "links": [], + "name": "VolumeMigStatusAttribute", + "updated": "%(extension_update)s" + }, + { + "alias": "os-volume-type-access", + "description": "Volume type access support.", + "links": [], + "name": "VolumeTypeAccess", + "updated": "%(isotime)s" + }, + { + "alias": "os-extended-services", + "description": "Extended services support.", + "links": [], + "name": "ExtendedServices", + "updated": "%(extension_update)s" + }, + { + "alias": "os-extended-snapshot-attributes", + "description": "Extended SnapshotAttributes support.", + "links": [], + "name": "ExtendedSnapshotAttributes", + "updated": "%(extension_update)s" + }, + { + "alias": "os-snapshot-unmanage", + "description": "Enable volume unmanage operation.", + "links": [], + "name": "SnapshotUnmanage", + "updated": "%(extension_update)s" + }, + { + "alias": "qos-specs", + "description": "QoS specs support.", + "links": [], + "name": "Qos_specs_manage", + "updated": "%(extension_update)s" + }, + { + "alias": "os-quota-class-sets", + "description": "Quota classes management support.", + "links": [], + "name": "QuotaClasses", + "updated": "%(extension_update)s" + }, + { + "alias": "os-volume-transfer", + "description": "Volume transfer management support.", + "links": [], + "name": "VolumeTransfer", + "updated": "%(extension_update)s" + }, + { + "alias": "os-volume-manage", + "description": "Allows existing backend storage to be 'managed' by Cinder.", + "links": [], + "name": "VolumeManage", + "updated": "%(extension_update)s" + }, + { + "alias": "os-admin-actions", + "description": "Enable admin actions.", + "links": [], + "name": "AdminActions", + "updated": "%(extension_update)s" + }, + { + "alias": "os-services", + "description": "Services support.", + "links": [], + "name": "Services", + "updated": "%(extension_update)s" + }, + { + "alias": "scheduler-stats", + "description": "Scheduler stats support.", + "links": [], + "name": "Scheduler_stats", + "updated": "%(extension_update)s" + } + ] +} \ No newline at end of file diff --git a/cinder/tests/functional/api_sample_tests/samples/versions/version-show-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/versions/version-show-response.json.tpl new file mode 100644 index 00000000000..7523742a0b5 --- /dev/null +++ b/cinder/tests/functional/api_sample_tests/samples/versions/version-show-response.json.tpl @@ -0,0 +1,28 @@ +{ + "versions": [ + { + "id": "v3.0", + "links": [ + { + "href": "https://docs.openstack.org/", + "rel": "describedby", + "type": "text/html" + }, + { + "href": "%(host)s/v3/", + "rel": "self" + } + ], + "media-types": [ + { + "base": "application/json", + "type": "application/vnd.openstack.volume+json;version=3" + } + ], + "min_version": "3.0", + "status": "CURRENT", + "updated": "%(isotime)s", + "version": "%(max_api_version)s" + } + ] +} diff --git a/api-ref/source/v3/samples/versions-response.json b/cinder/tests/functional/api_sample_tests/samples/versions/versions-response.json.tpl similarity index 80% rename from api-ref/source/v3/samples/versions-response.json rename to cinder/tests/functional/api_sample_tests/samples/versions/versions-response.json.tpl index 321ce241624..686799d99d9 100644 --- a/api-ref/source/v3/samples/versions-response.json +++ b/cinder/tests/functional/api_sample_tests/samples/versions/versions-response.json.tpl @@ -1,8 +1,8 @@ { "versions": [ { - "status": "SUPPORTED", - "updated": "2014-06-28T12:20:21Z", + "status": "DEPRECATED", + "updated": "%(isotime)s", "links": [ { "href": "https://docs.openstack.org/", @@ -10,7 +10,7 @@ "rel": "describedby" }, { - "href": "http://10.0.2.15:8776/v2/", + "href": "%(host)s/v2/", "rel": "self" } ], @@ -26,7 +26,7 @@ }, { "status": "CURRENT", - "updated": "2016-02-08T12:20:21Z", + "updated": "%(isotime)s", "links": [ { "href": "https://docs.openstack.org/", @@ -34,12 +34,12 @@ "rel": "describedby" }, { - "href": "http://10.0.2.15:8776/v3/", + "href": "%(host)s/v3/", "rel": "self" } ], "min_version": "3.0", - "version": "{Current_Max_Version}", + "version": "%(max_api_version)s", "media-types": [ { "base": "application/json", diff --git a/cinder/tests/functional/api_sample_tests/samples/encryption-type-create-request.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-create-request.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/encryption-type-create-request.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-create-request.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/encryption-type-create-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-create-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/encryption-type-create-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-create-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/encryption-type-show-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-show-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/encryption-type-show-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-show-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/encryption-type-specific-specs-show-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-specific-specs-show-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/encryption-type-specific-specs-show-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-specific-specs-show-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/encryption-type-update-request.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-update-request.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/encryption-type-update-request.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-update-request.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/encryption-type-update-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-update-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/encryption-type-update-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/encryption-type-update-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-all-extra-specs-show-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-all-extra-specs-show-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-all-extra-specs-show-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-all-extra-specs-show-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-create-request.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-create-request.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-create-request.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-create-request.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-create-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-create-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-create-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-create-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-default-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-default-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-default-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-default-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-extra-specs-create-update-request.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-extra-specs-create-update-request.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-extra-specs-create-update-request.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-extra-specs-create-update-request.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-extra-specs-create-update-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-extra-specs-create-update-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-extra-specs-create-update-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-extra-specs-create-update-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-show-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-show-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-show-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-show-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-type-specific-extra-specs-show-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-specific-extra-specs-show-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-type-specific-extra-specs-show-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-type-specific-extra-specs-show-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/samples/volume-types-list-response.json.tpl b/cinder/tests/functional/api_sample_tests/samples/volume_type/volume-types-list-response.json.tpl similarity index 100% rename from cinder/tests/functional/api_sample_tests/samples/volume-types-list-response.json.tpl rename to cinder/tests/functional/api_sample_tests/samples/volume_type/volume-types-list-response.json.tpl diff --git a/cinder/tests/functional/api_sample_tests/test_extensions.py b/cinder/tests/functional/api_sample_tests/test_extensions.py new file mode 100644 index 00000000000..f2f2ad894a1 --- /dev/null +++ b/cinder/tests/functional/api_sample_tests/test_extensions.py @@ -0,0 +1,29 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from cinder.api.openstack import api_version_request +from cinder.tests.functional import api_samples_test_base + + +class ExtensionsSampleJsonTest(api_samples_test_base.ApiSampleTestBase): + sample_dir = "extensions" + + def setUp(self): + super(ExtensionsSampleJsonTest, self).setUp() + self.subs = { + 'max_api_version': api_version_request._MAX_API_VERSION} + + def test_extensions(self): + response = self._do_get('extensions') + self._verify_response('extensions-list-response', + self.subs, + response, 200, update_links=False) diff --git a/cinder/tests/functional/api_sample_tests/test_versions.py b/cinder/tests/functional/api_sample_tests/test_versions.py new file mode 100644 index 00000000000..d618907e1f0 --- /dev/null +++ b/cinder/tests/functional/api_sample_tests/test_versions.py @@ -0,0 +1,35 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from cinder.api.openstack import api_version_request +from cinder.tests.functional import api_samples_test_base + + +class VersionsSampleJsonTest(api_samples_test_base.ApiSampleTestBase): + sample_dir = "versions" + + def setUp(self): + super(VersionsSampleJsonTest, self).setUp() + self.subs = { + 'max_api_version': api_version_request._MAX_API_VERSION} + + def test_versions_get_all(self): + response = self.api.api_request('', strip_version=True) + self._verify_response('versions-response', + self.subs, + response, 300, update_links=False) + + def test_versions_get_v3(self): + response = self.api.api_request('v3/', strip_version=True) + self._verify_response('version-show-response', + self.subs, + response, 200, update_links=False) diff --git a/cinder/tests/functional/api_sample_tests/test_volume_types.py b/cinder/tests/functional/api_sample_tests/test_volume_types.py index 36812fbd4d2..51f761c1008 100644 --- a/cinder/tests/functional/api_sample_tests/test_volume_types.py +++ b/cinder/tests/functional/api_sample_tests/test_volume_types.py @@ -19,7 +19,7 @@ CONF = cfg.CONF class VolumeTypesSampleJsonTest(api_samples_test_base.ApiSampleTestBase): - sample_dir = "volumes" + sample_dir = "volume_type" def setUp(self): super(VolumeTypesSampleJsonTest, self).setUp() diff --git a/cinder/tests/functional/api_samples_test_base.py b/cinder/tests/functional/api_samples_test_base.py index cf613748517..14bc070e323 100644 --- a/cinder/tests/functional/api_samples_test_base.py +++ b/cinder/tests/functional/api_samples_test_base.py @@ -100,6 +100,7 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase): def _get_sample_path(cls, name, dirname, suffix='', api_version=None): parts = [dirname] parts.append('samples') + parts.append(cls.sample_dir) if api_version: parts.append('v' + api_version) parts.append(name + ".json" + suffix) @@ -400,6 +401,8 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase): text = r'(\\"|[^"])*' isotime_re = '\d{4}-[0,1]\d-[0-3]\dT\d{2}:\d{2}:\d{2}Z' strtime_re = '\d{4}-[0,1]\d-[0-3]\dT\d{2}:\d{2}:\d{2}\.\d{6}' + extension_update = ( + '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}') strtime_url_re = ('\d{4}-[0,1]\d-[0-3]\d' '\+\d{2}\%3A\d{2}\%3A\d{2}\.\d{6}') @@ -415,7 +418,7 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase): '-[0-9a-f]{4}-[0-9a-f]{12}', 'request_id': 'req-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}' '-[0-9a-f]{4}-[0-9a-f]{12}', - 'host': self._get_host(), + 'host': 'https?://[0-9]+(?:\.[0-9]+){3}:[0-9]+', 'host_name': r'\w+', 'glance_host': self._get_glance_host(), 'os-vol-host-attr:host': self.volume.host, @@ -426,7 +429,8 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase): 'volume_endpoint': self._get_volume_endpoint(), 'versioned_volume_endpoint': self._get_versioned_volume_endpoint(), 'name': text, - 'description': text + 'description': text, + 'extension_update': extension_update } def _get_volume_endpoint(self):