python-openstackclient 9.0.0__py3-none-any.whl → 10.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/__init__.py +2 -6
- openstackclient/api/api.py +41 -23
- openstackclient/api/compute_v2.py +44 -25
- openstackclient/api/object_store_v1.py +75 -97
- openstackclient/api/volume_v2.py +2 -1
- openstackclient/api/volume_v3.py +2 -1
- openstackclient/common/availability_zone.py +58 -42
- openstackclient/common/clientmanager.py +56 -29
- openstackclient/common/configuration.py +10 -3
- openstackclient/common/envvars.py +2 -2
- openstackclient/common/extension.py +14 -5
- openstackclient/common/limits.py +10 -5
- openstackclient/common/module.py +14 -6
- openstackclient/common/pagination.py +8 -2
- openstackclient/common/progressbar.py +7 -6
- openstackclient/common/project_cleanup.py +13 -7
- openstackclient/common/quota.py +97 -99
- openstackclient/common/versions.py +8 -2
- openstackclient/compute/client.py +7 -3
- openstackclient/compute/v2/agent.py +17 -10
- openstackclient/compute/v2/aggregate.py +36 -22
- openstackclient/compute/v2/console.py +14 -8
- openstackclient/compute/v2/console_connection.py +11 -3
- openstackclient/compute/v2/flavor.py +39 -21
- openstackclient/compute/v2/host.py +14 -6
- openstackclient/compute/v2/hypervisor.py +14 -5
- openstackclient/compute/v2/hypervisor_stats.py +10 -2
- openstackclient/compute/v2/keypair.py +29 -14
- openstackclient/compute/v2/server.py +249 -169
- openstackclient/compute/v2/server_backup.py +10 -4
- openstackclient/compute/v2/server_event.py +21 -12
- openstackclient/compute/v2/server_group.py +21 -11
- openstackclient/compute/v2/server_image.py +19 -10
- openstackclient/compute/v2/server_migration.py +24 -10
- openstackclient/compute/v2/server_share.py +274 -0
- openstackclient/compute/v2/server_volume.py +10 -4
- openstackclient/compute/v2/service.py +14 -7
- openstackclient/compute/v2/usage.py +26 -21
- openstackclient/identity/client.py +8 -3
- openstackclient/identity/common.py +78 -47
- openstackclient/identity/v2_0/catalog.py +14 -7
- openstackclient/identity/v2_0/ec2creds.py +21 -10
- openstackclient/identity/v2_0/endpoint.py +23 -11
- openstackclient/identity/v2_0/project.py +25 -14
- openstackclient/identity/v2_0/role.py +28 -14
- openstackclient/identity/v2_0/role_assignment.py +9 -3
- openstackclient/identity/v2_0/service.py +23 -11
- openstackclient/identity/v2_0/token.py +12 -5
- openstackclient/identity/v2_0/user.py +26 -15
- openstackclient/identity/v3/access_rule.py +26 -12
- openstackclient/identity/v3/application_credential.py +59 -24
- openstackclient/identity/v3/catalog.py +14 -7
- openstackclient/identity/v3/consumer.py +22 -11
- openstackclient/identity/v3/credential.py +36 -16
- openstackclient/identity/v3/domain.py +37 -18
- openstackclient/identity/v3/ec2creds.py +25 -12
- openstackclient/identity/v3/endpoint.py +42 -20
- openstackclient/identity/v3/endpoint_group.py +28 -17
- openstackclient/identity/v3/federation_protocol.py +38 -16
- openstackclient/identity/v3/group.py +55 -32
- openstackclient/identity/v3/identity_provider.py +92 -57
- openstackclient/identity/v3/implied_role.py +21 -9
- openstackclient/identity/v3/limit.py +38 -16
- openstackclient/identity/v3/mapping.py +26 -13
- openstackclient/identity/v3/policy.py +23 -12
- openstackclient/identity/v3/project.py +43 -23
- openstackclient/identity/v3/region.py +36 -16
- openstackclient/identity/v3/registered_limit.py +40 -16
- openstackclient/identity/v3/role.py +61 -31
- openstackclient/identity/v3/role_assignment.py +23 -6
- openstackclient/identity/v3/service.py +36 -16
- openstackclient/identity/v3/service_provider.py +37 -15
- openstackclient/identity/v3/tag.py +23 -6
- openstackclient/identity/v3/token.py +30 -14
- openstackclient/identity/v3/trust.py +32 -14
- openstackclient/identity/v3/unscoped_saml.py +10 -2
- openstackclient/identity/v3/user.py +49 -26
- openstackclient/image/client.py +7 -3
- openstackclient/image/v1/image.py +33 -26
- openstackclient/image/v2/cache.py +14 -9
- openstackclient/image/v2/image.py +74 -48
- openstackclient/image/v2/info.py +7 -1
- openstackclient/image/v2/metadef_namespaces.py +109 -13
- openstackclient/image/v2/metadef_objects.py +28 -15
- openstackclient/image/v2/metadef_properties.py +24 -13
- openstackclient/image/v2/metadef_resource_type_association.py +14 -7
- openstackclient/image/v2/metadef_resource_types.py +7 -1
- openstackclient/image/v2/task.py +15 -6
- openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +7 -192
- openstackclient/network/client.py +7 -2
- openstackclient/network/common.py +16 -241
- openstackclient/network/utils.py +36 -22
- openstackclient/network/v2/address_group.py +27 -16
- openstackclient/network/v2/address_scope.py +24 -13
- openstackclient/network/v2/bgpvpn/bgpvpn.py +463 -0
- openstackclient/network/v2/bgpvpn/constants.py +30 -0
- openstackclient/network/v2/bgpvpn/network_association.py +214 -0
- openstackclient/network/v2/bgpvpn/port_association.py +490 -0
- openstackclient/network/v2/bgpvpn/router_association.py +288 -0
- openstackclient/network/v2/default_security_group_rule.py +19 -10
- openstackclient/network/v2/floating_ip.py +110 -159
- openstackclient/network/v2/floating_ip_port_forwarding.py +30 -18
- openstackclient/network/v2/fwaas/__init__.py +0 -0
- openstackclient/network/v2/fwaas/group.py +466 -0
- openstackclient/network/v2/fwaas/policy.py +518 -0
- openstackclient/network/v2/fwaas/rule.py +574 -0
- openstackclient/network/v2/ip_availability.py +13 -5
- openstackclient/network/v2/l3_conntrack_helper.py +22 -13
- openstackclient/network/v2/local_ip.py +24 -13
- openstackclient/network/v2/local_ip_association.py +14 -7
- openstackclient/network/v2/ndp_proxy.py +20 -11
- openstackclient/network/v2/network.py +129 -196
- openstackclient/network/v2/network_agent.py +46 -25
- openstackclient/network/v2/network_auto_allocated_topology.py +22 -11
- openstackclient/network/v2/network_flavor.py +27 -16
- openstackclient/network/v2/network_flavor_profile.py +23 -12
- openstackclient/network/v2/network_meter.py +21 -10
- openstackclient/network/v2/network_meter_rule.py +21 -11
- openstackclient/network/v2/network_qos_policy.py +25 -15
- openstackclient/network/v2/network_qos_rule.py +32 -17
- openstackclient/network/v2/network_qos_rule_type.py +13 -5
- openstackclient/network/v2/network_rbac.py +23 -12
- openstackclient/network/v2/network_segment.py +20 -11
- openstackclient/network/v2/network_segment_range.py +56 -29
- openstackclient/network/v2/network_service_provider.py +7 -1
- openstackclient/network/v2/network_trunk.py +38 -22
- openstackclient/network/v2/port.py +54 -29
- openstackclient/network/v2/router.py +75 -52
- openstackclient/network/v2/security_group.py +87 -157
- openstackclient/network/v2/security_group_rule.py +100 -280
- openstackclient/network/v2/subnet.py +49 -28
- openstackclient/network/v2/subnet_pool.py +30 -17
- openstackclient/network/v2/taas/tap_flow.py +22 -11
- openstackclient/network/v2/taas/tap_mirror.py +22 -11
- openstackclient/network/v2/taas/tap_service.py +23 -12
- openstackclient/object/client.py +7 -2
- openstackclient/object/v1/account.py +13 -6
- openstackclient/object/v1/container.py +25 -15
- openstackclient/object/v1/object.py +25 -15
- openstackclient/py.typed +0 -0
- openstackclient/shell.py +46 -10
- openstackclient/tests/functional/base.py +55 -20
- openstackclient/tests/functional/common/test_extension.py +4 -0
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +14 -13
- openstackclient/tests/functional/compute/v2/test_flavor.py +3 -1
- openstackclient/tests/functional/compute/v2/test_server.py +3 -0
- openstackclient/tests/functional/identity/v2/common.py +10 -6
- openstackclient/tests/functional/identity/v2/test_role.py +4 -4
- openstackclient/tests/functional/identity/v3/common.py +25 -19
- openstackclient/tests/functional/identity/v3/test_group.py +20 -20
- openstackclient/tests/functional/identity/v3/test_idp.py +3 -1
- openstackclient/tests/functional/identity/v3/test_project.py +10 -10
- openstackclient/tests/functional/identity/v3/test_role.py +18 -18
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +12 -12
- openstackclient/tests/functional/identity/v3/test_user.py +8 -8
- openstackclient/tests/functional/image/base.py +1 -6
- openstackclient/tests/functional/network/v2/common.py +5 -2
- openstackclient/tests/functional/network/v2/test_floating_ip.py +10 -4
- openstackclient/tests/functional/network/v2/test_ip_availability.py +4 -0
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +3 -2
- openstackclient/tests/functional/network/v2/test_network_segment.py +5 -0
- openstackclient/tests/functional/network/v2/test_subnet.py +13 -9
- openstackclient/tests/functional/object/v1/common.py +4 -0
- openstackclient/tests/functional/volume/v2/common.py +4 -0
- openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +27 -11
- openstackclient/tests/functional/volume/v2/test_volume_type.py +2 -2
- openstackclient/tests/functional/volume/v3/common.py +4 -0
- openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +11 -7
- openstackclient/tests/functional/volume/v3/test_volume_type.py +2 -2
- openstackclient/tests/unit/common/test_availability_zone.py +35 -49
- openstackclient/tests/unit/common/test_extension.py +2 -2
- openstackclient/tests/unit/common/test_module.py +12 -7
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
- openstackclient/tests/unit/common/test_quota.py +6 -26
- openstackclient/tests/unit/compute/v2/fakes.py +25 -0
- openstackclient/tests/unit/compute/v2/test_flavor.py +28 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +6 -6
- openstackclient/tests/unit/compute/v2/test_server.py +11 -96
- openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
- openstackclient/tests/unit/identity/v3/fakes.py +3 -0
- openstackclient/tests/unit/identity/v3/test_group.py +4 -14
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
- openstackclient/tests/unit/identity/v3/test_user.py +4 -4
- openstackclient/tests/unit/image/v2/test_image.py +11 -11
- openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +105 -6
- openstackclient/tests/unit/network/test_common.py +0 -155
- openstackclient/tests/unit/network/v2/bgpvpn/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/bgpvpn/fakes.py +179 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_bgpvpn.py +584 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_network_association.py +285 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_port_association.py +384 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_router_association.py +297 -0
- openstackclient/tests/unit/network/v2/fwaas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/fwaas/test_group.py +897 -0
- openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
- openstackclient/tests/unit/network/v2/fwaas/test_rule.py +980 -0
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_flow.py → test_tap_flow.py} +18 -25
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_mirror.py → test_tap_mirror.py} +19 -29
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_service.py → test_tap_service.py} +19 -29
- openstackclient/tests/unit/network/v2/test_address_group.py +2 -2
- openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +3 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +13 -13
- openstackclient/tests/unit/network/v2/test_network_agent.py +8 -4
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
- openstackclient/tests/unit/network/v2/test_network_flavor.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_rbac.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_segment.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +7 -10
- openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/unit/network/v2/test_router.py +8 -9
- openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +1 -20
- openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +7 -41
- openstackclient/tests/unit/network/v2/test_subnet.py +2 -1
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +2 -1
- openstackclient/tests/unit/object/v1/fakes.py +8 -7
- openstackclient/tests/unit/object/v1/test_container.py +65 -101
- openstackclient/tests/unit/object/v1/test_container_all.py +8 -1
- openstackclient/tests/unit/object/v1/test_object.py +44 -84
- openstackclient/tests/unit/object/v1/test_object_all.py +8 -1
- openstackclient/tests/unit/test_hacking.py +108 -0
- openstackclient/tests/unit/volume/v2/fakes.py +1 -0
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +1 -5
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +2 -1
- openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
- openstackclient/tests/unit/volume/v3/fakes.py +1 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +1 -1
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +1 -5
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +55 -1
- openstackclient/tests/unit/volume/v3/test_volume_type.py +2 -4
- openstackclient/volume/client.py +7 -3
- openstackclient/volume/v2/backup_record.py +15 -6
- openstackclient/volume/v2/consistency_group.py +29 -17
- openstackclient/volume/v2/consistency_group_snapshot.py +25 -10
- openstackclient/volume/v2/qos_specs.py +28 -17
- openstackclient/volume/v2/service.py +17 -6
- openstackclient/volume/v2/volume.py +57 -29
- openstackclient/volume/v2/volume_backend.py +19 -6
- openstackclient/volume/v2/volume_backup.py +46 -20
- openstackclient/volume/v2/volume_host.py +6 -4
- openstackclient/volume/v2/volume_snapshot.py +50 -24
- openstackclient/volume/v2/volume_transfer_request.py +31 -13
- openstackclient/volume/v2/volume_type.py +43 -24
- openstackclient/volume/v3/block_storage_cleanup.py +11 -3
- openstackclient/volume/v3/block_storage_cluster.py +19 -7
- openstackclient/volume/v3/block_storage_log_level.py +15 -6
- openstackclient/volume/v3/block_storage_manage.py +10 -4
- openstackclient/volume/v3/block_storage_resource_filter.py +17 -5
- openstackclient/volume/v3/service.py +16 -6
- openstackclient/volume/v3/volume.py +89 -39
- openstackclient/volume/v3/volume_attachment.py +43 -21
- openstackclient/volume/v3/volume_backup.py +53 -24
- openstackclient/volume/v3/volume_group.py +23 -13
- openstackclient/volume/v3/volume_group_snapshot.py +32 -13
- openstackclient/volume/v3/volume_group_type.py +26 -13
- openstackclient/volume/v3/volume_message.py +15 -7
- openstackclient/volume/v3/volume_snapshot.py +69 -32
- openstackclient/volume/v3/volume_transfer_request.py +31 -13
- openstackclient/volume/v3/volume_type.py +42 -24
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/METADATA +6 -6
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/RECORD +271 -260
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/entry_points.txt +53 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/AUTHORS +4 -0
- python_openstackclient-10.0.0.dist-info/pbr.json +1 -0
- openstackclient/api/image_v1.py +0 -69
- openstackclient/api/image_v2.py +0 -79
- openstackclient/network/v2/floating_ip_pool.py +0 -38
- openstackclient/tests/functional/image/v1/test_image.py +0 -97
- openstackclient/tests/unit/api/test_image_v1.py +0 -96
- openstackclient/tests/unit/api/test_image_v2.py +0 -96
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +0 -248
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +0 -49
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +0 -39
- openstackclient/tests/unit/network/v2/test_network_compute.py +0 -404
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +0 -392
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +0 -555
- python_openstackclient-9.0.0.dist-info/pbr.json +0 -1
- /openstackclient/{tests/functional/image/v1 → network/v2/bgpvpn}/__init__.py +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/LICENSE +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/top_level.txt +0 -0
|
@@ -21,7 +21,7 @@ class ProjectTests(common.IdentityTests):
|
|
|
21
21
|
description = data_utils.rand_name('description')
|
|
22
22
|
raw_output = self.openstack(
|
|
23
23
|
'project create '
|
|
24
|
-
f'--domain {self.
|
|
24
|
+
f'--domain {self.DOMAIN_NAME} '
|
|
25
25
|
f'--description {description} '
|
|
26
26
|
'--enable '
|
|
27
27
|
'--property k1=v1 '
|
|
@@ -30,7 +30,7 @@ class ProjectTests(common.IdentityTests):
|
|
|
30
30
|
)
|
|
31
31
|
self.addCleanup(
|
|
32
32
|
self.openstack,
|
|
33
|
-
f'project delete --domain {self.
|
|
33
|
+
f'project delete --domain {self.DOMAIN_NAME} {project_name}',
|
|
34
34
|
)
|
|
35
35
|
items = self.parse_show(raw_output)
|
|
36
36
|
show_fields = list(self.PROJECT_FIELDS)
|
|
@@ -43,7 +43,7 @@ class ProjectTests(common.IdentityTests):
|
|
|
43
43
|
def test_project_delete(self):
|
|
44
44
|
project_name = self._create_dummy_project(add_clean_up=False)
|
|
45
45
|
raw_output = self.openstack(
|
|
46
|
-
f'project delete --domain {self.
|
|
46
|
+
f'project delete --domain {self.DOMAIN_NAME} {project_name}'
|
|
47
47
|
)
|
|
48
48
|
self.assertEqual(0, len(raw_output))
|
|
49
49
|
|
|
@@ -55,7 +55,7 @@ class ProjectTests(common.IdentityTests):
|
|
|
55
55
|
def test_project_list_with_domain(self):
|
|
56
56
|
project_name = self._create_dummy_project()
|
|
57
57
|
raw_output = self.openstack(
|
|
58
|
-
f'project list --domain {self.
|
|
58
|
+
f'project list --domain {self.DOMAIN_NAME}'
|
|
59
59
|
)
|
|
60
60
|
items = self.parse_listing(raw_output)
|
|
61
61
|
self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
|
|
@@ -75,7 +75,7 @@ class ProjectTests(common.IdentityTests):
|
|
|
75
75
|
self.assertEqual(0, len(raw_output))
|
|
76
76
|
# check project details
|
|
77
77
|
raw_output = self.openstack(
|
|
78
|
-
f'project show --domain {self.
|
|
78
|
+
f'project show --domain {self.DOMAIN_NAME} {new_project_name}'
|
|
79
79
|
)
|
|
80
80
|
items = self.parse_show(raw_output)
|
|
81
81
|
fields = list(self.PROJECT_FIELDS)
|
|
@@ -92,7 +92,7 @@ class ProjectTests(common.IdentityTests):
|
|
|
92
92
|
|
|
93
93
|
def test_project_show(self):
|
|
94
94
|
raw_output = self.openstack(
|
|
95
|
-
f'project show --domain {self.
|
|
95
|
+
f'project show --domain {self.DOMAIN_NAME} {self.PROJECT_NAME}'
|
|
96
96
|
)
|
|
97
97
|
items = self.parse_show(raw_output)
|
|
98
98
|
self.assert_show_fields(items, self.PROJECT_FIELDS)
|
|
@@ -101,10 +101,10 @@ class ProjectTests(common.IdentityTests):
|
|
|
101
101
|
output = self.openstack(
|
|
102
102
|
'project show '
|
|
103
103
|
'--parents --children '
|
|
104
|
-
f'--domain {self.
|
|
105
|
-
f'{self.
|
|
104
|
+
f'--domain {self.DOMAIN_NAME} '
|
|
105
|
+
f'{self.PROJECT_NAME}',
|
|
106
106
|
parse_output=True,
|
|
107
107
|
)
|
|
108
|
-
for attr_name in self.PROJECT_FIELDS
|
|
108
|
+
for attr_name in [*self.PROJECT_FIELDS, 'parents', 'subtree']:
|
|
109
109
|
self.assertIn(attr_name, output)
|
|
110
|
-
self.assertEqual(self.
|
|
110
|
+
self.assertEqual(self.PROJECT_NAME, output.get('name'))
|
|
@@ -76,19 +76,19 @@ class RoleTests(common.IdentityTests):
|
|
|
76
76
|
username = self._create_dummy_user()
|
|
77
77
|
raw_output = self.openstack(
|
|
78
78
|
'role add '
|
|
79
|
-
f'--project {self.
|
|
80
|
-
f'--project-domain {self.
|
|
79
|
+
f'--project {self.PROJECT_NAME} '
|
|
80
|
+
f'--project-domain {self.DOMAIN_NAME} '
|
|
81
81
|
f'--user {username} '
|
|
82
|
-
f'--user-domain {self.
|
|
82
|
+
f'--user-domain {self.DOMAIN_NAME} '
|
|
83
83
|
f'{role_name}'
|
|
84
84
|
)
|
|
85
85
|
self.addCleanup(
|
|
86
86
|
self.openstack,
|
|
87
87
|
'role remove '
|
|
88
|
-
f'--project {self.
|
|
89
|
-
f'--project-domain {self.
|
|
88
|
+
f'--project {self.PROJECT_NAME} '
|
|
89
|
+
f'--project-domain {self.DOMAIN_NAME} '
|
|
90
90
|
f'--user {username} '
|
|
91
|
-
f'--user-domain {self.
|
|
91
|
+
f'--user-domain {self.DOMAIN_NAME} '
|
|
92
92
|
f'{role_name}',
|
|
93
93
|
)
|
|
94
94
|
self.assertEqual(0, len(raw_output))
|
|
@@ -98,20 +98,20 @@ class RoleTests(common.IdentityTests):
|
|
|
98
98
|
username = self._create_dummy_user()
|
|
99
99
|
raw_output = self.openstack(
|
|
100
100
|
'role add '
|
|
101
|
-
f'--project {self.
|
|
102
|
-
f'--project-domain {self.
|
|
101
|
+
f'--project {self.PROJECT_NAME} '
|
|
102
|
+
f'--project-domain {self.DOMAIN_NAME} '
|
|
103
103
|
f'--user {username} '
|
|
104
|
-
f'--user-domain {self.
|
|
104
|
+
f'--user-domain {self.DOMAIN_NAME} '
|
|
105
105
|
'--inherited '
|
|
106
106
|
f'{role_name}'
|
|
107
107
|
)
|
|
108
108
|
self.addCleanup(
|
|
109
109
|
self.openstack,
|
|
110
110
|
'role remove '
|
|
111
|
-
f'--project {self.
|
|
112
|
-
f'--project-domain {self.
|
|
111
|
+
f'--project {self.PROJECT_NAME} '
|
|
112
|
+
f'--project-domain {self.DOMAIN_NAME} '
|
|
113
113
|
f'--user {username} '
|
|
114
|
-
f'--user-domain {self.
|
|
114
|
+
f'--user-domain {self.DOMAIN_NAME} '
|
|
115
115
|
'--inherited '
|
|
116
116
|
f'{role_name}',
|
|
117
117
|
)
|
|
@@ -122,18 +122,18 @@ class RoleTests(common.IdentityTests):
|
|
|
122
122
|
username = self._create_dummy_user()
|
|
123
123
|
add_raw_output = self.openstack(
|
|
124
124
|
'role add '
|
|
125
|
-
f'--project {self.
|
|
126
|
-
f'--project-domain {self.
|
|
125
|
+
f'--project {self.PROJECT_NAME} '
|
|
126
|
+
f'--project-domain {self.DOMAIN_NAME} '
|
|
127
127
|
f'--user {username} '
|
|
128
|
-
f'--user-domain {self.
|
|
128
|
+
f'--user-domain {self.DOMAIN_NAME} '
|
|
129
129
|
f'{role_name}'
|
|
130
130
|
)
|
|
131
131
|
remove_raw_output = self.openstack(
|
|
132
132
|
'role remove '
|
|
133
|
-
f'--project {self.
|
|
134
|
-
f'--project-domain {self.
|
|
133
|
+
f'--project {self.PROJECT_NAME} '
|
|
134
|
+
f'--project-domain {self.DOMAIN_NAME} '
|
|
135
135
|
f'--user {username} '
|
|
136
|
-
f'--user-domain {self.
|
|
136
|
+
f'--user-domain {self.DOMAIN_NAME} '
|
|
137
137
|
f'{role_name}'
|
|
138
138
|
)
|
|
139
139
|
self.assertEqual(0, len(add_raw_output))
|
|
@@ -79,14 +79,14 @@ class RoleAssignmentTests(common.IdentityTests):
|
|
|
79
79
|
)
|
|
80
80
|
raw_output = self.openstack(
|
|
81
81
|
'role add '
|
|
82
|
-
f'--project {self.
|
|
82
|
+
f'--project {self.PROJECT_NAME} '
|
|
83
83
|
f'--group {group_name} --group-domain {domain_name_A} '
|
|
84
84
|
f'{role_name}'
|
|
85
85
|
)
|
|
86
86
|
self.addCleanup(
|
|
87
87
|
self.openstack,
|
|
88
88
|
'role remove '
|
|
89
|
-
f'--project {self.
|
|
89
|
+
f'--project {self.PROJECT_NAME} '
|
|
90
90
|
f'--group {group_name} --group-domain {domain_name_A} '
|
|
91
91
|
f'{role_name}',
|
|
92
92
|
)
|
|
@@ -108,20 +108,20 @@ class RoleAssignmentTests(common.IdentityTests):
|
|
|
108
108
|
username = self._create_dummy_user()
|
|
109
109
|
raw_output = self.openstack(
|
|
110
110
|
'role add '
|
|
111
|
-
f'--domain {self.
|
|
111
|
+
f'--domain {self.DOMAIN_NAME} '
|
|
112
112
|
f'--user {username} '
|
|
113
113
|
f'{role_name}'
|
|
114
114
|
)
|
|
115
115
|
self.addCleanup(
|
|
116
116
|
self.openstack,
|
|
117
117
|
'role remove '
|
|
118
|
-
f'--domain {self.
|
|
118
|
+
f'--domain {self.DOMAIN_NAME} '
|
|
119
119
|
f'--user {username} '
|
|
120
120
|
f'{role_name}',
|
|
121
121
|
)
|
|
122
122
|
self.assertEqual(0, len(raw_output))
|
|
123
123
|
raw_output = self.openstack(
|
|
124
|
-
f'role assignment list --domain {self.
|
|
124
|
+
f'role assignment list --domain {self.DOMAIN_NAME} '
|
|
125
125
|
)
|
|
126
126
|
items = self.parse_listing(raw_output)
|
|
127
127
|
self.assert_table_structure(items, self.ROLE_ASSIGNMENT_LIST_HEADERS)
|
|
@@ -141,14 +141,14 @@ class RoleAssignmentTests(common.IdentityTests):
|
|
|
141
141
|
)
|
|
142
142
|
raw_output = self.openstack(
|
|
143
143
|
'role add '
|
|
144
|
-
f'--project {self.
|
|
144
|
+
f'--project {self.PROJECT_NAME} '
|
|
145
145
|
f'--user {username} --user-domain {domain_name_A} '
|
|
146
146
|
f'{role_name}'
|
|
147
147
|
)
|
|
148
148
|
self.addCleanup(
|
|
149
149
|
self.openstack,
|
|
150
150
|
'role remove '
|
|
151
|
-
f'--project {self.
|
|
151
|
+
f'--project {self.PROJECT_NAME} '
|
|
152
152
|
f'--user {username} --user-domain {domain_name_A} '
|
|
153
153
|
f'{role_name}',
|
|
154
154
|
)
|
|
@@ -214,20 +214,20 @@ class RoleAssignmentTests(common.IdentityTests):
|
|
|
214
214
|
username = self._create_dummy_user()
|
|
215
215
|
raw_output = self.openstack(
|
|
216
216
|
'role add '
|
|
217
|
-
f'--project {self.
|
|
217
|
+
f'--project {self.PROJECT_NAME} '
|
|
218
218
|
f'--user {username} '
|
|
219
219
|
f'{role_name}'
|
|
220
220
|
)
|
|
221
221
|
self.addCleanup(
|
|
222
222
|
self.openstack,
|
|
223
223
|
'role remove '
|
|
224
|
-
f'--project {self.
|
|
224
|
+
f'--project {self.PROJECT_NAME} '
|
|
225
225
|
f'--user {username} '
|
|
226
226
|
f'{role_name}',
|
|
227
227
|
)
|
|
228
228
|
self.assertEqual(0, len(raw_output))
|
|
229
229
|
raw_output = self.openstack(
|
|
230
|
-
f'role assignment list --project {self.
|
|
230
|
+
f'role assignment list --project {self.PROJECT_NAME} '
|
|
231
231
|
)
|
|
232
232
|
items = self.parse_listing(raw_output)
|
|
233
233
|
self.assert_table_structure(items, self.ROLE_ASSIGNMENT_LIST_HEADERS)
|
|
@@ -302,7 +302,7 @@ class RoleAssignmentTests(common.IdentityTests):
|
|
|
302
302
|
username = self._create_dummy_user()
|
|
303
303
|
raw_output = self.openstack(
|
|
304
304
|
'role add '
|
|
305
|
-
f'--project {self.
|
|
305
|
+
f'--project {self.PROJECT_NAME} '
|
|
306
306
|
f'--user {username} '
|
|
307
307
|
'--inherited '
|
|
308
308
|
f'{role_name}'
|
|
@@ -310,7 +310,7 @@ class RoleAssignmentTests(common.IdentityTests):
|
|
|
310
310
|
self.addCleanup(
|
|
311
311
|
self.openstack,
|
|
312
312
|
'role remove '
|
|
313
|
-
f'--project {self.
|
|
313
|
+
f'--project {self.PROJECT_NAME} '
|
|
314
314
|
f'--user {username} '
|
|
315
315
|
'--inherited '
|
|
316
316
|
f'{role_name}',
|
|
@@ -22,7 +22,7 @@ class UserTests(common.IdentityTests):
|
|
|
22
22
|
def test_user_delete(self):
|
|
23
23
|
username = self._create_dummy_user(add_clean_up=False)
|
|
24
24
|
raw_output = self.openstack(
|
|
25
|
-
f'user delete --domain {self.
|
|
25
|
+
f'user delete --domain {self.DOMAIN_NAME} {username}'
|
|
26
26
|
)
|
|
27
27
|
self.assertEqual(0, len(raw_output))
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ class UserTests(common.IdentityTests):
|
|
|
34
34
|
def test_user_set(self):
|
|
35
35
|
username = self._create_dummy_user()
|
|
36
36
|
raw_output = self.openstack(
|
|
37
|
-
f'user show --domain {self.
|
|
37
|
+
f'user show --domain {self.DOMAIN_NAME} {username}'
|
|
38
38
|
)
|
|
39
39
|
user = self.parse_show_as_object(raw_output)
|
|
40
40
|
new_username = data_utils.rand_name('NewTestUser')
|
|
@@ -46,7 +46,7 @@ class UserTests(common.IdentityTests):
|
|
|
46
46
|
)
|
|
47
47
|
self.assertEqual(0, len(raw_output))
|
|
48
48
|
raw_output = self.openstack(
|
|
49
|
-
f'user show --domain {self.
|
|
49
|
+
f'user show --domain {self.DOMAIN_NAME} {new_username}'
|
|
50
50
|
)
|
|
51
51
|
updated_user = self.parse_show_as_object(raw_output)
|
|
52
52
|
self.assertEqual(user['id'], updated_user['id'])
|
|
@@ -57,7 +57,7 @@ class UserTests(common.IdentityTests):
|
|
|
57
57
|
project_name = self._create_dummy_project()
|
|
58
58
|
# get original user details
|
|
59
59
|
raw_output = self.openstack(
|
|
60
|
-
f'user show --domain {self.
|
|
60
|
+
f'user show --domain {self.DOMAIN_NAME} {username}'
|
|
61
61
|
)
|
|
62
62
|
user = self.parse_show_as_object(raw_output)
|
|
63
63
|
# update user
|
|
@@ -67,19 +67,19 @@ class UserTests(common.IdentityTests):
|
|
|
67
67
|
'--project-domain {project_domain} '
|
|
68
68
|
'{id}'.format(
|
|
69
69
|
project=project_name,
|
|
70
|
-
project_domain=self.
|
|
70
|
+
project_domain=self.DOMAIN_NAME,
|
|
71
71
|
id=user['id'],
|
|
72
72
|
)
|
|
73
73
|
)
|
|
74
74
|
self.assertEqual(0, len(raw_output))
|
|
75
75
|
# get updated user details
|
|
76
76
|
raw_output = self.openstack(
|
|
77
|
-
f'user show --domain {self.
|
|
77
|
+
f'user show --domain {self.DOMAIN_NAME} {username}'
|
|
78
78
|
)
|
|
79
79
|
updated_user = self.parse_show_as_object(raw_output)
|
|
80
80
|
# get project details
|
|
81
81
|
raw_output = self.openstack(
|
|
82
|
-
f'project show --domain {self.
|
|
82
|
+
f'project show --domain {self.DOMAIN_NAME} {project_name}'
|
|
83
83
|
)
|
|
84
84
|
project = self.parse_show_as_object(raw_output)
|
|
85
85
|
# check updated user details
|
|
@@ -89,7 +89,7 @@ class UserTests(common.IdentityTests):
|
|
|
89
89
|
def test_user_show(self):
|
|
90
90
|
username = self._create_dummy_user()
|
|
91
91
|
raw_output = self.openstack(
|
|
92
|
-
f'user show --domain {self.
|
|
92
|
+
f'user show --domain {self.DOMAIN_NAME} {username}'
|
|
93
93
|
)
|
|
94
94
|
items = self.parse_show(raw_output)
|
|
95
95
|
self.assert_show_fields(items, self.USER_FIELDS)
|
|
@@ -16,9 +16,4 @@ from openstackclient.tests.functional import base
|
|
|
16
16
|
class BaseImageTests(base.TestCase):
|
|
17
17
|
"""Functional tests for Image commands"""
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
def setUpClass(cls):
|
|
21
|
-
super().setUpClass()
|
|
22
|
-
# TODO(dtroyer): maybe do image API discovery here to determine
|
|
23
|
-
# what is available, it isn't in the service catalog
|
|
24
|
-
cls.haz_v1_api = False
|
|
19
|
+
...
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
13
14
|
import uuid
|
|
14
15
|
|
|
15
16
|
from openstackclient.tests.functional import base
|
|
@@ -18,6 +19,8 @@ from openstackclient.tests.functional import base
|
|
|
18
19
|
class NetworkTests(base.TestCase):
|
|
19
20
|
"""Functional tests for Network commands"""
|
|
20
21
|
|
|
22
|
+
haz_network: ClassVar[bool]
|
|
23
|
+
|
|
21
24
|
@classmethod
|
|
22
25
|
def setUpClass(cls):
|
|
23
26
|
super().setUpClass()
|
|
@@ -33,7 +36,7 @@ class NetworkTests(base.TestCase):
|
|
|
33
36
|
class NetworkTagTests(NetworkTests):
|
|
34
37
|
"""Functional tests with tag operation"""
|
|
35
38
|
|
|
36
|
-
base_command: str
|
|
39
|
+
base_command: ClassVar[str]
|
|
37
40
|
|
|
38
41
|
def test_tag_operation(self):
|
|
39
42
|
# Get project IDs
|
|
@@ -84,7 +87,7 @@ class NetworkTagTests(NetworkTests):
|
|
|
84
87
|
parse_output=True,
|
|
85
88
|
)
|
|
86
89
|
for name, tags in expected:
|
|
87
|
-
net =
|
|
90
|
+
net = next(n for n in cmd_output if n['Name'] == name)
|
|
88
91
|
self.assertEqual(set(tags), set(net['Tags']))
|
|
89
92
|
|
|
90
93
|
def _create_resource_for_tag_test(self, name, args):
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import random
|
|
14
|
+
from typing import ClassVar
|
|
14
15
|
import uuid
|
|
15
16
|
|
|
16
17
|
from openstackclient.tests.functional.network.v2 import common
|
|
@@ -19,6 +20,11 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
19
20
|
class FloatingIpTests(common.NetworkTests):
|
|
20
21
|
"""Functional tests for floating ip"""
|
|
21
22
|
|
|
23
|
+
EXTERNAL_NETWORK_NAME: ClassVar[str]
|
|
24
|
+
EXTERNAL_NETWORK_ID: ClassVar[str]
|
|
25
|
+
PRIVATE_NETWORK_NAME: ClassVar[str]
|
|
26
|
+
PRIVATE_NETWORK_ID: ClassVar[str]
|
|
27
|
+
|
|
22
28
|
@classmethod
|
|
23
29
|
def setUpClass(cls):
|
|
24
30
|
super().setUpClass()
|
|
@@ -32,14 +38,14 @@ class FloatingIpTests(common.NetworkTests):
|
|
|
32
38
|
'network create ' + '--external ' + cls.EXTERNAL_NETWORK_NAME,
|
|
33
39
|
parse_output=True,
|
|
34
40
|
)
|
|
35
|
-
cls.
|
|
41
|
+
cls.EXTERNAL_NETWORK_ID = json_output["id"]
|
|
36
42
|
|
|
37
43
|
# Create a private network for the port
|
|
38
44
|
json_output = cls.openstack(
|
|
39
45
|
'network create ' + cls.PRIVATE_NETWORK_NAME,
|
|
40
46
|
parse_output=True,
|
|
41
47
|
)
|
|
42
|
-
cls.
|
|
48
|
+
cls.PRIVATE_NETWORK_ID = json_output["id"]
|
|
43
49
|
|
|
44
50
|
@classmethod
|
|
45
51
|
def tearDownClass(cls):
|
|
@@ -59,8 +65,8 @@ class FloatingIpTests(common.NetworkTests):
|
|
|
59
65
|
super().setUp()
|
|
60
66
|
|
|
61
67
|
# Verify setup
|
|
62
|
-
self.assertIsNotNone(self.
|
|
63
|
-
self.assertIsNotNone(self.
|
|
68
|
+
self.assertIsNotNone(self.EXTERNAL_NETWORK_ID)
|
|
69
|
+
self.assertIsNotNone(self.PRIVATE_NETWORK_ID)
|
|
64
70
|
|
|
65
71
|
def _create_subnet(self, network_name, subnet_name):
|
|
66
72
|
subnet_id = None
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
13
14
|
import uuid
|
|
14
15
|
|
|
15
16
|
from openstackclient.tests.functional.network.v2 import common
|
|
@@ -18,6 +19,9 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
18
19
|
class IPAvailabilityTests(common.NetworkTests):
|
|
19
20
|
"""Functional tests for IP availability"""
|
|
20
21
|
|
|
22
|
+
NAME: ClassVar[str]
|
|
23
|
+
NETWORK_NAME: ClassVar[str]
|
|
24
|
+
|
|
21
25
|
@classmethod
|
|
22
26
|
def setUpClass(cls):
|
|
23
27
|
super().setUpClass()
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# License for the specific language governing permissions and limitations
|
|
14
14
|
# under the License.
|
|
15
15
|
|
|
16
|
+
from typing import ClassVar
|
|
16
17
|
import unittest
|
|
17
18
|
import uuid
|
|
18
19
|
|
|
@@ -22,8 +23,8 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
22
23
|
class TestMeterRule(common.NetworkTests):
|
|
23
24
|
"""Functional tests for meter rule"""
|
|
24
25
|
|
|
25
|
-
METER_ID: str
|
|
26
|
-
|
|
26
|
+
METER_ID: ClassVar[str]
|
|
27
|
+
METER_NAME: ClassVar[str]
|
|
27
28
|
|
|
28
29
|
@classmethod
|
|
29
30
|
def setUpClass(cls):
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
13
14
|
import uuid
|
|
14
15
|
|
|
15
16
|
from openstackclient.tests.functional.network.v2 import common
|
|
@@ -18,6 +19,10 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
18
19
|
class NetworkSegmentTests(common.NetworkTests):
|
|
19
20
|
"""Functional tests for network segment"""
|
|
20
21
|
|
|
22
|
+
NETWORK_NAME: ClassVar[str]
|
|
23
|
+
NETWORK_ID: ClassVar[str]
|
|
24
|
+
PHYSICAL_NETWORK_NAME: ClassVar[str]
|
|
25
|
+
|
|
21
26
|
@classmethod
|
|
22
27
|
def setUpClass(cls):
|
|
23
28
|
super().setUpClass()
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import random
|
|
14
|
+
from typing import ClassVar
|
|
14
15
|
import uuid
|
|
15
16
|
|
|
16
17
|
from openstackclient.tests.functional.network.v2 import common
|
|
@@ -21,19 +22,22 @@ class SubnetTests(common.NetworkTagTests):
|
|
|
21
22
|
|
|
22
23
|
base_command = 'subnet'
|
|
23
24
|
|
|
25
|
+
NETWORK_NAME: ClassVar[str]
|
|
26
|
+
NETWORK_ID: ClassVar[str]
|
|
27
|
+
|
|
24
28
|
@classmethod
|
|
25
29
|
def setUpClass(cls):
|
|
26
30
|
super().setUpClass()
|
|
27
|
-
if cls.haz_network:
|
|
28
|
-
cls.NETWORK_NAME = uuid.uuid4().hex
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
cls.NETWORK_NAME = uuid.uuid4().hex
|
|
33
|
+
|
|
34
|
+
# Create a network for the all subnet tests
|
|
35
|
+
cmd_output = cls.openstack(
|
|
36
|
+
'network create ' + cls.NETWORK_NAME,
|
|
37
|
+
parse_output=True,
|
|
38
|
+
)
|
|
39
|
+
# Get network_id for assertEqual
|
|
40
|
+
cls.NETWORK_ID = cmd_output["id"]
|
|
37
41
|
|
|
38
42
|
@classmethod
|
|
39
43
|
def tearDownClass(cls):
|
|
@@ -10,12 +10,16 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
14
|
+
|
|
13
15
|
from openstackclient.tests.functional import base
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
class ObjectStoreTests(base.TestCase):
|
|
17
19
|
"""Functional tests for Object Store commands"""
|
|
18
20
|
|
|
21
|
+
haz_object_store: ClassVar[bool]
|
|
22
|
+
|
|
19
23
|
@classmethod
|
|
20
24
|
def setUpClass(cls):
|
|
21
25
|
super().setUpClass()
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
14
|
+
|
|
13
15
|
import fixtures
|
|
14
16
|
|
|
15
17
|
from openstackclient.tests.functional.volume import base
|
|
@@ -18,6 +20,8 @@ from openstackclient.tests.functional.volume import base
|
|
|
18
20
|
class BaseVolumeTests(base.BaseVolumeTests):
|
|
19
21
|
"""Base class for Volume functional tests."""
|
|
20
22
|
|
|
23
|
+
haz_volume_v2: ClassVar[bool]
|
|
24
|
+
|
|
21
25
|
@classmethod
|
|
22
26
|
def setUpClass(cls):
|
|
23
27
|
super().setUpClass()
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
13
14
|
import uuid
|
|
14
15
|
|
|
15
16
|
from openstackclient.tests.functional.volume.v2 import common
|
|
@@ -18,24 +19,27 @@ from openstackclient.tests.functional.volume.v2 import common
|
|
|
18
19
|
class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
19
20
|
"""Functional tests for volume snapshot."""
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
VOLUME_NAME = uuid.uuid4().hex
|
|
23
|
+
VOLUME_ID: ClassVar[str]
|
|
22
24
|
|
|
23
25
|
@classmethod
|
|
24
26
|
def setUpClass(cls):
|
|
25
27
|
super().setUpClass()
|
|
26
28
|
# create a volume for all tests to create snapshot
|
|
27
29
|
cmd_output = cls.openstack(
|
|
28
|
-
'volume create ' + '--size 1 ' + cls.
|
|
30
|
+
'volume create ' + '--size 1 ' + cls.VOLUME_NAME,
|
|
29
31
|
parse_output=True,
|
|
30
32
|
)
|
|
31
|
-
cls.wait_for_status('volume', cls.
|
|
33
|
+
cls.wait_for_status('volume', cls.VOLUME_NAME, 'available')
|
|
32
34
|
cls.VOLUME_ID = cmd_output['id']
|
|
33
35
|
|
|
34
36
|
@classmethod
|
|
35
37
|
def tearDownClass(cls):
|
|
36
38
|
try:
|
|
37
|
-
cls.wait_for_status('volume', cls.
|
|
38
|
-
raw_output = cls.openstack(
|
|
39
|
+
cls.wait_for_status('volume', cls.VOLUME_NAME, 'available')
|
|
40
|
+
raw_output = cls.openstack(
|
|
41
|
+
'volume delete --force ' + cls.VOLUME_NAME
|
|
42
|
+
)
|
|
39
43
|
cls.assertOutput('', raw_output)
|
|
40
44
|
finally:
|
|
41
45
|
super().tearDownClass()
|
|
@@ -44,7 +48,10 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
44
48
|
"""Test create, delete multiple"""
|
|
45
49
|
name1 = uuid.uuid4().hex
|
|
46
50
|
cmd_output = self.openstack(
|
|
47
|
-
'volume snapshot create '
|
|
51
|
+
'volume snapshot create '
|
|
52
|
+
+ name1
|
|
53
|
+
+ ' --volume '
|
|
54
|
+
+ self.VOLUME_NAME,
|
|
48
55
|
parse_output=True,
|
|
49
56
|
)
|
|
50
57
|
self.assertEqual(
|
|
@@ -54,7 +61,10 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
54
61
|
|
|
55
62
|
name2 = uuid.uuid4().hex
|
|
56
63
|
cmd_output = self.openstack(
|
|
57
|
-
'volume snapshot create '
|
|
64
|
+
'volume snapshot create '
|
|
65
|
+
+ name2
|
|
66
|
+
+ ' --volume '
|
|
67
|
+
+ self.VOLUME_NAME,
|
|
58
68
|
parse_output=True,
|
|
59
69
|
)
|
|
60
70
|
self.assertEqual(
|
|
@@ -76,7 +86,10 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
76
86
|
"""Test create, list filter"""
|
|
77
87
|
name1 = uuid.uuid4().hex
|
|
78
88
|
cmd_output = self.openstack(
|
|
79
|
-
'volume snapshot create '
|
|
89
|
+
'volume snapshot create '
|
|
90
|
+
+ name1
|
|
91
|
+
+ ' --volume '
|
|
92
|
+
+ self.VOLUME_NAME,
|
|
80
93
|
parse_output=True,
|
|
81
94
|
)
|
|
82
95
|
self.addCleanup(self.wait_for_delete, 'volume snapshot', name1)
|
|
@@ -97,7 +110,10 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
97
110
|
|
|
98
111
|
name2 = uuid.uuid4().hex
|
|
99
112
|
cmd_output = self.openstack(
|
|
100
|
-
'volume snapshot create '
|
|
113
|
+
'volume snapshot create '
|
|
114
|
+
+ name2
|
|
115
|
+
+ ' --volume '
|
|
116
|
+
+ self.VOLUME_NAME,
|
|
101
117
|
parse_output=True,
|
|
102
118
|
)
|
|
103
119
|
self.addCleanup(self.wait_for_delete, 'volume snapshot', name2)
|
|
@@ -146,7 +162,7 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
146
162
|
|
|
147
163
|
# Test list --volume
|
|
148
164
|
cmd_output = self.openstack(
|
|
149
|
-
'volume snapshot list ' + '--volume ' + self.
|
|
165
|
+
'volume snapshot list ' + '--volume ' + self.VOLUME_NAME,
|
|
150
166
|
parse_output=True,
|
|
151
167
|
)
|
|
152
168
|
names = [x["Name"] for x in cmd_output]
|
|
@@ -169,7 +185,7 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
169
185
|
cmd_output = self.openstack(
|
|
170
186
|
'volume snapshot create '
|
|
171
187
|
+ '--volume '
|
|
172
|
-
+ self.
|
|
188
|
+
+ self.VOLUME_NAME
|
|
173
189
|
+ ' --description aaaa '
|
|
174
190
|
+ '--property Alpha=a '
|
|
175
191
|
+ name,
|
|
@@ -173,9 +173,9 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
|
|
173
173
|
'volume type list --encryption-type',
|
|
174
174
|
parse_output=True,
|
|
175
175
|
)
|
|
176
|
-
encryption_output =
|
|
176
|
+
encryption_output = next(
|
|
177
177
|
t['Encryption'] for t in cmd_output if t['Name'] == encryption_type
|
|
178
|
-
|
|
178
|
+
)
|
|
179
179
|
expected = {
|
|
180
180
|
'provider': 'LuksEncryptor',
|
|
181
181
|
'cipher': 'aes-xts-plain64',
|