python-openstackclient 7.3.1__py3-none-any.whl → 8.0.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 +2 -5
- openstackclient/compute/v2/agent.py +5 -5
- openstackclient/compute/v2/aggregate.py +17 -15
- openstackclient/compute/v2/console.py +3 -4
- 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 +8 -10
- openstackclient/compute/v2/server.py +70 -112
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_event.py +7 -16
- 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 +16 -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/consumer.py +4 -3
- openstackclient/identity/v3/credential.py +8 -9
- openstackclient/identity/v3/domain.py +1 -1
- 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 +3 -4
- 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 +6 -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 +9 -6
- openstackclient/image/client.py +2 -5
- openstackclient/image/v1/image.py +11 -15
- openstackclient/image/v2/cache.py +2 -4
- openstackclient/image/v2/image.py +30 -37
- 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 -10
- 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 +14 -21
- 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 +4 -5
- 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 +42 -31
- openstackclient/network/v2/router.py +55 -41
- openstackclient/network/v2/security_group.py +8 -15
- openstackclient/network/v2/security_group_rule.py +9 -10
- 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 +2 -2
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +12 -6
- 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 +4 -10
- 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 +16 -16
- openstackclient/tests/unit/compute/v2/test_flavor.py +71 -71
- 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 +24 -24
- openstackclient/tests/unit/compute/v2/test_server.py +524 -560
- openstackclient/tests/unit/compute/v2/test_server_backup.py +5 -7
- openstackclient/tests/unit/compute/v2/test_server_event.py +16 -18
- openstackclient/tests/unit/compute/v2/test_server_group.py +25 -31
- openstackclient/tests/unit/compute/v2/test_server_image.py +6 -8
- openstackclient/tests/unit/compute/v2/test_server_migration.py +37 -37
- 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 +1 -1
- openstackclient/tests/unit/identity/v3/test_credential.py +4 -4
- openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
- openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
- openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
- openstackclient/tests/unit/identity/v3/test_user.py +16 -0
- openstackclient/tests/unit/image/v1/fakes.py +2 -2
- openstackclient/tests/unit/image/v2/test_image.py +39 -1
- openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
- openstackclient/tests/unit/network/test_common.py +2 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +49 -35
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
- openstackclient/tests/unit/network/v2/test_port.py +33 -5
- openstackclient/tests/unit/network/v2/test_router.py +120 -7
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +14 -14
- openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
- openstackclient/tests/unit/test_shell.py +16 -13
- openstackclient/tests/unit/volume/v2/test_volume.py +1 -1
- 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_volume.py +1 -1
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -3
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +1 -2
- 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/volume.py +8 -16
- openstackclient/volume/v2/volume_backup.py +6 -7
- openstackclient/volume/v2/volume_snapshot.py +8 -9
- 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_manage.py +1 -3
- openstackclient/volume/v3/volume.py +18 -19
- openstackclient/volume/v3/volume_attachment.py +3 -2
- openstackclient/volume/v3/volume_backup.py +7 -8
- openstackclient/volume/v3/volume_group.py +2 -1
- openstackclient/volume/v3/volume_group_snapshot.py +2 -1
- openstackclient/volume/v3/volume_snapshot.py +4 -3
- openstackclient/volume/v3/volume_type.py +10 -21
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/AUTHORS +4 -0
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/METADATA +7 -13
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/RECORD +210 -233
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/entry_points.txt +0 -41
- python_openstackclient-8.0.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.3.1.dist-info/pbr.json +0 -1
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/top_level.txt +0 -0
|
@@ -72,7 +72,7 @@ class TestCreateSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
72
72
|
columns, data = self.cmd.take_action(parsed_args)
|
|
73
73
|
|
|
74
74
|
sg_mock.assert_called_once_with(
|
|
75
|
-
self.
|
|
75
|
+
self.compute_client,
|
|
76
76
|
self._security_group['name'],
|
|
77
77
|
self._security_group['name'],
|
|
78
78
|
)
|
|
@@ -95,7 +95,7 @@ class TestCreateSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
95
95
|
columns, data = self.cmd.take_action(parsed_args)
|
|
96
96
|
|
|
97
97
|
sg_mock.assert_called_once_with(
|
|
98
|
-
self.
|
|
98
|
+
self.compute_client,
|
|
99
99
|
self._security_group['name'],
|
|
100
100
|
self._security_group['description'],
|
|
101
101
|
)
|
|
@@ -133,7 +133,7 @@ class TestDeleteSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
133
133
|
result = self.cmd.take_action(parsed_args)
|
|
134
134
|
|
|
135
135
|
sg_mock.assert_called_once_with(
|
|
136
|
-
self.
|
|
136
|
+
self.compute_client,
|
|
137
137
|
self._security_groups[0]['id'],
|
|
138
138
|
)
|
|
139
139
|
self.assertIsNone(result)
|
|
@@ -153,12 +153,8 @@ class TestDeleteSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
153
153
|
|
|
154
154
|
sg_mock.assert_has_calls(
|
|
155
155
|
[
|
|
156
|
-
mock.call(
|
|
157
|
-
|
|
158
|
-
),
|
|
159
|
-
mock.call(
|
|
160
|
-
self.compute_sdk_client, self._security_groups[1]['id']
|
|
161
|
-
),
|
|
156
|
+
mock.call(self.compute_client, self._security_groups[0]['id']),
|
|
157
|
+
mock.call(self.compute_client, self._security_groups[1]['id']),
|
|
162
158
|
]
|
|
163
159
|
)
|
|
164
160
|
self.assertIsNone(result)
|
|
@@ -187,9 +183,7 @@ class TestDeleteSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
187
183
|
|
|
188
184
|
sg_mock.assert_has_calls(
|
|
189
185
|
[
|
|
190
|
-
mock.call(
|
|
191
|
-
self.compute_sdk_client, self._security_groups[0]['id']
|
|
192
|
-
),
|
|
186
|
+
mock.call(self.compute_client, self._security_groups[0]['id']),
|
|
193
187
|
]
|
|
194
188
|
)
|
|
195
189
|
|
|
@@ -250,7 +244,7 @@ class TestListSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
250
244
|
columns, data = self.cmd.take_action(parsed_args)
|
|
251
245
|
|
|
252
246
|
sg_mock.assert_called_once_with(
|
|
253
|
-
self.
|
|
247
|
+
self.compute_client, all_projects=False
|
|
254
248
|
)
|
|
255
249
|
self.assertEqual(self.columns, columns)
|
|
256
250
|
self.assertCountEqual(self.data, list(data))
|
|
@@ -267,9 +261,7 @@ class TestListSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
267
261
|
|
|
268
262
|
columns, data = self.cmd.take_action(parsed_args)
|
|
269
263
|
|
|
270
|
-
sg_mock.assert_called_once_with(
|
|
271
|
-
self.compute_sdk_client, all_projects=True
|
|
272
|
-
)
|
|
264
|
+
sg_mock.assert_called_once_with(self.compute_client, all_projects=True)
|
|
273
265
|
self.assertEqual(self.columns_all_projects, columns)
|
|
274
266
|
self.assertCountEqual(self.data_all_projects, list(data))
|
|
275
267
|
|
|
@@ -309,7 +301,7 @@ class TestSetSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
309
301
|
result = self.cmd.take_action(parsed_args)
|
|
310
302
|
|
|
311
303
|
sg_mock.assert_called_once_with(
|
|
312
|
-
self.
|
|
304
|
+
self.compute_client, self._security_group['id']
|
|
313
305
|
)
|
|
314
306
|
self.assertIsNone(result)
|
|
315
307
|
|
|
@@ -334,7 +326,7 @@ class TestSetSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
334
326
|
result = self.cmd.take_action(parsed_args)
|
|
335
327
|
|
|
336
328
|
sg_mock.assert_called_once_with(
|
|
337
|
-
self.
|
|
329
|
+
self.compute_client,
|
|
338
330
|
self._security_group['id'],
|
|
339
331
|
name=new_name,
|
|
340
332
|
description=new_description,
|
|
@@ -394,7 +386,7 @@ class TestShowSecurityGroupCompute(compute_fakes.TestComputev2):
|
|
|
394
386
|
columns, data = self.cmd.take_action(parsed_args)
|
|
395
387
|
|
|
396
388
|
sg_mock.assert_called_once_with(
|
|
397
|
-
self.
|
|
389
|
+
self.compute_client, self._security_group['id']
|
|
398
390
|
)
|
|
399
391
|
self.assertEqual(self.columns, columns)
|
|
400
392
|
self.assertCountEqual(self.data, data)
|
|
@@ -159,7 +159,7 @@ class TestCreateSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
159
159
|
columns, data = self.cmd.take_action(parsed_args)
|
|
160
160
|
|
|
161
161
|
sgr_mock.assert_called_once_with(
|
|
162
|
-
self.
|
|
162
|
+
self.compute_client,
|
|
163
163
|
security_group_id=self._security_group['id'],
|
|
164
164
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
165
165
|
from_port=self._security_group_rule['from_port'],
|
|
@@ -202,7 +202,7 @@ class TestCreateSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
202
202
|
columns, data = self.cmd.take_action(parsed_args)
|
|
203
203
|
|
|
204
204
|
sgr_mock.assert_called_once_with(
|
|
205
|
-
self.
|
|
205
|
+
self.compute_client,
|
|
206
206
|
security_group_id=self._security_group['id'],
|
|
207
207
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
208
208
|
from_port=self._security_group_rule['from_port'],
|
|
@@ -240,7 +240,7 @@ class TestCreateSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
240
240
|
columns, data = self.cmd.take_action(parsed_args)
|
|
241
241
|
|
|
242
242
|
sgr_mock.assert_called_once_with(
|
|
243
|
-
self.
|
|
243
|
+
self.compute_client,
|
|
244
244
|
security_group_id=self._security_group['id'],
|
|
245
245
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
246
246
|
from_port=self._security_group_rule['from_port'],
|
|
@@ -279,7 +279,7 @@ class TestCreateSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
279
279
|
columns, data = self.cmd.take_action(parsed_args)
|
|
280
280
|
|
|
281
281
|
sgr_mock.assert_called_once_with(
|
|
282
|
-
self.
|
|
282
|
+
self.compute_client,
|
|
283
283
|
security_group_id=self._security_group['id'],
|
|
284
284
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
285
285
|
from_port=self._security_group_rule['from_port'],
|
|
@@ -316,7 +316,7 @@ class TestDeleteSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
316
316
|
result = self.cmd.take_action(parsed_args)
|
|
317
317
|
|
|
318
318
|
sgr_mock.assert_called_once_with(
|
|
319
|
-
self.
|
|
319
|
+
self.compute_client, self._security_group_rules[0]['id']
|
|
320
320
|
)
|
|
321
321
|
self.assertIsNone(result)
|
|
322
322
|
|
|
@@ -335,11 +335,11 @@ class TestDeleteSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
335
335
|
sgr_mock.assert_has_calls(
|
|
336
336
|
[
|
|
337
337
|
mock.call(
|
|
338
|
-
self.
|
|
338
|
+
self.compute_client,
|
|
339
339
|
self._security_group_rules[0]['id'],
|
|
340
340
|
),
|
|
341
341
|
mock.call(
|
|
342
|
-
self.
|
|
342
|
+
self.compute_client,
|
|
343
343
|
self._security_group_rules[1]['id'],
|
|
344
344
|
),
|
|
345
345
|
]
|
|
@@ -367,10 +367,10 @@ class TestDeleteSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
367
367
|
sgr_mock.assert_has_calls(
|
|
368
368
|
[
|
|
369
369
|
mock.call(
|
|
370
|
-
self.
|
|
370
|
+
self.compute_client,
|
|
371
371
|
self._security_group_rules[0]['id'],
|
|
372
372
|
),
|
|
373
|
-
mock.call(self.
|
|
373
|
+
mock.call(self.compute_client, 'unexist_rule'),
|
|
374
374
|
]
|
|
375
375
|
)
|
|
376
376
|
|
|
@@ -457,7 +457,7 @@ class TestListSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
457
457
|
|
|
458
458
|
columns, data = self.cmd.take_action(parsed_args)
|
|
459
459
|
compute_v2.list_security_groups.assert_called_once_with(
|
|
460
|
-
self.
|
|
460
|
+
self.compute_client, all_projects=False
|
|
461
461
|
)
|
|
462
462
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
463
463
|
self.assertEqual(self.expected_data_no_group, list(data))
|
|
@@ -473,7 +473,7 @@ class TestListSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
473
473
|
|
|
474
474
|
columns, data = self.cmd.take_action(parsed_args)
|
|
475
475
|
compute_v2.find_security_group.assert_called_once_with(
|
|
476
|
-
self.
|
|
476
|
+
self.compute_client, self._security_group['id']
|
|
477
477
|
)
|
|
478
478
|
self.assertEqual(self.expected_columns_with_group, columns)
|
|
479
479
|
self.assertEqual(self.expected_data_with_group, list(data))
|
|
@@ -489,7 +489,7 @@ class TestListSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
489
489
|
|
|
490
490
|
columns, data = self.cmd.take_action(parsed_args)
|
|
491
491
|
compute_v2.list_security_groups.assert_called_once_with(
|
|
492
|
-
self.
|
|
492
|
+
self.compute_client, all_projects=True
|
|
493
493
|
)
|
|
494
494
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
495
495
|
self.assertEqual(self.expected_data_no_group, list(data))
|
|
@@ -505,7 +505,7 @@ class TestListSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
505
505
|
|
|
506
506
|
columns, data = self.cmd.take_action(parsed_args)
|
|
507
507
|
compute_v2.list_security_groups.assert_called_once_with(
|
|
508
|
-
self.
|
|
508
|
+
self.compute_client, all_projects=False
|
|
509
509
|
)
|
|
510
510
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
511
511
|
self.assertEqual(self.expected_data_no_group, list(data))
|
|
@@ -551,7 +551,7 @@ class TestShowSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
|
551
551
|
columns, data = self.cmd.take_action(parsed_args)
|
|
552
552
|
|
|
553
553
|
compute_v2.list_security_groups.assert_called_once_with(
|
|
554
|
-
self.
|
|
554
|
+
self.compute_client
|
|
555
555
|
)
|
|
556
556
|
self.assertEqual(self.columns, columns)
|
|
557
557
|
self.assertEqual(self.data, data)
|
|
@@ -252,9 +252,10 @@ class TestObjectSave(TestObjectAll):
|
|
|
252
252
|
def __exit__(self, *a):
|
|
253
253
|
self.context_manager_calls.append('__exit__')
|
|
254
254
|
|
|
255
|
-
with
|
|
256
|
-
'
|
|
257
|
-
|
|
255
|
+
with (
|
|
256
|
+
mock.patch('sys.stdout') as fake_stdout,
|
|
257
|
+
mock.patch('os.fdopen', return_value=FakeStdout()) as fake_fdopen,
|
|
258
|
+
):
|
|
258
259
|
fake_stdout.fileno.return_value = 123
|
|
259
260
|
self.cmd.take_action(parsed_args)
|
|
260
261
|
|
|
@@ -183,14 +183,14 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
183
183
|
osc_lib_test_utils.fake_execute(_shell, _cmd)
|
|
184
184
|
|
|
185
185
|
self.app.assert_called_with(["list", "role"])
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
186
|
+
|
|
187
|
+
if default_args.get('token'):
|
|
188
|
+
self.assertEqual(default_args['token'], _shell.options.token)
|
|
189
|
+
|
|
190
|
+
if default_args.get('auth_url'):
|
|
191
|
+
self.assertEqual(
|
|
192
|
+
default_args['auth_url'], _shell.options.auth_url
|
|
193
|
+
)
|
|
194
194
|
|
|
195
195
|
def _assert_cli(self, cmd_options, default_args):
|
|
196
196
|
with mock.patch(
|
|
@@ -204,25 +204,28 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
204
204
|
osc_lib_test_utils.fake_execute(_shell, _cmd)
|
|
205
205
|
|
|
206
206
|
self.app.assert_called_with(["list", "server"])
|
|
207
|
+
|
|
208
|
+
# TODO(stephenfin): Remove "or ''" when we bump osc-lib minimum to
|
|
209
|
+
# a version that includes I1d26133c9d9ed299d1035f207059aa8fe463a001
|
|
207
210
|
self.assertEqual(
|
|
208
211
|
default_args["compute_api_version"],
|
|
209
|
-
_shell.options.os_compute_api_version,
|
|
212
|
+
_shell.options.os_compute_api_version or '',
|
|
210
213
|
)
|
|
211
214
|
self.assertEqual(
|
|
212
215
|
default_args["identity_api_version"],
|
|
213
|
-
_shell.options.os_identity_api_version,
|
|
216
|
+
_shell.options.os_identity_api_version or '',
|
|
214
217
|
)
|
|
215
218
|
self.assertEqual(
|
|
216
219
|
default_args["image_api_version"],
|
|
217
|
-
_shell.options.os_image_api_version,
|
|
220
|
+
_shell.options.os_image_api_version or '',
|
|
218
221
|
)
|
|
219
222
|
self.assertEqual(
|
|
220
223
|
default_args["volume_api_version"],
|
|
221
|
-
_shell.options.os_volume_api_version,
|
|
224
|
+
_shell.options.os_volume_api_version or '',
|
|
222
225
|
)
|
|
223
226
|
self.assertEqual(
|
|
224
227
|
default_args["network_api_version"],
|
|
225
|
-
_shell.options.os_network_api_version,
|
|
228
|
+
_shell.options.os_network_api_version or '',
|
|
226
229
|
)
|
|
227
230
|
|
|
228
231
|
|
|
@@ -1619,7 +1619,7 @@ class TestVolumeSet(TestVolume):
|
|
|
1619
1619
|
result = self.cmd.take_action(parsed_args)
|
|
1620
1620
|
self.volumes_mock.retype.assert_not_called()
|
|
1621
1621
|
mock_warning.assert_called_with(
|
|
1622
|
-
"'--retype-policy' option will
|
|
1622
|
+
"'--retype-policy' option will not work without '--type' option"
|
|
1623
1623
|
)
|
|
1624
1624
|
self.assertIsNone(result)
|
|
1625
1625
|
|
|
@@ -241,7 +241,7 @@ class TestTransferDelete(TestTransfer):
|
|
|
241
241
|
self.fail('CommandError should be raised.')
|
|
242
242
|
except exceptions.CommandError as e:
|
|
243
243
|
self.assertEqual(
|
|
244
|
-
'1 of 2 volume transfer requests failed
|
|
244
|
+
'1 of 2 volume transfer requests failed to delete',
|
|
245
245
|
str(e),
|
|
246
246
|
)
|
|
247
247
|
|
|
@@ -129,14 +129,8 @@ class TestVolume(
|
|
|
129
129
|
|
|
130
130
|
# avoid circular imports by defining this manually rather than using
|
|
131
131
|
# openstackclient.tests.unit.compute.v2.fakes.FakeClientMixin
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
self.app.client_manager.sdk_connection.compute = mock.Mock(
|
|
135
|
-
_compute_proxy.Proxy
|
|
136
|
-
)
|
|
137
|
-
self.compute_sdk_client = (
|
|
138
|
-
self.app.client_manager.sdk_connection.compute
|
|
139
|
-
)
|
|
132
|
+
self.app.client_manager.compute = mock.Mock(_compute_proxy.Proxy)
|
|
133
|
+
self.compute_client = self.app.client_manager.compute
|
|
140
134
|
|
|
141
135
|
# avoid circular imports by defining this manually rather than using
|
|
142
136
|
# openstackclient.tests.unit.image.v2.fakes.FakeClientMixin
|
|
@@ -2027,7 +2027,7 @@ class TestVolumeSet(volume_fakes.TestVolume):
|
|
|
2027
2027
|
result = self.cmd.take_action(parsed_args)
|
|
2028
2028
|
self.volumes_mock.retype.assert_not_called()
|
|
2029
2029
|
mock_warning.assert_called_with(
|
|
2030
|
-
"'--retype-policy' option will
|
|
2030
|
+
"'--retype-policy' option will not work without '--type' option"
|
|
2031
2031
|
)
|
|
2032
2032
|
self.assertIsNone(result)
|
|
2033
2033
|
|
|
@@ -61,7 +61,7 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
61
61
|
self.volume_sdk_client.create_attachment.return_value = (
|
|
62
62
|
self.volume_attachment.to_dict()
|
|
63
63
|
)
|
|
64
|
-
self.
|
|
64
|
+
self.compute_client.find_server.return_value = self.server
|
|
65
65
|
|
|
66
66
|
self.cmd = volume_attachment.CreateVolumeAttachment(self.app, None)
|
|
67
67
|
|
|
@@ -92,7 +92,7 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
92
92
|
self.volume_sdk_client.find_volume.assert_called_once_with(
|
|
93
93
|
self.volume.id, ignore_missing=False
|
|
94
94
|
)
|
|
95
|
-
self.
|
|
95
|
+
self.compute_client.find_server.assert_called_once_with(
|
|
96
96
|
self.server.id, ignore_missing=False
|
|
97
97
|
)
|
|
98
98
|
self.volume_sdk_client.create_attachment.assert_called_once_with(
|
|
@@ -159,7 +159,7 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
159
159
|
self.volume_sdk_client.find_volume.assert_called_once_with(
|
|
160
160
|
self.volume.id, ignore_missing=False
|
|
161
161
|
)
|
|
162
|
-
self.
|
|
162
|
+
self.compute_client.find_server.assert_called_once_with(
|
|
163
163
|
self.server.id, ignore_missing=False
|
|
164
164
|
)
|
|
165
165
|
self.volume_sdk_client.create_attachment.assert_called_once_with(
|
|
@@ -140,8 +140,7 @@ class TestVolumeSnapshotDelete(TestVolumeSnapshot):
|
|
|
140
140
|
exceptions.CommandError, self.cmd.take_action, parsed_args
|
|
141
141
|
)
|
|
142
142
|
self.assertIn(
|
|
143
|
-
"The --force option is not supported with the --remote "
|
|
144
|
-
"parameter.",
|
|
143
|
+
"The --force option is not supported with the --remote parameter.",
|
|
145
144
|
str(exc),
|
|
146
145
|
)
|
|
147
146
|
|
|
@@ -284,7 +284,7 @@ class TestTransferDelete(TestTransfer):
|
|
|
284
284
|
self.fail('CommandError should be raised.')
|
|
285
285
|
except exceptions.CommandError as e:
|
|
286
286
|
self.assertEqual(
|
|
287
|
-
'1 of 2 volume transfer requests failed
|
|
287
|
+
'1 of 2 volume transfer requests failed to delete',
|
|
288
288
|
str(e),
|
|
289
289
|
)
|
|
290
290
|
|
openstackclient/volume/client.py
CHANGED
|
@@ -105,9 +105,7 @@ def build_option_parser(parser):
|
|
|
105
105
|
'--os-volume-api-version',
|
|
106
106
|
metavar='<volume-api-version>',
|
|
107
107
|
default=utils.env('OS_VOLUME_API_VERSION'),
|
|
108
|
-
help=_(
|
|
109
|
-
'Volume API version, default=%s ' '(Env: OS_VOLUME_API_VERSION)'
|
|
110
|
-
)
|
|
108
|
+
help=_('Volume API version, default=%s (Env: OS_VOLUME_API_VERSION)')
|
|
111
109
|
% DEFAULT_API_VERSION,
|
|
112
110
|
)
|
|
113
111
|
return parser
|
|
@@ -38,10 +38,7 @@ def _find_volumes(parsed_args_volumes, volume_client):
|
|
|
38
38
|
except Exception as e:
|
|
39
39
|
result += 1
|
|
40
40
|
LOG.error(
|
|
41
|
-
_(
|
|
42
|
-
"Failed to find volume with "
|
|
43
|
-
"name or ID '%(volume)s':%(e)s"
|
|
44
|
-
)
|
|
41
|
+
_("Failed to find volume with name or ID '%(volume)s':%(e)s")
|
|
45
42
|
% {'volume': volume, 'e': e}
|
|
46
43
|
)
|
|
47
44
|
|
|
@@ -76,7 +73,7 @@ class AddVolumeToConsistencyGroup(command.Command):
|
|
|
76
73
|
if result > 0:
|
|
77
74
|
total = len(parsed_args.volumes)
|
|
78
75
|
LOG.error(
|
|
79
|
-
_("%(result)s of %(total)s volumes failed
|
|
76
|
+
_("%(result)s of %(total)s volumes failed to add.")
|
|
80
77
|
% {'result': result, 'total': total}
|
|
81
78
|
)
|
|
82
79
|
|
|
@@ -236,8 +233,7 @@ class DeleteConsistencyGroup(command.Command):
|
|
|
236
233
|
if result > 0:
|
|
237
234
|
total = len(parsed_args.consistency_groups)
|
|
238
235
|
msg = _(
|
|
239
|
-
"%(result)s of %(total)s consistency groups failed "
|
|
240
|
-
"to delete."
|
|
236
|
+
"%(result)s of %(total)s consistency groups failed to delete."
|
|
241
237
|
) % {'result': result, 'total': total}
|
|
242
238
|
raise exceptions.CommandError(msg)
|
|
243
239
|
|
|
@@ -321,7 +317,7 @@ class RemoveVolumeFromConsistencyGroup(command.Command):
|
|
|
321
317
|
if result > 0:
|
|
322
318
|
total = len(parsed_args.volumes)
|
|
323
319
|
LOG.error(
|
|
324
|
-
_("%(result)s of %(total)s volumes failed
|
|
320
|
+
_("%(result)s of %(total)s volumes failed to remove.")
|
|
325
321
|
% {'result': result, 'total': total}
|
|
326
322
|
)
|
|
327
323
|
|
|
@@ -123,8 +123,7 @@ class ListConsistencyGroupSnapshot(command.Lister):
|
|
|
123
123
|
'--all-projects',
|
|
124
124
|
action="store_true",
|
|
125
125
|
help=_(
|
|
126
|
-
'Show detail for all projects (admin only) '
|
|
127
|
-
'(defaults to False)'
|
|
126
|
+
'Show detail for all projects (admin only) (defaults to False)'
|
|
128
127
|
),
|
|
129
128
|
)
|
|
130
129
|
parser.add_argument(
|
|
@@ -153,8 +153,7 @@ class DeleteQos(command.Command):
|
|
|
153
153
|
if result > 0:
|
|
154
154
|
total = len(parsed_args.qos_specs)
|
|
155
155
|
msg = _(
|
|
156
|
-
"%(result)s of %(total)s QoS specifications failed"
|
|
157
|
-
" to delete."
|
|
156
|
+
"%(result)s of %(total)s QoS specifications failed to delete."
|
|
158
157
|
) % {'result': result, 'total': total}
|
|
159
158
|
raise exceptions.CommandError(msg)
|
|
160
159
|
|
|
@@ -286,8 +286,7 @@ class CreateVolume(command.ShowOne):
|
|
|
286
286
|
)
|
|
287
287
|
else:
|
|
288
288
|
msg = _(
|
|
289
|
-
"Volume status is not available for setting boot "
|
|
290
|
-
"state"
|
|
289
|
+
"Volume status is not available for setting boot state"
|
|
291
290
|
)
|
|
292
291
|
raise exceptions.CommandError(msg)
|
|
293
292
|
except Exception as e:
|
|
@@ -312,10 +311,7 @@ class CreateVolume(command.ShowOne):
|
|
|
312
311
|
raise exceptions.CommandError(msg)
|
|
313
312
|
except Exception as e:
|
|
314
313
|
LOG.error(
|
|
315
|
-
_(
|
|
316
|
-
"Failed to set volume read-only access "
|
|
317
|
-
"mode flag: %s"
|
|
318
|
-
),
|
|
314
|
+
_("Failed to set volume read-only access mode flag: %s"),
|
|
319
315
|
e,
|
|
320
316
|
)
|
|
321
317
|
|
|
@@ -356,8 +352,7 @@ class DeleteVolume(command.Command):
|
|
|
356
352
|
"--purge",
|
|
357
353
|
action="store_true",
|
|
358
354
|
help=_(
|
|
359
|
-
"Remove any snapshots along with volume(s) "
|
|
360
|
-
"(defaults to False)"
|
|
355
|
+
"Remove any snapshots along with volume(s) (defaults to False)"
|
|
361
356
|
),
|
|
362
357
|
)
|
|
363
358
|
return parser
|
|
@@ -387,7 +382,7 @@ class DeleteVolume(command.Command):
|
|
|
387
382
|
|
|
388
383
|
if result > 0:
|
|
389
384
|
total = len(parsed_args.volumes)
|
|
390
|
-
msg = _("%(result)s of %(total)s volumes failed
|
|
385
|
+
msg = _("%(result)s of %(total)s volumes failed to delete.") % {
|
|
391
386
|
'result': result,
|
|
392
387
|
'total': total,
|
|
393
388
|
}
|
|
@@ -508,7 +503,7 @@ class ListVolume(command.Lister):
|
|
|
508
503
|
server_cache = {}
|
|
509
504
|
if do_server_list:
|
|
510
505
|
try:
|
|
511
|
-
compute_client = self.app.client_manager.
|
|
506
|
+
compute_client = self.app.client_manager.compute
|
|
512
507
|
for s in compute_client.servers():
|
|
513
508
|
server_cache[s.id] = s
|
|
514
509
|
except sdk_exceptions.SDKException: # noqa: S110
|
|
@@ -829,10 +824,7 @@ class SetVolume(command.Command):
|
|
|
829
824
|
)
|
|
830
825
|
except Exception as e:
|
|
831
826
|
LOG.error(
|
|
832
|
-
_(
|
|
833
|
-
"Failed to set volume read-only access "
|
|
834
|
-
"mode flag: %s"
|
|
835
|
-
),
|
|
827
|
+
_("Failed to set volume read-only access mode flag: %s"),
|
|
836
828
|
e,
|
|
837
829
|
)
|
|
838
830
|
result += 1
|
|
@@ -885,7 +877,7 @@ class SetVolume(command.Command):
|
|
|
885
877
|
|
|
886
878
|
if result > 0:
|
|
887
879
|
raise exceptions.CommandError(
|
|
888
|
-
_("One or more of the
|
|
880
|
+
_("One or more of the set operations failed")
|
|
889
881
|
)
|
|
890
882
|
|
|
891
883
|
|
|
@@ -977,5 +969,5 @@ class UnsetVolume(command.Command):
|
|
|
977
969
|
|
|
978
970
|
if result > 0:
|
|
979
971
|
raise exceptions.CommandError(
|
|
980
|
-
_("One or more of the
|
|
972
|
+
_("One or more of the unset operations failed")
|
|
981
973
|
)
|
|
@@ -118,7 +118,7 @@ class CreateVolumeBackup(command.ShowOne):
|
|
|
118
118
|
ignore_missing=False,
|
|
119
119
|
).id
|
|
120
120
|
|
|
121
|
-
columns = (
|
|
121
|
+
columns: tuple[str, ...] = (
|
|
122
122
|
"id",
|
|
123
123
|
"name",
|
|
124
124
|
"volume_id",
|
|
@@ -240,7 +240,7 @@ class ListVolumeBackup(command.Lister):
|
|
|
240
240
|
def take_action(self, parsed_args):
|
|
241
241
|
volume_client = self.app.client_manager.sdk_connection.volume
|
|
242
242
|
|
|
243
|
-
columns = (
|
|
243
|
+
columns: tuple[str, ...] = (
|
|
244
244
|
'id',
|
|
245
245
|
'name',
|
|
246
246
|
'description',
|
|
@@ -249,7 +249,7 @@ class ListVolumeBackup(command.Lister):
|
|
|
249
249
|
'is_incremental',
|
|
250
250
|
'created_at',
|
|
251
251
|
)
|
|
252
|
-
column_headers = (
|
|
252
|
+
column_headers: tuple[str, ...] = (
|
|
253
253
|
'ID',
|
|
254
254
|
'Name',
|
|
255
255
|
'Description',
|
|
@@ -345,8 +345,7 @@ class RestoreVolumeBackup(command.ShowOne):
|
|
|
345
345
|
"--force",
|
|
346
346
|
action="store_true",
|
|
347
347
|
help=_(
|
|
348
|
-
"Restore the backup to an existing volume "
|
|
349
|
-
"(default to False)"
|
|
348
|
+
"Restore the backup to an existing volume (default to False)"
|
|
350
349
|
),
|
|
351
350
|
)
|
|
352
351
|
return parser
|
|
@@ -359,7 +358,7 @@ class RestoreVolumeBackup(command.ShowOne):
|
|
|
359
358
|
ignore_missing=False,
|
|
360
359
|
)
|
|
361
360
|
|
|
362
|
-
columns = (
|
|
361
|
+
columns: tuple[str, ...] = (
|
|
363
362
|
'id',
|
|
364
363
|
'volume_id',
|
|
365
364
|
'volume_name',
|
|
@@ -449,7 +448,7 @@ class ShowVolumeBackup(command.ShowOne):
|
|
|
449
448
|
def take_action(self, parsed_args):
|
|
450
449
|
volume_client = self.app.client_manager.sdk_connection.volume
|
|
451
450
|
backup = volume_client.find_backup(parsed_args.backup)
|
|
452
|
-
columns = (
|
|
451
|
+
columns: tuple[str, ...] = (
|
|
453
452
|
"availability_zone",
|
|
454
453
|
"container",
|
|
455
454
|
"created_at",
|
|
@@ -74,8 +74,7 @@ class CreateVolumeSnapshot(command.ShowOne):
|
|
|
74
74
|
"--volume",
|
|
75
75
|
metavar="<volume>",
|
|
76
76
|
help=_(
|
|
77
|
-
"Volume to snapshot (name or ID) "
|
|
78
|
-
"(default is <snapshot-name>)"
|
|
77
|
+
"Volume to snapshot (name or ID) (default is <snapshot-name>)"
|
|
79
78
|
),
|
|
80
79
|
)
|
|
81
80
|
parser.add_argument(
|
|
@@ -88,8 +87,7 @@ class CreateVolumeSnapshot(command.ShowOne):
|
|
|
88
87
|
action="store_true",
|
|
89
88
|
default=False,
|
|
90
89
|
help=_(
|
|
91
|
-
"Create a snapshot attached to an instance. "
|
|
92
|
-
"Default is False"
|
|
90
|
+
"Create a snapshot attached to an instance. Default is False"
|
|
93
91
|
),
|
|
94
92
|
)
|
|
95
93
|
parser.add_argument(
|
|
@@ -200,9 +198,10 @@ class DeleteVolumeSnapshot(command.Command):
|
|
|
200
198
|
|
|
201
199
|
if result > 0:
|
|
202
200
|
total = len(parsed_args.snapshots)
|
|
203
|
-
msg = _(
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
msg = _("%(result)s of %(total)s snapshots failed to delete.") % {
|
|
202
|
+
'result': result,
|
|
203
|
+
'total': total,
|
|
204
|
+
}
|
|
206
205
|
raise exceptions.CommandError(msg)
|
|
207
206
|
|
|
208
207
|
|
|
@@ -446,14 +445,14 @@ class SetVolumeSnapshot(command.Command):
|
|
|
446
445
|
volume_client.volume_snapshots.update(snapshot.id, **kwargs)
|
|
447
446
|
except Exception as e:
|
|
448
447
|
LOG.error(
|
|
449
|
-
_("Failed to update snapshot name
|
|
448
|
+
_("Failed to update snapshot name or description: %s"),
|
|
450
449
|
e,
|
|
451
450
|
)
|
|
452
451
|
result += 1
|
|
453
452
|
|
|
454
453
|
if result > 0:
|
|
455
454
|
raise exceptions.CommandError(
|
|
456
|
-
_("One or more of the
|
|
455
|
+
_("One or more of the set operations failed")
|
|
457
456
|
)
|
|
458
457
|
|
|
459
458
|
|
|
@@ -85,8 +85,6 @@ class CreateTransferRequest(command.ShowOne):
|
|
|
85
85
|
def take_action(self, parsed_args):
|
|
86
86
|
volume_client = self.app.client_manager.volume
|
|
87
87
|
|
|
88
|
-
kwargs = {}
|
|
89
|
-
|
|
90
88
|
volume_id = utils.find_resource(
|
|
91
89
|
volume_client.volumes,
|
|
92
90
|
parsed_args.volume,
|
|
@@ -94,7 +92,6 @@ class CreateTransferRequest(command.ShowOne):
|
|
|
94
92
|
volume_transfer_request = volume_client.transfers.create(
|
|
95
93
|
volume_id,
|
|
96
94
|
parsed_args.name,
|
|
97
|
-
**kwargs,
|
|
98
95
|
)
|
|
99
96
|
volume_transfer_request._info.pop("links", None)
|
|
100
97
|
|