python-openstackclient 7.4.0__py3-none-any.whl → 8.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/common/availability_zone.py +3 -6
- openstackclient/common/clientmanager.py +2 -1
- openstackclient/common/envvars.py +57 -0
- openstackclient/common/extension.py +3 -11
- openstackclient/common/limits.py +1 -1
- openstackclient/common/project_cleanup.py +3 -2
- openstackclient/common/quota.py +54 -28
- openstackclient/compute/client.py +7 -5
- openstackclient/compute/v2/agent.py +5 -5
- openstackclient/compute/v2/aggregate.py +17 -15
- openstackclient/compute/v2/console.py +10 -4
- openstackclient/compute/v2/console_connection.py +48 -0
- openstackclient/compute/v2/flavor.py +14 -18
- openstackclient/compute/v2/host.py +3 -3
- openstackclient/compute/v2/hypervisor.py +10 -4
- openstackclient/compute/v2/hypervisor_stats.py +1 -1
- openstackclient/compute/v2/keypair.py +18 -13
- openstackclient/compute/v2/server.py +144 -121
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_event.py +8 -17
- openstackclient/compute/v2/server_group.py +6 -6
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +6 -6
- openstackclient/compute/v2/server_volume.py +4 -4
- openstackclient/compute/v2/service.py +9 -13
- openstackclient/compute/v2/usage.py +4 -6
- openstackclient/identity/client.py +2 -4
- openstackclient/identity/common.py +95 -17
- openstackclient/identity/v2_0/ec2creds.py +4 -3
- openstackclient/identity/v2_0/endpoint.py +12 -10
- openstackclient/identity/v2_0/project.py +6 -6
- openstackclient/identity/v2_0/role.py +1 -1
- openstackclient/identity/v2_0/service.py +7 -7
- openstackclient/identity/v2_0/user.py +6 -21
- openstackclient/identity/v3/access_rule.py +2 -5
- openstackclient/identity/v3/application_credential.py +2 -2
- openstackclient/identity/v3/consumer.py +4 -3
- openstackclient/identity/v3/credential.py +6 -7
- openstackclient/identity/v3/domain.py +63 -44
- openstackclient/identity/v3/ec2creds.py +4 -3
- openstackclient/identity/v3/endpoint.py +104 -88
- openstackclient/identity/v3/endpoint_group.py +1 -1
- openstackclient/identity/v3/group.py +116 -72
- openstackclient/identity/v3/identity_provider.py +1 -2
- openstackclient/identity/v3/limit.py +4 -9
- openstackclient/identity/v3/mapping.py +4 -3
- openstackclient/identity/v3/policy.py +5 -8
- openstackclient/identity/v3/project.py +23 -6
- openstackclient/identity/v3/region.py +2 -5
- openstackclient/identity/v3/registered_limit.py +4 -8
- openstackclient/identity/v3/role.py +15 -16
- openstackclient/identity/v3/service.py +8 -8
- openstackclient/identity/v3/service_provider.py +3 -6
- openstackclient/identity/v3/tag.py +2 -2
- openstackclient/identity/v3/token.py +1 -2
- openstackclient/identity/v3/trust.py +74 -25
- openstackclient/identity/v3/user.py +47 -11
- openstackclient/image/client.py +7 -5
- openstackclient/image/v1/image.py +11 -15
- openstackclient/image/v2/cache.py +2 -4
- openstackclient/image/v2/image.py +41 -48
- openstackclient/image/v2/metadef_namespaces.py +4 -3
- openstackclient/image/v2/metadef_resource_type_association.py +1 -2
- openstackclient/image/v2/metadef_resource_types.py +1 -2
- openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +9 -1370
- openstackclient/network/client.py +4 -16
- openstackclient/network/common.py +16 -12
- openstackclient/network/utils.py +3 -3
- openstackclient/network/v2/address_group.py +5 -9
- openstackclient/network/v2/address_scope.py +2 -3
- openstackclient/network/v2/default_security_group_rule.py +1 -2
- openstackclient/network/v2/floating_ip.py +69 -47
- openstackclient/network/v2/floating_ip_port_forwarding.py +7 -7
- openstackclient/network/v2/ip_availability.py +1 -2
- openstackclient/network/v2/l3_conntrack_helper.py +8 -12
- openstackclient/network/v2/local_ip.py +24 -26
- openstackclient/network/v2/local_ip_association.py +4 -5
- openstackclient/network/v2/ndp_proxy.py +9 -10
- openstackclient/network/v2/network.py +12 -16
- openstackclient/network/v2/network_agent.py +29 -37
- openstackclient/network/v2/network_auto_allocated_topology.py +4 -5
- openstackclient/network/v2/network_flavor.py +1 -1
- openstackclient/network/v2/network_flavor_profile.py +5 -5
- openstackclient/network/v2/network_meter.py +3 -3
- openstackclient/network/v2/network_meter_rule.py +5 -8
- openstackclient/network/v2/network_qos_policy.py +4 -4
- openstackclient/network/v2/network_qos_rule.py +7 -16
- openstackclient/network/v2/network_rbac.py +4 -4
- openstackclient/network/v2/network_segment.py +6 -7
- openstackclient/network/v2/network_segment_range.py +16 -20
- openstackclient/network/v2/network_trunk.py +24 -16
- openstackclient/network/v2/port.py +28 -29
- openstackclient/network/v2/router.py +53 -42
- openstackclient/network/v2/security_group.py +13 -19
- openstackclient/network/v2/security_group_rule.py +10 -11
- openstackclient/network/v2/subnet.py +31 -30
- openstackclient/network/v2/subnet_pool.py +4 -4
- openstackclient/object/client.py +2 -3
- openstackclient/object/v1/container.py +2 -3
- openstackclient/object/v1/object.py +2 -9
- openstackclient/shell.py +22 -5
- openstackclient/tests/functional/base.py +7 -3
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +12 -6
- openstackclient/tests/functional/compute/v2/test_keypair.py +41 -5
- openstackclient/tests/functional/compute/v2/test_server.py +2 -3
- openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
- openstackclient/tests/functional/identity/v2/test_user.py +1 -1
- openstackclient/tests/functional/identity/v3/common.py +3 -8
- openstackclient/tests/functional/identity/v3/test_application_credential.py +10 -10
- openstackclient/tests/functional/identity/v3/test_endpoint.py +3 -3
- openstackclient/tests/functional/identity/v3/test_group.py +3 -3
- openstackclient/tests/functional/identity/v3/test_idp.py +3 -7
- openstackclient/tests/functional/identity/v3/test_limit.py +4 -4
- openstackclient/tests/functional/identity/v3/test_project.py +5 -14
- openstackclient/tests/functional/identity/v3/test_region.py +1 -3
- openstackclient/tests/functional/identity/v3/test_registered_limit.py +3 -3
- openstackclient/tests/functional/identity/v3/test_role.py +1 -1
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +13 -31
- openstackclient/tests/functional/identity/v3/test_service_provider.py +3 -7
- openstackclient/tests/functional/identity/v3/test_user.py +8 -8
- openstackclient/tests/functional/network/v2/common.py +7 -3
- openstackclient/tests/functional/network/v2/test_address_group.py +4 -0
- openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +15 -11
- openstackclient/tests/functional/network/v2/test_local_ip.py +4 -0
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +2 -2
- openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +2 -3
- openstackclient/tests/functional/network/v2/test_network_rbac.py +2 -2
- openstackclient/tests/functional/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/functional/network/v2/test_port.py +17 -7
- openstackclient/tests/functional/network/v2/test_router.py +42 -0
- openstackclient/tests/functional/network/v2/test_subnet_pool.py +4 -0
- openstackclient/tests/unit/api/test_compute_v2.py +67 -87
- openstackclient/tests/unit/common/test_availability_zone.py +6 -14
- openstackclient/tests/unit/common/test_command.py +1 -1
- openstackclient/tests/unit/common/test_extension.py +5 -7
- openstackclient/tests/unit/common/test_limits.py +1 -1
- openstackclient/tests/unit/common/test_project_cleanup.py +5 -6
- openstackclient/tests/unit/common/test_quota.py +51 -28
- openstackclient/tests/unit/compute/v2/fakes.py +85 -315
- openstackclient/tests/unit/compute/v2/test_agent.py +16 -16
- openstackclient/tests/unit/compute/v2/test_aggregate.py +56 -60
- openstackclient/tests/unit/compute/v2/test_console.py +34 -17
- openstackclient/tests/unit/compute/v2/test_console_connection.py +72 -0
- openstackclient/tests/unit/compute/v2/test_flavor.py +72 -72
- openstackclient/tests/unit/compute/v2/test_host.py +8 -8
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +22 -30
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +36 -29
- openstackclient/tests/unit/compute/v2/test_server.py +693 -606
- openstackclient/tests/unit/compute/v2/test_server_backup.py +36 -77
- openstackclient/tests/unit/compute/v2/test_server_event.py +18 -20
- openstackclient/tests/unit/compute/v2/test_server_group.py +25 -31
- openstackclient/tests/unit/compute/v2/test_server_image.py +37 -78
- openstackclient/tests/unit/compute/v2/test_server_migration.py +41 -41
- openstackclient/tests/unit/compute/v2/test_server_volume.py +12 -12
- openstackclient/tests/unit/compute/v2/test_service.py +39 -45
- openstackclient/tests/unit/compute/v2/test_usage.py +5 -5
- openstackclient/tests/unit/identity/v2_0/fakes.py +1 -1
- openstackclient/tests/unit/identity/v3/test_access_rule.py +1 -3
- openstackclient/tests/unit/identity/v3/test_application_credential.py +48 -26
- openstackclient/tests/unit/identity/v3/test_domain.py +115 -105
- openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
- openstackclient/tests/unit/identity/v3/test_group.py +353 -202
- openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
- openstackclient/tests/unit/identity/v3/test_project.py +16 -0
- openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
- openstackclient/tests/unit/identity/v3/test_user.py +102 -6
- openstackclient/tests/unit/image/v1/fakes.py +2 -2
- openstackclient/tests/unit/image/v1/test_image.py +8 -9
- openstackclient/tests/unit/image/v2/test_image.py +84 -46
- openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
- openstackclient/tests/unit/network/test_common.py +2 -2
- openstackclient/tests/unit/network/v2/fakes.py +405 -485
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +62 -54
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +2 -2
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +1 -3
- openstackclient/tests/unit/network/v2/test_network.py +4 -4
- openstackclient/tests/unit/network/v2/test_network_agent.py +15 -29
- openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +16 -19
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +79 -152
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +4 -6
- openstackclient/tests/unit/network/v2/test_network_rbac.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
- openstackclient/tests/unit/network/v2/test_port.py +21 -22
- openstackclient/tests/unit/network/v2/test_router.py +130 -51
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
- openstackclient/tests/unit/network/v2/test_security_group_network.py +25 -27
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +15 -17
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +33 -39
- openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
- openstackclient/tests/unit/test_shell.py +16 -13
- openstackclient/tests/unit/volume/v2/fakes.py +1 -2
- openstackclient/tests/unit/volume/v2/test_service.py +57 -91
- openstackclient/tests/unit/volume/v2/test_volume.py +109 -106
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +141 -148
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +293 -283
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +1 -1
- openstackclient/tests/unit/volume/v3/fakes.py +2 -8
- openstackclient/tests/unit/volume/v3/test_block_storage_log_level.py +61 -71
- openstackclient/tests/unit/volume/v3/test_service.py +221 -141
- openstackclient/tests/unit/volume/v3/test_volume.py +131 -120
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +4 -4
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +198 -203
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +683 -49
- openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +1 -1
- openstackclient/volume/client.py +1 -3
- openstackclient/volume/v2/consistency_group.py +4 -8
- openstackclient/volume/v2/consistency_group_snapshot.py +1 -2
- openstackclient/volume/v2/qos_specs.py +1 -2
- openstackclient/volume/v2/service.py +41 -38
- openstackclient/volume/v2/volume.py +71 -53
- openstackclient/volume/v2/volume_backup.py +15 -10
- openstackclient/volume/v2/volume_snapshot.py +129 -93
- openstackclient/volume/v2/volume_transfer_request.py +0 -3
- openstackclient/volume/v2/volume_type.py +10 -21
- openstackclient/volume/v3/block_storage_cluster.py +3 -3
- openstackclient/volume/v3/block_storage_log_level.py +22 -28
- openstackclient/volume/v3/block_storage_manage.py +1 -3
- openstackclient/volume/v3/service.py +105 -14
- openstackclient/volume/v3/volume.py +218 -58
- openstackclient/volume/v3/volume_attachment.py +3 -2
- openstackclient/volume/v3/volume_backup.py +31 -27
- openstackclient/volume/v3/volume_group.py +2 -1
- openstackclient/volume/v3/volume_group_snapshot.py +2 -1
- openstackclient/volume/v3/volume_snapshot.py +489 -13
- openstackclient/volume/v3/volume_type.py +10 -21
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/AUTHORS +11 -0
- python_openstackclient-8.1.0.dist-info/METADATA +264 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/RECORD +238 -259
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/entry_points.txt +7 -47
- python_openstackclient-8.1.0.dist-info/pbr.json +1 -0
- openstackclient/tests/functional/volume/v1/__init__.py +0 -0
- openstackclient/tests/functional/volume/v1/common.py +0 -35
- openstackclient/tests/functional/volume/v1/test_qos.py +0 -100
- openstackclient/tests/functional/volume/v1/test_service.py +0 -76
- openstackclient/tests/functional/volume/v1/test_snapshot.py +0 -232
- openstackclient/tests/functional/volume/v1/test_transfer_request.py +0 -111
- openstackclient/tests/functional/volume/v1/test_volume.py +0 -228
- openstackclient/tests/functional/volume/v1/test_volume_type.py +0 -213
- openstackclient/tests/unit/volume/v1/__init__.py +0 -0
- openstackclient/tests/unit/volume/v1/fakes.py +0 -615
- openstackclient/tests/unit/volume/v1/test_qos_specs.py +0 -471
- openstackclient/tests/unit/volume/v1/test_service.py +0 -295
- openstackclient/tests/unit/volume/v1/test_transfer_request.py +0 -380
- openstackclient/tests/unit/volume/v1/test_type.py +0 -633
- openstackclient/tests/unit/volume/v1/test_volume.py +0 -1447
- openstackclient/tests/unit/volume/v1/test_volume_backup.py +0 -435
- openstackclient/volume/v1/__init__.py +0 -0
- openstackclient/volume/v1/qos_specs.py +0 -377
- openstackclient/volume/v1/service.py +0 -136
- openstackclient/volume/v1/volume.py +0 -734
- openstackclient/volume/v1/volume_backup.py +0 -302
- openstackclient/volume/v1/volume_snapshot.py +0 -433
- openstackclient/volume/v1/volume_transfer_request.py +0 -200
- openstackclient/volume/v1/volume_type.py +0 -520
- python_openstackclient-7.4.0.dist-info/METADATA +0 -172
- python_openstackclient-7.4.0.dist-info/pbr.json +0 -1
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/top_level.txt +0 -0
|
@@ -98,7 +98,7 @@ class TestQuotaList(TestQuota):
|
|
|
98
98
|
_compute_quota_set.QuotaSet
|
|
99
99
|
)
|
|
100
100
|
# the defaults are global hence use of return_value here
|
|
101
|
-
self.
|
|
101
|
+
self.compute_client.get_quota_set_defaults.return_value = (
|
|
102
102
|
self.default_compute_quotas
|
|
103
103
|
)
|
|
104
104
|
self.compute_reference_data = (
|
|
@@ -164,7 +164,7 @@ class TestQuotaList(TestQuota):
|
|
|
164
164
|
|
|
165
165
|
def test_quota_list_compute(self):
|
|
166
166
|
# Two projects with non-default quotas
|
|
167
|
-
self.
|
|
167
|
+
self.compute_client.get_quota_set.side_effect = self.compute_quotas
|
|
168
168
|
|
|
169
169
|
arglist = [
|
|
170
170
|
'--compute',
|
|
@@ -183,7 +183,7 @@ class TestQuotaList(TestQuota):
|
|
|
183
183
|
|
|
184
184
|
def test_quota_list_compute_default(self):
|
|
185
185
|
# One of the projects is at defaults
|
|
186
|
-
self.
|
|
186
|
+
self.compute_client.get_quota_set.side_effect = [
|
|
187
187
|
self.compute_quotas[0],
|
|
188
188
|
self.default_compute_quotas,
|
|
189
189
|
]
|
|
@@ -205,7 +205,7 @@ class TestQuotaList(TestQuota):
|
|
|
205
205
|
|
|
206
206
|
def test_quota_list_compute_project_not_found(self):
|
|
207
207
|
# Make one of the projects disappear
|
|
208
|
-
self.
|
|
208
|
+
self.compute_client.get_quota_set.side_effect = [
|
|
209
209
|
self.compute_quotas[0],
|
|
210
210
|
sdk_exceptions.NotFoundException("NotFound"),
|
|
211
211
|
]
|
|
@@ -227,7 +227,7 @@ class TestQuotaList(TestQuota):
|
|
|
227
227
|
|
|
228
228
|
def test_quota_list_compute_project_inaccessible(self):
|
|
229
229
|
# Make one of the projects inaccessible
|
|
230
|
-
self.
|
|
230
|
+
self.compute_client.get_quota_set.side_effect = [
|
|
231
231
|
self.compute_quotas[0],
|
|
232
232
|
sdk_exceptions.ForbiddenException("Forbidden"),
|
|
233
233
|
]
|
|
@@ -249,7 +249,7 @@ class TestQuotaList(TestQuota):
|
|
|
249
249
|
|
|
250
250
|
def test_quota_list_compute_server_error(self):
|
|
251
251
|
# Make the server "break"
|
|
252
|
-
self.
|
|
252
|
+
self.compute_client.get_quota_set.side_effect = (
|
|
253
253
|
sdk_exceptions.HttpException("Not implemented?")
|
|
254
254
|
)
|
|
255
255
|
|
|
@@ -470,7 +470,7 @@ class TestQuotaSet(TestQuota):
|
|
|
470
470
|
'server_group_members': servgroup_members_num,
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
-
self.
|
|
473
|
+
self.compute_client.update_quota_set.assert_called_once_with(
|
|
474
474
|
self.projects[0].id, **kwargs
|
|
475
475
|
)
|
|
476
476
|
self.assertIsNone(result)
|
|
@@ -744,7 +744,7 @@ class TestQuotaSet(TestQuota):
|
|
|
744
744
|
'volumes': volumes,
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
-
self.
|
|
747
|
+
self.compute_client.update_quota_class_set.assert_called_with(
|
|
748
748
|
self.projects[0].name, **kwargs_compute
|
|
749
749
|
)
|
|
750
750
|
self.volume_sdk_client.update_quota_class_set.assert_called_with(
|
|
@@ -842,7 +842,7 @@ class TestQuotaSet(TestQuota):
|
|
|
842
842
|
'volumes': volumes,
|
|
843
843
|
}
|
|
844
844
|
|
|
845
|
-
self.
|
|
845
|
+
self.compute_client.update_quota_class_set.assert_called_with(
|
|
846
846
|
'default', **kwargs_compute
|
|
847
847
|
)
|
|
848
848
|
self.volume_sdk_client.update_quota_class_set.assert_called_with(
|
|
@@ -899,7 +899,7 @@ class TestQuotaSet(TestQuota):
|
|
|
899
899
|
'subnet': subnet,
|
|
900
900
|
'force': True,
|
|
901
901
|
}
|
|
902
|
-
self.
|
|
902
|
+
self.compute_client.update_quota_set.assert_called_once_with(
|
|
903
903
|
self.projects[0].id, **kwargs_compute
|
|
904
904
|
)
|
|
905
905
|
self.volume_sdk_client.update_quota_set.assert_called_once_with(
|
|
@@ -942,7 +942,7 @@ class TestQuotaSet(TestQuota):
|
|
|
942
942
|
'subnet': 10,
|
|
943
943
|
'check_limit': True,
|
|
944
944
|
}
|
|
945
|
-
self.
|
|
945
|
+
self.compute_client.update_quota_set.assert_called_once_with(
|
|
946
946
|
self.projects[0].id, **kwargs_compute
|
|
947
947
|
)
|
|
948
948
|
self.volume_sdk_client.update_quota_set.assert_called_once_with(
|
|
@@ -955,18 +955,35 @@ class TestQuotaSet(TestQuota):
|
|
|
955
955
|
|
|
956
956
|
|
|
957
957
|
class TestQuotaShow(TestQuota):
|
|
958
|
+
_network_quota_details = {
|
|
959
|
+
'floating_ips': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
960
|
+
'health_monitors': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
961
|
+
'l7_policies': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
962
|
+
'listeners': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
963
|
+
'load_balancers': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
964
|
+
'networks': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
965
|
+
'pools': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
966
|
+
'ports': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
967
|
+
'rbac_policies': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
968
|
+
'routers': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
969
|
+
'security_group_rules': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
970
|
+
'security_groups': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
971
|
+
'subnet_pools': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
972
|
+
'subnets': {'limit': 0, 'reserved': 0, 'used': 0},
|
|
973
|
+
}
|
|
974
|
+
|
|
958
975
|
def setUp(self):
|
|
959
976
|
super().setUp()
|
|
960
977
|
|
|
961
978
|
self.identity_sdk_client.find_project.return_value = self.projects[0]
|
|
962
979
|
|
|
963
|
-
self.
|
|
980
|
+
self.compute_client.get_quota_set.return_value = (
|
|
964
981
|
sdk_fakes.generate_fake_resource(_compute_quota_set.QuotaSet)
|
|
965
982
|
)
|
|
966
983
|
self.default_compute_quotas = sdk_fakes.generate_fake_resource(
|
|
967
984
|
_compute_quota_set.QuotaSet
|
|
968
985
|
)
|
|
969
|
-
self.
|
|
986
|
+
self.compute_client.get_quota_set_defaults.return_value = (
|
|
970
987
|
self.default_compute_quotas
|
|
971
988
|
)
|
|
972
989
|
|
|
@@ -980,9 +997,15 @@ class TestQuotaShow(TestQuota):
|
|
|
980
997
|
self.default_volume_quotas
|
|
981
998
|
)
|
|
982
999
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1000
|
+
def get_network_quota_mock(*args, **kwargs):
|
|
1001
|
+
if kwargs.get("details"):
|
|
1002
|
+
return sdk_fakes.generate_fake_resource(
|
|
1003
|
+
_network_quota_set.QuotaDetails,
|
|
1004
|
+
**self._network_quota_details,
|
|
1005
|
+
)
|
|
1006
|
+
return sdk_fakes.generate_fake_resource(_network_quota_set.Quota)
|
|
1007
|
+
|
|
1008
|
+
self.network_client.get_quota.side_effect = get_network_quota_mock
|
|
986
1009
|
self.default_network_quotas = sdk_fakes.generate_fake_resource(
|
|
987
1010
|
_network_quota_set.QuotaDefault
|
|
988
1011
|
)
|
|
@@ -1004,7 +1027,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1004
1027
|
|
|
1005
1028
|
self.cmd.take_action(parsed_args)
|
|
1006
1029
|
|
|
1007
|
-
self.
|
|
1030
|
+
self.compute_client.get_quota_set.assert_called_once_with(
|
|
1008
1031
|
self.projects[0].id,
|
|
1009
1032
|
usage=False,
|
|
1010
1033
|
)
|
|
@@ -1031,7 +1054,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1031
1054
|
|
|
1032
1055
|
self.cmd.take_action(parsed_args)
|
|
1033
1056
|
|
|
1034
|
-
self.
|
|
1057
|
+
self.compute_client.get_quota_set.assert_called_once_with(
|
|
1035
1058
|
self.projects[0].id,
|
|
1036
1059
|
usage=False,
|
|
1037
1060
|
)
|
|
@@ -1051,7 +1074,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1051
1074
|
|
|
1052
1075
|
self.cmd.take_action(parsed_args)
|
|
1053
1076
|
|
|
1054
|
-
self.
|
|
1077
|
+
self.compute_client.get_quota_set.assert_not_called()
|
|
1055
1078
|
self.volume_sdk_client.get_quota_set.assert_called_once_with(
|
|
1056
1079
|
self.projects[0].id,
|
|
1057
1080
|
usage=False,
|
|
@@ -1071,7 +1094,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1071
1094
|
|
|
1072
1095
|
self.cmd.take_action(parsed_args)
|
|
1073
1096
|
|
|
1074
|
-
self.
|
|
1097
|
+
self.compute_client.get_quota_set.assert_not_called()
|
|
1075
1098
|
self.volume_sdk_client.get_quota_set.assert_not_called()
|
|
1076
1099
|
self.network_client.get_quota.assert_called_once_with(
|
|
1077
1100
|
self.projects[0].id,
|
|
@@ -1092,7 +1115,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1092
1115
|
|
|
1093
1116
|
self.cmd.take_action(parsed_args)
|
|
1094
1117
|
|
|
1095
|
-
self.
|
|
1118
|
+
self.compute_client.get_quota_set_defaults.assert_called_once_with(
|
|
1096
1119
|
self.projects[0].id,
|
|
1097
1120
|
)
|
|
1098
1121
|
self.volume_sdk_client.get_quota_set_defaults.assert_called_once_with(
|
|
@@ -1116,7 +1139,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1116
1139
|
|
|
1117
1140
|
self.cmd.take_action(parsed_args)
|
|
1118
1141
|
|
|
1119
|
-
self.
|
|
1142
|
+
self.compute_client.get_quota_set.assert_called_once_with(
|
|
1120
1143
|
self.projects[0].id,
|
|
1121
1144
|
usage=True,
|
|
1122
1145
|
)
|
|
@@ -1138,7 +1161,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1138
1161
|
|
|
1139
1162
|
self.cmd.take_action(parsed_args)
|
|
1140
1163
|
|
|
1141
|
-
self.
|
|
1164
|
+
self.compute_client.get_quota_set.assert_called_once_with(
|
|
1142
1165
|
self.projects[1].id, usage=False
|
|
1143
1166
|
)
|
|
1144
1167
|
self.volume_sdk_client.get_quota_set.assert_called_once_with(
|
|
@@ -1158,7 +1181,7 @@ class TestQuotaDelete(TestQuota):
|
|
|
1158
1181
|
|
|
1159
1182
|
self.identity_sdk_client.find_project.return_value = self.projects[0]
|
|
1160
1183
|
|
|
1161
|
-
self.
|
|
1184
|
+
self.compute_client.revert_quota_set.return_value = None
|
|
1162
1185
|
self.volume_sdk_client.revert_quota_set.return_value = None
|
|
1163
1186
|
self.network_client.delete_quota.return_value = None
|
|
1164
1187
|
|
|
@@ -1182,7 +1205,7 @@ class TestQuotaDelete(TestQuota):
|
|
|
1182
1205
|
self.identity_sdk_client.find_project.assert_called_once_with(
|
|
1183
1206
|
self.projects[0].id, ignore_missing=False
|
|
1184
1207
|
)
|
|
1185
|
-
self.
|
|
1208
|
+
self.compute_client.revert_quota_set.assert_called_once_with(
|
|
1186
1209
|
self.projects[0].id,
|
|
1187
1210
|
)
|
|
1188
1211
|
self.volume_sdk_client.revert_quota_set.assert_called_once_with(
|
|
@@ -1211,7 +1234,7 @@ class TestQuotaDelete(TestQuota):
|
|
|
1211
1234
|
self.identity_sdk_client.find_project.assert_called_once_with(
|
|
1212
1235
|
self.projects[0].id, ignore_missing=False
|
|
1213
1236
|
)
|
|
1214
|
-
self.
|
|
1237
|
+
self.compute_client.revert_quota_set.assert_called_once_with(
|
|
1215
1238
|
self.projects[0].id,
|
|
1216
1239
|
)
|
|
1217
1240
|
self.volume_sdk_client.revert_quota_set.assert_not_called()
|
|
@@ -1236,7 +1259,7 @@ class TestQuotaDelete(TestQuota):
|
|
|
1236
1259
|
self.identity_sdk_client.find_project.assert_called_once_with(
|
|
1237
1260
|
self.projects[0].id, ignore_missing=False
|
|
1238
1261
|
)
|
|
1239
|
-
self.
|
|
1262
|
+
self.compute_client.revert_quota_set.assert_not_called()
|
|
1240
1263
|
self.volume_sdk_client.revert_quota_set.assert_called_once_with(
|
|
1241
1264
|
self.projects[0].id,
|
|
1242
1265
|
)
|
|
@@ -1261,7 +1284,7 @@ class TestQuotaDelete(TestQuota):
|
|
|
1261
1284
|
self.identity_sdk_client.find_project.assert_called_once_with(
|
|
1262
1285
|
self.projects[0].id, ignore_missing=False
|
|
1263
1286
|
)
|
|
1264
|
-
self.
|
|
1287
|
+
self.compute_client.revert_quota_set.assert_not_called()
|
|
1265
1288
|
self.volume_sdk_client.revert_quota_set.assert_not_called()
|
|
1266
1289
|
self.network_client.delete_quota.assert_called_once_with(
|
|
1267
1290
|
self.projects[0].id,
|