python-openstackclient 6.3.0__py3-none-any.whl → 6.5.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 +4 -4
- openstackclient/common/pagination.py +82 -0
- openstackclient/compute/v2/flavor.py +2 -16
- openstackclient/compute/v2/hypervisor.py +2 -21
- openstackclient/compute/v2/keypair.py +2 -9
- openstackclient/compute/v2/server.py +220 -131
- openstackclient/compute/v2/server_event.py +30 -19
- openstackclient/compute/v2/server_group.py +2 -23
- openstackclient/compute/v2/server_migration.py +2 -22
- openstackclient/compute/v2/usage.py +4 -6
- openstackclient/identity/v3/mapping.py +25 -3
- openstackclient/identity/v3/policy.py +3 -1
- openstackclient/image/v2/cache.py +218 -0
- openstackclient/image/v2/image.py +40 -17
- openstackclient/image/v2/metadef_namespaces.py +25 -21
- openstackclient/image/v2/metadef_objects.py +189 -0
- openstackclient/image/v2/metadef_properties.py +284 -0
- openstackclient/network/utils.py +100 -0
- openstackclient/network/v2/default_security_group_rule.py +418 -0
- openstackclient/network/v2/local_ip_association.py +1 -1
- openstackclient/network/v2/ndp_proxy.py +7 -3
- openstackclient/network/v2/network.py +2 -2
- openstackclient/network/v2/port.py +65 -19
- openstackclient/network/v2/security_group_rule.py +18 -111
- openstackclient/network/v2/subnet.py +1 -0
- openstackclient/object/v1/container.py +2 -12
- openstackclient/object/v1/object.py +2 -11
- openstackclient/tests/functional/base.py +13 -6
- openstackclient/tests/functional/identity/v3/test_role.py +11 -3
- openstackclient/tests/functional/network/v2/common.py +7 -1
- openstackclient/tests/functional/network/v2/test_address_group.py +2 -4
- openstackclient/tests/functional/network/v2/test_address_scope.py +0 -6
- openstackclient/tests/functional/network/v2/test_default_security_group_rule.py +67 -0
- openstackclient/tests/functional/network/v2/test_floating_ip.py +3 -6
- openstackclient/tests/functional/network/v2/test_ip_availability.py +3 -8
- openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +3 -4
- openstackclient/tests/functional/network/v2/test_local_ip.py +2 -4
- openstackclient/tests/functional/network/v2/test_network.py +18 -17
- openstackclient/tests/functional/network/v2/test_network_agent.py +24 -21
- openstackclient/tests/functional/network/v2/test_network_flavor.py +0 -6
- openstackclient/tests/functional/network/v2/test_network_flavor_profile.py +0 -6
- openstackclient/tests/functional/network/v2/test_network_meter.py +6 -6
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +7 -8
- openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +1 -3
- openstackclient/tests/functional/network/v2/test_network_qos_policy.py +4 -4
- openstackclient/tests/functional/network/v2/test_network_qos_rule.py +16 -20
- openstackclient/tests/functional/network/v2/test_network_qos_rule_type.py +4 -4
- openstackclient/tests/functional/network/v2/test_network_rbac.py +1 -4
- openstackclient/tests/functional/network/v2/test_network_segment.py +7 -12
- openstackclient/tests/functional/network/v2/test_network_segment_range.py +3 -4
- openstackclient/tests/functional/network/v2/test_network_service_provider.py +2 -4
- openstackclient/tests/functional/network/v2/test_network_trunk.py +3 -3
- openstackclient/tests/functional/network/v2/test_port.py +2 -8
- openstackclient/tests/functional/network/v2/test_router.py +0 -6
- openstackclient/tests/functional/network/v2/test_security_group.py +1 -4
- openstackclient/tests/functional/network/v2/test_security_group_rule.py +1 -4
- openstackclient/tests/functional/network/v2/test_subnet.py +4 -22
- openstackclient/tests/functional/network/v2/test_subnet_pool.py +0 -6
- openstackclient/tests/unit/common/test_availability_zone.py +28 -30
- openstackclient/tests/unit/common/test_extension.py +1 -4
- openstackclient/tests/unit/common/test_limits.py +2 -4
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -10
- openstackclient/tests/unit/common/test_quota.py +18 -24
- openstackclient/tests/unit/compute/v2/fakes.py +24 -11
- openstackclient/tests/unit/compute/v2/test_agent.py +1 -1
- openstackclient/tests/unit/compute/v2/test_aggregate.py +62 -72
- openstackclient/tests/unit/compute/v2/test_console.py +18 -30
- openstackclient/tests/unit/compute/v2/test_flavor.py +85 -89
- openstackclient/tests/unit/compute/v2/test_host.py +12 -19
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +23 -25
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -6
- openstackclient/tests/unit/compute/v2/test_keypair.py +25 -39
- openstackclient/tests/unit/compute/v2/test_server.py +316 -365
- openstackclient/tests/unit/compute/v2/test_server_backup.py +5 -17
- openstackclient/tests/unit/compute/v2/test_server_event.py +23 -25
- openstackclient/tests/unit/compute/v2/test_server_group.py +41 -33
- openstackclient/tests/unit/compute/v2/test_server_image.py +6 -18
- openstackclient/tests/unit/compute/v2/test_server_migration.py +45 -45
- openstackclient/tests/unit/compute/v2/test_server_volume.py +15 -31
- openstackclient/tests/unit/compute/v2/test_service.py +51 -56
- openstackclient/tests/unit/compute/v2/test_usage.py +10 -13
- openstackclient/tests/unit/fakes.py +4 -0
- openstackclient/tests/unit/identity/v3/test_mappings.py +9 -4
- openstackclient/tests/unit/identity/v3/test_trust.py +0 -2
- openstackclient/tests/unit/image/v1/fakes.py +2 -1
- openstackclient/tests/unit/image/v1/test_image.py +1 -1
- openstackclient/tests/unit/image/v2/fakes.py +82 -0
- openstackclient/tests/unit/image/v2/test_cache.py +214 -0
- openstackclient/tests/unit/image/v2/test_image.py +62 -4
- openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +5 -19
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +162 -0
- openstackclient/tests/unit/image/v2/test_metadef_properties.py +227 -0
- openstackclient/tests/unit/integ/cli/test_shell.py +0 -2
- openstackclient/tests/unit/network/test_common.py +3 -3
- openstackclient/tests/unit/network/v2/fakes.py +1 -0
- openstackclient/tests/unit/network/v2/test_default_security_group_rule.py +1133 -0
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +5 -13
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -9
- openstackclient/tests/unit/network/v2/test_network.py +33 -0
- openstackclient/tests/unit/network/v2/test_network_compute.py +5 -11
- openstackclient/tests/unit/network/v2/test_network_trunk.py +6 -8
- openstackclient/tests/unit/network/v2/test_port.py +83 -38
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +7 -15
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +19 -27
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +3 -6
- openstackclient/tests/unit/network/v2/test_subnet.py +92 -0
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +11 -13
- openstackclient/tests/unit/test_shell.py +1 -7
- openstackclient/tests/unit/utils.py +10 -4
- openstackclient/tests/unit/volume/v1/fakes.py +7 -1
- openstackclient/tests/unit/volume/v1/test_qos_specs.py +2 -2
- openstackclient/tests/unit/volume/v1/test_service.py +1 -1
- openstackclient/tests/unit/volume/v1/test_transfer_request.py +2 -2
- openstackclient/tests/unit/volume/v1/test_type.py +2 -4
- openstackclient/tests/unit/volume/v1/test_volume.py +5 -7
- openstackclient/tests/unit/volume/v1/test_volume_backup.py +4 -4
- openstackclient/tests/unit/volume/v2/fakes.py +32 -12
- openstackclient/tests/unit/volume/v2/test_backup_record.py +1 -1
- openstackclient/tests/unit/volume/v2/test_consistency_group.py +4 -6
- openstackclient/tests/unit/volume/v2/test_consistency_group_snapshot.py +2 -4
- openstackclient/tests/unit/volume/v2/test_qos_specs.py +2 -2
- openstackclient/tests/unit/volume/v2/test_service.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume.py +78 -16
- openstackclient/tests/unit/volume/v2/test_volume_backend.py +10 -22
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +76 -89
- openstackclient/tests/unit/volume/v2/test_volume_host.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +5 -7
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +4 -8
- openstackclient/tests/unit/volume/v2/test_volume_type.py +164 -24
- openstackclient/tests/unit/volume/v3/fakes.py +91 -15
- openstackclient/tests/unit/volume/v3/test_block_storage_cleanup.py +3 -7
- openstackclient/tests/unit/volume/v3/test_block_storage_cluster.py +11 -31
- openstackclient/tests/unit/volume/v3/test_block_storage_log_level.py +6 -16
- openstackclient/tests/unit/volume/v3/test_block_storage_manage.py +219 -157
- openstackclient/tests/unit/volume/v3/test_block_storage_resource_filter.py +32 -23
- openstackclient/tests/unit/volume/v3/test_volume.py +50 -48
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +17 -47
- openstackclient/tests/unit/volume/v3/test_volume_group.py +23 -65
- openstackclient/tests/unit/volume/v3/test_volume_group_snapshot.py +88 -77
- openstackclient/tests/unit/volume/v3/test_volume_group_type.py +14 -42
- openstackclient/tests/unit/volume/v3/test_volume_message.py +10 -28
- openstackclient/volume/v1/volume.py +2 -14
- openstackclient/volume/v2/volume.py +30 -15
- openstackclient/volume/v2/volume_backend.py +10 -18
- openstackclient/volume/v2/volume_backup.py +18 -15
- openstackclient/volume/v2/volume_snapshot.py +2 -12
- openstackclient/volume/v2/volume_type.py +211 -14
- openstackclient/volume/v3/block_storage_manage.py +72 -11
- openstackclient/volume/v3/block_storage_resource_filter.py +33 -11
- openstackclient/volume/v3/volume_attachment.py +2 -14
- openstackclient/volume/v3/volume_group_snapshot.py +27 -27
- openstackclient/volume/v3/volume_message.py +2 -13
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/AUTHORS +11 -0
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/METADATA +6 -5
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/RECORD +160 -151
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/entry_points.txt +23 -5
- python_openstackclient-6.5.0.dist-info/pbr.json +1 -0
- openstackclient/tests/unit/common/test_parseractions.py +0 -233
- python_openstackclient-6.3.0.dist-info/pbr.json +0 -1
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/top_level.txt +0 -0
|
@@ -23,16 +23,8 @@ from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
|
23
23
|
from openstackclient.tests.unit import utils as tests_utils
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class TestSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
27
|
-
def setUp(self):
|
|
28
|
-
super(TestSecurityGroupRuleCompute, self).setUp()
|
|
29
|
-
|
|
30
|
-
# Get a shortcut to the network client
|
|
31
|
-
self.compute = self.app.client_manager.compute
|
|
32
|
-
|
|
33
|
-
|
|
34
26
|
@mock.patch('openstackclient.api.compute_v2.APIv2.security_group_rule_create')
|
|
35
|
-
class TestCreateSecurityGroupRuleCompute(
|
|
27
|
+
class TestCreateSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
36
28
|
project = identity_fakes.FakeProject.create_one_project()
|
|
37
29
|
domain = identity_fakes.FakeDomain.create_one_domain()
|
|
38
30
|
|
|
@@ -49,7 +41,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
49
41
|
(
|
|
50
42
|
expected_columns,
|
|
51
43
|
expected_data,
|
|
52
|
-
) =
|
|
44
|
+
) = network_utils.format_security_group_rule_show(
|
|
53
45
|
self._security_group_rule
|
|
54
46
|
)
|
|
55
47
|
return expected_columns, expected_data
|
|
@@ -59,7 +51,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
59
51
|
|
|
60
52
|
self.app.client_manager.network_endpoint_enabled = False
|
|
61
53
|
|
|
62
|
-
self.
|
|
54
|
+
self.compute_client.api.security_group_find = mock.Mock(
|
|
63
55
|
return_value=self._security_group,
|
|
64
56
|
)
|
|
65
57
|
|
|
@@ -168,7 +160,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
168
160
|
columns, data = self.cmd.take_action(parsed_args)
|
|
169
161
|
|
|
170
162
|
# TODO(dtroyer): save this for the security group rule changes
|
|
171
|
-
# self.
|
|
163
|
+
# self.compute_client.api.security_group_rule_create.assert_called_once_with(
|
|
172
164
|
sgr_mock.assert_called_once_with(
|
|
173
165
|
security_group_id=self._security_group['id'],
|
|
174
166
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
@@ -212,7 +204,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
212
204
|
columns, data = self.cmd.take_action(parsed_args)
|
|
213
205
|
|
|
214
206
|
# TODO(dtroyer): save this for the security group rule changes
|
|
215
|
-
# self.
|
|
207
|
+
# self.compute_client.api.security_group_rule_create.assert_called_once_with(
|
|
216
208
|
sgr_mock.assert_called_once_with(
|
|
217
209
|
security_group_id=self._security_group['id'],
|
|
218
210
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
@@ -251,7 +243,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
251
243
|
columns, data = self.cmd.take_action(parsed_args)
|
|
252
244
|
|
|
253
245
|
# TODO(dtroyer): save this for the security group rule changes
|
|
254
|
-
# self.
|
|
246
|
+
# self.compute_client.api.security_group_rule_create.assert_called_once_with(
|
|
255
247
|
sgr_mock.assert_called_once_with(
|
|
256
248
|
security_group_id=self._security_group['id'],
|
|
257
249
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
@@ -291,7 +283,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
291
283
|
columns, data = self.cmd.take_action(parsed_args)
|
|
292
284
|
|
|
293
285
|
# TODO(dtroyer): save this for the security group rule changes
|
|
294
|
-
# self.
|
|
286
|
+
# self.compute_client.api.security_group_rule_create.assert_called_once_with(
|
|
295
287
|
sgr_mock.assert_called_once_with(
|
|
296
288
|
security_group_id=self._security_group['id'],
|
|
297
289
|
ip_protocol=self._security_group_rule['ip_protocol'],
|
|
@@ -305,7 +297,7 @@ class TestCreateSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
305
297
|
|
|
306
298
|
|
|
307
299
|
@mock.patch('openstackclient.api.compute_v2.APIv2.security_group_rule_delete')
|
|
308
|
-
class TestDeleteSecurityGroupRuleCompute(
|
|
300
|
+
class TestDeleteSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
309
301
|
# The security group rule to be deleted.
|
|
310
302
|
_security_group_rules = compute_fakes.create_security_group_rules(count=2)
|
|
311
303
|
|
|
@@ -373,7 +365,7 @@ class TestDeleteSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
373
365
|
sgr_mock.assert_any_call('unexist_rule')
|
|
374
366
|
|
|
375
367
|
|
|
376
|
-
class TestListSecurityGroupRuleCompute(
|
|
368
|
+
class TestListSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
377
369
|
# The security group to hold the rules.
|
|
378
370
|
_security_group = compute_fakes.create_one_security_group()
|
|
379
371
|
|
|
@@ -440,10 +432,10 @@ class TestListSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
440
432
|
|
|
441
433
|
self.app.client_manager.network_endpoint_enabled = False
|
|
442
434
|
|
|
443
|
-
self.
|
|
435
|
+
self.compute_client.api.security_group_find = mock.Mock(
|
|
444
436
|
return_value=self._security_group,
|
|
445
437
|
)
|
|
446
|
-
self.
|
|
438
|
+
self.compute_client.api.security_group_list = mock.Mock(
|
|
447
439
|
return_value=[self._security_group],
|
|
448
440
|
)
|
|
449
441
|
|
|
@@ -454,7 +446,7 @@ class TestListSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
454
446
|
parsed_args = self.check_parser(self.cmd, [], [])
|
|
455
447
|
|
|
456
448
|
columns, data = self.cmd.take_action(parsed_args)
|
|
457
|
-
self.
|
|
449
|
+
self.compute_client.api.security_group_list.assert_called_once_with(
|
|
458
450
|
search_opts={'all_tenants': False}
|
|
459
451
|
)
|
|
460
452
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
@@ -470,7 +462,7 @@ class TestListSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
470
462
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
471
463
|
|
|
472
464
|
columns, data = self.cmd.take_action(parsed_args)
|
|
473
|
-
self.
|
|
465
|
+
self.compute_client.api.security_group_find.assert_called_once_with(
|
|
474
466
|
self._security_group['id']
|
|
475
467
|
)
|
|
476
468
|
self.assertEqual(self.expected_columns_with_group, columns)
|
|
@@ -486,7 +478,7 @@ class TestListSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
486
478
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
487
479
|
|
|
488
480
|
columns, data = self.cmd.take_action(parsed_args)
|
|
489
|
-
self.
|
|
481
|
+
self.compute_client.api.security_group_list.assert_called_once_with(
|
|
490
482
|
search_opts={'all_tenants': True}
|
|
491
483
|
)
|
|
492
484
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
@@ -502,18 +494,18 @@ class TestListSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
502
494
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
503
495
|
|
|
504
496
|
columns, data = self.cmd.take_action(parsed_args)
|
|
505
|
-
self.
|
|
497
|
+
self.compute_client.api.security_group_list.assert_called_once_with(
|
|
506
498
|
search_opts={'all_tenants': False}
|
|
507
499
|
)
|
|
508
500
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
509
501
|
self.assertEqual(self.expected_data_no_group, list(data))
|
|
510
502
|
|
|
511
503
|
|
|
512
|
-
class TestShowSecurityGroupRuleCompute(
|
|
504
|
+
class TestShowSecurityGroupRuleCompute(compute_fakes.TestComputev2):
|
|
513
505
|
# The security group rule to be shown.
|
|
514
506
|
_security_group_rule = compute_fakes.create_one_security_group_rule()
|
|
515
507
|
|
|
516
|
-
columns, data =
|
|
508
|
+
columns, data = network_utils.format_security_group_rule_show(
|
|
517
509
|
_security_group_rule
|
|
518
510
|
)
|
|
519
511
|
|
|
@@ -525,7 +517,7 @@ class TestShowSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
525
517
|
# Build a security group fake customized for this test.
|
|
526
518
|
security_group_rules = [self._security_group_rule]
|
|
527
519
|
security_group = {'rules': security_group_rules}
|
|
528
|
-
self.
|
|
520
|
+
self.compute_client.api.security_group_list = mock.Mock(
|
|
529
521
|
return_value=[security_group],
|
|
530
522
|
)
|
|
531
523
|
|
|
@@ -548,6 +540,6 @@ class TestShowSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
|
|
|
548
540
|
|
|
549
541
|
columns, data = self.cmd.take_action(parsed_args)
|
|
550
542
|
|
|
551
|
-
self.
|
|
543
|
+
self.compute_client.api.security_group_list.assert_called_once_with()
|
|
552
544
|
self.assertEqual(self.columns, columns)
|
|
553
545
|
self.assertEqual(self.data, data)
|
|
@@ -16,6 +16,7 @@ from unittest.mock import call
|
|
|
16
16
|
|
|
17
17
|
from osc_lib import exceptions
|
|
18
18
|
|
|
19
|
+
from openstackclient.network import utils as network_utils
|
|
19
20
|
from openstackclient.network.v2 import security_group_rule
|
|
20
21
|
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
21
22
|
from openstackclient.tests.unit.network.v2 import fakes as network_fakes
|
|
@@ -1124,9 +1125,7 @@ class TestListSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
1124
1125
|
_security_group_rule.protocol,
|
|
1125
1126
|
_security_group_rule.ether_type,
|
|
1126
1127
|
_security_group_rule.remote_ip_prefix,
|
|
1127
|
-
|
|
1128
|
-
_security_group_rule
|
|
1129
|
-
),
|
|
1128
|
+
network_utils.format_network_port_range(_security_group_rule),
|
|
1130
1129
|
_security_group_rule.direction,
|
|
1131
1130
|
_security_group_rule.remote_group_id,
|
|
1132
1131
|
_security_group_rule.remote_address_group_id,
|
|
@@ -1138,9 +1137,7 @@ class TestListSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
1138
1137
|
_security_group_rule.protocol,
|
|
1139
1138
|
_security_group_rule.ether_type,
|
|
1140
1139
|
_security_group_rule.remote_ip_prefix,
|
|
1141
|
-
|
|
1142
|
-
_security_group_rule
|
|
1143
|
-
),
|
|
1140
|
+
network_utils.format_network_port_range(_security_group_rule),
|
|
1144
1141
|
_security_group_rule.direction,
|
|
1145
1142
|
_security_group_rule.remote_group_id,
|
|
1146
1143
|
_security_group_rule.remote_address_group_id,
|
|
@@ -108,6 +108,26 @@ class TestCreateSubnet(TestSubnet):
|
|
|
108
108
|
}
|
|
109
109
|
)
|
|
110
110
|
|
|
111
|
+
# An IPv6 subnet to be created with Prefix Delegation options specified
|
|
112
|
+
self._subnet_ipv6_pd = network_fakes.FakeSubnet.create_one_subnet(
|
|
113
|
+
attrs={
|
|
114
|
+
'project_id': self.project.id,
|
|
115
|
+
'cidr': '::/64',
|
|
116
|
+
'enable_dhcp': True,
|
|
117
|
+
'allocation_pools': [
|
|
118
|
+
{
|
|
119
|
+
'start': '::1',
|
|
120
|
+
'end': '::ffff:ffff:ffff:ffff',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
'ip_version': 6,
|
|
124
|
+
'gateway_ip': '::',
|
|
125
|
+
'ipv6_address_mode': 'slaac',
|
|
126
|
+
'ipv6_ra_mode': 'slaac',
|
|
127
|
+
'subnetpool_id': 'prefix_delegation',
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
|
|
111
131
|
# The network to be returned from find_network
|
|
112
132
|
self._network = network_fakes.create_one_network(
|
|
113
133
|
attrs={
|
|
@@ -210,6 +230,29 @@ class TestCreateSubnet(TestSubnet):
|
|
|
210
230
|
format_columns.ListColumn(self._subnet_ipv6.tags),
|
|
211
231
|
)
|
|
212
232
|
|
|
233
|
+
self.data_ipv6_pd = (
|
|
234
|
+
subnet_v2.AllocationPoolsColumn(
|
|
235
|
+
self._subnet_ipv6_pd.allocation_pools
|
|
236
|
+
),
|
|
237
|
+
self._subnet_ipv6_pd.cidr,
|
|
238
|
+
self._subnet_ipv6_pd.description,
|
|
239
|
+
format_columns.ListColumn(self._subnet_ipv6_pd.dns_nameservers),
|
|
240
|
+
self._subnet_ipv6_pd.enable_dhcp,
|
|
241
|
+
self._subnet_ipv6_pd.gateway_ip,
|
|
242
|
+
subnet_v2.HostRoutesColumn(self._subnet_ipv6_pd.host_routes),
|
|
243
|
+
self._subnet_ipv6_pd.id,
|
|
244
|
+
self._subnet_ipv6_pd.ip_version,
|
|
245
|
+
self._subnet_ipv6_pd.ipv6_address_mode,
|
|
246
|
+
self._subnet_ipv6_pd.ipv6_ra_mode,
|
|
247
|
+
self._subnet_ipv6_pd.name,
|
|
248
|
+
self._subnet_ipv6_pd.network_id,
|
|
249
|
+
self._subnet_ipv6_pd.project_id,
|
|
250
|
+
self._subnet_ipv6_pd.segment_id,
|
|
251
|
+
format_columns.ListColumn(self._subnet_ipv6_pd.service_types),
|
|
252
|
+
self._subnet_ipv6_pd.subnetpool_id,
|
|
253
|
+
format_columns.ListColumn(self._subnet_ipv6_pd.tags),
|
|
254
|
+
)
|
|
255
|
+
|
|
213
256
|
def setUp(self):
|
|
214
257
|
self._init_subnet_variables()
|
|
215
258
|
super(TestCreateSubnet, self).setUp()
|
|
@@ -455,6 +498,55 @@ class TestCreateSubnet(TestSubnet):
|
|
|
455
498
|
self.assertEqual(self.columns, columns)
|
|
456
499
|
self.assertCountEqual(self.data_ipv6, data)
|
|
457
500
|
|
|
501
|
+
def test_create_options_subnet_ipv6_pd(self):
|
|
502
|
+
# Mock SDK calls for this test.
|
|
503
|
+
self.network_client.create_subnet.return_value = self._subnet_ipv6_pd
|
|
504
|
+
self._network.id = self._subnet_ipv6_pd.network_id
|
|
505
|
+
|
|
506
|
+
arglist = [
|
|
507
|
+
self._subnet_ipv6_pd.name,
|
|
508
|
+
"--network",
|
|
509
|
+
self._subnet_ipv6_pd.network_id,
|
|
510
|
+
"--ip-version",
|
|
511
|
+
str(self._subnet_ipv6_pd.ip_version),
|
|
512
|
+
"--ipv6-ra-mode",
|
|
513
|
+
self._subnet_ipv6_pd.ipv6_ra_mode,
|
|
514
|
+
"--ipv6-address-mode",
|
|
515
|
+
self._subnet_ipv6_pd.ipv6_address_mode,
|
|
516
|
+
"--dhcp",
|
|
517
|
+
"--use-prefix-delegation",
|
|
518
|
+
]
|
|
519
|
+
|
|
520
|
+
verifylist = [
|
|
521
|
+
('name', self._subnet_ipv6_pd.name),
|
|
522
|
+
('network', self._subnet_ipv6_pd.network_id),
|
|
523
|
+
('ip_version', self._subnet_ipv6_pd.ip_version),
|
|
524
|
+
('ipv6_ra_mode', self._subnet_ipv6_pd.ipv6_ra_mode),
|
|
525
|
+
('ipv6_address_mode', self._subnet_ipv6_pd.ipv6_address_mode),
|
|
526
|
+
('dhcp', self._subnet_ipv6_pd.enable_dhcp),
|
|
527
|
+
('use_prefix_delegation', True),
|
|
528
|
+
]
|
|
529
|
+
|
|
530
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
531
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
532
|
+
|
|
533
|
+
# Calling with --use-prefix-delegation will set the subnetpool_id
|
|
534
|
+
# to 'prefix_delegation'
|
|
535
|
+
self.network_client.create_subnet.assert_called_once_with(
|
|
536
|
+
**{
|
|
537
|
+
'enable_dhcp': self._subnet_ipv6_pd.enable_dhcp,
|
|
538
|
+
'ip_version': self._subnet_ipv6_pd.ip_version,
|
|
539
|
+
'ipv6_address_mode': self._subnet_ipv6_pd.ipv6_address_mode,
|
|
540
|
+
'ipv6_ra_mode': self._subnet_ipv6_pd.ipv6_ra_mode,
|
|
541
|
+
'name': self._subnet_ipv6_pd.name,
|
|
542
|
+
'network_id': self._subnet_ipv6_pd.network_id,
|
|
543
|
+
'subnetpool_id': self._subnet_ipv6_pd.subnetpool_id,
|
|
544
|
+
}
|
|
545
|
+
)
|
|
546
|
+
self.assertFalse(self.network_client.set_tags.called)
|
|
547
|
+
self.assertEqual(self.columns, columns)
|
|
548
|
+
self.assertCountEqual(self.data_ipv6_pd, data)
|
|
549
|
+
|
|
458
550
|
def test_create_with_network_segment(self):
|
|
459
551
|
# Mock SDK calls for this test.
|
|
460
552
|
self._network.id = self._subnet.network_id
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
|
-
#
|
|
13
12
|
|
|
14
|
-
import argparse
|
|
15
13
|
from unittest import mock
|
|
16
14
|
from unittest.mock import call
|
|
17
15
|
|
|
@@ -21,7 +19,7 @@ from osc_lib import exceptions
|
|
|
21
19
|
from openstackclient.network.v2 import subnet_pool
|
|
22
20
|
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes_v3
|
|
23
21
|
from openstackclient.tests.unit.network.v2 import fakes as network_fakes
|
|
24
|
-
from openstackclient.tests.unit import utils as
|
|
22
|
+
from openstackclient.tests.unit import utils as test_utils
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
class TestSubnetPool(network_fakes.TestNetworkV2):
|
|
@@ -98,7 +96,7 @@ class TestCreateSubnetPool(TestSubnetPool):
|
|
|
98
96
|
verifylist = []
|
|
99
97
|
|
|
100
98
|
self.assertRaises(
|
|
101
|
-
|
|
99
|
+
test_utils.ParserException,
|
|
102
100
|
self.check_parser,
|
|
103
101
|
self.cmd,
|
|
104
102
|
arglist,
|
|
@@ -115,7 +113,7 @@ class TestCreateSubnetPool(TestSubnetPool):
|
|
|
115
113
|
('name', self._subnet_pool.name),
|
|
116
114
|
]
|
|
117
115
|
self.assertRaises(
|
|
118
|
-
|
|
116
|
+
test_utils.ParserException,
|
|
119
117
|
self.check_parser,
|
|
120
118
|
self.cmd,
|
|
121
119
|
arglist,
|
|
@@ -196,7 +194,7 @@ class TestCreateSubnetPool(TestSubnetPool):
|
|
|
196
194
|
]
|
|
197
195
|
|
|
198
196
|
self.assertRaises(
|
|
199
|
-
|
|
197
|
+
test_utils.ParserException,
|
|
200
198
|
self.check_parser,
|
|
201
199
|
self.cmd,
|
|
202
200
|
arglist,
|
|
@@ -368,7 +366,7 @@ class TestCreateSubnetPool(TestSubnetPool):
|
|
|
368
366
|
)
|
|
369
367
|
if add_tags:
|
|
370
368
|
self.network_client.set_tags.assert_called_once_with(
|
|
371
|
-
self._subnet_pool,
|
|
369
|
+
self._subnet_pool, test_utils.CompareBySet(['red', 'blue'])
|
|
372
370
|
)
|
|
373
371
|
else:
|
|
374
372
|
self.assertFalse(self.network_client.set_tags.called)
|
|
@@ -837,7 +835,7 @@ class TestSetSubnetPool(TestSubnetPool):
|
|
|
837
835
|
]
|
|
838
836
|
|
|
839
837
|
self.assertRaises(
|
|
840
|
-
|
|
838
|
+
test_utils.ParserException,
|
|
841
839
|
self.check_parser,
|
|
842
840
|
self.cmd,
|
|
843
841
|
arglist,
|
|
@@ -902,7 +900,7 @@ class TestSetSubnetPool(TestSubnetPool):
|
|
|
902
900
|
|
|
903
901
|
# Exclusive arguments will conflict here.
|
|
904
902
|
self.assertRaises(
|
|
905
|
-
|
|
903
|
+
test_utils.ParserException,
|
|
906
904
|
self.check_parser,
|
|
907
905
|
self.cmd,
|
|
908
906
|
arglist,
|
|
@@ -963,7 +961,7 @@ class TestSetSubnetPool(TestSubnetPool):
|
|
|
963
961
|
|
|
964
962
|
# Exclusive arguments will conflict here.
|
|
965
963
|
self.assertRaises(
|
|
966
|
-
|
|
964
|
+
test_utils.ParserException,
|
|
967
965
|
self.check_parser,
|
|
968
966
|
self.cmd,
|
|
969
967
|
arglist,
|
|
@@ -1029,7 +1027,7 @@ class TestSetSubnetPool(TestSubnetPool):
|
|
|
1029
1027
|
|
|
1030
1028
|
self.assertFalse(self.network_client.update_subnet_pool.called)
|
|
1031
1029
|
self.network_client.set_tags.assert_called_once_with(
|
|
1032
|
-
self._subnet_pool,
|
|
1030
|
+
self._subnet_pool, test_utils.CompareBySet(expected_args)
|
|
1033
1031
|
)
|
|
1034
1032
|
self.assertIsNone(result)
|
|
1035
1033
|
|
|
@@ -1093,7 +1091,7 @@ class TestShowSubnetPool(TestSubnetPool):
|
|
|
1093
1091
|
verifylist = []
|
|
1094
1092
|
|
|
1095
1093
|
self.assertRaises(
|
|
1096
|
-
|
|
1094
|
+
test_utils.ParserException,
|
|
1097
1095
|
self.check_parser,
|
|
1098
1096
|
self.cmd,
|
|
1099
1097
|
arglist,
|
|
@@ -1149,7 +1147,7 @@ class TestUnsetSubnetPool(TestSubnetPool):
|
|
|
1149
1147
|
|
|
1150
1148
|
self.assertFalse(self.network_client.update_subnet_pool.called)
|
|
1151
1149
|
self.network_client.set_tags.assert_called_once_with(
|
|
1152
|
-
self._subnetpool,
|
|
1150
|
+
self._subnetpool, test_utils.CompareBySet(expected_args)
|
|
1153
1151
|
)
|
|
1154
1152
|
self.assertIsNone(result)
|
|
1155
1153
|
|
|
@@ -141,10 +141,6 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
141
141
|
# Full name of the OpenStackShell class to test (cliff.app.App subclass)
|
|
142
142
|
shell_class_name = "openstackclient.shell.OpenStackShell"
|
|
143
143
|
|
|
144
|
-
# TODO(dtroyer): remove this once the shell_class_patch patch is released
|
|
145
|
-
# in osc-lib
|
|
146
|
-
app_patch = shell_class_name
|
|
147
|
-
|
|
148
144
|
def setUp(self):
|
|
149
145
|
super(TestShell, self).setUp()
|
|
150
146
|
# TODO(dtroyer): remove this once the shell_class_patch patch is
|
|
@@ -162,7 +158,6 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
162
158
|
)
|
|
163
159
|
_cmd = cmd_options + " list role"
|
|
164
160
|
osc_lib_test_utils.fake_execute(_shell, _cmd)
|
|
165
|
-
print("_shell: %s" % _shell)
|
|
166
161
|
|
|
167
162
|
self.app.assert_called_with(["list", "role"])
|
|
168
163
|
self.assertEqual(
|
|
@@ -178,7 +173,7 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
178
173
|
|
|
179
174
|
def _assert_token_auth(self, cmd_options, default_args):
|
|
180
175
|
with mock.patch(
|
|
181
|
-
self.
|
|
176
|
+
self.shell_class_name + ".initialize_app",
|
|
182
177
|
self.app,
|
|
183
178
|
):
|
|
184
179
|
_shell = osc_lib_test_utils.make_shell(
|
|
@@ -186,7 +181,6 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
186
181
|
)
|
|
187
182
|
_cmd = cmd_options + " list role"
|
|
188
183
|
osc_lib_test_utils.fake_execute(_shell, _cmd)
|
|
189
|
-
print("_shell: %s" % _shell)
|
|
190
184
|
|
|
191
185
|
self.app.assert_called_with(["list", "role"])
|
|
192
186
|
self.assertEqual(
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
13
13
|
# License for the specific language governing permissions and limitations
|
|
14
14
|
# under the License.
|
|
15
|
-
#
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
import argparse
|
|
17
|
+
import io
|
|
18
18
|
import os
|
|
19
19
|
|
|
20
20
|
import fixtures
|
|
@@ -52,6 +52,8 @@ class TestCase(testtools.TestCase):
|
|
|
52
52
|
stderr = self.useFixture(fixtures.StringStream("stderr")).stream
|
|
53
53
|
self.useFixture(fixtures.MonkeyPatch("sys.stderr", stderr))
|
|
54
54
|
|
|
55
|
+
self.log = self.useFixture(fixtures.LoggerFixture())
|
|
56
|
+
|
|
55
57
|
def assertNotCalled(self, m, msg=None):
|
|
56
58
|
"""Assert a function was not called"""
|
|
57
59
|
|
|
@@ -75,11 +77,15 @@ class TestCommand(TestCase):
|
|
|
75
77
|
|
|
76
78
|
def check_parser(self, cmd, args, verify_args):
|
|
77
79
|
cmd_parser = cmd.get_parser('check_parser')
|
|
78
|
-
stderr = StringIO()
|
|
80
|
+
stderr = io.StringIO()
|
|
79
81
|
with fixtures.MonkeyPatch('sys.stderr', stderr):
|
|
80
82
|
try:
|
|
81
83
|
parsed_args = cmd_parser.parse_args(args)
|
|
82
|
-
except
|
|
84
|
+
except (
|
|
85
|
+
SystemExit,
|
|
86
|
+
argparse.ArgumentTypeError,
|
|
87
|
+
argparse.ArgumentError,
|
|
88
|
+
):
|
|
83
89
|
raise ParserException(
|
|
84
90
|
"Argument parse failed: %s" % stderr.getvalue()
|
|
85
91
|
)
|
|
@@ -53,7 +53,7 @@ class FakeVolumev1Client:
|
|
|
53
53
|
self.management_url = kwargs['endpoint']
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
class
|
|
56
|
+
class FakeClientMixin:
|
|
57
57
|
def setUp(self):
|
|
58
58
|
super().setUp()
|
|
59
59
|
|
|
@@ -61,6 +61,12 @@ class TestVolumev1(utils.TestCommand):
|
|
|
61
61
|
endpoint=fakes.AUTH_URL,
|
|
62
62
|
token=fakes.AUTH_TOKEN,
|
|
63
63
|
)
|
|
64
|
+
self.volume_client = self.app.client_manager.volume
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class TestVolumev1(FakeClientMixin, utils.TestCommand):
|
|
68
|
+
def setUp(self):
|
|
69
|
+
super().setUp()
|
|
64
70
|
|
|
65
71
|
self.app.client_manager.identity = identity_fakes.FakeIdentityv2Client(
|
|
66
72
|
endpoint=fakes.AUTH_URL,
|
|
@@ -29,10 +29,10 @@ class TestQos(volume_fakes.TestVolumev1):
|
|
|
29
29
|
def setUp(self):
|
|
30
30
|
super().setUp()
|
|
31
31
|
|
|
32
|
-
self.qos_mock = self.
|
|
32
|
+
self.qos_mock = self.volume_client.qos_specs
|
|
33
33
|
self.qos_mock.reset_mock()
|
|
34
34
|
|
|
35
|
-
self.types_mock = self.
|
|
35
|
+
self.types_mock = self.volume_client.volume_types
|
|
36
36
|
self.types_mock.reset_mock()
|
|
37
37
|
|
|
38
38
|
|
|
@@ -23,7 +23,7 @@ class TestService(volume_fakes.TestVolumev1):
|
|
|
23
23
|
super().setUp()
|
|
24
24
|
|
|
25
25
|
# Get a shortcut to the ServiceManager Mock
|
|
26
|
-
self.service_mock = self.
|
|
26
|
+
self.service_mock = self.volume_client.services
|
|
27
27
|
self.service_mock.reset_mock()
|
|
28
28
|
|
|
29
29
|
|
|
@@ -27,11 +27,11 @@ class TestTransfer(volume_fakes.TestVolumev1):
|
|
|
27
27
|
super().setUp()
|
|
28
28
|
|
|
29
29
|
# Get a shortcut to the TransferManager Mock
|
|
30
|
-
self.transfer_mock = self.
|
|
30
|
+
self.transfer_mock = self.volume_client.transfers
|
|
31
31
|
self.transfer_mock.reset_mock()
|
|
32
32
|
|
|
33
33
|
# Get a shortcut to the VolumeManager Mock
|
|
34
|
-
self.volumes_mock = self.
|
|
34
|
+
self.volumes_mock = self.volume_client.volumes
|
|
35
35
|
self.volumes_mock.reset_mock()
|
|
36
36
|
|
|
37
37
|
|
|
@@ -28,12 +28,10 @@ class TestType(volume_fakes.TestVolumev1):
|
|
|
28
28
|
def setUp(self):
|
|
29
29
|
super().setUp()
|
|
30
30
|
|
|
31
|
-
self.types_mock = self.
|
|
31
|
+
self.types_mock = self.volume_client.volume_types
|
|
32
32
|
self.types_mock.reset_mock()
|
|
33
33
|
|
|
34
|
-
self.encryption_types_mock =
|
|
35
|
-
self.app.client_manager.volume.volume_encryption_types
|
|
36
|
-
)
|
|
34
|
+
self.encryption_types_mock = self.volume_client.volume_encryption_types
|
|
37
35
|
self.encryption_types_mock.reset_mock()
|
|
38
36
|
|
|
39
37
|
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
12
12
|
# License for the specific language governing permissions and limitations
|
|
13
13
|
# under the License.
|
|
14
|
-
#
|
|
15
14
|
|
|
16
|
-
import argparse
|
|
17
15
|
from unittest import mock
|
|
18
16
|
from unittest.mock import call
|
|
19
17
|
|
|
@@ -23,7 +21,7 @@ from osc_lib import utils
|
|
|
23
21
|
|
|
24
22
|
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes
|
|
25
23
|
from openstackclient.tests.unit.image.v1 import fakes as image_fakes
|
|
26
|
-
from openstackclient.tests.unit import utils as
|
|
24
|
+
from openstackclient.tests.unit import utils as test_utils
|
|
27
25
|
from openstackclient.tests.unit.volume.v1 import fakes as volume_fakes
|
|
28
26
|
from openstackclient.volume.v1 import volume
|
|
29
27
|
|
|
@@ -33,7 +31,7 @@ class TestVolume(volume_fakes.TestVolumev1):
|
|
|
33
31
|
super().setUp()
|
|
34
32
|
|
|
35
33
|
# Get a shortcut to the VolumeManager Mock
|
|
36
|
-
self.volumes_mock = self.
|
|
34
|
+
self.volumes_mock = self.volume_client.volumes
|
|
37
35
|
self.volumes_mock.reset_mock()
|
|
38
36
|
|
|
39
37
|
# Get a shortcut to the TenantManager Mock
|
|
@@ -665,7 +663,7 @@ class TestVolumeCreate(TestVolume):
|
|
|
665
663
|
]
|
|
666
664
|
|
|
667
665
|
self.assertRaises(
|
|
668
|
-
|
|
666
|
+
test_utils.ParserException,
|
|
669
667
|
self.check_parser,
|
|
670
668
|
self.cmd,
|
|
671
669
|
arglist,
|
|
@@ -973,7 +971,7 @@ class TestVolumeList(TestVolume):
|
|
|
973
971
|
("limit", -2),
|
|
974
972
|
]
|
|
975
973
|
self.assertRaises(
|
|
976
|
-
|
|
974
|
+
test_utils.ParserException,
|
|
977
975
|
self.check_parser,
|
|
978
976
|
self.cmd,
|
|
979
977
|
arglist,
|
|
@@ -1065,7 +1063,7 @@ class TestVolumeMigrate(TestVolume):
|
|
|
1065
1063
|
]
|
|
1066
1064
|
|
|
1067
1065
|
self.assertRaises(
|
|
1068
|
-
|
|
1066
|
+
test_utils.ParserException,
|
|
1069
1067
|
self.check_parser,
|
|
1070
1068
|
self.cmd,
|
|
1071
1069
|
arglist,
|
|
@@ -26,13 +26,13 @@ class TestBackup(volume_fakes.TestVolumev1):
|
|
|
26
26
|
def setUp(self):
|
|
27
27
|
super().setUp()
|
|
28
28
|
|
|
29
|
-
self.backups_mock = self.
|
|
29
|
+
self.backups_mock = self.volume_client.backups
|
|
30
30
|
self.backups_mock.reset_mock()
|
|
31
|
-
self.volumes_mock = self.
|
|
31
|
+
self.volumes_mock = self.volume_client.volumes
|
|
32
32
|
self.volumes_mock.reset_mock()
|
|
33
|
-
self.snapshots_mock = self.
|
|
33
|
+
self.snapshots_mock = self.volume_client.volume_snapshots
|
|
34
34
|
self.snapshots_mock.reset_mock()
|
|
35
|
-
self.restores_mock = self.
|
|
35
|
+
self.restores_mock = self.volume_client.restores
|
|
36
36
|
self.restores_mock.reset_mock()
|
|
37
37
|
|
|
38
38
|
|