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
|
@@ -55,7 +55,7 @@ class TestMappingCreate(TestMapping):
|
|
|
55
55
|
mocker = mock.Mock()
|
|
56
56
|
mocker.return_value = identity_fakes.MAPPING_RULES
|
|
57
57
|
with mock.patch(
|
|
58
|
-
"openstackclient.identity.v3.mapping.
|
|
58
|
+
"openstackclient.identity.v3.mapping.CreateMapping._read_rules",
|
|
59
59
|
mocker,
|
|
60
60
|
):
|
|
61
61
|
columns, data = self.cmd.take_action(parsed_args)
|
|
@@ -170,7 +170,7 @@ class TestMappingSet(TestMapping):
|
|
|
170
170
|
mocker = mock.Mock()
|
|
171
171
|
mocker.return_value = identity_fakes.MAPPING_RULES_2
|
|
172
172
|
with mock.patch(
|
|
173
|
-
"openstackclient.identity.v3.mapping.
|
|
173
|
+
"openstackclient.identity.v3.mapping.SetMapping._read_rules",
|
|
174
174
|
mocker,
|
|
175
175
|
):
|
|
176
176
|
result = self.cmd.take_action(parsed_args)
|
|
@@ -941,6 +941,22 @@ class TestProjectList(TestProject):
|
|
|
941
941
|
)
|
|
942
942
|
self.assertEqual(datalist, tuple(data))
|
|
943
943
|
|
|
944
|
+
def test_project_list_with_option_enabled(self):
|
|
945
|
+
arglist = ['--enabled']
|
|
946
|
+
verifylist = [('is_enabled', True)]
|
|
947
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
948
|
+
|
|
949
|
+
# In base command class Lister in cliff, abstract method take_action()
|
|
950
|
+
# returns a tuple containing the column names and an iterable
|
|
951
|
+
# containing the data to be listed.
|
|
952
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
953
|
+
|
|
954
|
+
kwargs = {'is_enabled': True}
|
|
955
|
+
self.projects_mock.list.assert_called_with(**kwargs)
|
|
956
|
+
|
|
957
|
+
self.assertEqual(self.columns, columns)
|
|
958
|
+
self.assertEqual(self.datalist, tuple(data))
|
|
959
|
+
|
|
944
960
|
|
|
945
961
|
class TestProjectSet(TestProject):
|
|
946
962
|
domain = identity_fakes.FakeDomain.create_one_domain()
|
|
@@ -70,12 +70,15 @@ class TestTrustCreate(identity_fakes.TestIdentityv3):
|
|
|
70
70
|
# Set expected values
|
|
71
71
|
kwargs = {
|
|
72
72
|
'project_id': self.project.id,
|
|
73
|
-
'roles': [self.role.id],
|
|
73
|
+
'roles': [{'id': self.role.id}],
|
|
74
|
+
'impersonation': False,
|
|
74
75
|
}
|
|
75
76
|
# TrustManager.create(trustee_id, trustor_id, impersonation=,
|
|
76
77
|
# project=, role_names=, expires_at=)
|
|
77
78
|
self.identity_sdk_client.create_trust.assert_called_with(
|
|
78
|
-
|
|
79
|
+
trustor_user_id=self.user.id,
|
|
80
|
+
trustee_user_id=self.user.id,
|
|
81
|
+
**kwargs,
|
|
79
82
|
)
|
|
80
83
|
|
|
81
84
|
collist = (
|
|
@@ -44,6 +44,7 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
44
44
|
'name',
|
|
45
45
|
'description',
|
|
46
46
|
'password_expires_at',
|
|
47
|
+
'options',
|
|
47
48
|
)
|
|
48
49
|
|
|
49
50
|
def setUp(self):
|
|
@@ -63,6 +64,7 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
63
64
|
self.user.name,
|
|
64
65
|
self.user.description,
|
|
65
66
|
self.user.password_expires_at,
|
|
67
|
+
getattr(self.user, 'options', {}),
|
|
66
68
|
)
|
|
67
69
|
|
|
68
70
|
self.identity_sdk_client.find_domain.return_value = self.domain
|
|
@@ -163,6 +165,53 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
163
165
|
self.assertEqual(self.columns, columns)
|
|
164
166
|
self.assertEqual(self.datalist, data)
|
|
165
167
|
|
|
168
|
+
def test_user_create_password_prompt_no_warning(self):
|
|
169
|
+
arglist = [
|
|
170
|
+
'--password-prompt',
|
|
171
|
+
self.user.name,
|
|
172
|
+
]
|
|
173
|
+
verifylist = [
|
|
174
|
+
('password', None),
|
|
175
|
+
('password_prompt', True),
|
|
176
|
+
('enable', False),
|
|
177
|
+
('disable', False),
|
|
178
|
+
('name', self.user.name),
|
|
179
|
+
]
|
|
180
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
181
|
+
import logging
|
|
182
|
+
|
|
183
|
+
# Mock the password prompt
|
|
184
|
+
mocker = mock.Mock()
|
|
185
|
+
mocker.return_value = 'abc123'
|
|
186
|
+
|
|
187
|
+
# Use assertLogs to verify no warnings are logged
|
|
188
|
+
logger = 'openstackclient.identity.v3.user'
|
|
189
|
+
with mock.patch("osc_lib.utils.get_password", mocker):
|
|
190
|
+
with self.assertLogs(logger, level='WARNING') as log_ctx:
|
|
191
|
+
logging.getLogger(logger).warning(
|
|
192
|
+
"Dummy warning for test setup"
|
|
193
|
+
)
|
|
194
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
195
|
+
|
|
196
|
+
self.assertEqual(1, len(log_ctx.records))
|
|
197
|
+
self.assertIn(
|
|
198
|
+
"Dummy warning for test setup", log_ctx.output[0]
|
|
199
|
+
)
|
|
200
|
+
self.assertNotIn(
|
|
201
|
+
"No password was supplied", ''.join(log_ctx.output)
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
# Set expected values
|
|
205
|
+
kwargs = {
|
|
206
|
+
'name': self.user.name,
|
|
207
|
+
'is_enabled': True,
|
|
208
|
+
'password': 'abc123',
|
|
209
|
+
}
|
|
210
|
+
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
211
|
+
|
|
212
|
+
self.assertEqual(self.columns, columns)
|
|
213
|
+
self.assertEqual(self.datalist, data)
|
|
214
|
+
|
|
166
215
|
def test_user_create_email(self):
|
|
167
216
|
arglist = [
|
|
168
217
|
'--email',
|
|
@@ -232,6 +281,7 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
232
281
|
self.user.name,
|
|
233
282
|
self.user.description,
|
|
234
283
|
self.user.password_expires_at,
|
|
284
|
+
getattr(self.user, 'options', {}),
|
|
235
285
|
)
|
|
236
286
|
self.assertEqual(datalist, data)
|
|
237
287
|
|
|
@@ -279,6 +329,7 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
279
329
|
self.user.name,
|
|
280
330
|
self.user.description,
|
|
281
331
|
self.user.password_expires_at,
|
|
332
|
+
getattr(self.user, 'options', {}),
|
|
282
333
|
)
|
|
283
334
|
self.assertEqual(datalist, data)
|
|
284
335
|
|
|
@@ -988,6 +1039,24 @@ class TestUserList(identity_fakes.TestIdentityv3):
|
|
|
988
1039
|
self.assertEqual(self.columns, columns)
|
|
989
1040
|
self.assertEqual(self.datalist, tuple(data))
|
|
990
1041
|
|
|
1042
|
+
def test_user_list_with_option_enabled(self):
|
|
1043
|
+
arglist = ['--enabled']
|
|
1044
|
+
verifylist = [('is_enabled', True)]
|
|
1045
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
1046
|
+
|
|
1047
|
+
# In base command class Lister in cliff, abstract method take_action()
|
|
1048
|
+
# returns a tuple containing the column names and an iterable
|
|
1049
|
+
# containing the data to be listed.
|
|
1050
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
1051
|
+
|
|
1052
|
+
kwargs = {'domain_id': None, 'is_enabled': True}
|
|
1053
|
+
self.identity_sdk_client.users.assert_called_with(**kwargs)
|
|
1054
|
+
self.identity_sdk_client.find_user.assert_not_called()
|
|
1055
|
+
self.identity_sdk_client.group_users.assert_not_called()
|
|
1056
|
+
|
|
1057
|
+
self.assertEqual(self.columns, columns)
|
|
1058
|
+
self.assertEqual(self.datalist, tuple(data))
|
|
1059
|
+
|
|
991
1060
|
|
|
992
1061
|
class TestUserSet(identity_fakes.TestIdentityv3):
|
|
993
1062
|
project = sdk_fakes.generate_fake_resource(_project.Project)
|
|
@@ -1206,6 +1275,17 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1206
1275
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1207
1276
|
user=self.user, **kwargs
|
|
1208
1277
|
)
|
|
1278
|
+
self.identity_sdk_client.find_domain.assert_not_called()
|
|
1279
|
+
|
|
1280
|
+
# Set expected values
|
|
1281
|
+
kwargs = {
|
|
1282
|
+
'ignore_missing': False,
|
|
1283
|
+
'domain_id': None,
|
|
1284
|
+
}
|
|
1285
|
+
self.identity_sdk_client.find_project.assert_called_once_with(
|
|
1286
|
+
name_or_id=self.project.id, **kwargs
|
|
1287
|
+
)
|
|
1288
|
+
|
|
1209
1289
|
self.assertIsNone(result)
|
|
1210
1290
|
|
|
1211
1291
|
def test_user_set_project_domain(self):
|
|
@@ -1238,6 +1318,11 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1238
1318
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1239
1319
|
user=self.user, **kwargs
|
|
1240
1320
|
)
|
|
1321
|
+
|
|
1322
|
+
self.identity_sdk_client.find_domain.assert_called_once_with(
|
|
1323
|
+
name_or_id=self.project.domain_id, ignore_missing=False
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1241
1326
|
self.assertIsNone(result)
|
|
1242
1327
|
|
|
1243
1328
|
def test_user_set_enable(self):
|
|
@@ -1670,11 +1755,14 @@ class TestUserSetPassword(identity_fakes.TestIdentityv3):
|
|
|
1670
1755
|
# Mock getting user current password.
|
|
1671
1756
|
with self._mock_get_password(current_pass):
|
|
1672
1757
|
result = self.cmd.take_action(parsed_args)
|
|
1758
|
+
self.assertIsNone(result)
|
|
1759
|
+
|
|
1760
|
+
conn = self.app.client_manager.sdk_connection
|
|
1761
|
+
user_id = conn.config.get_auth().get_user_id(conn.identity)
|
|
1673
1762
|
|
|
1674
1763
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1675
|
-
current_password=current_pass, password=new_pass
|
|
1764
|
+
user=user_id, current_password=current_pass, password=new_pass
|
|
1676
1765
|
)
|
|
1677
|
-
self.assertIsNone(result)
|
|
1678
1766
|
|
|
1679
1767
|
def test_user_create_password_prompt(self):
|
|
1680
1768
|
current_pass = 'old_pass'
|
|
@@ -1684,11 +1772,14 @@ class TestUserSetPassword(identity_fakes.TestIdentityv3):
|
|
|
1684
1772
|
# Mock getting user current and new password.
|
|
1685
1773
|
with self._mock_get_password(current_pass, new_pass):
|
|
1686
1774
|
result = self.cmd.take_action(parsed_args)
|
|
1775
|
+
self.assertIsNone(result)
|
|
1776
|
+
|
|
1777
|
+
conn = self.app.client_manager.sdk_connection
|
|
1778
|
+
user_id = conn.config.get_auth().get_user_id(conn.identity)
|
|
1687
1779
|
|
|
1688
1780
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1689
|
-
current_password=current_pass, password=new_pass
|
|
1781
|
+
user=user_id, current_password=current_pass, password=new_pass
|
|
1690
1782
|
)
|
|
1691
|
-
self.assertIsNone(result)
|
|
1692
1783
|
|
|
1693
1784
|
def test_user_password_change_no_prompt(self):
|
|
1694
1785
|
current_pass = 'old_pass'
|
|
@@ -1706,11 +1797,14 @@ class TestUserSetPassword(identity_fakes.TestIdentityv3):
|
|
|
1706
1797
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
1707
1798
|
|
|
1708
1799
|
result = self.cmd.take_action(parsed_args)
|
|
1800
|
+
self.assertIsNone(result)
|
|
1801
|
+
|
|
1802
|
+
conn = self.app.client_manager.sdk_connection
|
|
1803
|
+
user_id = conn.config.get_auth().get_user_id(conn.identity)
|
|
1709
1804
|
|
|
1710
1805
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1711
|
-
current_password=current_pass, password=new_pass
|
|
1806
|
+
user=user_id, current_password=current_pass, password=new_pass
|
|
1712
1807
|
)
|
|
1713
|
-
self.assertIsNone(result)
|
|
1714
1808
|
|
|
1715
1809
|
|
|
1716
1810
|
class TestUserShow(identity_fakes.TestIdentityv3):
|
|
@@ -1763,6 +1857,7 @@ class TestUserShow(identity_fakes.TestIdentityv3):
|
|
|
1763
1857
|
'name',
|
|
1764
1858
|
'description',
|
|
1765
1859
|
'password_expires_at',
|
|
1860
|
+
'options',
|
|
1766
1861
|
)
|
|
1767
1862
|
self.assertEqual(collist, columns)
|
|
1768
1863
|
datalist = (
|
|
@@ -1774,6 +1869,7 @@ class TestUserShow(identity_fakes.TestIdentityv3):
|
|
|
1774
1869
|
self.user.name,
|
|
1775
1870
|
self.user.description,
|
|
1776
1871
|
self.user.password_expires_at,
|
|
1872
|
+
getattr(self.user, 'options', {}),
|
|
1777
1873
|
)
|
|
1778
1874
|
self.assertEqual(datalist, data)
|
|
1779
1875
|
|
|
@@ -20,7 +20,7 @@ from openstack.image.v1 import image
|
|
|
20
20
|
|
|
21
21
|
from openstackclient.tests.unit import fakes
|
|
22
22
|
from openstackclient.tests.unit import utils
|
|
23
|
-
from openstackclient.tests.unit.volume.
|
|
23
|
+
from openstackclient.tests.unit.volume.v2 import fakes as volume_fakes
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class FakeClientMixin:
|
|
@@ -35,7 +35,7 @@ class TestImagev1(FakeClientMixin, utils.TestCommand):
|
|
|
35
35
|
def setUp(self):
|
|
36
36
|
super().setUp()
|
|
37
37
|
|
|
38
|
-
self.app.client_manager.volume = volume_fakes.
|
|
38
|
+
self.app.client_manager.volume = volume_fakes.FakeVolumeClient(
|
|
39
39
|
endpoint=fakes.AUTH_URL,
|
|
40
40
|
token=fakes.AUTH_TOKEN,
|
|
41
41
|
)
|
|
@@ -54,9 +54,9 @@ class TestImageCreate(image_fakes.TestImagev1):
|
|
|
54
54
|
def setUp(self):
|
|
55
55
|
super().setUp()
|
|
56
56
|
|
|
57
|
-
self.image_client.create_image =
|
|
58
|
-
self.image_client.find_image =
|
|
59
|
-
self.image_client.update_image =
|
|
57
|
+
self.image_client.create_image.return_value = self.new_image
|
|
58
|
+
self.image_client.find_image.return_value = self.new_image
|
|
59
|
+
self.image_client.update_image.return_value = self.new_image
|
|
60
60
|
|
|
61
61
|
# Get the command object to test
|
|
62
62
|
self.cmd = image.CreateImage(self.app, None)
|
|
@@ -212,8 +212,8 @@ class TestImageDelete(image_fakes.TestImagev1):
|
|
|
212
212
|
super().setUp()
|
|
213
213
|
|
|
214
214
|
# This is the return value for utils.find_resource()
|
|
215
|
-
self.image_client.find_image =
|
|
216
|
-
self.image_client.delete_image =
|
|
215
|
+
self.image_client.find_image.return_value = self._image
|
|
216
|
+
self.image_client.delete_image.return_value = None
|
|
217
217
|
|
|
218
218
|
# Get the command object to test
|
|
219
219
|
self.cmd = image.DeleteImage(self.app, None)
|
|
@@ -261,7 +261,6 @@ class TestImageList(image_fakes.TestImagev1):
|
|
|
261
261
|
def setUp(self):
|
|
262
262
|
super().setUp()
|
|
263
263
|
|
|
264
|
-
self.image_client.images = mock.Mock()
|
|
265
264
|
self.image_client.images.side_effect = [
|
|
266
265
|
[self._image],
|
|
267
266
|
[],
|
|
@@ -441,8 +440,8 @@ class TestImageSet(image_fakes.TestImagev1):
|
|
|
441
440
|
super().setUp()
|
|
442
441
|
|
|
443
442
|
# This is the return value for utils.find_resource()
|
|
444
|
-
self.image_client.find_image =
|
|
445
|
-
self.image_client.update_image =
|
|
443
|
+
self.image_client.find_image.return_value = self._image
|
|
444
|
+
self.image_client.update_image.return_value = self._image
|
|
446
445
|
|
|
447
446
|
# Get the command object to test
|
|
448
447
|
self.cmd = image.SetImage(self.app, None)
|
|
@@ -712,7 +711,7 @@ class TestImageShow(image_fakes.TestImagev1):
|
|
|
712
711
|
def setUp(self):
|
|
713
712
|
super().setUp()
|
|
714
713
|
|
|
715
|
-
self.image_client.find_image =
|
|
714
|
+
self.image_client.find_image.return_value = self._image
|
|
716
715
|
|
|
717
716
|
# Get the command object to test
|
|
718
717
|
self.cmd = image.ShowImage(self.app, None)
|
|
@@ -17,8 +17,9 @@ import io
|
|
|
17
17
|
import tempfile
|
|
18
18
|
from unittest import mock
|
|
19
19
|
|
|
20
|
-
from
|
|
20
|
+
from openstack.block_storage.v2 import volume as _volume
|
|
21
21
|
from openstack import exceptions as sdk_exceptions
|
|
22
|
+
from openstack.test import fakes as sdk_fakes
|
|
22
23
|
from osc_lib.cli import format_columns
|
|
23
24
|
from osc_lib import exceptions
|
|
24
25
|
|
|
@@ -37,12 +38,6 @@ class TestImage(image_fakes.TestImagev2, volume_fakes.TestVolume):
|
|
|
37
38
|
self.project_mock.reset_mock()
|
|
38
39
|
self.domain_mock = self.identity_client.domains
|
|
39
40
|
self.domain_mock.reset_mock()
|
|
40
|
-
self.volumes_mock = self.volume_client.volumes
|
|
41
|
-
fake_body = {
|
|
42
|
-
'os-volume_upload_image': {'volume_type': {'name': 'fake_type'}}
|
|
43
|
-
}
|
|
44
|
-
self.volumes_mock.upload_to_image.return_value = (200, fake_body)
|
|
45
|
-
self.volumes_mock.reset_mock()
|
|
46
41
|
|
|
47
42
|
|
|
48
43
|
class TestImageCreate(TestImage):
|
|
@@ -312,7 +307,6 @@ class TestImageCreate(TestImage):
|
|
|
312
307
|
|
|
313
308
|
columns, data = self.cmd.take_action(parsed_args)
|
|
314
309
|
|
|
315
|
-
# ImageManager.create(name=, **)
|
|
316
310
|
self.image_client.create_image.assert_called_with(
|
|
317
311
|
name=self.new_image.name,
|
|
318
312
|
allow_duplicates=True,
|
|
@@ -322,20 +316,19 @@ class TestImageCreate(TestImage):
|
|
|
322
316
|
)
|
|
323
317
|
self.image_client.get_image.assert_called_once_with(self.new_image)
|
|
324
318
|
|
|
325
|
-
@mock.patch('osc_lib.utils.find_resource')
|
|
326
319
|
@mock.patch('openstackclient.image.v2.image.get_data_from_stdin')
|
|
327
|
-
def test_image_create_from_volume(self, mock_get_data_f
|
|
328
|
-
fake_vol_id = 'fake-volume-id'
|
|
320
|
+
def test_image_create_from_volume(self, mock_get_data_f):
|
|
329
321
|
mock_get_data_f.return_value = None
|
|
330
322
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
323
|
+
volume = sdk_fakes.generate_fake_resource(_volume.Volume)
|
|
324
|
+
self.volume_sdk_client.find_volume.return_value = volume
|
|
325
|
+
self.volume_sdk_client.upload_volume_to_image.return_value = {
|
|
326
|
+
'volume_type': {'name': 'fake_type'}
|
|
327
|
+
}
|
|
335
328
|
|
|
336
329
|
arglist = [
|
|
337
330
|
'--volume',
|
|
338
|
-
|
|
331
|
+
volume.id,
|
|
339
332
|
self.new_image.name,
|
|
340
333
|
]
|
|
341
334
|
verifylist = [
|
|
@@ -345,47 +338,60 @@ class TestImageCreate(TestImage):
|
|
|
345
338
|
|
|
346
339
|
columns, data = self.cmd.take_action(parsed_args)
|
|
347
340
|
|
|
348
|
-
self.
|
|
349
|
-
|
|
341
|
+
self.volume_sdk_client.upload_volume_to_image.assert_called_once_with(
|
|
342
|
+
volume.id,
|
|
343
|
+
self.new_image.name,
|
|
344
|
+
force=False,
|
|
345
|
+
disk_format='raw',
|
|
346
|
+
container_format='bare',
|
|
347
|
+
visibility=None,
|
|
348
|
+
protected=None,
|
|
350
349
|
)
|
|
351
350
|
|
|
352
|
-
@mock.patch('osc_lib.utils.find_resource')
|
|
353
351
|
@mock.patch('openstackclient.image.v2.image.get_data_from_stdin')
|
|
354
|
-
def
|
|
355
|
-
self, mock_get_data_f, mock_get_vol
|
|
356
|
-
):
|
|
357
|
-
fake_vol_id = 'fake-volume-id'
|
|
352
|
+
def test_image_create_from_volume_pre_v31(self, mock_get_data_f):
|
|
358
353
|
mock_get_data_f.return_value = None
|
|
359
354
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
355
|
+
volume = sdk_fakes.generate_fake_resource(_volume.Volume)
|
|
356
|
+
self.volume_sdk_client.find_volume.return_value = volume
|
|
357
|
+
self.volume_sdk_client.upload_volume_to_image.return_value = {
|
|
358
|
+
'volume_type': {'name': 'fake_type'}
|
|
359
|
+
}
|
|
364
360
|
|
|
365
|
-
arglist = [
|
|
361
|
+
arglist = [
|
|
362
|
+
'--volume',
|
|
363
|
+
volume.id,
|
|
364
|
+
self.new_image.name,
|
|
365
|
+
'--public',
|
|
366
|
+
]
|
|
366
367
|
verifylist = [
|
|
367
368
|
('name', self.new_image.name),
|
|
368
369
|
]
|
|
369
370
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
370
371
|
|
|
371
|
-
self.assertRaises(
|
|
372
|
+
exc = self.assertRaises(
|
|
372
373
|
exceptions.CommandError, self.cmd.take_action, parsed_args
|
|
373
374
|
)
|
|
375
|
+
self.assertIn('--os-volume-api-version 3.1 or greater ', str(exc))
|
|
374
376
|
|
|
375
|
-
@mock.patch('osc_lib.utils.find_resource')
|
|
376
377
|
@mock.patch('openstackclient.image.v2.image.get_data_from_stdin')
|
|
377
|
-
def test_image_create_from_volume_v31(self, mock_get_data_f
|
|
378
|
-
self.
|
|
378
|
+
def test_image_create_from_volume_v31(self, mock_get_data_f):
|
|
379
|
+
self.set_volume_api_version('3.1')
|
|
379
380
|
|
|
380
|
-
fake_vol_id = 'fake-volume-id'
|
|
381
381
|
mock_get_data_f.return_value = None
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
383
|
+
volume = sdk_fakes.generate_fake_resource(_volume.Volume)
|
|
384
|
+
self.volume_sdk_client.find_volume.return_value = volume
|
|
385
|
+
self.volume_sdk_client.upload_volume_to_image.return_value = {
|
|
386
|
+
'volume_type': {'name': 'fake_type'}
|
|
387
|
+
}
|
|
387
388
|
|
|
388
|
-
arglist = [
|
|
389
|
+
arglist = [
|
|
390
|
+
'--volume',
|
|
391
|
+
volume.id,
|
|
392
|
+
self.new_image.name,
|
|
393
|
+
'--public',
|
|
394
|
+
]
|
|
389
395
|
verifylist = [
|
|
390
396
|
('name', self.new_image.name),
|
|
391
397
|
]
|
|
@@ -393,12 +399,12 @@ class TestImageCreate(TestImage):
|
|
|
393
399
|
|
|
394
400
|
columns, data = self.cmd.take_action(parsed_args)
|
|
395
401
|
|
|
396
|
-
self.
|
|
397
|
-
|
|
398
|
-
False,
|
|
402
|
+
self.volume_sdk_client.upload_volume_to_image.assert_called_once_with(
|
|
403
|
+
volume.id,
|
|
399
404
|
self.new_image.name,
|
|
400
|
-
|
|
401
|
-
'raw',
|
|
405
|
+
force=False,
|
|
406
|
+
disk_format='raw',
|
|
407
|
+
container_format='bare',
|
|
402
408
|
visibility='public',
|
|
403
409
|
protected=False,
|
|
404
410
|
)
|
|
@@ -908,7 +914,7 @@ class TestImageList(TestImage):
|
|
|
908
914
|
self.assertEqual(ret_limit, len(tuple(data)))
|
|
909
915
|
|
|
910
916
|
def test_image_list_project_option(self):
|
|
911
|
-
self.image_client.find_image =
|
|
917
|
+
self.image_client.find_image.return_value = self._image
|
|
912
918
|
arglist = [
|
|
913
919
|
'--project',
|
|
914
920
|
'nova',
|
|
@@ -925,7 +931,7 @@ class TestImageList(TestImage):
|
|
|
925
931
|
|
|
926
932
|
@mock.patch('osc_lib.utils.find_resource')
|
|
927
933
|
def test_image_list_marker_option(self, fr_mock):
|
|
928
|
-
self.image_client.find_image =
|
|
934
|
+
self.image_client.find_image.return_value = self._image
|
|
929
935
|
|
|
930
936
|
arglist = [
|
|
931
937
|
'--marker',
|
|
@@ -1715,7 +1721,7 @@ class TestImageShow(TestImage):
|
|
|
1715
1721
|
def setUp(self):
|
|
1716
1722
|
super().setUp()
|
|
1717
1723
|
|
|
1718
|
-
self.image_client.find_image =
|
|
1724
|
+
self.image_client.find_image.return_value = self._data
|
|
1719
1725
|
|
|
1720
1726
|
# Get the command object to test
|
|
1721
1727
|
self.cmd = _image.ShowImage(self.app, None)
|
|
@@ -2092,6 +2098,38 @@ class TestImageImport(TestImage):
|
|
|
2092
2098
|
all_stores_must_succeed=False,
|
|
2093
2099
|
)
|
|
2094
2100
|
|
|
2101
|
+
def test_import_image__copy_image_disallow_failure(self):
|
|
2102
|
+
self.image.status = 'active'
|
|
2103
|
+
arglist = [
|
|
2104
|
+
self.image.name,
|
|
2105
|
+
'--method',
|
|
2106
|
+
'copy-image',
|
|
2107
|
+
'--store',
|
|
2108
|
+
'fast',
|
|
2109
|
+
'--disallow-failure',
|
|
2110
|
+
]
|
|
2111
|
+
verifylist = [
|
|
2112
|
+
('image', self.image.name),
|
|
2113
|
+
('import_method', 'copy-image'),
|
|
2114
|
+
('stores', ['fast']),
|
|
2115
|
+
('allow_failure', False),
|
|
2116
|
+
]
|
|
2117
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
2118
|
+
|
|
2119
|
+
self.cmd.take_action(parsed_args)
|
|
2120
|
+
|
|
2121
|
+
self.image_client.import_image.assert_called_once_with(
|
|
2122
|
+
self.image,
|
|
2123
|
+
method='copy-image',
|
|
2124
|
+
uri=None,
|
|
2125
|
+
remote_region=None,
|
|
2126
|
+
remote_image_id=None,
|
|
2127
|
+
remote_service_interface=None,
|
|
2128
|
+
stores=['fast'],
|
|
2129
|
+
all_stores=None,
|
|
2130
|
+
all_stores_must_succeed=True,
|
|
2131
|
+
)
|
|
2132
|
+
|
|
2095
2133
|
def test_import_image__glance_download(self):
|
|
2096
2134
|
arglist = [
|
|
2097
2135
|
self.image.name,
|
|
@@ -361,8 +361,7 @@ class TestIntegShellCliPrecedence(test_base.TestInteg):
|
|
|
361
361
|
|
|
362
362
|
_shell = shell.OpenStackShell()
|
|
363
363
|
_shell.run(
|
|
364
|
-
"--os-username zarquon --os-password qaz "
|
|
365
|
-
"extension list".split(),
|
|
364
|
+
"--os-username zarquon --os-password qaz extension list".split(),
|
|
366
365
|
)
|
|
367
366
|
|
|
368
367
|
# Check general calls
|
|
@@ -132,8 +132,8 @@ class TestNetworkAndCompute(utils.TestCommand):
|
|
|
132
132
|
return_value='take_action_network'
|
|
133
133
|
)
|
|
134
134
|
|
|
135
|
-
self.app.client_manager.
|
|
136
|
-
self.compute_client = self.app.client_manager.
|
|
135
|
+
self.app.client_manager.compute = mock.Mock()
|
|
136
|
+
self.compute_client = self.app.client_manager.compute
|
|
137
137
|
self.compute_client.compute_action = mock.Mock(
|
|
138
138
|
return_value='take_action_compute'
|
|
139
139
|
)
|