Update api-ref location

The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: Ib1a25cc31b6802655f576711dab38ddfcb73bbdb
This commit is contained in:
Andreas Jaeger committed 2019-07-22 19:22:57 +02:00
1 parent 6264ea68c5
commit bf30ae7874
108 files changed
+497 -497

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ class NetworksTest(base.BaseV2ComputeAdminTest):
"""Tests Nova Networks API that usually requires admin privileges.
API docs:
https://developer.openstack.org/api-ref/compute/#networks-os-networks-deprecated
https://docs.openstack.org/api-ref/compute/#networks-os-networks-deprecated
"""
max_microversion = '2.35'
@@ -27,7 +27,7 @@ class VolumesSnapshotsTestJSON(base.BaseV2ComputeTest):
# These tests will fail with a 404 starting from microversion 2.36. For
# more information, see:
# https://developer.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
# https://docs.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
max_microversion = '2.35'
@classmethod
@@ -28,7 +28,7 @@ class VolumesGetTestJSON(base.BaseV2ComputeTest):
# These tests will fail with a 404 starting from microversion 2.36. For
# more information, see:
# https://developer.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
# https://docs.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
max_microversion = '2.35'
@classmethod
@@ -29,7 +29,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
# These tests will fail with a 404 starting from microversion 2.36. For
# more information, see:
# https://developer.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
# https://docs.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
max_microversion = '2.35'
@classmethod
@@ -26,7 +26,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
# These tests will fail with a 404 starting from microversion 2.36. For
# more information, see:
# https://developer.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
# https://docs.openstack.org/api-ref/compute/#volume-extension-os-volumes-os-snapshots-deprecated
max_microversion = '2.35'
@classmethod
@@ -28,7 +28,7 @@ class AgentsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-agent-builds
https://docs.openstack.org/api-ref/compute/#list-agent-builds
"""
url = 'os-agents'
if params:
@@ -43,7 +43,7 @@ class AgentsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-agent-build
https://docs.openstack.org/api-ref/compute/#create-agent-build
"""
post_body = json.dumps({'agent': kwargs})
resp, body = self.post('os-agents', post_body)
@@ -56,7 +56,7 @@ class AgentsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-agent-build
https://docs.openstack.org/api-ref/compute/#delete-agent-build
"""
resp, body = self.delete("os-agents/%s" % agent_id)
self.validate_response(schema.delete_agent, resp, body)
@@ -67,7 +67,7 @@ class AgentsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-agent-build
https://docs.openstack.org/api-ref/compute/#update-agent-build
"""
put_body = json.dumps({'para': kwargs})
resp, body = self.put('os-agents/%s' % agent_id, put_body)
@@ -51,7 +51,7 @@ class AggregatesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-aggregate
https://docs.openstack.org/api-ref/compute/#create-aggregate
"""
post_body = json.dumps({'aggregate': kwargs})
resp, body = self.post('os-aggregates', post_body)
@@ -66,7 +66,7 @@ class AggregatesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-aggregate
https://docs.openstack.org/api-ref/compute/#update-aggregate
"""
put_body = json.dumps({'aggregate': kwargs})
resp, body = self.put('os-aggregates/%s' % aggregate_id, put_body)
@@ -100,7 +100,7 @@ class AggregatesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#add-host
https://docs.openstack.org/api-ref/compute/#add-host
"""
post_body = json.dumps({'add_host': kwargs})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
@@ -115,7 +115,7 @@ class AggregatesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#remove-host
https://docs.openstack.org/api-ref/compute/#remove-host
"""
post_body = json.dumps({'remove_host': kwargs})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
@@ -130,7 +130,7 @@ class AggregatesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-or-update-aggregate-metadata
https://docs.openstack.org/api-ref/compute/#create-or-update-aggregate-metadata
"""
post_body = json.dumps({'set_metadata': kwargs})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
@@ -29,7 +29,7 @@ class BaremetalNodesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-bare-metal-nodes
https://docs.openstack.org/api-ref/compute/#list-bare-metal-nodes
"""
url = 'os-baremetal-nodes'
if params:
@@ -43,7 +43,7 @@ class BaremetalNodesClient(base_compute_client.BaseComputeClient):
"""Show the details of a single baremetal node.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/compute/#show-bare-metal-node-details
https://docs.openstack.org/api-ref/compute/#show-bare-metal-node-details
"""
url = 'os-baremetal-nodes/%s' % baremetal_node_id
resp, body = self.get(url)
@@ -34,7 +34,7 @@ class FixedIPsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#reserve-or-release-a-fixed-ip
https://docs.openstack.org/api-ref/compute/#reserve-or-release-a-fixed-ip
"""
url = "os-fixed-ips/%s/action" % fixed_ip
resp, body = self.post(url, json.dumps(kwargs))
+14 -14
View File
@@ -41,8 +41,8 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-flavors
https://developer.openstack.org/api-ref/compute/#list-flavors-with-details
https://docs.openstack.org/api-ref/compute/#list-flavors
https://docs.openstack.org/api-ref/compute/#list-flavors-with-details
"""
url = 'flavors'
schema = self.get_schema(self.schema_versions_info)
@@ -64,7 +64,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-flavor-details
https://docs.openstack.org/api-ref/compute/#show-flavor-details
"""
resp, body = self.get("flavors/%s" % flavor_id)
body = json.loads(body)
@@ -78,7 +78,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-flavor
https://docs.openstack.org/api-ref/compute/#create-flavor
"""
if 'ephemeral' in kwargs:
kwargs['OS-FLV-EXT-DATA:ephemeral'] = kwargs.pop('ephemeral')
@@ -99,7 +99,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-flavor-description
https://docs.openstack.org/api-ref/compute/#update-flavor-description
"""
put_body = json.dumps({'flavor': kwargs})
resp, body = self.put("flavors/%s" % flavor_id, put_body)
@@ -115,7 +115,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-flavor
https://docs.openstack.org/api-ref/compute/#delete-flavor
"""
resp, body = self.delete("flavors/{0}".format(flavor_id))
self.validate_response(schema.delete_flavor, resp, body)
@@ -141,7 +141,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-extra-specs-for-a-flavor
https://docs.openstack.org/api-ref/compute/#create-extra-specs-for-a-flavor
"""
post_body = json.dumps({'extra_specs': kwargs})
resp, body = self.post('flavors/%s/os-extra_specs' % flavor_id,
@@ -156,7 +156,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-extra-specs-for-a-flavor
https://docs.openstack.org/api-ref/compute/#list-extra-specs-for-a-flavor
"""
resp, body = self.get('flavors/%s/os-extra_specs' % flavor_id)
body = json.loads(body)
@@ -169,7 +169,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-an-extra-spec-for-a-flavor
https://docs.openstack.org/api-ref/compute/#show-an-extra-spec-for-a-flavor
"""
resp, body = self.get('flavors/%s/os-extra_specs/%s' % (flavor_id,
key))
@@ -184,7 +184,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-an-extra-spec-for-a-flavor
https://docs.openstack.org/api-ref/compute/#update-an-extra-spec-for-a-flavor
"""
resp, body = self.put('flavors/%s/os-extra_specs/%s' %
(flavor_id, key), json.dumps(kwargs))
@@ -201,7 +201,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-an-extra-spec-for-a-flavor
https://docs.openstack.org/api-ref/compute/#delete-an-extra-spec-for-a-flavor
"""
resp, body = self.delete('flavors/%s/os-extra_specs/%s' %
(flavor_id, key))
@@ -214,7 +214,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-flavor-access-information-for-given-flavor
https://docs.openstack.org/api-ref/compute/#list-flavor-access-information-for-given-flavor
"""
resp, body = self.get('flavors/%s/os-flavor-access' % flavor_id)
body = json.loads(body)
@@ -227,7 +227,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#add-flavor-access-to-tenant-addtenantaccess-action
https://docs.openstack.org/api-ref/compute/#add-flavor-access-to-tenant-addtenantaccess-action
"""
post_body = {
'addTenantAccess': {
@@ -246,7 +246,7 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#remove-flavor-access-from-tenant-removetenantaccess-action
https://docs.openstack.org/api-ref/compute/#remove-flavor-access-from-tenant-removetenantaccess-action
"""
post_body = {
'removeTenantAccess': {
@@ -29,7 +29,7 @@ class FloatingIPsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-floating-ip-addresses
https://docs.openstack.org/api-ref/compute/#list-floating-ip-addresses
"""
url = 'os-floating-ips'
if params:
@@ -45,7 +45,7 @@ class FloatingIPsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-floating-ip-address-details
https://docs.openstack.org/api-ref/compute/#show-floating-ip-address-details
"""
url = "os-floating-ips/%s" % floating_ip_id
resp, body = self.get(url)
@@ -58,7 +58,7 @@ class FloatingIPsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-allocate-floating-ip-address
https://docs.openstack.org/api-ref/compute/#create-allocate-floating-ip-address
"""
url = 'os-floating-ips'
post_body = json.dumps(kwargs)
@@ -72,7 +72,7 @@ class FloatingIPsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-deallocate-floating-ip-address
https://docs.openstack.org/api-ref/compute/#delete-deallocate-floating-ip-address
"""
url = "os-floating-ips/%s" % floating_ip_id
resp, body = self.delete(url)
+2 -2
View File
@@ -27,7 +27,7 @@ class HostsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-hosts
https://docs.openstack.org/api-ref/compute/#list-hosts
"""
url = 'os-hosts'
@@ -52,7 +52,7 @@ class HostsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-host-status
https://docs.openstack.org/api-ref/compute/#update-host-status
"""
request_body = {
@@ -34,7 +34,7 @@ class ImagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-image-createimage-action
https://docs.openstack.org/api-ref/compute/#create-image-createimage-action
"""
post_body = {'createImage': kwargs}
@@ -52,8 +52,8 @@ class ImagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-images
https://developer.openstack.org/api-ref/compute/#list-images-with-details
https://docs.openstack.org/api-ref/compute/#list-images
https://docs.openstack.org/api-ref/compute/#list-images-with-details
"""
url = 'images'
_schema = schema.list_images
@@ -94,7 +94,7 @@ class ImagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-image-metadata
https://docs.openstack.org/api-ref/compute/#update-image-metadata
"""
post_body = json.dumps({'metadata': meta})
resp, body = self.put('images/%s/metadata' % image_id, post_body)
@@ -107,7 +107,7 @@ class ImagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-image-metadata
https://docs.openstack.org/api-ref/compute/#create-image-metadata
"""
post_body = json.dumps({'metadata': meta})
resp, body = self.post('images/%s/metadata' % image_id, post_body)
@@ -127,7 +127,7 @@ class ImagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-or-update-image-metadata-item
https://docs.openstack.org/api-ref/compute/#create-or-update-image-metadata-item
"""
post_body = json.dumps({'meta': meta})
resp, body = self.put('images/%s/metadata/%s' % (image_id, key),
@@ -33,7 +33,7 @@ class InterfacesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-interface
https://docs.openstack.org/api-ref/compute/#create-interface
"""
post_body = {'interfaceAttachment': kwargs}
post_body = json.dumps(post_body)
@@ -32,7 +32,7 @@ class KeyPairsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-keypairs
https://docs.openstack.org/api-ref/compute/#list-keypairs
"""
url = 'os-keypairs'
if params:
@@ -48,7 +48,7 @@ class KeyPairsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-keypair-details
https://docs.openstack.org/api-ref/compute/#show-keypair-details
"""
url = "os-keypairs/%s" % keypair_name
if params:
@@ -64,7 +64,7 @@ class KeyPairsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-or-import-keypair
https://docs.openstack.org/api-ref/compute/#create-or-import-keypair
"""
post_body = json.dumps({'keypair': kwargs})
resp, body = self.post("os-keypairs", body=post_body)
@@ -78,7 +78,7 @@ class KeyPairsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-keypair
https://docs.openstack.org/api-ref/compute/#delete-keypair
"""
url = "os-keypairs/%s" % keypair_name
if params:
@@ -32,7 +32,7 @@ class MigrationsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-migrations
https://docs.openstack.org/api-ref/compute/#list-migrations
"""
url = 'os-migrations'
@@ -37,7 +37,7 @@ class QuotaClassesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-or-update-quotas-for-quota-class
https://docs.openstack.org/api-ref/compute/#create-or-update-quotas-for-quota-class
"""
post_body = json.dumps({'quota_class_set': kwargs})
@@ -35,8 +35,8 @@ class QuotasClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-a-quota
https://developer.openstack.org/api-ref/compute/#show-the-detail-of-quota
https://docs.openstack.org/api-ref/compute/#show-a-quota
https://docs.openstack.org/api-ref/compute/#show-the-detail-of-quota
"""
params = {}
@@ -59,7 +59,7 @@ class QuotasClient(base_compute_client.BaseComputeClient):
def show_default_quota_set(self, tenant_id):
"""List the default quota set for a tenant.
https://developer.openstack.org/api-ref/compute/#list-default-quotas-for-tenant
https://docs.openstack.org/api-ref/compute/#list-default-quotas-for-tenant
"""
url = 'os-quota-sets/%s/defaults' % tenant_id
@@ -74,7 +74,7 @@ class QuotasClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-quotas
https://docs.openstack.org/api-ref/compute/#update-quotas
"""
post_body = json.dumps({'quota_set': kwargs})
@@ -94,7 +94,7 @@ class QuotasClient(base_compute_client.BaseComputeClient):
def delete_quota_set(self, tenant_id):
"""Delete the tenant's quota set.
https://developer.openstack.org/api-ref/compute/#revert-quotas-to-defaults
https://docs.openstack.org/api-ref/compute/#revert-quotas-to-defaults
"""
resp, body = self.delete('os-quota-sets/%s' % tenant_id)
schema = self.get_schema(self.schema_versions_info)
@@ -28,7 +28,7 @@ class SecurityGroupDefaultRulesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-default-security-group-rule
https://docs.openstack.org/api-ref/compute/#create-default-security-group-rule
"""
post_body = json.dumps({'security_group_default_rule': kwargs})
url = 'os-security-group-default-rules'
@@ -28,7 +28,7 @@ class SecurityGroupRulesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-security-group-rule
https://docs.openstack.org/api-ref/compute/#create-security-group-rule
"""
post_body = json.dumps({'security_group_rule': kwargs})
url = 'os-security-group-rules'
@@ -30,7 +30,7 @@ class SecurityGroupsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-security-groups
https://docs.openstack.org/api-ref/compute/#list-security-groups
"""
url = 'os-security-groups'
@@ -47,7 +47,7 @@ class SecurityGroupsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-security-group-details
https://docs.openstack.org/api-ref/compute/#show-security-group-details
"""
url = "os-security-groups/%s" % security_group_id
resp, body = self.get(url)
@@ -60,7 +60,7 @@ class SecurityGroupsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-security-group
https://docs.openstack.org/api-ref/compute/#create-security-group
"""
post_body = json.dumps({'security_group': kwargs})
resp, body = self.post('os-security-groups', post_body)
@@ -73,7 +73,7 @@ class SecurityGroupsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-security-group
https://docs.openstack.org/api-ref/compute/#update-security-group
"""
post_body = json.dumps({'security_group': kwargs})
resp, body = self.put('os-security-groups/%s' % security_group_id,
@@ -87,7 +87,7 @@ class SecurityGroupsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-security-group
https://docs.openstack.org/api-ref/compute/#delete-security-group
"""
resp, body = self.delete(
'os-security-groups/%s' % security_group_id)
@@ -35,7 +35,7 @@ class ServerGroupsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-server-group
https://docs.openstack.org/api-ref/compute/#create-server-group
"""
post_body = json.dumps({'server_group': kwargs})
resp, body = self.post('os-server-groups', post_body)
+59 -59
View File
@@ -72,7 +72,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/compute/#create-server
https://docs.openstack.org/api-ref/compute/#create-server
:param name: Server name
:param imageRef: Image reference (UUID)
@@ -117,7 +117,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-server
https://docs.openstack.org/api-ref/compute/#update-server
Most parameters except the following are passed to the API without
any changes.
@@ -138,7 +138,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-server-details
https://docs.openstack.org/api-ref/compute/#show-server-details
"""
resp, body = self.get("servers/%s" % server_id)
body = json.loads(body)
@@ -151,7 +151,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-server
https://docs.openstack.org/api-ref/compute/#delete-server
"""
resp, body = self.delete("servers/%s" % server_id)
self.validate_response(schema.delete_server, resp, body)
@@ -162,8 +162,8 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-servers
https://developer.openstack.org/api-ref/compute/#list-servers-detailed
https://docs.openstack.org/api-ref/compute/#list-servers
https://docs.openstack.org/api-ref/compute/#list-servers-detailed
"""
url = 'servers'
@@ -186,7 +186,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-ips
https://docs.openstack.org/api-ref/compute/#list-ips
"""
resp, body = self.get("servers/%s/ips" % server_id)
body = json.loads(body)
@@ -217,7 +217,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-server-back-up-createbackup-action
https://docs.openstack.org/api-ref/compute/#create-server-back-up-createbackup-action
"""
return self.action(server_id, "createBackup", **kwargs)
@@ -226,7 +226,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#change-administrative-password-changepassword-action
https://docs.openstack.org/api-ref/compute/#change-administrative-password-changepassword-action
"""
return self.action(server_id, 'changePassword', **kwargs)
@@ -254,7 +254,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#reboot-server-reboot-action
https://docs.openstack.org/api-ref/compute/#reboot-server-reboot-action
"""
return self.action(server_id, 'reboot', **kwargs)
@@ -263,7 +263,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#rebuild-server-rebuild-action
https://docs.openstack.org/api-ref/compute/#rebuild-server-rebuild-action
Most parameters except the following are passed to the API without
any changes.
@@ -285,7 +285,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#resize-server-resize-action
https://docs.openstack.org/api-ref/compute/#resize-server-resize-action
Most parameters except the following are passed to the API without
any changes.
@@ -301,7 +301,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#confirm-resized-server-confirmresize-action
https://docs.openstack.org/api-ref/compute/#confirm-resized-server-confirmresize-action
"""
return self.action(server_id, 'confirmResize',
schema.server_actions_confirm_resize,
@@ -312,7 +312,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#revert-resized-server-revertresize-action
https://docs.openstack.org/api-ref/compute/#revert-resized-server-revertresize-action
"""
return self.action(server_id, 'revertResize', **kwargs)
@@ -321,7 +321,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-all-metadata
https://docs.openstack.org/api-ref/compute/#list-all-metadata
"""
resp, body = self.get("servers/%s/metadata" % server_id)
body = json.loads(body)
@@ -333,7 +333,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#replace-metadata-items
https://docs.openstack.org/api-ref/compute/#replace-metadata-items
"""
if no_metadata_field:
post_body = ""
@@ -350,7 +350,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-or-update-metadata-items
https://docs.openstack.org/api-ref/compute/#create-or-update-metadata-items
"""
post_body = json.dumps({'metadata': meta})
resp, body = self.post('servers/%s/metadata' % server_id,
@@ -365,7 +365,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-metadata-item-details
https://docs.openstack.org/api-ref/compute/#show-metadata-item-details
"""
resp, body = self.get("servers/%s/metadata/%s" % (server_id, key))
body = json.loads(body)
@@ -378,7 +378,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-or-update-metadata-item
https://docs.openstack.org/api-ref/compute/#create-or-update-metadata-item
"""
post_body = json.dumps({'meta': meta})
resp, body = self.put('servers/%s/metadata/%s' % (server_id, key),
@@ -393,7 +393,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-metadata-item
https://docs.openstack.org/api-ref/compute/#delete-metadata-item
"""
resp, body = self.delete("servers/%s/metadata/%s" %
(server_id, key))
@@ -406,7 +406,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#stop-server-os-stop-action
https://docs.openstack.org/api-ref/compute/#stop-server-os-stop-action
"""
return self.action(server_id, 'os-stop', **kwargs)
@@ -415,7 +415,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#start-server-os-start-action
https://docs.openstack.org/api-ref/compute/#start-server-os-start-action
"""
return self.action(server_id, 'os-start', **kwargs)
@@ -424,7 +424,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#attach-a-volume-to-an-instance
https://docs.openstack.org/api-ref/compute/#attach-a-volume-to-an-instance
"""
post_body = json.dumps({'volumeAttachment': kwargs})
resp, body = self.post('servers/%s/os-volume_attachments' % server_id,
@@ -448,7 +448,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#detach-a-volume-from-an-instance
https://docs.openstack.org/api-ref/compute/#detach-a-volume-from-an-instance
"""
resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
(server_id, volume_id))
@@ -460,7 +460,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-a-detail-of-a-volume-attachment
https://docs.openstack.org/api-ref/compute/#show-a-detail-of-a-volume-attachment
"""
resp, body = self.get('servers/%s/os-volume_attachments/%s' % (
server_id, volume_id))
@@ -474,7 +474,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-volume-attachments-for-an-instance
https://docs.openstack.org/api-ref/compute/#list-volume-attachments-for-an-instance
"""
resp, body = self.get('servers/%s/os-volume_attachments' % (
server_id))
@@ -488,7 +488,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#add-security-group-to-a-server-addsecuritygroup-action
https://docs.openstack.org/api-ref/compute/#add-security-group-to-a-server-addsecuritygroup-action
"""
return self.action(server_id, 'addSecurityGroup', **kwargs)
@@ -497,7 +497,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#remove-security-group-from-a-server-removesecuritygroup-action
https://docs.openstack.org/api-ref/compute/#remove-security-group-from-a-server-removesecuritygroup-action
"""
return self.action(server_id, 'removeSecurityGroup', **kwargs)
@@ -506,7 +506,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#live-migrate-server-os-migratelive-action
https://docs.openstack.org/api-ref/compute/#live-migrate-server-os-migratelive-action
"""
return self.action(server_id, 'os-migrateLive', **kwargs)
@@ -515,7 +515,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#migrate-server-migrate-action
https://docs.openstack.org/api-ref/compute/#migrate-server-migrate-action
"""
return self.action(server_id, 'migrate', **kwargs)
@@ -524,7 +524,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#lock-server-lock-action
https://docs.openstack.org/api-ref/compute/#lock-server-lock-action
"""
return self.action(server_id, 'lock', **kwargs)
@@ -533,7 +533,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#unlock-server-unlock-action
https://docs.openstack.org/api-ref/compute/#unlock-server-unlock-action
"""
return self.action(server_id, 'unlock', **kwargs)
@@ -542,7 +542,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#suspend-server-suspend-action
https://docs.openstack.org/api-ref/compute/#suspend-server-suspend-action
"""
return self.action(server_id, 'suspend', **kwargs)
@@ -551,7 +551,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#resume-suspended-server-resume-action
https://docs.openstack.org/api-ref/compute/#resume-suspended-server-resume-action
"""
return self.action(server_id, 'resume', **kwargs)
@@ -560,7 +560,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#pause-server-pause-action
https://docs.openstack.org/api-ref/compute/#pause-server-pause-action
"""
return self.action(server_id, 'pause', **kwargs)
@@ -569,7 +569,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#unpause-server-unpause-action
https://docs.openstack.org/api-ref/compute/#unpause-server-unpause-action
"""
return self.action(server_id, 'unpause', **kwargs)
@@ -578,7 +578,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#reset-server-state-os-resetstate-action
https://docs.openstack.org/api-ref/compute/#reset-server-state-os-resetstate-action
"""
return self.action(server_id, 'os-resetState', **kwargs)
@@ -587,7 +587,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#shelve-server-shelve-action
https://docs.openstack.org/api-ref/compute/#shelve-server-shelve-action
"""
return self.action(server_id, 'shelve', **kwargs)
@@ -596,7 +596,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#unshelve-restore-shelved-server-unshelve-action
https://docs.openstack.org/api-ref/compute/#unshelve-restore-shelved-server-unshelve-action
"""
return self.action(server_id, 'unshelve', **kwargs)
@@ -605,7 +605,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#shelf-offload-remove-server-shelveoffload-action
https://docs.openstack.org/api-ref/compute/#shelf-offload-remove-server-shelveoffload-action
"""
return self.action(server_id, 'shelveOffload', **kwargs)
@@ -614,7 +614,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-console-output-os-getconsoleoutput-action
https://docs.openstack.org/api-ref/compute/#show-console-output-os-getconsoleoutput-action
"""
return self.action(server_id, 'os-getConsoleOutput',
schema.get_console_output, **kwargs)
@@ -624,7 +624,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-remote-console
https://docs.openstack.org/api-ref/compute/#create-remote-console
"""
param = {
'remote_console': {
@@ -653,7 +653,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#rescue-server-rescue-action
https://docs.openstack.org/api-ref/compute/#rescue-server-rescue-action
"""
if self.enable_instance_password:
rescue_schema = schema.rescue_server_with_admin_pass
@@ -666,7 +666,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#unrescue-server-unrescue-action
https://docs.openstack.org/api-ref/compute/#unrescue-server-unrescue-action
"""
return self.action(server_id, 'unrescue')
@@ -699,7 +699,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#force-delete-server-forcedelete-action
https://docs.openstack.org/api-ref/compute/#force-delete-server-forcedelete-action
"""
return self.action(server_id, 'forceDelete', **kwargs)
@@ -708,7 +708,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#restore-soft-deleted-instance-restore-action
https://docs.openstack.org/api-ref/compute/#restore-soft-deleted-instance-restore-action
"""
return self.action(server_id, 'restore', **kwargs)
@@ -717,7 +717,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#reset-networking-on-a-server-resetnetwork-action
https://docs.openstack.org/api-ref/compute/#reset-networking-on-a-server-resetnetwork-action
"""
return self.action(server_id, 'resetNetwork', **kwargs)
@@ -726,7 +726,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#inject-network-information-injectnetworkinfo-action
https://docs.openstack.org/api-ref/compute/#inject-network-information-injectnetworkinfo-action
"""
return self.action(server_id, 'injectNetworkInfo', **kwargs)
@@ -735,7 +735,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#get-vnc-console-os-getvncconsole-action-deprecated
https://docs.openstack.org/api-ref/compute/#get-vnc-console-os-getvncconsole-action-deprecated
"""
return self.action(server_id, "os-getVNCConsole",
schema.get_vnc_console, **kwargs)
@@ -745,7 +745,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#add-associate-fixed-ip-addfixedip-action-deprecated
https://docs.openstack.org/api-ref/compute/#add-associate-fixed-ip-addfixedip-action-deprecated
"""
return self.action(server_id, 'addFixedIp', **kwargs)
@@ -754,7 +754,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#remove-disassociate-fixed-ip-removefixedip-action-deprecated
https://docs.openstack.org/api-ref/compute/#remove-disassociate-fixed-ip-removefixedip-action-deprecated
"""
return self.action(server_id, 'removeFixedIp', **kwargs)
@@ -763,7 +763,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-security-groups-by-server
https://docs.openstack.org/api-ref/compute/#list-security-groups-by-server
"""
resp, body = self.get("servers/%s/os-security-groups" % server_id)
body = json.loads(body)
@@ -776,7 +776,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-tags
https://docs.openstack.org/api-ref/compute/#list-tags
"""
url = 'servers/%s/tags' % server_id
resp, body = self.get(url)
@@ -790,7 +790,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#replace-tags
https://docs.openstack.org/api-ref/compute/#replace-tags
:param tags: List of tags to replace current server tags with.
"""
@@ -807,7 +807,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-all-tags
https://docs.openstack.org/api-ref/compute/#delete-all-tags
"""
url = 'servers/%s/tags' % server_id
resp, body = self.delete(url)
@@ -820,7 +820,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#check-tag-existence
https://docs.openstack.org/api-ref/compute/#check-tag-existence
:param tag: Check for existence of tag on specified server.
"""
@@ -835,7 +835,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#add-a-single-tag
https://docs.openstack.org/api-ref/compute/#add-a-single-tag
:param tag: Tag to be added to the specified server.
"""
@@ -850,7 +850,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-a-single-tag
https://docs.openstack.org/api-ref/compute/#delete-a-single-tag
:param tag: Tag to be removed from the specified server.
"""
@@ -865,7 +865,7 @@ class ServersClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#evacuate-server-evacuate-action
https://docs.openstack.org/api-ref/compute/#evacuate-server-evacuate-action
"""
if self.enable_instance_password:
evacuate_schema = schema.evacuate_server_with_admin_pass
@@ -38,7 +38,7 @@ class ServicesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-compute-services
https://docs.openstack.org/api-ref/compute/#list-compute-services
"""
url = 'os-services'
if params:
@@ -60,7 +60,7 @@ class ServicesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-compute-service
https://docs.openstack.org/api-ref/compute/#update-compute-service
"""
put_body = json.dumps(kwargs)
resp, body = self.put('os-services/%s' % service_id, put_body)
@@ -76,7 +76,7 @@ class ServicesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#enable-scheduling-for-a-compute-service
https://docs.openstack.org/api-ref/compute/#enable-scheduling-for-a-compute-service
"""
post_body = json.dumps(kwargs)
resp, body = self.put('os-services/enable', post_body)
@@ -91,7 +91,7 @@ class ServicesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#disable-scheduling-for-a-compute-service
https://docs.openstack.org/api-ref/compute/#disable-scheduling-for-a-compute-service
"""
post_body = json.dumps(kwargs)
resp, body = self.put('os-services/disable', post_body)
@@ -106,7 +106,7 @@ class ServicesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#disable-scheduling-for-a-compute-service-and-log-disabled-reason
https://docs.openstack.org/api-ref/compute/#disable-scheduling-for-a-compute-service-and-log-disabled-reason
"""
post_body = json.dumps(kwargs)
resp, body = self.put('os-services/disable-log-reason', post_body)
@@ -121,7 +121,7 @@ class ServicesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#update-forced-down
https://docs.openstack.org/api-ref/compute/#update-forced-down
"""
post_body = json.dumps(kwargs)
resp, body = self.put('os-services/force-down', post_body)
@@ -29,7 +29,7 @@ class SnapshotsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-snapshot
https://docs.openstack.org/api-ref/compute/#create-snapshot
"""
post_body = {
'volume_id': volume_id
@@ -53,7 +53,7 @@ class SnapshotsClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-snapshots
https://docs.openstack.org/api-ref/compute/#list-snapshots
"""
url = 'os-snapshots'
@@ -28,7 +28,7 @@ class TenantUsagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-tenant-usage-statistics-for-all-tenants
https://docs.openstack.org/api-ref/compute/#list-tenant-usage-statistics-for-all-tenants
"""
url = 'os-simple-tenant-usage'
if params:
@@ -44,7 +44,7 @@ class TenantUsagesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-usage-statistics-for-tenant
https://docs.openstack.org/api-ref/compute/#show-usage-statistics-for-tenant
"""
url = 'os-simple-tenant-usage/%s' % tenant_id
if params:
@@ -29,8 +29,8 @@ class VolumesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#list-volumes
https://developer.openstack.org/api-ref/compute/#list-volumes-with-details
https://docs.openstack.org/api-ref/compute/#list-volumes
https://docs.openstack.org/api-ref/compute/#list-volumes-with-details
"""
url = 'os-volumes'
@@ -49,7 +49,7 @@ class VolumesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#show-volume-details
https://docs.openstack.org/api-ref/compute/#show-volume-details
"""
url = "os-volumes/%s" % volume_id
resp, body = self.get(url)
@@ -62,7 +62,7 @@ class VolumesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#create-volume
https://docs.openstack.org/api-ref/compute/#create-volume
"""
post_body = json.dumps({'volume': kwargs})
resp, body = self.post('os-volumes', post_body)
@@ -75,7 +75,7 @@ class VolumesClient(base_compute_client.BaseComputeClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/compute/#delete-volume
https://docs.openstack.org/api-ref/compute/#delete-volume
"""
resp, body = self.delete("os-volumes/%s" % volume_id)
self.validate_response(schema.delete_volume, resp, body)
@@ -25,7 +25,7 @@ class EndpointsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-admin/index.html#create-endpoint-template
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#create-endpoint-template
"""
post_body = json.dumps({'endpoint': kwargs})
@@ -59,7 +59,7 @@ class IdentityClient(rest_client.RestClient):
For a full list of available parameters, please refer to the
official API reference:
https://developer.openstack.org/api-ref/identity/v2-admin/#validate-token
https://docs.openstack.org/api-ref/identity/v2-admin/#validate-token
"""
url = "tokens/%s" % token_id
if params:
@@ -24,7 +24,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#create-a-role
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#create-a-role
"""
post_body = json.dumps({'role': kwargs})
resp, body = self.post('OS-KSADM/roles', post_body)
@@ -37,9 +37,9 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#show-a-role
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#show-a-role
OR
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#show-role-information-by-name
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#show-role-information-by-name
"""
resp, body = self.get('OS-KSADM/roles/%s' % role_id_or_name)
self.expected_success(200, resp.status)
@@ -51,7 +51,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#list-all-roles
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#list-all-roles
"""
url = 'OS-KSADM/roles'
if params:
@@ -66,7 +66,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#delete-a-role
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#delete-a-role
"""
resp, body = self.delete('OS-KSADM/roles/%s' % role_id)
self.expected_success(204, resp.status)
@@ -77,7 +77,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#grant-roles-to-user-on-tenant
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#grant-roles-to-user-on-tenant
"""
resp, body = self.put('/tenants/%s/users/%s/roles/OS-KSADM/%s' %
(tenant_id, user_id, role_id), "")
@@ -101,7 +101,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#revoke-role-from-user-on-tenant
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#revoke-role-from-user-on-tenant
"""
resp, body = self.delete('/tenants/%s/users/%s/roles/OS-KSADM/%s' %
(tenant_id, user_id, role_id))
@@ -26,7 +26,7 @@ class ServicesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-ext/#create-service-admin-extension
https://docs.openstack.org/api-ref/identity/v2-ext/#create-service-admin-extension
"""
post_body = json.dumps({'OS-KSADM:service': kwargs})
resp, body = self.post('/OS-KSADM/services', post_body)
@@ -47,7 +47,7 @@ class ServicesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-ext/#list-services-admin-extension
https://docs.openstack.org/api-ref/identity/v2-ext/#list-services-admin-extension
"""
url = '/OS-KSADM/services'
if params:
@@ -26,7 +26,7 @@ class TenantsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#create-tenant
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#create-tenant
"""
post_body = json.dumps({'tenant': kwargs})
resp, body = self.post('tenants', post_body)
@@ -39,7 +39,7 @@ class TenantsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-admin/index.html#delete-tenant
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#delete-tenant
"""
resp, body = self.delete('tenants/%s' % str(tenant_id))
self.expected_success(204, resp.status)
@@ -50,7 +50,7 @@ class TenantsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-admin/index.html#show-tenant-details-by-id
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#show-tenant-details-by-id
"""
resp, body = self.get('tenants/%s' % str(tenant_id))
self.expected_success(200, resp.status)
@@ -62,7 +62,7 @@ class TenantsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#list-tenants-admin-endpoint
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#list-tenants-admin-endpoint
"""
url = 'tenants'
if params:
@@ -77,7 +77,7 @@ class TenantsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#update-tenant
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#update-tenant
"""
if 'id' not in kwargs:
kwargs['id'] = tenant_id
@@ -92,7 +92,7 @@ class TenantsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#list-users-on-a-tenant
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#list-users-on-a-tenant
"""
url = '/tenants/%s/users' % tenant_id
if params:
@@ -24,7 +24,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#create-user-admin-endpoint
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#create-user-admin-endpoint
"""
post_body = json.dumps({'user': kwargs})
resp, body = self.post('users', post_body)
@@ -37,7 +37,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#update-user-admin-endpoint
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#update-user-admin-endpoint
"""
put_body = json.dumps({'user': kwargs})
resp, body = self.put('users/%s' % user_id, put_body)
@@ -50,7 +50,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-admin/index.html#show-user-details-admin-endpoint
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#show-user-details-admin-endpoint
"""
resp, body = self.get("users/%s" % user_id)
self.expected_success(200, resp.status)
@@ -62,7 +62,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-admin/index.html#delete-user-admin-endpoint
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#delete-user-admin-endpoint
"""
resp, body = self.delete("users/%s" % user_id)
self.expected_success(204, resp.status)
@@ -73,7 +73,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v2-admin/index.html#list-users-admin-endpoint
https://docs.openstack.org/api-ref/identity/v2-admin/index.html#list-users-admin-endpoint
"""
url = "users"
if params:
@@ -88,7 +88,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v2-ext/index.html#enable-disable-user
https://docs.openstack.org/api-ref/identity/v2-ext/index.html#enable-disable-user
"""
# NOTE: The URL (users/<id>/enabled) is different from the api-site
# one (users/<id>/OS-KSADM/enabled) , but they are the same API
@@ -15,7 +15,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#application-credentials
https://docs.openstack.org/api-ref/identity/v3/index.html#application-credentials
"""
from oslo_serialization import jsonutils as json
@@ -32,7 +32,7 @@ class ApplicationCredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3/index.html#create-application-credential
https://docs.openstack.org/api-ref/identity/v3/index.html#create-application-credential
"""
post_body = json.dumps({'application_credential': kwargs})
resp, body = self.post('users/%s/application_credentials' % user_id,
@@ -46,7 +46,7 @@ class ApplicationCredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3/index.html#show-application-credential-details
https://docs.openstack.org/api-ref/identity/v3/index.html#show-application-credential-details
"""
resp, body = self.get('users/%s/application_credentials/%s' %
(user_id, application_credential_id))
@@ -59,7 +59,7 @@ class ApplicationCredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3/index.html#list-application-credentials
https://docs.openstack.org/api-ref/identity/v3/index.html#list-application-credentials
"""
url = 'users/%s/application_credentials' % user_id
if params:
@@ -75,7 +75,7 @@ class ApplicationCredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3/index.html#delete-application-credential
https://docs.openstack.org/api-ref/identity/v3/index.html#delete-application-credential
"""
resp, body = self.delete('users/%s/application_credentials/%s' %
(user_id, application_credential_id))
@@ -11,7 +11,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#get-service-catalog
https://docs.openstack.org/api-ref/identity/v3/index.html#get-service-catalog
"""
from oslo_serialization import jsonutils as json
@@ -14,7 +14,7 @@
# under the License.
"""
http://developer.openstack.org/api-ref/identity/v3/index.html#credentials
https://docs.openstack.org/api-ref/identity/v3/index.html#credentials
"""
from oslo_serialization import jsonutils as json
@@ -31,7 +31,7 @@ class CredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-credential
https://docs.openstack.org/api-ref/identity/v3/index.html#create-credential
"""
post_body = json.dumps({'credential': kwargs})
resp, body = self.post('credentials', post_body)
@@ -44,7 +44,7 @@ class CredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-credential
https://docs.openstack.org/api-ref/identity/v3/index.html#update-credential
"""
post_body = json.dumps({'credential': kwargs})
resp, body = self.patch('credentials/%s' % credential_id, post_body)
@@ -57,7 +57,7 @@ class CredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-credential-details
https://docs.openstack.org/api-ref/identity/v3/index.html#show-credential-details
"""
resp, body = self.get('credentials/%s' % credential_id)
self.expected_success(200, resp.status)
@@ -69,7 +69,7 @@ class CredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-credentials
https://docs.openstack.org/api-ref/identity/v3/#list-credentials
"""
url = 'credentials'
if params:
@@ -84,7 +84,7 @@ class CredentialsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#delete-credential
https://docs.openstack.org/api-ref/identity/v3/#delete-credential
"""
resp, body = self.delete('credentials/%s' % credential_id)
self.expected_success(204, resp.status)
@@ -25,7 +25,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-default-configuration-settings
https://docs.openstack.org/api-ref/identity/v3/index.html#show-default-configuration-settings
"""
url = 'domains/config/default'
resp, body = self.get(url)
@@ -38,7 +38,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-default-configuration-for-a-group
https://docs.openstack.org/api-ref/identity/v3/index.html#show-default-configuration-for-a-group
"""
url = 'domains/config/%s/default' % group
resp, body = self.get(url)
@@ -51,7 +51,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-default-option-for-a-group
https://docs.openstack.org/api-ref/identity/v3/index.html#show-default-option-for-a-group
"""
url = 'domains/config/%s/%s/default' % (group, option)
resp, body = self.get(url)
@@ -64,7 +64,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-domain-group-option-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#show-domain-group-option-configuration
"""
url = 'domains/%s/config/%s/%s' % (domain_id, group, option)
resp, body = self.get(url)
@@ -78,7 +78,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-domain-group-option-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#update-domain-group-option-configuration
"""
url = 'domains/%s/config/%s/%s' % (domain_id, group, option)
resp, body = self.patch(url, json.dumps({'config': kwargs}))
@@ -91,7 +91,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#delete-domain-group-option-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#delete-domain-group-option-configuration
"""
url = 'domains/%s/config/%s/%s' % (domain_id, group, option)
resp, body = self.delete(url)
@@ -103,7 +103,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-domain-group-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#show-domain-group-configuration
"""
url = 'domains/%s/config/%s' % (domain_id, group)
resp, body = self.get(url)
@@ -116,7 +116,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-domain-group-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#update-domain-group-configuration
"""
url = 'domains/%s/config/%s' % (domain_id, group)
resp, body = self.patch(url, json.dumps({'config': kwargs}))
@@ -129,7 +129,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#delete-domain-group-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#delete-domain-group-configuration
"""
url = 'domains/%s/config/%s' % (domain_id, group)
resp, body = self.delete(url)
@@ -141,7 +141,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-domain-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#create-domain-configuration
"""
url = 'domains/%s/config' % domain_id
resp, body = self.put(url, json.dumps({'config': kwargs}))
@@ -154,7 +154,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-domain-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#show-domain-configuration
"""
url = 'domains/%s/config' % domain_id
resp, body = self.get(url)
@@ -167,7 +167,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-domain-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#update-domain-configuration
"""
url = 'domains/%s/config' % domain_id
resp, body = self.patch(url, json.dumps({'config': kwargs}))
@@ -180,7 +180,7 @@ class DomainConfigurationClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#delete-domain-configuration
https://docs.openstack.org/api-ref/identity/v3/index.html#delete-domain-configuration
"""
url = 'domains/%s/config' % domain_id
resp, body = self.delete(url)
@@ -26,7 +26,7 @@ class DomainsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-domain
https://docs.openstack.org/api-ref/identity/v3/index.html#create-domain
"""
post_body = json.dumps({'domain': kwargs})
resp, body = self.post('domains', post_body)
@@ -38,7 +38,7 @@ class DomainsClient(rest_client.RestClient):
"""Deletes a domain.
For APi details, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#delete-domain
https://docs.openstack.org/api-ref/identity/v3/index.html#delete-domain
"""
resp, body = self.delete('domains/%s' % domain_id)
self.expected_success(204, resp.status)
@@ -49,7 +49,7 @@ class DomainsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#list-domains
https://docs.openstack.org/api-ref/identity/v3/index.html#list-domains
"""
url = 'domains'
if params:
@@ -64,7 +64,7 @@ class DomainsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-domain
https://docs.openstack.org/api-ref/identity/v3/index.html#update-domain
"""
post_body = json.dumps({'domain': kwargs})
resp, body = self.patch('domains/%s' % domain_id, post_body)
@@ -76,7 +76,7 @@ class DomainsClient(rest_client.RestClient):
"""Get Domain details.
For API details, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#show-domain-details
https://docs.openstack.org/api-ref/identity/v3/index.html#show-domain-details
"""
resp, body = self.get('domains/%s' % domain_id)
self.expected_success(200, resp.status)
@@ -14,7 +14,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3-ext/#os-ep-filter-api
https://docs.openstack.org/api-ref/identity/v3-ext/#os-ep-filter-api
"""
from oslo_serialization import jsonutils as json
@@ -26,7 +26,7 @@ class EndPointGroupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the
official API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/#create-endpoint-group
https://docs.openstack.org/api-ref/identity/v3-ext/#create-endpoint-group
"""
post_body = json.dumps({'endpoint_group': kwargs})
resp, body = self.post('OS-EP-FILTER/endpoint_groups', post_body)
@@ -39,7 +39,7 @@ class EndPointGroupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the
official API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/#update-endpoint-group
https://docs.openstack.org/api-ref/identity/v3-ext/#update-endpoint-group
"""
post_body = json.dumps({'endpoint_group': kwargs})
resp, body = self.patch(
@@ -14,7 +14,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#service-catalog-and-endpoints
https://docs.openstack.org/api-ref/identity/v3/index.html#service-catalog-and-endpoints
"""
from oslo_serialization import jsonutils as json
@@ -31,7 +31,7 @@ class EndPointsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-endpoints
https://docs.openstack.org/api-ref/identity/v3/#list-endpoints
"""
url = 'endpoints'
if params:
@@ -46,7 +46,7 @@ class EndPointsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-endpoint
https://docs.openstack.org/api-ref/identity/v3/index.html#create-endpoint
"""
post_body = json.dumps({'endpoint': kwargs})
resp, body = self.post('endpoints', post_body)
@@ -59,7 +59,7 @@ class EndPointsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-endpoint
https://docs.openstack.org/api-ref/identity/v3/index.html#update-endpoint
"""
post_body = json.dumps({'endpoint': kwargs})
resp, body = self.patch('endpoints/%s' % endpoint_id, post_body)
@@ -14,7 +14,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#groups
https://docs.openstack.org/api-ref/identity/v3/index.html#groups
"""
from oslo_serialization import jsonutils as json
@@ -31,7 +31,7 @@ class GroupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-group
https://docs.openstack.org/api-ref/identity/v3/index.html#create-group
"""
post_body = json.dumps({'group': kwargs})
resp, body = self.post('groups', post_body)
@@ -51,7 +51,7 @@ class GroupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-groups
https://docs.openstack.org/api-ref/identity/v3/#list-groups
"""
url = 'groups'
if params:
@@ -66,7 +66,7 @@ class GroupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-group
https://docs.openstack.org/api-ref/identity/v3/index.html#update-group
"""
post_body = json.dumps({'group': kwargs})
resp, body = self.patch('groups/%s' % group_id, post_body)
@@ -92,7 +92,7 @@ class GroupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-users-in-group
https://docs.openstack.org/api-ref/identity/v3/#list-users-in-group
"""
url = 'groups/%s/users' % group_id
if params:
@@ -28,7 +28,7 @@ class OAUTHConsumerClient(rest_client.RestClient):
For more information, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#create-consumer
https://docs.openstack.org/api-ref/identity/v3-ext/#create-consumer
"""
post_body = {"description": description}
post_body = json.dumps({'consumer': post_body})
@@ -44,7 +44,7 @@ class OAUTHConsumerClient(rest_client.RestClient):
For more information, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#delete-consumer
https://docs.openstack.org/api-ref/identity/v3-ext/#delete-consumer
"""
resp, body = self.delete('OS-OAUTH1/consumers/%s' % consumer_id)
self.expected_success(204, resp.status)
@@ -58,7 +58,7 @@ class OAUTHConsumerClient(rest_client.RestClient):
For more information, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/#update-consumer
https://docs.openstack.org/api-ref/identity/v3-ext/#update-consumer
"""
post_body = {"description": description}
post_body = json.dumps({'consumer': post_body})
@@ -75,7 +75,7 @@ class OAUTHConsumerClient(rest_client.RestClient):
For more information, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#show-consumer-details
https://docs.openstack.org/api-ref/identity/v3-ext/#show-consumer-details
"""
resp, body = self.get('OS-OAUTH1/consumers/%s' % consumer_id)
self.expected_success(200, resp.status)
@@ -87,7 +87,7 @@ class OAUTHConsumerClient(rest_client.RestClient):
For more information, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#list-consumers
https://docs.openstack.org/api-ref/identity/v3-ext/#list-consumers
"""
resp, body = self.get('OS-OAUTH1/consumers')
self.expected_success(200, resp.status)
@@ -117,7 +117,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""Create request token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#create-request-token
https://docs.openstack.org/api-ref/identity/v3-ext/#create-request-token
"""
endpoint = 'OS-OAUTH1/request_token'
headers = {'Requested-Project-Id': project_id}
@@ -142,7 +142,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""Authorize request token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#authorize-request-token
https://docs.openstack.org/api-ref/identity/v3-ext/#authorize-request-token
"""
roles = [{'id': role_id} for role_id in role_ids]
body = {'roles': roles}
@@ -158,7 +158,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""Create access token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#create-access-token
https://docs.openstack.org/api-ref/identity/v3-ext/#create-access-token
"""
endpoint = 'OS-OAUTH1/access_token'
oauth_params = self._generate_params_with_signature(
@@ -181,7 +181,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""Get access token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#get-access-token
https://docs.openstack.org/api-ref/identity/v3-ext/#get-access-token
"""
resp, body = self.get("users/%s/OS-OAUTH1/access_tokens/%s"
% (user_id, access_token_id))
@@ -193,7 +193,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""Revoke access token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#revoke-access-token
https://docs.openstack.org/api-ref/identity/v3-ext/#revoke-access-token
"""
resp, body = self.delete("users/%s/OS-OAUTH1/access_tokens/%s"
% (user_id, access_token_id))
@@ -204,7 +204,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""List access tokens.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#list-access-tokens
https://docs.openstack.org/api-ref/identity/v3-ext/#list-access-tokens
"""
resp, body = self.get("users/%s/OS-OAUTH1/access_tokens"
% (user_id))
@@ -216,7 +216,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""List roles for an access token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#list-roles-for-an-access-token
https://docs.openstack.org/api-ref/identity/v3-ext/#list-roles-for-an-access-token
"""
resp, body = self.get("users/%s/OS-OAUTH1/access_tokens/%s/roles"
% (user_id, access_token_id))
@@ -228,7 +228,7 @@ class OAUTHTokenClient(rest_client.RestClient):
"""Show role details for an access token.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/#show-role-details-for-an-access-token
https://docs.openstack.org/api-ref/identity/v3-ext/#show-role-details-for-an-access-token
"""
resp, body = self.get("users/%s/OS-OAUTH1/access_tokens/%s/roles/%s"
% (user_id, access_token_id, role_id))
@@ -14,7 +14,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#policies
https://docs.openstack.org/api-ref/identity/v3/index.html#policies
"""
from oslo_serialization import jsonutils as json
@@ -30,7 +30,7 @@ class PoliciesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-policy
https://docs.openstack.org/api-ref/identity/v3/index.html#create-policy
"""
post_body = json.dumps({'policy': kwargs})
resp, body = self.post('policies', post_body)
@@ -58,7 +58,7 @@ class PoliciesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-policy
https://docs.openstack.org/api-ref/identity/v3/index.html#update-policy
"""
post_body = json.dumps({'policy': kwargs})
url = 'policies/%s' % policy_id
@@ -79,7 +79,7 @@ class PoliciesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#associate-policy-and-endpoint
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#associate-policy-and-endpoint
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/endpoints/{1}"\
.format(policy_id, endpoint_id)
@@ -91,7 +91,7 @@ class PoliciesClient(rest_client.RestClient):
"""Get policy association of endpoint.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#verify-a-policy-and-endpoint-association
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#verify-a-policy-and-endpoint-association
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/endpoints/{1}"\
.format(policy_id, endpoint_id)
@@ -103,7 +103,7 @@ class PoliciesClient(rest_client.RestClient):
"""Delete policy association with endpoint.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#delete-a-policy-and-endpoint-association
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#delete-a-policy-and-endpoint-association
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/endpoints/{1}"\
.format(policy_id, endpoint_id)
@@ -115,7 +115,7 @@ class PoliciesClient(rest_client.RestClient):
"""Create policy association with service.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#associate-policy-and-service-type-endpoint
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#associate-policy-and-service-type-endpoint
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/services/{1}"\
.format(policy_id, service_id)
@@ -127,7 +127,7 @@ class PoliciesClient(rest_client.RestClient):
"""Get policy association of service.
API Reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#verify-a-policy-and-service-type-endpoint-association
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#verify-a-policy-and-service-type-endpoint-association
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/services/{1}"\
.format(policy_id, service_id)
@@ -139,7 +139,7 @@ class PoliciesClient(rest_client.RestClient):
"""Delete policy association with service.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#delete-a-policy-and-service-type-endpoint-association
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#delete-a-policy-and-service-type-endpoint-association
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/services/{1}"\
.format(policy_id, service_id)
@@ -152,7 +152,7 @@ class PoliciesClient(rest_client.RestClient):
"""Create policy association with service and region.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#associate-policy-and-service-type-endpoint-in-a-region
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#associate-policy-and-service-type-endpoint-in-a-region
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/services/{1}/regions/{2}"\
.format(policy_id, service_id, region_id)
@@ -165,7 +165,7 @@ class PoliciesClient(rest_client.RestClient):
"""Get policy association of service and region.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#verify-a-policy-and-service-type-endpoint-in-a-region-association
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#verify-a-policy-and-service-type-endpoint-in-a-region-association
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/services/{1}/regions/{2}"\
.format(policy_id, service_id, region_id)
@@ -178,7 +178,7 @@ class PoliciesClient(rest_client.RestClient):
"""Delete policy association with service and region.
API reference:
https://developer.openstack.org/api-ref/identity/v3-ext/index.html#delete-a-policy-and-service-type-endpoint-in-a-region-association
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#delete-a-policy-and-service-type-endpoint-in-a-region-association
"""
url = "policies/{0}/OS-ENDPOINT-POLICY/services/{1}/regions/{2}"\
.format(policy_id, service_id, region_id)
@@ -48,7 +48,7 @@ class ProjectTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/identity/v3/#modify-tag-list-for-a-project
https://docs.openstack.org/api-ref/identity/v3/#modify-tag-list-for-a-project
"""
body = {'tags': tags}
if kwargs:
@@ -27,7 +27,7 @@ class ProjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-project
https://docs.openstack.org/api-ref/identity/v3/index.html#create-project
"""
# Include the project name to the kwargs parameters
@@ -52,7 +52,7 @@ class ProjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-project
https://docs.openstack.org/api-ref/identity/v3/index.html#update-project
"""
post_body = json.dumps({'project': kwargs})
@@ -14,7 +14,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#regions
https://docs.openstack.org/api-ref/identity/v3/index.html#regions
"""
from oslo_serialization import jsonutils as json
@@ -31,7 +31,7 @@ class RegionsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-region
https://docs.openstack.org/api-ref/identity/v3/index.html#create-region
"""
if region_id is not None:
method = self.put
@@ -50,7 +50,7 @@ class RegionsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-region
https://docs.openstack.org/api-ref/identity/v3/index.html#update-region
"""
post_body = json.dumps({'region': kwargs})
resp, body = self.patch('regions/%s' % region_id, post_body)
@@ -26,7 +26,7 @@ class RoleAssignmentsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-role-assignments
https://docs.openstack.org/api-ref/identity/v3/#list-role-assignments
:param effective: If True, returns the effective assignments, including
any assignments gained by virtue of group membership
@@ -26,7 +26,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-role
https://docs.openstack.org/api-ref/identity/v3/index.html#create-role
"""
post_body = json.dumps({'role': kwargs})
resp, body = self.post('roles', post_body)
@@ -57,7 +57,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-role
https://docs.openstack.org/api-ref/identity/v3/index.html#update-role
"""
post_body = json.dumps({'role': kwargs})
resp, body = self.patch('roles/%s' % role_id, post_body)
@@ -219,7 +219,7 @@ class RolesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#list-all-role-inference-rules
https://docs.openstack.org/api-ref/identity/v3/index.html#list-all-role-inference-rules
"""
resp, body = self.get('role_inferences')
self.expected_success(200, resp.status)
@@ -14,7 +14,7 @@
# under the License.
"""
https://developer.openstack.org/api-ref/identity/v3/index.html#service-catalog-and-endpoints
https://docs.openstack.org/api-ref/identity/v3/index.html#service-catalog-and-endpoints
"""
from oslo_serialization import jsonutils as json
@@ -31,7 +31,7 @@ class ServicesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#update-service
https://docs.openstack.org/api-ref/identity/v3/index.html#update-service
"""
patch_body = json.dumps({'service': kwargs})
resp, body = self.patch('services/%s' % service_id, patch_body)
@@ -52,7 +52,7 @@ class ServicesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#create-service
https://docs.openstack.org/api-ref/identity/v3/index.html#create-service
"""
body = json.dumps({'service': kwargs})
resp, body = self.post("services", body)
@@ -71,7 +71,7 @@ class ServicesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-services
https://docs.openstack.org/api-ref/identity/v3/#list-services
"""
url = 'services'
if params:
@@ -26,7 +26,7 @@ class TrustsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/index.html#create-trust
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#create-trust
"""
post_body = json.dumps({'trust': kwargs})
resp, body = self.post('OS-TRUST/trusts', post_body)
@@ -45,7 +45,7 @@ class TrustsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3-ext/index.html#list-trusts
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#list-trusts
"""
url = "OS-TRUST/trusts/"
if params:
@@ -26,7 +26,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#create-user
https://docs.openstack.org/api-ref/identity/v3/#create-user
"""
post_body = json.dumps({'user': kwargs})
resp, body = self.post('users', post_body)
@@ -39,7 +39,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#update-user
https://docs.openstack.org/api-ref/identity/v3/#update-user
"""
if 'id' not in kwargs:
kwargs['id'] = user_id
@@ -54,7 +54,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/index.html#change-password-for-user
https://docs.openstack.org/api-ref/identity/v3/index.html#change-password-for-user
"""
update_user = json.dumps({'user': kwargs})
resp, _ = self.post('users/%s/password' % user_id, update_user)
@@ -66,7 +66,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-projects-for-user
https://docs.openstack.org/api-ref/identity/v3/#list-projects-for-user
"""
url = 'users/%s/projects' % user_id
if params:
@@ -81,7 +81,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-users
https://docs.openstack.org/api-ref/identity/v3/#list-users
"""
url = 'users'
if params:
@@ -109,7 +109,7 @@ class UsersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/identity/v3/#list-groups-to-which-a-user-belongs
https://docs.openstack.org/api-ref/identity/v3/#list-groups-to-which-a-user-belongs
"""
url = 'users/%s/groups' % user_id
if params:
@@ -31,7 +31,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v1/#list-shared-images
https://docs.openstack.org/api-ref/image/v1/#list-shared-images
"""
url = 'shared-images/%s' % tenant_id
@@ -45,7 +45,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v1/#add-member-to-image
https://docs.openstack.org/api-ref/image/v1/#add-member-to-image
"""
url = 'images/%s/members/%s' % (image_id, member_id)
body = json.dumps({'member': kwargs})
@@ -58,7 +58,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v1/#remove-member
https://docs.openstack.org/api-ref/image/v1/#remove-member
"""
url = 'images/%s/members/%s' % (image_id, member_id)
resp, __ = self.delete(url)
@@ -61,7 +61,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v1/index.html#create-image
https://docs.openstack.org/api-ref/image/v1/index.html#create-image
"""
if headers is None:
headers = {}
@@ -79,7 +79,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v1/index.html#update-image
https://docs.openstack.org/api-ref/image/v1/index.html#update-image
"""
if headers is None:
headers = {}
@@ -104,7 +104,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v1/#list-images
https://docs.openstack.org/api-ref/image/v1/#list-images
Most parameters except the following are passed to the API without
any changes.
@@ -23,7 +23,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#list-image-members
https://docs.openstack.org/api-ref/image/v2/#list-image-members
"""
url = 'images/%s/members' % image_id
resp, body = self.get(url)
@@ -36,7 +36,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#create-image-member
https://docs.openstack.org/api-ref/image/v2/#create-image-member
"""
url = 'images/%s/members' % image_id
data = json.dumps(kwargs)
@@ -50,7 +50,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#update-image-member
https://docs.openstack.org/api-ref/image/v2/#update-image-member
"""
url = 'images/%s/members/%s' % (image_id, member_id)
data = json.dumps(kwargs)
@@ -64,7 +64,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#show-image-member-details
https://docs.openstack.org/api-ref/image/v2/#show-image-member-details
"""
url = 'images/%s/members/%s' % (image_id, member_id)
resp, body = self.get(url)
@@ -76,7 +76,7 @@ class ImageMembersClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#delete-image-member
https://docs.openstack.org/api-ref/image/v2/#delete-image-member
"""
url = 'images/%s/members/%s' % (image_id, member_id)
resp, _ = self.delete(url)
+11 -11
View File
@@ -32,7 +32,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v2/#update-image
https://docs.openstack.org/api-ref/image/v2/#update-image
"""
data = json.dumps(patch)
headers = {"Content-Type": "application/openstack-images-v2.0"
@@ -47,7 +47,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v2/#create-image
https://docs.openstack.org/api-ref/image/v2/#create-image
"""
data = json.dumps(kwargs)
resp, body = self.post('images', data)
@@ -60,7 +60,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#deactivate-image
https://docs.openstack.org/api-ref/image/v2/#deactivate-image
"""
url = 'images/%s/actions/deactivate' % image_id
resp, body = self.post(url, None)
@@ -72,7 +72,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#reactivate-image
https://docs.openstack.org/api-ref/image/v2/#reactivate-image
"""
url = 'images/%s/actions/reactivate' % image_id
resp, body = self.post(url, None)
@@ -84,7 +84,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v2/#delete-image
https://docs.openstack.org/api-ref/image/v2/#delete-image
"""
url = 'images/%s' % image_id
resp, _ = self.delete(url)
@@ -96,7 +96,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v2/#list-images
https://docs.openstack.org/api-ref/image/v2/#list-images
"""
url = 'images'
@@ -113,7 +113,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v2/#show-image
https://docs.openstack.org/api-ref/image/v2/#show-image
"""
url = 'images/%s' % image_id
resp, body = self.get(url)
@@ -138,7 +138,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#upload-binary-image-data
https://docs.openstack.org/api-ref/image/v2/#upload-binary-image-data
"""
url = 'images/%s/file' % image_id
@@ -157,7 +157,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#download-binary-image-data
https://docs.openstack.org/api-ref/image/v2/#download-binary-image-data
"""
url = 'images/%s/file' % image_id
resp, body = self.get(url)
@@ -169,7 +169,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#add-image-tag
https://docs.openstack.org/api-ref/image/v2/#add-image-tag
"""
url = 'images/%s/tags/%s' % (image_id, tag)
resp, body = self.put(url, body=None)
@@ -181,7 +181,7 @@ class ImagesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/#delete-image-tag
https://docs.openstack.org/api-ref/image/v2/#delete-image-tag
"""
url = 'images/%s/tags/%s' % (image_id, tag)
resp, _ = self.delete(url)
@@ -27,7 +27,7 @@ class NamespaceObjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#list-objects
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#list-objects
"""
url = 'metadefs/namespaces/%s/objects' % namespace
if kwargs:
@@ -42,7 +42,7 @@ class NamespaceObjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#create-object
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#create-object
"""
url = 'metadefs/namespaces/%s/objects' % namespace
data = json.dumps(kwargs)
@@ -56,7 +56,7 @@ class NamespaceObjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#update-object
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#update-object
"""
url = 'metadefs/namespaces/%s/objects/%s' % (namespace, object_name)
data = json.dumps(kwargs)
@@ -70,7 +70,7 @@ class NamespaceObjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#show-object
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#show-object
"""
url = 'metadefs/namespaces/%s/objects/%s' % (namespace, object_name)
resp, body = self.get(url)
@@ -83,7 +83,7 @@ class NamespaceObjectsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#delete-object
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#delete-object
"""
url = 'metadefs/namespaces/%s/objects/%s' % (namespace, object_name)
resp, _ = self.delete(url)
@@ -26,7 +26,7 @@ class NamespacePropertiesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#list-properties
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#list-properties
"""
url = 'metadefs/namespaces/%s/properties' % namespace
resp, body = self.get(url)
@@ -39,7 +39,7 @@ class NamespacePropertiesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#create-property
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#create-property
"""
url = 'metadefs/namespaces/%s/properties' % namespace
data = json.dumps(kwargs)
@@ -53,7 +53,7 @@ class NamespacePropertiesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#show-property-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#show-property-definition
"""
url = 'metadefs/namespaces/%s/properties/%s' % (namespace,
property_name)
@@ -67,7 +67,7 @@ class NamespacePropertiesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#update-property-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#update-property-definition
"""
url = 'metadefs/namespaces/%s/properties/%s' % (namespace,
property_name)
@@ -82,7 +82,7 @@ class NamespacePropertiesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#remove-property-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#remove-property-definition
"""
url = 'metadefs/namespaces/%s/properties/%s' % (namespace,
property_name)
@@ -27,7 +27,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#create-tag-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#create-tag-definition
"""
url = 'metadefs/namespaces/%s/tags/%s' % (namespace,
tag_name)
@@ -41,7 +41,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/image/v2/metadefs-index.html#get-tag-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#get-tag-definition
"""
url = 'metadefs/namespaces/%s/tags/%s' % (namespace,
tag_name)
@@ -55,7 +55,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#update-tag-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#update-tag-definition
"""
url = 'metadefs/namespaces/%s/tags/%s' % (namespace,
tag_name)
@@ -70,7 +70,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#delete-tag-definition
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#delete-tag-definition
"""
url = 'metadefs/namespaces/%s/tags/%s' % (namespace, tag_name)
resp, _ = self.delete(url)
@@ -82,7 +82,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#create-tags
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#create-tags
"""
url = 'metadefs/namespaces/%s/tags' % namespace
data = json.dumps(kwargs)
@@ -96,7 +96,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#list-tags
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#list-tags
"""
url = 'metadefs/namespaces/%s/tags' % namespace
if params:
@@ -111,7 +111,7 @@ class NamespaceTagsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#delete-all-tag-definitions
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#delete-all-tag-definitions
"""
url = 'metadefs/namespaces/%s/tags' % namespace
resp, _ = self.delete(url)
@@ -26,7 +26,7 @@ class NamespacesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#create-namespace
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#create-namespace
"""
data = json.dumps(kwargs)
resp, body = self.post('metadefs/namespaces', data)
@@ -39,7 +39,7 @@ class NamespacesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#list-namespaces
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#list-namespaces
"""
url = 'metadefs/namespaces'
resp, body = self.get(url)
@@ -52,7 +52,7 @@ class NamespacesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#get-namespace-details
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#get-namespace-details
"""
url = 'metadefs/namespaces/%s' % namespace
resp, body = self.get(url)
@@ -65,7 +65,7 @@ class NamespacesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#update-namespace
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#update-namespace
"""
# NOTE: On Glance API, we need to pass namespace on both URI
# and a request body.
@@ -83,7 +83,7 @@ class NamespacesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#delete-namespace
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#delete-namespace
"""
url = 'metadefs/namespaces/%s' % namespace
resp, _ = self.delete(url)
@@ -26,7 +26,7 @@ class ResourceTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#list-resource-types
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#list-resource-types
"""
url = 'metadefs/resource_types'
resp, body = self.get(url)
@@ -39,7 +39,7 @@ class ResourceTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#create-resource-type-association
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#create-resource-type-association
"""
url = 'metadefs/namespaces/%s/resource_types' % namespace_id
data = json.dumps(kwargs)
@@ -53,7 +53,7 @@ class ResourceTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#list-resource-type-associations
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#list-resource-type-associations
"""
url = 'metadefs/namespaces/%s/resource_types' % namespace_id
resp, body = self.get(url)
@@ -66,7 +66,7 @@ class ResourceTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/image/v2/metadefs-index.html#remove-resource-type-association
https://docs.openstack.org/api-ref/image/v2/metadefs-index.html#remove-resource-type-association
"""
url = 'metadefs/namespaces/%s/resource_types/%s' % (namespace_id,
resource_name)
@@ -22,7 +22,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#update-agent
https://docs.openstack.org/api-ref/network/v2/#update-agent
"""
uri = '/agents/%s' % agent_id
return self.update_resource(uri, kwargs)
@@ -32,7 +32,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#show-agent-details
https://docs.openstack.org/api-ref/network/v2/#show-agent-details
"""
uri = '/agents/%s' % agent_id
return self.show_resource(uri, **fields)
@@ -42,7 +42,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#delete-agent
https://docs.openstack.org/api-ref/network/v2/index.html#delete-agent
"""
uri = '/agents/%s' % agent_id
return self.delete_resource(uri)
@@ -52,7 +52,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#list-all-agents
https://docs.openstack.org/api-ref/network/v2/#list-all-agents
"""
uri = '/agents'
return self.list_resources(uri, **filters)
@@ -62,7 +62,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#list-routers-hosted-by-an-l3-agent
https://docs.openstack.org/api-ref/network/v2/#list-routers-hosted-by-an-l3-agent
"""
uri = '/agents/%s/l3-routers' % agent_id
return self.list_resources(uri)
@@ -72,7 +72,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#schedule-router-to-an-l3-agent
https://docs.openstack.org/api-ref/network/v2/#schedule-router-to-an-l3-agent
"""
uri = '/agents/%s/l3-routers' % agent_id
return self.create_resource(uri, kwargs, expect_empty_body=True)
@@ -82,7 +82,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#remove-l3-router-from-an-l3-agent
https://docs.openstack.org/api-ref/network/v2/#remove-l3-router-from-an-l3-agent
"""
uri = '/agents/%s/l3-routers/%s' % (agent_id, router_id)
return self.delete_resource(uri)
@@ -101,7 +101,7 @@ class AgentsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/#schedule-a-network-to-a-dhcp-agent
https://docs.openstack.org/api-ref/network/v2/#schedule-a-network-to-a-dhcp-agent
"""
uri = '/agents/%s/dhcp-networks' % agent_id
return self.create_resource(uri, kwargs, expect_empty_body=True)
@@ -23,7 +23,7 @@ class FloatingIPsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-floating-ip
https://docs.openstack.org/api-ref/networking/v2/index.html#create-floating-ip
"""
uri = '/floatingips'
post_data = {'floatingip': kwargs}
@@ -34,7 +34,7 @@ class FloatingIPsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-floating-ip
https://docs.openstack.org/api-ref/networking/v2/index.html#update-floating-ip
"""
uri = '/floatingips/%s' % floatingip_id
post_data = {'floatingip': kwargs}
@@ -45,7 +45,7 @@ class FloatingIPsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-floating-ip-details
https://docs.openstack.org/api-ref/networking/v2/index.html#show-floating-ip-details
"""
uri = '/floatingips/%s' % floatingip_id
return self.show_resource(uri, **fields)
@@ -59,7 +59,7 @@ class FloatingIPsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-floating-ips
https://docs.openstack.org/api-ref/networking/v2/index.html#list-floating-ips
"""
uri = '/floatingips'
return self.list_resources(uri, **filters)
@@ -20,7 +20,7 @@ class MeteringLabelRulesClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#create-metering-label-rule
https://docs.openstack.org/api-ref/network/v2/index.html#create-metering-label-rule
"""
uri = '/metering/metering-label-rules'
post_data = {'metering_label_rule': kwargs}
@@ -39,7 +39,7 @@ class MeteringLabelRulesClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#list-metering-label-rules
https://docs.openstack.org/api-ref/network/v2/index.html#list-metering-label-rules
"""
uri = '/metering/metering-label-rules'
return self.list_resources(uri, **filters)
@@ -20,7 +20,7 @@ class MeteringLabelsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-metering-label
https://docs.openstack.org/api-ref/networking/v2/index.html#create-metering-label
"""
uri = '/metering/metering-labels'
post_data = {'metering_label': kwargs}
@@ -31,7 +31,7 @@ class MeteringLabelsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-metering-label-details
https://docs.openstack.org/api-ref/networking/v2/index.html#show-metering-label-details
"""
uri = '/metering/metering-labels/%s' % metering_label_id
return self.show_resource(uri, **fields)
@@ -41,7 +41,7 @@ class MeteringLabelsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#delete-metering-label
https://docs.openstack.org/api-ref/networking/v2/index.html#delete-metering-label
"""
uri = '/metering/metering-labels/%s' % metering_label_id
return self.delete_resource(uri)
@@ -51,7 +51,7 @@ class MeteringLabelsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-metering-labels
https://docs.openstack.org/api-ref/networking/v2/index.html#list-metering-labels
"""
uri = '/metering/metering-labels'
return self.list_resources(uri, **filters)
@@ -20,7 +20,7 @@ class NetworksClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-network
https://docs.openstack.org/api-ref/networking/v2/index.html#create-network
"""
uri = '/networks'
post_data = {'network': kwargs}
@@ -31,7 +31,7 @@ class NetworksClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-network
https://docs.openstack.org/api-ref/networking/v2/index.html#update-network
"""
uri = '/networks/%s' % network_id
post_data = {'network': kwargs}
@@ -42,7 +42,7 @@ class NetworksClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-network-details
https://docs.openstack.org/api-ref/networking/v2/index.html#show-network-details
"""
uri = '/networks/%s' % network_id
return self.show_resource(uri, **fields)
@@ -56,7 +56,7 @@ class NetworksClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-networks
https://docs.openstack.org/api-ref/networking/v2/index.html#list-networks
"""
uri = '/networks'
return self.list_resources(uri, **filters)
@@ -66,7 +66,7 @@ class NetworksClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#bulk-create-networks
https://docs.openstack.org/api-ref/networking/v2/index.html#bulk-create-networks
"""
uri = '/networks'
return self.create_resource(uri, kwargs)
+6 -6
View File
@@ -21,7 +21,7 @@ class PortsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-port
https://docs.openstack.org/api-ref/networking/v2/index.html#create-port
"""
uri = '/ports'
post_data = {'port': kwargs}
@@ -32,7 +32,7 @@ class PortsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-port
https://docs.openstack.org/api-ref/networking/v2/index.html#update-port
"""
uri = '/ports/%s' % port_id
post_data = {'port': kwargs}
@@ -43,7 +43,7 @@ class PortsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-port-details
https://docs.openstack.org/api-ref/networking/v2/index.html#show-port-details
"""
uri = '/ports/%s' % port_id
return self.show_resource(uri, **fields)
@@ -53,7 +53,7 @@ class PortsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#delete-port
https://docs.openstack.org/api-ref/networking/v2/index.html#delete-port
"""
uri = '/ports/%s' % port_id
return self.delete_resource(uri)
@@ -63,7 +63,7 @@ class PortsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-ports
https://docs.openstack.org/api-ref/networking/v2/index.html#list-ports
"""
uri = '/ports'
return self.list_resources(uri, **filters)
@@ -73,7 +73,7 @@ class PortsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#bulk-create-ports
https://docs.openstack.org/api-ref/networking/v2/index.html#bulk-create-ports
"""
uri = '/ports'
return self.create_resource(uri, kwargs)
+5 -5
View File
@@ -22,7 +22,7 @@ class QosClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#create-qos-policy
https://docs.openstack.org/api-ref/network/v2/index.html#create-qos-policy
"""
uri = '/qos/policies'
post_data = {'policy': kwargs}
@@ -33,7 +33,7 @@ class QosClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#update-qos-policy
https://docs.openstack.org/api-ref/network/v2/index.html#update-qos-policy
"""
uri = '/qos/policies/%s' % qos_policy_id
post_data = {'policy': kwargs}
@@ -44,7 +44,7 @@ class QosClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#show-qos-policy-details
https://docs.openstack.org/api-ref/network/v2/index.html#show-qos-policy-details
"""
uri = '/qos/policies/%s' % qos_policy_id
return self.show_resource(uri, **fields)
@@ -54,7 +54,7 @@ class QosClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#delete-qos-policy
https://docs.openstack.org/api-ref/network/v2/index.html#delete-qos-policy
"""
uri = '/qos/policies/%s' % qos_policy_id
return self.delete_resource(uri)
@@ -64,7 +64,7 @@ class QosClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#list-qos-policies
https://docs.openstack.org/api-ref/network/v2/index.html#list-qos-policies
"""
uri = '/qos/policies'
return self.list_resources(uri, **filters)
@@ -22,7 +22,7 @@ class QosMinimumBandwidthRulesClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#create-minimum-bandwidth-rule
https://docs.openstack.org/api-ref/network/v2/index.html#create-minimum-bandwidth-rule
"""
uri = '/qos/policies/%s/minimum_bandwidth_rules' % qos_policy_id
post_data = {'minimum_bandwidth_rule': kwargs}
@@ -33,7 +33,7 @@ class QosMinimumBandwidthRulesClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#update-minimum-bandwidth-rule
https://docs.openstack.org/api-ref/network/v2/index.html#update-minimum-bandwidth-rule
"""
uri = '/qos/policies/%s/minimum_bandwidth_rules/%s' % (
qos_policy_id, rule_id)
@@ -45,7 +45,7 @@ class QosMinimumBandwidthRulesClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#show-minimum-bandwidth-rule-details
https://docs.openstack.org/api-ref/network/v2/index.html#show-minimum-bandwidth-rule-details
"""
uri = '/qos/policies/%s/minimum_bandwidth_rules/%s' % (
qos_policy_id, rule_id)
@@ -56,7 +56,7 @@ class QosMinimumBandwidthRulesClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#delete-minimum-bandwidth-rule
https://docs.openstack.org/api-ref/network/v2/index.html#delete-minimum-bandwidth-rule
"""
uri = '/qos/policies/%s/minimum_bandwidth_rules/%s' % (
qos_policy_id, rule_id)
@@ -67,7 +67,7 @@ class QosMinimumBandwidthRulesClient(base.BaseNetworkClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#list-minimum-bandwidth-rules-for-qos-policy
https://docs.openstack.org/api-ref/network/v2/index.html#list-minimum-bandwidth-rules-for-qos-policy
"""
uri = '/qos/policies/%s/minimum_bandwidth_rules' % qos_policy_id
return self.list_resources(uri, **filters)
@@ -22,7 +22,7 @@ class QuotasClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#update-quota-for-a-project
https://docs.openstack.org/api-ref/network/v2/index.html#update-quota-for-a-project
"""
put_body = {'quota': kwargs}
uri = '/quotas/%s' % tenant_id
@@ -20,7 +20,7 @@ class RoutersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-router
https://docs.openstack.org/api-ref/networking/v2/index.html#create-router
"""
post_body = {'router': kwargs}
uri = '/routers'
@@ -31,7 +31,7 @@ class RoutersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-router
https://docs.openstack.org/api-ref/networking/v2/index.html#update-router
"""
uri = '/routers/%s' % router_id
update_body = {'router': kwargs}
@@ -42,7 +42,7 @@ class RoutersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-router-details
https://docs.openstack.org/api-ref/networking/v2/index.html#show-router-details
"""
uri = '/routers/%s' % router_id
return self.show_resource(uri, **fields)
@@ -56,7 +56,7 @@ class RoutersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-routers
https://docs.openstack.org/api-ref/networking/v2/index.html#list-routers
"""
uri = '/routers'
return self.list_resources(uri, **filters)
@@ -66,7 +66,7 @@ class RoutersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#add-interface-to-router
https://docs.openstack.org/api-ref/networking/v2/index.html#add-interface-to-router
"""
uri = '/routers/%s/add_router_interface' % router_id
return self.update_resource(uri, kwargs)
@@ -76,7 +76,7 @@ class RoutersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#remove-interface-from-router
https://docs.openstack.org/api-ref/networking/v2/index.html#remove-interface-from-router
"""
uri = '/routers/%s/remove_router_interface' % router_id
return self.update_resource(uri, kwargs)
@@ -20,7 +20,7 @@ class SecurityGroupRulesClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-security-group-rule
https://docs.openstack.org/api-ref/networking/v2/index.html#create-security-group-rule
"""
uri = '/security-group-rules'
post_data = {'security_group_rule': kwargs}
@@ -31,7 +31,7 @@ class SecurityGroupRulesClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-security-group-rule
https://docs.openstack.org/api-ref/networking/v2/index.html#show-security-group-rule
"""
uri = '/security-group-rules/%s' % security_group_rule_id
return self.show_resource(uri, **fields)
@@ -45,7 +45,7 @@ class SecurityGroupRulesClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-security-group-rules
https://docs.openstack.org/api-ref/networking/v2/index.html#list-security-group-rules
"""
uri = '/security-group-rules'
return self.list_resources(uri, **filters)
@@ -21,7 +21,7 @@ class SecurityGroupsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-security-group
https://docs.openstack.org/api-ref/networking/v2/index.html#create-security-group
"""
uri = '/security-groups'
post_data = {'security_group': kwargs}
@@ -32,7 +32,7 @@ class SecurityGroupsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-security-group
https://docs.openstack.org/api-ref/networking/v2/index.html#update-security-group
"""
uri = '/security-groups/%s' % security_group_id
post_data = {'security_group': kwargs}
@@ -43,7 +43,7 @@ class SecurityGroupsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-security-group
https://docs.openstack.org/api-ref/networking/v2/index.html#show-security-group
"""
uri = '/security-groups/%s' % security_group_id
return self.show_resource(uri, **fields)
@@ -53,7 +53,7 @@ class SecurityGroupsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#delete-security-group
https://docs.openstack.org/api-ref/networking/v2/index.html#delete-security-group
"""
uri = '/security-groups/%s' % security_group_id
return self.delete_resource(uri)
@@ -63,7 +63,7 @@ class SecurityGroupsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-security-groups
https://docs.openstack.org/api-ref/networking/v2/index.html#list-security-groups
"""
uri = '/security-groups'
return self.list_resources(uri, **filters)
@@ -20,7 +20,7 @@ class ServiceProvidersClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#list-service-providers
https://docs.openstack.org/api-ref/network/v2/index.html#list-service-providers
"""
uri = '/service-providers'
return self.list_resources(uri, **filters)
@@ -22,7 +22,7 @@ class SubnetpoolsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-subnet-pools
https://docs.openstack.org/api-ref/networking/v2/index.html#list-subnet-pools
"""
uri = '/subnetpools'
return self.list_resources(uri, **filters)
@@ -32,7 +32,7 @@ class SubnetpoolsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-subnet-pool
https://docs.openstack.org/api-ref/networking/v2/index.html#create-subnet-pool
"""
uri = '/subnetpools'
post_data = {'subnetpool': kwargs}
@@ -43,7 +43,7 @@ class SubnetpoolsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-subnet-pool
https://docs.openstack.org/api-ref/networking/v2/index.html#show-subnet-pool
"""
uri = '/subnetpools/%s' % subnetpool_id
return self.show_resource(uri, **fields)
@@ -53,7 +53,7 @@ class SubnetpoolsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-subnet-pool
https://docs.openstack.org/api-ref/networking/v2/index.html#update-subnet-pool
"""
uri = '/subnetpools/%s' % subnetpool_id
post_data = {'subnetpool': kwargs}
@@ -20,7 +20,7 @@ class SubnetsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#create-subnet
https://docs.openstack.org/api-ref/networking/v2/index.html#create-subnet
"""
uri = '/subnets'
post_data = {'subnet': kwargs}
@@ -31,7 +31,7 @@ class SubnetsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#update-subnet
https://docs.openstack.org/api-ref/networking/v2/index.html#update-subnet
"""
uri = '/subnets/%s' % subnet_id
post_data = {'subnet': kwargs}
@@ -42,7 +42,7 @@ class SubnetsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#show-subnet-details
https://docs.openstack.org/api-ref/networking/v2/index.html#show-subnet-details
"""
uri = '/subnets/%s' % subnet_id
return self.show_resource(uri, **fields)
@@ -56,7 +56,7 @@ class SubnetsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#list-subnets
https://docs.openstack.org/api-ref/networking/v2/index.html#list-subnets
"""
uri = '/subnets'
return self.list_resources(uri, **filters)
@@ -66,7 +66,7 @@ class SubnetsClient(base.BaseNetworkClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#bulk-create-subnet
https://docs.openstack.org/api-ref/networking/v2/index.html#bulk-create-subnet
"""
uri = '/subnets'
return self.create_resource(uri, kwargs)
+6 -6
View File
@@ -25,7 +25,7 @@ class TagsClient(base.BaseNetworkClient):
"""Adds a tag on the resource.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#add-a-tag
https://docs.openstack.org/api-ref/networking/v2/index.html#add-a-tag
"""
uri = '/%s/%s/tags/%s' % (resource_type, resource_id, tag)
return self.update_resource(
@@ -36,7 +36,7 @@ class TagsClient(base.BaseNetworkClient):
"""Confirm that a given tag is set on the resource.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#confirm-a-tag
https://docs.openstack.org/api-ref/networking/v2/index.html#confirm-a-tag
"""
# TODO(felipemonteiro): Use the "check_resource" method in
# ``BaseNetworkClient`` once it has been implemented.
@@ -50,7 +50,7 @@ class TagsClient(base.BaseNetworkClient):
"""Replace all tags on the resource.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#replace-all-tags
https://docs.openstack.org/api-ref/networking/v2/index.html#replace-all-tags
"""
uri = '/%s/%s/tags' % (resource_type, resource_id)
put_body = {"tags": tags}
@@ -60,7 +60,7 @@ class TagsClient(base.BaseNetworkClient):
"""Removes a tag on the resource.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#remove-a-tag
https://docs.openstack.org/api-ref/networking/v2/index.html#remove-a-tag
"""
uri = '/%s/%s/tags/%s' % (resource_type, resource_id, tag)
return self.delete_resource(uri)
@@ -69,7 +69,7 @@ class TagsClient(base.BaseNetworkClient):
"""Removes all tags on the resource.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#remove-all-tags
https://docs.openstack.org/api-ref/networking/v2/index.html#remove-all-tags
"""
uri = '/%s/%s/tags' % (resource_type, resource_id)
return self.delete_resource(uri)
@@ -78,7 +78,7 @@ class TagsClient(base.BaseNetworkClient):
"""Retrieves the tags for a resource.
For more information, please refer to the official API reference:
http://developer.openstack.org/api-ref/networking/v2/index.html#obtain-tag-list
https://docs.openstack.org/api-ref/networking/v2/index.html#obtain-tag-list
"""
uri = '/%s/%s/tags' % (resource_type, resource_id)
return self.list_resources(uri)
@@ -24,7 +24,7 @@ class NetworkVersionsClient(base.BaseNetworkClient):
"""Do a GET / to fetch available API version information.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#list-api-versions
https://docs.openstack.org/api-ref/network/v2/index.html#list-api-versions
"""
# Note: we do a self.get('/') here because we want to use
@@ -38,7 +38,7 @@ class NetworkVersionsClient(base.BaseNetworkClient):
"""Do a GET /<version> to fetch available resources.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/network/v2/index.html#show-api-v2-details
https://docs.openstack.org/api-ref/network/v2/index.html#show-api-v2-details
"""
resp, body = self.get(version + '/')
@@ -34,7 +34,7 @@ class AccountClient(rest_client.RestClient):
Account Metadata can be created, updated or deleted based on
metadata header or value. For detailed info, please refer to the
official API reference:
https://developer.openstack.org/api-ref/object-store/#create-update-or-delete-account-metadata
https://docs.openstack.org/api-ref/object-store/#create-update-or-delete-account-metadata
"""
headers = {}
if create_update_metadata:
@@ -63,7 +63,7 @@ class AccountClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/object-store/#show-account-details-and-list-containers
https://docs.openstack.org/api-ref/object-store/#show-account-details-and-list-containers
"""
url = '?%s' % urllib.urlencode(params) if params else ''
@@ -30,7 +30,7 @@ class ContainerClient(rest_client.RestClient):
with optional metadata passed in as a dictionary.
Full list of allowed headers or value, please refer to the
official API reference:
https://developer.openstack.org/api-ref/object-store/#create-container
https://docs.openstack.org/api-ref/object-store/#create-container
"""
url = str(container_name)
@@ -61,7 +61,7 @@ class ContainerClient(rest_client.RestClient):
Container Metadata can be created, updated or deleted based on
metadata header or value. For detailed info, please refer to the
official API reference:
https://developer.openstack.org/api-ref/object-store/#create-update-or-delete-container-metadata
https://docs.openstack.org/api-ref/object-store/#create-update-or-delete-container-metadata
"""
url = str(container_name)
headers = {}
@@ -97,7 +97,7 @@ class ContainerClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/object-store/#show-container-details-and-list-objects
https://docs.openstack.org/api-ref/object-store/#show-container-details-and-list-objects
"""
url = str(container_name)
@@ -26,7 +26,7 @@ class PlacementClient(base_placement_client.BasePlacementClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/placement/#list-allocation-candidates
https://docs.openstack.org/api-ref/placement/#list-allocation-candidates
"""
url = '/allocation_candidates'
if params:
@@ -41,7 +41,7 @@ class PlacementClient(base_placement_client.BasePlacementClient):
For full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/placement/#list-allocations
https://docs.openstack.org/api-ref/placement/#list-allocations
"""
url = '/allocations/%s' % consumer_uuid
resp, body = self.get(url)
@@ -28,7 +28,7 @@ class BackupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#create-backup
https://docs.openstack.org/api-ref/block-storage/v2/#create-backup
"""
post_body = json.dumps({'backup': kwargs})
resp, body = self.post('backups', post_body)
@@ -41,7 +41,7 @@ class BackupsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#restore-backup
https://docs.openstack.org/api-ref/block-storage/v2/#restore-backup
"""
post_body = json.dumps({'restore': kwargs})
resp, body = self.post('backups/%s/restore' % (backup_id), post_body)
@@ -51,7 +51,7 @@ class EncryptionTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#create-an-encryption-type-for-v2
https://docs.openstack.org/api-ref/block-storage/v2/#create-an-encryption-type-for-v2
"""
url = "/types/%s/encryption" % volume_type_id
post_body = json.dumps({'encryption': kwargs})
@@ -27,7 +27,7 @@ class HostsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#list-all-hosts
https://docs.openstack.org/api-ref/block-storage/v2/#list-all-hosts
"""
url = 'os-hosts'
if params:
+3 -3
View File
@@ -43,7 +43,7 @@ class QosSpecsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#create-qos-specification
https://docs.openstack.org/api-ref/block-storage/v2/#create-qos-specification
"""
post_body = json.dumps({'qos_specs': kwargs})
resp, body = self.post('qos-specs', post_body)
@@ -79,7 +79,7 @@ class QosSpecsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#set-keys-in-qos-specification
https://docs.openstack.org/api-ref/block-storage/v2/#set-keys-in-qos-specification
"""
put_body = json.dumps({"qos_specs": kwargs})
resp, body = self.put('qos-specs/%s' % qos_id, put_body)
@@ -94,7 +94,7 @@ class QosSpecsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#unset-keys-in-qos-specification
https://docs.openstack.org/api-ref/block-storage/v2/#unset-keys-in-qos-specification
"""
put_body = json.dumps({'keys': keys})
resp, body = self.put('qos-specs/%s/delete_keys' % qos_id, put_body)
@@ -47,7 +47,7 @@ class QuotasClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#update-quotas
https://docs.openstack.org/api-ref/block-storage/v2/#update-quotas
"""
put_body = jsonutils.dumps({'quota_set': kwargs})
resp, body = self.put('os-quota-sets/%s' % tenant_id, put_body)
@@ -27,8 +27,8 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#list-snapshots
https://developer.openstack.org/api-ref/block-storage/v2/#list-snapshots-with-details
https://docs.openstack.org/api-ref/block-storage/v2/#list-snapshots
https://docs.openstack.org/api-ref/block-storage/v2/#list-snapshots-with-details
"""
url = 'snapshots'
if detail:
@@ -46,7 +46,7 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#show-snapshot-details
https://docs.openstack.org/api-ref/block-storage/v2/#show-snapshot-details
"""
url = "snapshots/%s" % snapshot_id
resp, body = self.get(url)
@@ -59,7 +59,7 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#create-snapshot
https://docs.openstack.org/api-ref/block-storage/v2/#create-snapshot
"""
post_body = json.dumps({'snapshot': kwargs})
resp, body = self.post('snapshots', post_body)
@@ -72,7 +72,7 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#delete-snapshot
https://docs.openstack.org/api-ref/block-storage/v2/#delete-snapshot
"""
resp, body = self.delete("snapshots/%s" % snapshot_id)
self.expected_success(202, resp.status)
@@ -124,7 +124,7 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#update-snapshot
https://docs.openstack.org/api-ref/block-storage/v2/#update-snapshot
"""
put_body = json.dumps({'snapshot': kwargs})
resp, body = self.put('snapshots/%s' % snapshot_id, put_body)
@@ -137,7 +137,7 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#show-snapshot-metadata
https://docs.openstack.org/api-ref/block-storage/v2/#show-snapshot-metadata
"""
url = "snapshots/%s/metadata" % snapshot_id
resp, body = self.get(url)
@@ -150,7 +150,7 @@ class SnapshotsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#update-snapshot-metadata
https://docs.openstack.org/api-ref/block-storage/v2/#update-snapshot-metadata
"""
put_body = json.dumps(kwargs)
url = "snapshots/%s/metadata" % snapshot_id
@@ -40,7 +40,7 @@ class TypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#list-all-volume-types-for-v2
https://docs.openstack.org/api-ref/block-storage/v2/#list-all-volume-types-for-v2
"""
url = 'types'
if params:
@@ -56,7 +56,7 @@ class TypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#show-volume-type-details-for-v2
https://docs.openstack.org/api-ref/block-storage/v2/#show-volume-type-details-for-v2
"""
url = "types/%s" % volume_type_id
resp, body = self.get(url)
@@ -69,7 +69,7 @@ class TypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#create-volume-type-for-v2
https://docs.openstack.org/api-ref/block-storage/v2/#create-volume-type-for-v2
"""
post_body = json.dumps({'volume_type': kwargs})
resp, body = self.post('types', post_body)
@@ -82,7 +82,7 @@ class TypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#delete-volume-type
https://docs.openstack.org/api-ref/block-storage/v2/#delete-volume-type
"""
resp, body = self.delete("types/%s" % volume_type_id)
self.expected_success(202, resp.status)
@@ -137,7 +137,7 @@ class TypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#update-volume-type
https://docs.openstack.org/api-ref/block-storage/v2/#update-volume-type
"""
put_body = json.dumps({'volume_type': kwargs})
resp, body = self.put('types/%s' % volume_type_id, put_body)
@@ -156,7 +156,7 @@ class TypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#update-extra-specs-for-a-volume-type
https://docs.openstack.org/api-ref/block-storage/v2/#update-extra-specs-for-a-volume-type
"""
url = "types/%s/extra_specs/%s" % (volume_type_id, extra_spec_name)
put_body = json.dumps(extra_specs)
@@ -41,8 +41,8 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#list-volumes
https://developer.openstack.org/api-ref/block-storage/v2/#list-volumes-with-details
https://docs.openstack.org/api-ref/block-storage/v2/#list-volumes
https://docs.openstack.org/api-ref/block-storage/v2/#list-volumes-with-details
"""
url = 'volumes'
if detail:
@@ -68,7 +68,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#create-volume
https://docs.openstack.org/api-ref/block-storage/v2/#create-volume
"""
post_body = json.dumps({'volume': kwargs})
resp, body = self.post('volumes', post_body)
@@ -81,7 +81,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#update-volume
https://docs.openstack.org/api-ref/block-storage/v2/#update-volume
"""
put_body = json.dumps({'volume': kwargs})
resp, body = self.put('volumes/%s' % volume_id, put_body)
@@ -109,7 +109,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#attach-volume-to-server
https://docs.openstack.org/api-ref/block-storage/v2/#attach-volume-to-server
"""
post_body = json.dumps({'os-attach': kwargs})
url = 'volumes/%s/action' % (volume_id)
@@ -166,7 +166,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#extend-volume-size
https://docs.openstack.org/api-ref/block-storage/v2/#extend-volume-size
"""
post_body = json.dumps({'os-extend': kwargs})
url = 'volumes/%s/action' % (volume_id)
@@ -179,7 +179,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#reset-volume-statuses
https://docs.openstack.org/api-ref/block-storage/v2/#reset-volume-statuses
"""
post_body = json.dumps({'os-reset_status': kwargs})
resp, body = self.post('volumes/%s/action' % volume_id, post_body)
@@ -191,7 +191,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#create-volume-transfer
https://docs.openstack.org/api-ref/block-storage/v2/#create-volume-transfer
"""
post_body = json.dumps({'transfer': kwargs})
resp, body = self.post('os-volume-transfer', post_body)
@@ -212,7 +212,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#list-volume-transfers
https://docs.openstack.org/api-ref/block-storage/v2/#list-volume-transfers
"""
url = 'os-volume-transfer'
if params:
@@ -233,7 +233,7 @@ class VolumesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/#accept-volume-transfer
https://docs.openstack.org/api-ref/block-storage/v2/#accept-volume-transfer
"""
url = 'os-volume-transfer/%s/accept' % transfer_id
post_body = json.dumps({'accept': kwargs})
@@ -29,7 +29,7 @@ class BackupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#create-a-backup
https://docs.openstack.org/api-ref/block-storage/v3/index.html#create-a-backup
"""
post_body = json.dumps({'backup': kwargs})
resp, body = self.post('backups', post_body)
@@ -42,7 +42,7 @@ class BackupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#update-a-backup
https://docs.openstack.org/api-ref/block-storage/v3/#update-a-backup
"""
put_body = json.dumps({'backup': kwargs})
resp, body = self.put('backups/%s' % backup_id, put_body)
@@ -55,7 +55,7 @@ class BackupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#restore-a-backup
https://docs.openstack.org/api-ref/block-storage/v3/index.html#restore-a-backup
"""
post_body = json.dumps({'restore': kwargs})
resp, body = self.post('backups/%s/restore' % (backup_id), post_body)
@@ -82,8 +82,8 @@ class BackupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#list-backups-for-project
https://developer.openstack.org/api-ref/block-storage/v3/index.html#list-backups-with-detail
https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-backups-for-project
https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-backups-with-detail
"""
url = "backups"
if detail:
@@ -108,7 +108,7 @@ class BackupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#import-a-backup
https://docs.openstack.org/api-ref/block-storage/v3/index.html#import-a-backup
"""
post_body = json.dumps({'backup-record': kwargs})
resp, body = self.post("backups/import_record", post_body)
@@ -25,7 +25,7 @@ class CapabilitiesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v2/index.html#show-back-end-capabilities
https://docs.openstack.org/api-ref/block-storage/v2/index.html#show-back-end-capabilities
"""
url = 'capabilities/%s' % host
resp, body = self.get(url)
@@ -59,7 +59,7 @@ class EncryptionTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#create-an-encryption-type
https://docs.openstack.org/api-ref/block-storage/v3/index.html#create-an-encryption-type
"""
url = "/types/%s/encryption" % volume_type_id
post_body = json.dumps({'encryption': kwargs})
@@ -80,7 +80,7 @@ class EncryptionTypesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#update-an-encryption-type
https://docs.openstack.org/api-ref/block-storage/v3/index.html#update-an-encryption-type
"""
url = "/types/%s/encryption/provider" % volume_type_id
put_body = json.dumps({'encryption': kwargs})
@@ -29,7 +29,7 @@ class GroupSnapshotsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#create-group-snapshot
https://docs.openstack.org/api-ref/block-storage/v3/#create-group-snapshot
"""
post_body = json.dumps({'group_snapshot': kwargs})
resp, body = self.post('group_snapshots', post_body)
@@ -41,7 +41,7 @@ class GroupSnapshotsClient(base_client.BaseClient):
"""Deletes a group snapshot.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#delete-group-snapshot
https://docs.openstack.org/api-ref/block-storage/v3/#delete-group-snapshot
"""
resp, body = self.delete('group_snapshots/%s' % group_snapshot_id)
self.expected_success(202, resp.status)
@@ -51,7 +51,7 @@ class GroupSnapshotsClient(base_client.BaseClient):
"""Returns the details of a single group snapshot.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#show-group-snapshot-details
https://docs.openstack.org/api-ref/block-storage/v3/#show-group-snapshot-details
"""
url = "group_snapshots/%s" % str(group_snapshot_id)
resp, body = self.get(url)
@@ -63,8 +63,8 @@ class GroupSnapshotsClient(base_client.BaseClient):
"""Information for all the tenant's group snapshots.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#list-group-snapshots
https://developer.openstack.org/api-ref/block-storage/v3/#list-group-snapshots-with-details
https://docs.openstack.org/api-ref/block-storage/v3/#list-group-snapshots
https://docs.openstack.org/api-ref/block-storage/v3/#list-group-snapshots-with-details
"""
url = "group_snapshots"
if detail:
@@ -80,7 +80,7 @@ class GroupSnapshotsClient(base_client.BaseClient):
"""Resets group snapshot status.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#reset-group-snapshot-status
https://docs.openstack.org/api-ref/block-storage/v3/#reset-group-snapshot-status
"""
post_body = json.dumps({'reset_status': {'status': status_to_set}})
resp, body = self.post('group_snapshots/%s/action' % group_snapshot_id,
@@ -33,7 +33,7 @@ class GroupTypesClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#create-group-type
https://docs.openstack.org/api-ref/block-storage/v3/#create-group-type
"""
post_body = json.dumps({'group_type': kwargs})
resp, body = self.post('group_types', post_body)
@@ -52,7 +52,7 @@ class GroupTypesClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#list-group-types
https://docs.openstack.org/api-ref/block-storage/v3/#list-group-types
"""
url = 'group_types'
if params:
@@ -67,7 +67,7 @@ class GroupTypesClient(base_client.BaseClient):
"""Returns the details of default group_type.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#show-default-group-type-details
https://docs.openstack.org/api-ref/block-storage/v3/#show-default-group-type-details
"""
url = 'group_types/default'
resp, body = self.get(url)
@@ -79,7 +79,7 @@ class GroupTypesClient(base_client.BaseClient):
"""Returns the details of a single group_type.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#show-group-type-details
https://docs.openstack.org/api-ref/block-storage/v3/#show-group-type-details
"""
url = "group_types/%s" % group_type_id
resp, body = self.get(url)
@@ -92,7 +92,7 @@ class GroupTypesClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#update-group-type
https://docs.openstack.org/api-ref/block-storage/v3/#update-group-type
"""
post_body = json.dumps({'group_type': kwargs})
resp, body = self.put('group_types/%s' % group_type_id, post_body)
@@ -105,7 +105,7 @@ class GroupTypesClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#create-or-update-group-specs-for-a-group-type
https://docs.openstack.org/api-ref/block-storage/v3/#create-or-update-group-specs-for-a-group-type
"""
url = "group_types/%s/group_specs" % group_type_id
post_body = json.dumps({'group_specs': group_specs})
@@ -135,7 +135,7 @@ class GroupTypesClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#update-one-specific-group-spec-for-a-group-type
https://docs.openstack.org/api-ref/block-storage/v3/#update-one-specific-group-spec-for-a-group-type
"""
url = "group_types/%s/group_specs/%s" % (group_type_id, spec_id)
put_body = json.dumps(spec)
@@ -30,7 +30,7 @@ class GroupsClient(base_client.BaseClient):
group_type and volume_types are required parameters in kwargs.
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#create-group
https://docs.openstack.org/api-ref/block-storage/v3/#create-group
"""
post_body = json.dumps({'group': kwargs})
resp, body = self.post('groups', post_body)
@@ -43,7 +43,7 @@ class GroupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#delete-group
https://docs.openstack.org/api-ref/block-storage/v3/#delete-group
"""
post_body = {'delete-volumes': delete_volumes}
post_body = json.dumps({'delete': post_body})
@@ -57,7 +57,7 @@ class GroupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#show-group-details
https://docs.openstack.org/api-ref/block-storage/v3/#show-group-details
"""
url = "groups/%s" % str(group_id)
resp, body = self.get(url)
@@ -70,8 +70,8 @@ class GroupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#list-groups
https://developer.openstack.org/api-ref/block-storage/v3/#list-groups-with-details
https://docs.openstack.org/api-ref/block-storage/v3/#list-groups
https://docs.openstack.org/api-ref/block-storage/v3/#list-groups-with-details
"""
url = "groups"
if detail:
@@ -88,7 +88,7 @@ class GroupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#create-group-from-source
https://docs.openstack.org/api-ref/block-storage/v3/#create-group-from-source
"""
post_body = json.dumps({'create-from-src': kwargs})
resp, body = self.post('groups/action', post_body)
@@ -101,7 +101,7 @@ class GroupsClient(base_client.BaseClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#update-group
https://docs.openstack.org/api-ref/block-storage/v3/#update-group
"""
put_body = json.dumps({'group': kwargs})
resp, body = self.put('groups/%s' % group_id, put_body)
@@ -112,7 +112,7 @@ class GroupsClient(base_client.BaseClient):
"""Resets group status.
For more information, please refer to the official API reference:
https://developer.openstack.org/api-ref/block-storage/v3/#reset-group-status
https://docs.openstack.org/api-ref/block-storage/v3/#reset-group-status
"""
post_body = json.dumps({'reset_status': {'status': status_to_set}})
resp, body = self.post('groups/%s/action' % group_id, post_body)
@@ -27,7 +27,7 @@ class HostsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#list-all-hosts-for-a-project
https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-all-hosts-for-a-project
"""
url = 'os-hosts'
if params:
+3 -3
View File
@@ -42,7 +42,7 @@ class QosSpecsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#create-a-qos-specification
https://docs.openstack.org/api-ref/block-storage/v3/index.html#create-a-qos-specification
"""
post_body = json.dumps({'qos_specs': kwargs})
resp, body = self.post('qos-specs', post_body)
@@ -78,7 +78,7 @@ class QosSpecsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#set-keys-in-a-qos-specification
https://docs.openstack.org/api-ref/block-storage/v3/index.html#set-keys-in-a-qos-specification
"""
put_body = json.dumps({"qos_specs": kwargs})
resp, body = self.put('qos-specs/%s' % qos_id, put_body)
@@ -93,7 +93,7 @@ class QosSpecsClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#unset-keys-in-a-qos-specification
https://docs.openstack.org/api-ref/block-storage/v3/index.html#unset-keys-in-a-qos-specification
"""
put_body = json.dumps({'keys': keys})
resp, body = self.put('qos-specs/%s/delete_keys' % qos_id, put_body)
@@ -26,7 +26,7 @@ class QuotaClassesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#show-quota-classes-for-a-project
https://docs.openstack.org/api-ref/block-storage/v3/index.html#show-quota-classes-for-a-project
"""
url = 'os-quota-class-sets/%s' % quota_class_id
resp, body = self.get(url)
@@ -39,7 +39,7 @@ class QuotaClassesClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#update-quota-classes-for-a-project
https://docs.openstack.org/api-ref/block-storage/v3/index.html#update-quota-classes-for-a-project
"""
url = 'os-quota-class-sets/%s' % quota_class_id
put_body = json.dumps({'quota_class_set': kwargs})
@@ -48,7 +48,7 @@ class QuotasClient(rest_client.RestClient):
For a full list of available parameters, please refer to the official
API reference:
https://developer.openstack.org/api-ref/block-storage/v3/index.html#update-quotas-for-a-project
https://docs.openstack.org/api-ref/block-storage/v3/index.html#update-quotas-for-a-project
"""
put_body = jsonutils.dumps({'quota_set': kwargs})
resp, body = self.put('os-quota-sets/%s' % tenant_id, put_body)
Loaded 100 of 108 files, more files were not shown because too many files have changed in this diff. Show more