python-openstackclient 8.1.0__py3-none-any.whl → 8.3.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/api/compute_v2.py +2 -2
- openstackclient/api/object_store_v1.py +4 -1
- openstackclient/api/volume_v2.py +60 -0
- openstackclient/api/volume_v3.py +60 -0
- openstackclient/command.py +27 -0
- openstackclient/common/availability_zone.py +1 -1
- openstackclient/common/clientmanager.py +59 -21
- openstackclient/common/configuration.py +1 -1
- openstackclient/common/extension.py +1 -1
- openstackclient/common/limits.py +1 -1
- openstackclient/common/module.py +4 -2
- openstackclient/common/project_cleanup.py +10 -8
- openstackclient/common/quota.py +23 -6
- openstackclient/common/versions.py +1 -2
- openstackclient/compute/v2/agent.py +1 -1
- openstackclient/compute/v2/aggregate.py +6 -5
- openstackclient/compute/v2/console.py +5 -3
- openstackclient/compute/v2/console_connection.py +1 -1
- openstackclient/compute/v2/flavor.py +15 -2
- openstackclient/compute/v2/host.py +1 -1
- openstackclient/compute/v2/hypervisor.py +1 -1
- openstackclient/compute/v2/hypervisor_stats.py +1 -1
- openstackclient/compute/v2/keypair.py +1 -1
- openstackclient/compute/v2/server.py +77 -30
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_event.py +1 -1
- openstackclient/compute/v2/server_group.py +4 -2
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +1 -1
- openstackclient/compute/v2/server_volume.py +1 -1
- openstackclient/compute/v2/service.py +1 -1
- openstackclient/compute/v2/usage.py +6 -4
- openstackclient/identity/common.py +10 -14
- openstackclient/identity/v2_0/catalog.py +3 -2
- openstackclient/identity/v2_0/ec2creds.py +1 -1
- openstackclient/identity/v2_0/endpoint.py +1 -1
- openstackclient/identity/v2_0/project.py +17 -7
- openstackclient/identity/v2_0/role.py +1 -1
- openstackclient/identity/v2_0/role_assignment.py +3 -3
- openstackclient/identity/v2_0/service.py +1 -1
- openstackclient/identity/v2_0/token.py +1 -1
- openstackclient/identity/v2_0/user.py +2 -2
- openstackclient/identity/v3/access_rule.py +16 -4
- openstackclient/identity/v3/application_credential.py +116 -95
- openstackclient/identity/v3/catalog.py +3 -3
- openstackclient/identity/v3/consumer.py +1 -1
- openstackclient/identity/v3/credential.py +1 -1
- openstackclient/identity/v3/domain.py +15 -10
- openstackclient/identity/v3/ec2creds.py +1 -1
- openstackclient/identity/v3/endpoint.py +33 -12
- openstackclient/identity/v3/endpoint_group.py +1 -1
- openstackclient/identity/v3/federation_protocol.py +1 -1
- openstackclient/identity/v3/group.py +11 -5
- openstackclient/identity/v3/identity_provider.py +12 -10
- openstackclient/identity/v3/implied_role.py +1 -1
- openstackclient/identity/v3/limit.py +1 -1
- openstackclient/identity/v3/mapping.py +1 -1
- openstackclient/identity/v3/policy.py +1 -1
- openstackclient/identity/v3/project.py +34 -22
- openstackclient/identity/v3/region.py +1 -1
- openstackclient/identity/v3/registered_limit.py +16 -11
- openstackclient/identity/v3/role.py +27 -41
- openstackclient/identity/v3/role_assignment.py +12 -23
- openstackclient/identity/v3/service.py +1 -1
- openstackclient/identity/v3/service_provider.py +1 -1
- openstackclient/identity/v3/tag.py +3 -2
- openstackclient/identity/v3/token.py +3 -2
- openstackclient/identity/v3/trust.py +4 -2
- openstackclient/identity/v3/unscoped_saml.py +1 -1
- openstackclient/identity/v3/user.py +22 -13
- openstackclient/image/v1/image.py +35 -17
- openstackclient/image/v2/cache.py +11 -7
- openstackclient/image/v2/image.py +62 -12
- openstackclient/image/v2/info.py +1 -1
- openstackclient/image/v2/metadef_namespaces.py +1 -1
- openstackclient/image/v2/metadef_objects.py +9 -3
- openstackclient/image/v2/metadef_properties.py +11 -3
- openstackclient/image/v2/metadef_resource_type_association.py +1 -1
- openstackclient/image/v2/metadef_resource_types.py +1 -1
- openstackclient/image/v2/task.py +1 -1
- openstackclient/network/common.py +10 -9
- openstackclient/network/v2/address_group.py +4 -3
- openstackclient/network/v2/address_scope.py +8 -6
- openstackclient/network/v2/default_security_group_rule.py +9 -8
- openstackclient/network/v2/floating_ip.py +16 -9
- openstackclient/network/v2/floating_ip_port_forwarding.py +9 -6
- openstackclient/network/v2/ip_availability.py +7 -4
- openstackclient/network/v2/l3_conntrack_helper.py +11 -4
- openstackclient/network/v2/local_ip.py +13 -7
- openstackclient/network/v2/local_ip_association.py +7 -4
- openstackclient/network/v2/ndp_proxy.py +13 -6
- openstackclient/network/v2/network.py +33 -16
- openstackclient/network/v2/network_agent.py +5 -5
- openstackclient/network/v2/network_auto_allocated_topology.py +1 -1
- openstackclient/network/v2/network_flavor.py +1 -1
- openstackclient/network/v2/network_flavor_profile.py +1 -1
- openstackclient/network/v2/network_meter.py +1 -1
- openstackclient/network/v2/network_meter_rule.py +1 -1
- openstackclient/network/v2/network_qos_policy.py +7 -5
- openstackclient/network/v2/network_qos_rule.py +1 -1
- openstackclient/network/v2/network_qos_rule_type.py +1 -1
- openstackclient/network/v2/network_rbac.py +8 -5
- openstackclient/network/v2/network_segment.py +2 -2
- openstackclient/network/v2/network_segment_range.py +13 -6
- openstackclient/network/v2/network_service_provider.py +1 -1
- openstackclient/network/v2/network_trunk.py +65 -42
- openstackclient/network/v2/port.py +38 -20
- openstackclient/network/v2/router.py +19 -8
- openstackclient/network/v2/security_group.py +52 -7
- openstackclient/network/v2/security_group_rule.py +27 -4
- openstackclient/network/v2/subnet.py +17 -18
- openstackclient/network/v2/subnet_pool.py +11 -9
- openstackclient/network/v2/taas/__init__.py +0 -0
- openstackclient/network/v2/taas/tap_flow.py +245 -0
- openstackclient/network/v2/taas/tap_mirror.py +237 -0
- openstackclient/network/v2/taas/tap_service.py +211 -0
- openstackclient/object/v1/account.py +1 -1
- openstackclient/object/v1/container.py +1 -1
- openstackclient/object/v1/object.py +1 -1
- openstackclient/shell.py +18 -8
- openstackclient/tests/functional/identity/v3/test_access_rule.py +1 -1
- openstackclient/tests/functional/identity/v3/test_application_credential.py +7 -7
- openstackclient/tests/functional/identity/v3/test_catalog.py +42 -23
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +174 -0
- openstackclient/tests/functional/image/v2/test_cache.py +54 -0
- openstackclient/tests/functional/image/v2/test_image.py +36 -14
- openstackclient/tests/functional/image/v2/test_metadef_resource_type.py +55 -0
- openstackclient/tests/functional/volume/v2/test_volume.py +1 -1
- openstackclient/tests/functional/volume/v3/test_volume.py +2 -2
- openstackclient/tests/unit/api/test_volume_v2.py +124 -0
- openstackclient/tests/unit/api/test_volume_v3.py +124 -0
- openstackclient/tests/unit/common/test_command.py +1 -1
- openstackclient/tests/unit/common/test_extension.py +2 -3
- openstackclient/tests/unit/common/test_module.py +14 -7
- openstackclient/tests/unit/common/test_quota.py +20 -0
- openstackclient/tests/unit/compute/v2/test_aggregate.py +5 -3
- openstackclient/tests/unit/compute/v2/test_console.py +1 -4
- openstackclient/tests/unit/compute/v2/test_flavor.py +160 -177
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +1 -9
- openstackclient/tests/unit/compute/v2/test_server.py +406 -81
- openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -3
- openstackclient/tests/unit/compute/v2/test_service.py +1 -3
- openstackclient/tests/unit/fakes.py +35 -134
- openstackclient/tests/unit/identity/test_common.py +100 -0
- openstackclient/tests/unit/identity/v2_0/test_project.py +4 -4
- openstackclient/tests/unit/identity/v3/fakes.py +10 -2
- openstackclient/tests/unit/identity/v3/test_application_credential.py +50 -44
- openstackclient/tests/unit/identity/v3/test_domain.py +3 -3
- openstackclient/tests/unit/identity/v3/test_endpoint.py +1 -1
- openstackclient/tests/unit/identity/v3/test_group.py +4 -2
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +10 -10
- openstackclient/tests/unit/identity/v3/test_oauth.py +1 -1
- openstackclient/tests/unit/identity/v3/test_project.py +31 -54
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +2 -2
- openstackclient/tests/unit/identity/v3/test_role.py +3 -90
- openstackclient/tests/unit/identity/v3/test_user.py +7 -51
- openstackclient/tests/unit/image/v1/test_image.py +47 -0
- openstackclient/tests/unit/image/v2/test_image.py +190 -9
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +22 -0
- openstackclient/tests/unit/image/v2/test_metadef_properties.py +24 -10
- openstackclient/tests/unit/network/test_common.py +9 -13
- openstackclient/tests/unit/network/v2/fakes.py +1 -0
- openstackclient/tests/unit/network/v2/taas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/taas/test_osc_tap_flow.py +276 -0
- openstackclient/tests/unit/network/v2/taas/test_osc_tap_mirror.py +288 -0
- openstackclient/tests/unit/network/v2/taas/test_osc_tap_service.py +271 -0
- openstackclient/tests/unit/network/v2/test_address_group.py +19 -22
- openstackclient/tests/unit/network/v2/test_address_scope.py +10 -15
- openstackclient/tests/unit/network/v2/test_default_security_group_rule.py +38 -49
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +21 -27
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +21 -18
- openstackclient/tests/unit/network/v2/test_ip_availability.py +6 -8
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +6 -15
- openstackclient/tests/unit/network/v2/test_local_ip.py +12 -23
- openstackclient/tests/unit/network/v2/test_local_ip_association.py +13 -18
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +13 -23
- openstackclient/tests/unit/network/v2/test_network.py +41 -37
- openstackclient/tests/unit/network/v2/test_network_agent.py +13 -20
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +5 -8
- openstackclient/tests/unit/network/v2/test_network_flavor.py +14 -26
- openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +14 -17
- openstackclient/tests/unit/network/v2/test_network_meter.py +7 -17
- openstackclient/tests/unit/network/v2/test_network_meter_rule.py +10 -20
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +7 -13
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +44 -54
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +2 -7
- openstackclient/tests/unit/network/v2/test_network_rbac.py +21 -36
- openstackclient/tests/unit/network/v2/test_network_segment.py +13 -29
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +20 -19
- openstackclient/tests/unit/network/v2/test_network_service_provider.py +1 -4
- openstackclient/tests/unit/network/v2/test_network_trunk.py +52 -47
- openstackclient/tests/unit/network/v2/test_port.py +113 -84
- openstackclient/tests/unit/network/v2/test_router.py +104 -126
- openstackclient/tests/unit/network/v2/test_security_group_network.py +25 -26
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +66 -18
- openstackclient/tests/unit/network/v2/test_subnet.py +35 -46
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +21 -33
- openstackclient/tests/unit/volume/test_find_resource.py +4 -13
- openstackclient/tests/unit/volume/v2/test_volume.py +358 -305
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +3 -1
- openstackclient/tests/unit/volume/v3/test_volume.py +443 -415
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +9 -0
- openstackclient/volume/client.py +7 -17
- openstackclient/volume/v2/backup_record.py +1 -1
- openstackclient/volume/v2/consistency_group.py +1 -1
- openstackclient/volume/v2/consistency_group_snapshot.py +1 -1
- openstackclient/volume/v2/qos_specs.py +1 -1
- openstackclient/volume/v2/service.py +2 -2
- openstackclient/volume/v2/volume.py +80 -54
- openstackclient/volume/v2/volume_backend.py +1 -1
- openstackclient/volume/v2/volume_backup.py +5 -3
- openstackclient/volume/v2/volume_host.py +1 -2
- openstackclient/volume/v2/volume_snapshot.py +2 -2
- openstackclient/volume/v2/volume_transfer_request.py +1 -1
- openstackclient/volume/v2/volume_type.py +11 -6
- openstackclient/volume/v3/block_storage_cleanup.py +1 -1
- openstackclient/volume/v3/block_storage_cluster.py +1 -1
- openstackclient/volume/v3/block_storage_log_level.py +1 -1
- openstackclient/volume/v3/block_storage_manage.py +1 -1
- openstackclient/volume/v3/block_storage_resource_filter.py +1 -1
- openstackclient/volume/v3/service.py +2 -2
- openstackclient/volume/v3/volume.py +104 -77
- openstackclient/volume/v3/volume_attachment.py +6 -5
- openstackclient/volume/v3/volume_backup.py +18 -3
- openstackclient/volume/v3/volume_group.py +2 -2
- openstackclient/volume/v3/volume_group_snapshot.py +1 -1
- openstackclient/volume/v3/volume_group_type.py +1 -1
- openstackclient/volume/v3/volume_message.py +1 -1
- openstackclient/volume/v3/volume_snapshot.py +2 -2
- openstackclient/volume/v3/volume_transfer_request.py +1 -1
- openstackclient/volume/v3/volume_type.py +15 -9
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/METADATA +19 -17
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/RECORD +239 -224
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/entry_points.txt +15 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info/licenses}/AUTHORS +15 -0
- python_openstackclient-8.3.0.dist-info/pbr.json +1 -0
- openstackclient/tests/unit/common/test_logs.py +0 -221
- python_openstackclient-8.1.0.dist-info/pbr.json +0 -1
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info/licenses}/LICENSE +0 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/top_level.txt +0 -0
|
@@ -94,7 +94,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
94
94
|
kwargs = {
|
|
95
95
|
'name': self.user.name,
|
|
96
96
|
'is_enabled': True,
|
|
97
|
-
'password': None,
|
|
98
97
|
}
|
|
99
98
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
100
99
|
|
|
@@ -138,7 +137,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
138
137
|
self.user.name,
|
|
139
138
|
]
|
|
140
139
|
verifylist = [
|
|
141
|
-
('password', None),
|
|
142
140
|
('password_prompt', True),
|
|
143
141
|
('enable', False),
|
|
144
142
|
('disable', False),
|
|
@@ -171,7 +169,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
171
169
|
self.user.name,
|
|
172
170
|
]
|
|
173
171
|
verifylist = [
|
|
174
|
-
('password', None),
|
|
175
172
|
('password_prompt', True),
|
|
176
173
|
('enable', False),
|
|
177
174
|
('disable', False),
|
|
@@ -236,7 +233,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
236
233
|
'name': self.user.name,
|
|
237
234
|
'email': 'barney@example.com',
|
|
238
235
|
'is_enabled': True,
|
|
239
|
-
'password': None,
|
|
240
236
|
}
|
|
241
237
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
242
238
|
|
|
@@ -267,7 +263,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
267
263
|
'name': self.user.name,
|
|
268
264
|
'default_project_id': self.project.id,
|
|
269
265
|
'is_enabled': True,
|
|
270
|
-
'password': None,
|
|
271
266
|
}
|
|
272
267
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
273
268
|
|
|
@@ -312,7 +307,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
312
307
|
'name': self.user.name,
|
|
313
308
|
'default_project_id': self.project.id,
|
|
314
309
|
'is_enabled': True,
|
|
315
|
-
'password': None,
|
|
316
310
|
}
|
|
317
311
|
self.identity_sdk_client.create_user.assert_called_once_with(**kwargs)
|
|
318
312
|
self.identity_sdk_client.find_domain.assert_called_once_with(
|
|
@@ -357,7 +351,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
357
351
|
'name': self.user.name,
|
|
358
352
|
'domain_id': self.domain.id,
|
|
359
353
|
'is_enabled': True,
|
|
360
|
-
'password': None,
|
|
361
354
|
}
|
|
362
355
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
363
356
|
|
|
@@ -385,7 +378,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
385
378
|
kwargs = {
|
|
386
379
|
'name': self.user.name,
|
|
387
380
|
'is_enabled': True,
|
|
388
|
-
'password': None,
|
|
389
381
|
}
|
|
390
382
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
391
383
|
|
|
@@ -413,7 +405,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
413
405
|
kwargs = {
|
|
414
406
|
'name': self.user.name,
|
|
415
407
|
'is_enabled': False,
|
|
416
|
-
'password': None,
|
|
417
408
|
}
|
|
418
409
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
419
410
|
|
|
@@ -443,7 +434,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
443
434
|
'name': self.user.name,
|
|
444
435
|
'is_enabled': True,
|
|
445
436
|
'options': {'ignore_lockout_failure_attempts': True},
|
|
446
|
-
'password': None,
|
|
447
437
|
}
|
|
448
438
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
449
439
|
|
|
@@ -473,7 +463,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
473
463
|
'name': self.user.name,
|
|
474
464
|
'is_enabled': True,
|
|
475
465
|
'options': {'ignore_lockout_failure_attempts': False},
|
|
476
|
-
'password': None,
|
|
477
466
|
}
|
|
478
467
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
479
468
|
|
|
@@ -503,7 +492,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
503
492
|
'name': self.user.name,
|
|
504
493
|
'is_enabled': True,
|
|
505
494
|
'options': {'ignore_password_expiry': True},
|
|
506
|
-
'password': None,
|
|
507
495
|
}
|
|
508
496
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
509
497
|
|
|
@@ -533,7 +521,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
533
521
|
'name': self.user.name,
|
|
534
522
|
'is_enabled': True,
|
|
535
523
|
'options': {'ignore_password_expiry': False},
|
|
536
|
-
'password': None,
|
|
537
524
|
}
|
|
538
525
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
539
526
|
|
|
@@ -563,7 +550,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
563
550
|
'name': self.user.name,
|
|
564
551
|
'is_enabled': True,
|
|
565
552
|
'options': {'ignore_change_password_upon_first_use': True},
|
|
566
|
-
'password': None,
|
|
567
553
|
}
|
|
568
554
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
569
555
|
|
|
@@ -593,7 +579,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
593
579
|
'name': self.user.name,
|
|
594
580
|
'is_enabled': True,
|
|
595
581
|
'options': {'ignore_change_password_upon_first_use': False},
|
|
596
|
-
'password': None,
|
|
597
582
|
}
|
|
598
583
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
599
584
|
|
|
@@ -623,7 +608,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
623
608
|
'name': self.user.name,
|
|
624
609
|
'is_enabled': True,
|
|
625
610
|
'options': {'lock_password': True},
|
|
626
|
-
'password': None,
|
|
627
611
|
}
|
|
628
612
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
629
613
|
|
|
@@ -653,7 +637,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
653
637
|
'name': self.user.name,
|
|
654
638
|
'is_enabled': True,
|
|
655
639
|
'options': {'lock_password': False},
|
|
656
|
-
'password': None,
|
|
657
640
|
}
|
|
658
641
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
659
642
|
|
|
@@ -683,7 +666,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
683
666
|
'name': self.user.name,
|
|
684
667
|
'is_enabled': True,
|
|
685
668
|
'options': {'multi_factor_auth_enabled': True},
|
|
686
|
-
'password': None,
|
|
687
669
|
}
|
|
688
670
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
689
671
|
|
|
@@ -713,7 +695,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
713
695
|
'name': self.user.name,
|
|
714
696
|
'is_enabled': True,
|
|
715
697
|
'options': {'multi_factor_auth_enabled': False},
|
|
716
|
-
'password': None,
|
|
717
698
|
}
|
|
718
699
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
719
700
|
|
|
@@ -730,7 +711,7 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
730
711
|
]
|
|
731
712
|
verifylist = [
|
|
732
713
|
(
|
|
733
|
-
'
|
|
714
|
+
'multi_factor_auth_rules',
|
|
734
715
|
[identity_fakes.mfa_opt1, identity_fakes.mfa_opt2],
|
|
735
716
|
),
|
|
736
717
|
('enable', False),
|
|
@@ -751,7 +732,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
751
732
|
'options': {
|
|
752
733
|
'multi_factor_auth_rules': [["password", "totp"], ["password"]]
|
|
753
734
|
},
|
|
754
|
-
'password': None,
|
|
755
735
|
}
|
|
756
736
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
757
737
|
|
|
@@ -769,7 +749,7 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
769
749
|
verifylist = [
|
|
770
750
|
('ignore_password_expiry', True),
|
|
771
751
|
('disable_multi_factor_auth', True),
|
|
772
|
-
('
|
|
752
|
+
('multi_factor_auth_rules', [identity_fakes.mfa_opt1]),
|
|
773
753
|
('enable', False),
|
|
774
754
|
('disable', False),
|
|
775
755
|
('name', self.user.name),
|
|
@@ -790,7 +770,6 @@ class TestUserCreate(identity_fakes.TestIdentityv3):
|
|
|
790
770
|
'multi_factor_auth_enabled': False,
|
|
791
771
|
'multi_factor_auth_rules': [["password", "totp"]],
|
|
792
772
|
},
|
|
793
|
-
'password': None,
|
|
794
773
|
}
|
|
795
774
|
self.identity_sdk_client.create_user.assert_called_with(**kwargs)
|
|
796
775
|
|
|
@@ -891,7 +870,7 @@ class TestUserList(identity_fakes.TestIdentityv3):
|
|
|
891
870
|
self.identity_sdk_client.find_domain.return_value = self.domain
|
|
892
871
|
self.identity_sdk_client.find_group.return_value = self.group
|
|
893
872
|
self.identity_sdk_client.find_project.return_value = self.project
|
|
894
|
-
self.identity_sdk_client.
|
|
873
|
+
self.identity_sdk_client.role_assignments.return_value = [
|
|
895
874
|
self.role_assignment
|
|
896
875
|
]
|
|
897
876
|
|
|
@@ -1029,12 +1008,10 @@ class TestUserList(identity_fakes.TestIdentityv3):
|
|
|
1029
1008
|
columns, data = self.cmd.take_action(parsed_args)
|
|
1030
1009
|
|
|
1031
1010
|
kwargs = {
|
|
1032
|
-
'
|
|
1011
|
+
'scope_project_id': self.project.id,
|
|
1033
1012
|
}
|
|
1034
1013
|
|
|
1035
|
-
self.identity_sdk_client.
|
|
1036
|
-
**kwargs
|
|
1037
|
-
)
|
|
1014
|
+
self.identity_sdk_client.role_assignments.assert_called_with(**kwargs)
|
|
1038
1015
|
|
|
1039
1016
|
self.assertEqual(self.columns, columns)
|
|
1040
1017
|
self.assertEqual(self.datalist, tuple(data))
|
|
@@ -1086,7 +1063,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1086
1063
|
]
|
|
1087
1064
|
verifylist = [
|
|
1088
1065
|
('name', None),
|
|
1089
|
-
('password', None),
|
|
1090
1066
|
('email', None),
|
|
1091
1067
|
('project', None),
|
|
1092
1068
|
('enable', False),
|
|
@@ -1107,7 +1083,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1107
1083
|
]
|
|
1108
1084
|
verifylist = [
|
|
1109
1085
|
('name', 'qwerty'),
|
|
1110
|
-
('password', None),
|
|
1111
1086
|
('email', None),
|
|
1112
1087
|
('project', None),
|
|
1113
1088
|
('enable', False),
|
|
@@ -1138,7 +1113,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1138
1113
|
]
|
|
1139
1114
|
verifylist = [
|
|
1140
1115
|
('name', 'qwerty'),
|
|
1141
|
-
('password', None),
|
|
1142
1116
|
('domain', self.domain.id),
|
|
1143
1117
|
('email', None),
|
|
1144
1118
|
('project', None),
|
|
@@ -1194,7 +1168,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1194
1168
|
]
|
|
1195
1169
|
verifylist = [
|
|
1196
1170
|
('name', None),
|
|
1197
|
-
('password', None),
|
|
1198
1171
|
('password_prompt', True),
|
|
1199
1172
|
('email', None),
|
|
1200
1173
|
('project', None),
|
|
@@ -1227,7 +1200,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1227
1200
|
]
|
|
1228
1201
|
verifylist = [
|
|
1229
1202
|
('name', None),
|
|
1230
|
-
('password', None),
|
|
1231
1203
|
('email', 'barney@example.com'),
|
|
1232
1204
|
('project', None),
|
|
1233
1205
|
('enable', False),
|
|
@@ -1256,7 +1228,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1256
1228
|
]
|
|
1257
1229
|
verifylist = [
|
|
1258
1230
|
('name', None),
|
|
1259
|
-
('password', None),
|
|
1260
1231
|
('email', None),
|
|
1261
1232
|
('project', self.project.id),
|
|
1262
1233
|
('enable', False),
|
|
@@ -1298,7 +1269,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1298
1269
|
]
|
|
1299
1270
|
verifylist = [
|
|
1300
1271
|
('name', None),
|
|
1301
|
-
('password', None),
|
|
1302
1272
|
('email', None),
|
|
1303
1273
|
('project', self.project.id),
|
|
1304
1274
|
('project_domain', self.project.domain_id),
|
|
@@ -1332,7 +1302,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1332
1302
|
]
|
|
1333
1303
|
verifylist = [
|
|
1334
1304
|
('name', None),
|
|
1335
|
-
('password', None),
|
|
1336
1305
|
('email', None),
|
|
1337
1306
|
('project', None),
|
|
1338
1307
|
('enable', True),
|
|
@@ -1359,7 +1328,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1359
1328
|
]
|
|
1360
1329
|
verifylist = [
|
|
1361
1330
|
('name', None),
|
|
1362
|
-
('password', None),
|
|
1363
1331
|
('email', None),
|
|
1364
1332
|
('project', None),
|
|
1365
1333
|
('enable', False),
|
|
@@ -1386,7 +1354,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1386
1354
|
]
|
|
1387
1355
|
verifylist = [
|
|
1388
1356
|
('name', None),
|
|
1389
|
-
('password', None),
|
|
1390
1357
|
('email', None),
|
|
1391
1358
|
('ignore_lockout_failure_attempts', True),
|
|
1392
1359
|
('project', None),
|
|
@@ -1414,7 +1381,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1414
1381
|
]
|
|
1415
1382
|
verifylist = [
|
|
1416
1383
|
('name', None),
|
|
1417
|
-
('password', None),
|
|
1418
1384
|
('email', None),
|
|
1419
1385
|
('no_ignore_lockout_failure_attempts', True),
|
|
1420
1386
|
('project', None),
|
|
@@ -1442,7 +1408,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1442
1408
|
]
|
|
1443
1409
|
verifylist = [
|
|
1444
1410
|
('name', None),
|
|
1445
|
-
('password', None),
|
|
1446
1411
|
('email', None),
|
|
1447
1412
|
('ignore_password_expiry', True),
|
|
1448
1413
|
('project', None),
|
|
@@ -1470,7 +1435,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1470
1435
|
]
|
|
1471
1436
|
verifylist = [
|
|
1472
1437
|
('name', None),
|
|
1473
|
-
('password', None),
|
|
1474
1438
|
('email', None),
|
|
1475
1439
|
('no_ignore_password_expiry', True),
|
|
1476
1440
|
('project', None),
|
|
@@ -1498,7 +1462,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1498
1462
|
]
|
|
1499
1463
|
verifylist = [
|
|
1500
1464
|
('name', None),
|
|
1501
|
-
('password', None),
|
|
1502
1465
|
('email', None),
|
|
1503
1466
|
('ignore_change_password_upon_first_use', True),
|
|
1504
1467
|
('project', None),
|
|
@@ -1526,7 +1489,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1526
1489
|
]
|
|
1527
1490
|
verifylist = [
|
|
1528
1491
|
('name', None),
|
|
1529
|
-
('password', None),
|
|
1530
1492
|
('email', None),
|
|
1531
1493
|
('no_ignore_change_password_upon_first_use', True),
|
|
1532
1494
|
('project', None),
|
|
@@ -1554,7 +1516,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1554
1516
|
]
|
|
1555
1517
|
verifylist = [
|
|
1556
1518
|
('name', None),
|
|
1557
|
-
('password', None),
|
|
1558
1519
|
('email', None),
|
|
1559
1520
|
('enable_lock_password', True),
|
|
1560
1521
|
('project', None),
|
|
@@ -1582,7 +1543,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1582
1543
|
]
|
|
1583
1544
|
verifylist = [
|
|
1584
1545
|
('name', None),
|
|
1585
|
-
('password', None),
|
|
1586
1546
|
('email', None),
|
|
1587
1547
|
('disable_lock_password', True),
|
|
1588
1548
|
('project', None),
|
|
@@ -1610,7 +1570,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1610
1570
|
]
|
|
1611
1571
|
verifylist = [
|
|
1612
1572
|
('name', None),
|
|
1613
|
-
('password', None),
|
|
1614
1573
|
('email', None),
|
|
1615
1574
|
('enable_multi_factor_auth', True),
|
|
1616
1575
|
('project', None),
|
|
@@ -1638,7 +1597,6 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1638
1597
|
]
|
|
1639
1598
|
verifylist = [
|
|
1640
1599
|
('name', None),
|
|
1641
|
-
('password', None),
|
|
1642
1600
|
('email', None),
|
|
1643
1601
|
('disable_multi_factor_auth', True),
|
|
1644
1602
|
('project', None),
|
|
@@ -1667,9 +1625,8 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1667
1625
|
]
|
|
1668
1626
|
verifylist = [
|
|
1669
1627
|
('name', None),
|
|
1670
|
-
('password', None),
|
|
1671
1628
|
('email', None),
|
|
1672
|
-
('
|
|
1629
|
+
('multi_factor_auth_rules', [identity_fakes.mfa_opt1]),
|
|
1673
1630
|
('project', None),
|
|
1674
1631
|
('enable', False),
|
|
1675
1632
|
('disable', False),
|
|
@@ -1699,11 +1656,10 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1699
1656
|
]
|
|
1700
1657
|
verifylist = [
|
|
1701
1658
|
('name', None),
|
|
1702
|
-
('password', None),
|
|
1703
1659
|
('email', None),
|
|
1704
1660
|
('ignore_password_expiry', True),
|
|
1705
1661
|
('enable_multi_factor_auth', True),
|
|
1706
|
-
('
|
|
1662
|
+
('multi_factor_auth_rules', [identity_fakes.mfa_opt1]),
|
|
1707
1663
|
('project', None),
|
|
1708
1664
|
('enable', False),
|
|
1709
1665
|
('disable', False),
|
|
@@ -757,3 +757,50 @@ class TestImageShow(image_fakes.TestImagev1):
|
|
|
757
757
|
|
|
758
758
|
size_index = columns.index('size')
|
|
759
759
|
self.assertEqual(data[size_index].human_readable(), '2K')
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
class TestImageSave(image_fakes.TestImagev1):
|
|
763
|
+
image = image_fakes.create_one_image({})
|
|
764
|
+
|
|
765
|
+
def setUp(self):
|
|
766
|
+
super().setUp()
|
|
767
|
+
|
|
768
|
+
self.image_client.find_image.return_value = self.image
|
|
769
|
+
self.image_client.download_image.return_value = self.image
|
|
770
|
+
|
|
771
|
+
# Get the command object to test
|
|
772
|
+
self.cmd = image.SaveImage(self.app, None)
|
|
773
|
+
|
|
774
|
+
def test_save_data(self):
|
|
775
|
+
arglist = ['--file', '/path/to/file', self.image.id]
|
|
776
|
+
|
|
777
|
+
verifylist = [('file', '/path/to/file'), ('image', self.image.id)]
|
|
778
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
779
|
+
|
|
780
|
+
self.cmd.take_action(parsed_args)
|
|
781
|
+
|
|
782
|
+
self.image_client.download_image.assert_called_once_with(
|
|
783
|
+
self.image.id, output='/path/to/file', stream=True, chunk_size=1024
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
def test_save_data_with_chunk_size(self):
|
|
787
|
+
arglist = [
|
|
788
|
+
'--file',
|
|
789
|
+
'/path/to/file',
|
|
790
|
+
'--chunk-size',
|
|
791
|
+
'2048',
|
|
792
|
+
self.image.id,
|
|
793
|
+
]
|
|
794
|
+
|
|
795
|
+
verifylist = [
|
|
796
|
+
('file', '/path/to/file'),
|
|
797
|
+
('chunk_size', 2048),
|
|
798
|
+
('image', self.image.id),
|
|
799
|
+
]
|
|
800
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
801
|
+
|
|
802
|
+
self.cmd.take_action(parsed_args)
|
|
803
|
+
|
|
804
|
+
self.image_client.download_image.assert_called_once_with(
|
|
805
|
+
self.image.id, output='/path/to/file', stream=True, chunk_size=2048
|
|
806
|
+
)
|