python-openstackclient 9.0.0__py3-none-any.whl → 10.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/__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 +59 -43
- 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 +36 -34
- openstackclient/common/pagination.py +50 -6
- openstackclient/common/progressbar.py +7 -6
- openstackclient/common/project_cleanup.py +11 -6
- openstackclient/common/quota.py +105 -103
- 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 +42 -22
- openstackclient/compute/v2/host.py +14 -6
- openstackclient/compute/v2/hypervisor.py +16 -5
- openstackclient/compute/v2/hypervisor_stats.py +10 -2
- openstackclient/compute/v2/keypair.py +35 -16
- openstackclient/compute/v2/server.py +268 -179
- openstackclient/compute/v2/server_backup.py +10 -4
- openstackclient/compute/v2/server_event.py +28 -12
- openstackclient/compute/v2/server_group.py +23 -11
- openstackclient/compute/v2/server_image.py +19 -10
- openstackclient/compute/v2/server_migration.py +27 -10
- openstackclient/compute/v2/server_share.py +274 -0
- openstackclient/compute/v2/server_volume.py +13 -5
- openstackclient/compute/v2/service.py +17 -8
- openstackclient/compute/v2/usage.py +28 -23
- openstackclient/identity/client.py +8 -3
- openstackclient/identity/common.py +82 -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 +32 -12
- openstackclient/identity/v3/application_credential.py +66 -24
- openstackclient/identity/v3/catalog.py +14 -7
- openstackclient/identity/v3/consumer.py +22 -11
- openstackclient/identity/v3/credential.py +39 -17
- openstackclient/identity/v3/domain.py +40 -19
- openstackclient/identity/v3/ec2creds.py +25 -12
- openstackclient/identity/v3/endpoint.py +98 -64
- openstackclient/identity/v3/endpoint_group.py +28 -17
- openstackclient/identity/v3/federation_protocol.py +44 -20
- openstackclient/identity/v3/group.py +64 -40
- openstackclient/identity/v3/identity_provider.py +95 -57
- openstackclient/identity/v3/implied_role.py +21 -9
- openstackclient/identity/v3/limit.py +42 -17
- openstackclient/identity/v3/mapping.py +58 -28
- openstackclient/identity/v3/policy.py +23 -12
- openstackclient/identity/v3/project.py +59 -26
- openstackclient/identity/v3/region.py +39 -17
- openstackclient/identity/v3/registered_limit.py +41 -16
- openstackclient/identity/v3/role.py +62 -31
- openstackclient/identity/v3/role_assignment.py +25 -7
- openstackclient/identity/v3/service.py +39 -17
- openstackclient/identity/v3/service_provider.py +40 -16
- openstackclient/identity/v3/tag.py +23 -6
- openstackclient/identity/v3/token.py +30 -14
- openstackclient/identity/v3/trust.py +39 -18
- openstackclient/identity/v3/unscoped_saml.py +10 -2
- openstackclient/identity/v3/user.py +86 -36
- openstackclient/image/client.py +7 -3
- openstackclient/image/v1/image.py +33 -26
- openstackclient/image/v2/cache.py +16 -11
- openstackclient/image/v2/image.py +88 -56
- openstackclient/image/v2/info.py +7 -1
- openstackclient/image/v2/metadef_namespaces.py +117 -20
- openstackclient/image/v2/metadef_objects.py +32 -19
- openstackclient/image/v2/metadef_properties.py +30 -16
- openstackclient/image/v2/metadef_resource_type_association.py +14 -7
- openstackclient/image/v2/metadef_resource_types.py +7 -1
- openstackclient/image/v2/task.py +25 -27
- 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 +27 -54
- openstackclient/network/v2/address_group.py +39 -16
- openstackclient/network/v2/address_scope.py +36 -20
- openstackclient/network/v2/bgpvpn/bgpvpn.py +477 -0
- openstackclient/network/v2/bgpvpn/constants.py +30 -0
- openstackclient/network/v2/bgpvpn/network_association.py +226 -0
- openstackclient/network/v2/bgpvpn/port_association.py +504 -0
- openstackclient/network/v2/bgpvpn/router_association.py +301 -0
- openstackclient/network/v2/default_security_group_rule.py +31 -14
- openstackclient/network/v2/floating_ip.py +121 -162
- openstackclient/network/v2/floating_ip_port_forwarding.py +41 -19
- openstackclient/network/v2/fwaas/__init__.py +0 -0
- openstackclient/network/v2/fwaas/group.py +499 -0
- openstackclient/network/v2/fwaas/policy.py +518 -0
- openstackclient/network/v2/fwaas/rule.py +610 -0
- openstackclient/network/v2/ip_availability.py +25 -8
- openstackclient/network/v2/l3_conntrack_helper.py +35 -13
- openstackclient/network/v2/local_ip.py +27 -13
- openstackclient/network/v2/local_ip_association.py +17 -7
- openstackclient/network/v2/ndp_proxy.py +23 -11
- openstackclient/network/v2/network.py +213 -213
- openstackclient/network/v2/network_agent.py +77 -34
- openstackclient/network/v2/network_auto_allocated_topology.py +27 -15
- openstackclient/network/v2/network_flavor.py +45 -21
- openstackclient/network/v2/network_flavor_profile.py +42 -17
- openstackclient/network/v2/network_meter.py +39 -15
- openstackclient/network/v2/network_meter_rule.py +40 -12
- openstackclient/network/v2/network_qos_policy.py +39 -21
- openstackclient/network/v2/network_qos_rule.py +48 -18
- openstackclient/network/v2/network_qos_rule_type.py +28 -9
- openstackclient/network/v2/network_rbac.py +34 -16
- openstackclient/network/v2/network_segment.py +32 -11
- openstackclient/network/v2/network_segment_range.py +70 -31
- openstackclient/network/v2/network_service_provider.py +7 -1
- openstackclient/network/v2/network_trunk.py +41 -22
- openstackclient/network/v2/port.py +141 -40
- openstackclient/network/v2/router.py +101 -67
- openstackclient/network/v2/security_group.py +97 -198
- openstackclient/network/v2/security_group_rule.py +115 -282
- openstackclient/network/v2/subnet.py +63 -34
- openstackclient/network/v2/subnet_pool.py +42 -24
- openstackclient/network/v2/taas/tap_flow.py +35 -14
- openstackclient/network/v2/taas/tap_mirror.py +28 -14
- openstackclient/network/v2/taas/tap_service.py +26 -12
- openstackclient/object/client.py +7 -2
- openstackclient/object/v1/account.py +13 -6
- openstackclient/object/v1/container.py +28 -16
- openstackclient/object/v1/object.py +28 -16
- 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 +59 -19
- openstackclient/tests/functional/identity/v3/test_application_credential.py +1 -1
- 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_mapping.py +81 -0
- 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_group.py +163 -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_limits.py +1 -1
- openstackclient/tests/unit/common/test_module.py +82 -44
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
- openstackclient/tests/unit/common/test_quota.py +15 -26
- openstackclient/tests/unit/compute/v2/fakes.py +26 -57
- openstackclient/tests/unit/compute/v2/test_agent.py +4 -4
- openstackclient/tests/unit/compute/v2/test_aggregate.py +1 -1
- openstackclient/tests/unit/compute/v2/test_console.py +2 -2
- openstackclient/tests/unit/compute/v2/test_console_connection.py +1 -1
- openstackclient/tests/unit/compute/v2/test_flavor.py +29 -3
- openstackclient/tests/unit/compute/v2/test_host.py +3 -3
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +2 -2
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +1 -1
- openstackclient/tests/unit/compute/v2/test_keypair.py +7 -7
- openstackclient/tests/unit/compute/v2/test_server.py +26 -111
- openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_event.py +2 -2
- openstackclient/tests/unit/compute/v2/test_server_group.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_image.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_migration.py +4 -4
- openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
- openstackclient/tests/unit/compute/v2/test_server_volume.py +2 -2
- openstackclient/tests/unit/compute/v2/test_service.py +3 -3
- openstackclient/tests/unit/compute/v2/test_usage.py +1 -1
- openstackclient/tests/unit/identity/v2_0/fakes.py +3 -7
- openstackclient/tests/unit/identity/v2_0/test_endpoint.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_project.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_role.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_role_assignment.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_service.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_token.py +2 -2
- openstackclient/tests/unit/identity/v2_0/test_user.py +1 -1
- openstackclient/tests/unit/identity/v3/fakes.py +8 -38
- openstackclient/tests/unit/identity/v3/test_access_rule.py +3 -3
- openstackclient/tests/unit/identity/v3/test_application_credential.py +4 -4
- openstackclient/tests/unit/identity/v3/test_credential.py +5 -5
- openstackclient/tests/unit/identity/v3/test_domain.py +5 -5
- openstackclient/tests/unit/identity/v3/test_endpoint.py +6 -6
- openstackclient/tests/unit/identity/v3/test_endpoint_group.py +1 -1
- openstackclient/tests/unit/identity/v3/test_group.py +12 -22
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
- openstackclient/tests/unit/identity/v3/test_implied_role.py +1 -1
- openstackclient/tests/unit/identity/v3/test_limit.py +5 -5
- openstackclient/tests/unit/identity/v3/test_mappings.py +163 -79
- openstackclient/tests/unit/identity/v3/test_project.py +28 -5
- openstackclient/tests/unit/identity/v3/test_protocol.py +3 -3
- openstackclient/tests/unit/identity/v3/test_region.py +5 -5
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +5 -5
- openstackclient/tests/unit/identity/v3/test_role.py +8 -8
- openstackclient/tests/unit/identity/v3/test_role_assignment.py +1 -1
- openstackclient/tests/unit/identity/v3/test_service.py +5 -5
- openstackclient/tests/unit/identity/v3/test_token.py +2 -2
- openstackclient/tests/unit/identity/v3/test_trust.py +4 -4
- openstackclient/tests/unit/identity/v3/test_user.py +77 -10
- 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/fakes.py +5 -77
- openstackclient/tests/unit/network/v2/fwaas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/fwaas/test_group.py +923 -0
- openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
- openstackclient/tests/unit/network/v2/fwaas/test_rule.py +1005 -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 +26 -2
- openstackclient/tests/unit/network/v2/test_address_scope.py +24 -0
- openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +27 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +37 -13
- openstackclient/tests/unit/network/v2/test_ip_availability.py +25 -0
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +29 -3
- openstackclient/tests/unit/network/v2/test_network.py +74 -12
- openstackclient/tests/unit/network/v2/test_network_agent.py +58 -5
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
- openstackclient/tests/unit/network/v2/test_network_flavor.py +26 -2
- openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +24 -0
- openstackclient/tests/unit/network/v2/test_network_meter.py +24 -0
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +25 -1
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +24 -0
- openstackclient/tests/unit/network/v2/test_network_rbac.py +25 -1
- openstackclient/tests/unit/network/v2/test_network_segment.py +25 -1
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +31 -10
- openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/unit/network/v2/test_port.py +166 -0
- openstackclient/tests/unit/network/v2/test_router.py +36 -16
- openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +11 -8
- openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +28 -37
- openstackclient/tests/unit/network/v2/test_subnet.py +30 -5
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +26 -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 +21 -140
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +6 -14
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +8 -1
- openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
- openstackclient/tests/unit/volume/v3/fakes.py +205 -100
- openstackclient/tests/unit/volume/v3/test_backup_record.py +114 -0
- openstackclient/tests/unit/volume/v3/test_consistency_group.py +720 -0
- openstackclient/tests/unit/volume/v3/test_consistency_group_snapshot.py +354 -0
- openstackclient/tests/unit/volume/v3/test_qos_specs.py +455 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -1
- openstackclient/tests/unit/volume/v3/test_volume_backend.py +158 -0
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +6 -14
- openstackclient/tests/unit/volume/v3/test_volume_group_type.py +65 -0
- openstackclient/tests/unit/volume/v3/test_volume_host.py +115 -0
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +61 -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 +60 -30
- openstackclient/volume/v2/volume_backend.py +19 -6
- openstackclient/volume/v2/volume_backup.py +48 -23
- openstackclient/volume/v2/volume_host.py +6 -4
- openstackclient/volume/v2/volume_snapshot.py +49 -24
- openstackclient/volume/v2/volume_transfer_request.py +31 -13
- openstackclient/volume/v2/volume_type.py +43 -24
- openstackclient/volume/v3/backup_record.py +94 -0
- 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/consistency_group.py +400 -0
- openstackclient/volume/v3/consistency_group_snapshot.py +225 -0
- openstackclient/volume/v3/qos_specs.py +389 -0
- openstackclient/volume/v3/service.py +16 -6
- openstackclient/volume/v3/volume.py +92 -40
- openstackclient/volume/v3/volume_attachment.py +47 -21
- openstackclient/volume/v3/volume_backend.py +130 -0
- openstackclient/volume/v3/volume_backup.py +55 -27
- openstackclient/volume/v3/volume_group.py +23 -13
- openstackclient/volume/v3/volume_group_snapshot.py +34 -17
- openstackclient/volume/v3/volume_group_type.py +27 -14
- openstackclient/volume/v3/volume_host.py +74 -0
- openstackclient/volume/v3/volume_message.py +18 -8
- openstackclient/volume/v3/volume_snapshot.py +70 -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.1.0.dist-info}/METADATA +7 -8
- python_openstackclient-10.1.0.dist-info/RECORD +524 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/entry_points.txt +77 -25
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/licenses/AUTHORS +9 -0
- python_openstackclient-10.1.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/RECORD +0 -499
- 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.1.0.dist-info}/licenses/LICENSE +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/top_level.txt +0 -0
|
@@ -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',
|
|
@@ -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_v3: ClassVar[bool]
|
|
24
|
+
|
|
21
25
|
@classmethod
|
|
22
26
|
def setUpClass(cls):
|
|
23
27
|
super().setUpClass()
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
+
# not use this file except in compliance with the License. You may obtain
|
|
3
|
+
# a copy of the License at
|
|
4
|
+
#
|
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
#
|
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
+
# License for the specific language governing permissions and limitations
|
|
11
|
+
# under the License.
|
|
12
|
+
|
|
13
|
+
from typing import ClassVar
|
|
14
|
+
import uuid
|
|
15
|
+
|
|
16
|
+
from openstackclient.tests.functional.volume.v3 import common
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class VolumeGroupTests(common.BaseVolumeTests):
|
|
20
|
+
"""Functional tests for volume group."""
|
|
21
|
+
|
|
22
|
+
API_VERSION = '3.13'
|
|
23
|
+
GROUP_TYPE_NAME = uuid.uuid4().hex
|
|
24
|
+
GROUP_TYPE_ID: ClassVar[str]
|
|
25
|
+
VOLUME_TYPE_ID: ClassVar[str]
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def setUpClass(cls):
|
|
29
|
+
super().setUpClass()
|
|
30
|
+
cmd_output = cls.openstack(
|
|
31
|
+
'--os-volume-api-version '
|
|
32
|
+
+ cls.API_VERSION
|
|
33
|
+
+ ' volume group type create '
|
|
34
|
+
+ cls.GROUP_TYPE_NAME,
|
|
35
|
+
parse_output=True,
|
|
36
|
+
)
|
|
37
|
+
cls.GROUP_TYPE_ID = cmd_output['ID']
|
|
38
|
+
|
|
39
|
+
volume_type_name = uuid.uuid4().hex
|
|
40
|
+
cmd_output = cls.openstack(
|
|
41
|
+
'volume type create ' + volume_type_name,
|
|
42
|
+
parse_output=True,
|
|
43
|
+
)
|
|
44
|
+
cls.VOLUME_TYPE_ID = cmd_output['id']
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def tearDownClass(cls):
|
|
48
|
+
try:
|
|
49
|
+
raw_output = cls.openstack(
|
|
50
|
+
'volume type delete ' + cls.VOLUME_TYPE_ID
|
|
51
|
+
)
|
|
52
|
+
cls.assertOutput('', raw_output)
|
|
53
|
+
raw_output = cls.openstack(
|
|
54
|
+
'--os-volume-api-version '
|
|
55
|
+
+ cls.API_VERSION
|
|
56
|
+
+ ' volume group type delete '
|
|
57
|
+
+ cls.GROUP_TYPE_NAME
|
|
58
|
+
)
|
|
59
|
+
cls.assertOutput('', raw_output)
|
|
60
|
+
finally:
|
|
61
|
+
super().tearDownClass()
|
|
62
|
+
|
|
63
|
+
def test_volume_group(self):
|
|
64
|
+
# create volume group
|
|
65
|
+
name = uuid.uuid4().hex
|
|
66
|
+
description = 'description-' + uuid.uuid4().hex
|
|
67
|
+
cmd_output = self.openstack(
|
|
68
|
+
'--os-volume-api-version '
|
|
69
|
+
+ self.API_VERSION
|
|
70
|
+
+ ' volume group create '
|
|
71
|
+
+ '--volume-group-type '
|
|
72
|
+
+ self.GROUP_TYPE_NAME
|
|
73
|
+
+ ' --volume-type '
|
|
74
|
+
+ self.VOLUME_TYPE_ID
|
|
75
|
+
+ ' --name '
|
|
76
|
+
+ name
|
|
77
|
+
+ ' --description '
|
|
78
|
+
+ description,
|
|
79
|
+
parse_output=True,
|
|
80
|
+
)
|
|
81
|
+
group_id = cmd_output['ID']
|
|
82
|
+
self.addCleanup(
|
|
83
|
+
self.wait_for_delete,
|
|
84
|
+
'--os-volume-api-version ' + self.API_VERSION + ' volume group',
|
|
85
|
+
group_id,
|
|
86
|
+
name_field='ID',
|
|
87
|
+
)
|
|
88
|
+
self.addCleanup(
|
|
89
|
+
self.openstack,
|
|
90
|
+
'--os-volume-api-version '
|
|
91
|
+
+ self.API_VERSION
|
|
92
|
+
+ ' volume group delete '
|
|
93
|
+
+ group_id,
|
|
94
|
+
fail_ok=True,
|
|
95
|
+
)
|
|
96
|
+
self.assertIsNotNone(group_id)
|
|
97
|
+
self.assertEqual(name, cmd_output['Name'])
|
|
98
|
+
self.assertEqual(description, cmd_output['Description'])
|
|
99
|
+
self.assertEqual(self.GROUP_TYPE_ID, cmd_output['Group Type'])
|
|
100
|
+
self.assertIn(self.VOLUME_TYPE_ID, cmd_output['Volume Types'])
|
|
101
|
+
|
|
102
|
+
# show volume group
|
|
103
|
+
cmd_output = self.openstack(
|
|
104
|
+
'--os-volume-api-version '
|
|
105
|
+
+ self.API_VERSION
|
|
106
|
+
+ ' volume group show '
|
|
107
|
+
+ group_id,
|
|
108
|
+
parse_output=True,
|
|
109
|
+
)
|
|
110
|
+
self.assertEqual(group_id, cmd_output['ID'])
|
|
111
|
+
self.assertEqual(name, cmd_output['Name'])
|
|
112
|
+
self.assertEqual(description, cmd_output['Description'])
|
|
113
|
+
|
|
114
|
+
# list volume group
|
|
115
|
+
cmd_output = self.openstack(
|
|
116
|
+
'--os-volume-api-version '
|
|
117
|
+
+ self.API_VERSION
|
|
118
|
+
+ ' volume group list',
|
|
119
|
+
parse_output=True,
|
|
120
|
+
)
|
|
121
|
+
self.assertIn(group_id, [group['ID'] for group in cmd_output])
|
|
122
|
+
self.assertIn(name, [group['Name'] for group in cmd_output])
|
|
123
|
+
|
|
124
|
+
# set volume group
|
|
125
|
+
new_name = uuid.uuid4().hex
|
|
126
|
+
new_description = 'description-' + uuid.uuid4().hex
|
|
127
|
+
self.openstack(
|
|
128
|
+
'--os-volume-api-version '
|
|
129
|
+
+ self.API_VERSION
|
|
130
|
+
+ ' volume group set '
|
|
131
|
+
+ '--name '
|
|
132
|
+
+ new_name
|
|
133
|
+
+ ' --description '
|
|
134
|
+
+ new_description
|
|
135
|
+
+ ' '
|
|
136
|
+
+ group_id,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
# show updated volume group
|
|
140
|
+
cmd_output = self.openstack(
|
|
141
|
+
'--os-volume-api-version '
|
|
142
|
+
+ self.API_VERSION
|
|
143
|
+
+ ' volume group show '
|
|
144
|
+
+ group_id,
|
|
145
|
+
parse_output=True,
|
|
146
|
+
)
|
|
147
|
+
self.assertEqual(group_id, cmd_output['ID'])
|
|
148
|
+
self.assertEqual(new_name, cmd_output['Name'])
|
|
149
|
+
self.assertEqual(new_description, cmd_output['Description'])
|
|
150
|
+
|
|
151
|
+
# delete volume group
|
|
152
|
+
raw_output = self.openstack(
|
|
153
|
+
'--os-volume-api-version '
|
|
154
|
+
+ self.API_VERSION
|
|
155
|
+
+ ' volume group delete '
|
|
156
|
+
+ group_id,
|
|
157
|
+
)
|
|
158
|
+
self.assertOutput('', raw_output)
|
|
159
|
+
self.wait_for_delete(
|
|
160
|
+
'--os-volume-api-version ' + self.API_VERSION + ' volume group',
|
|
161
|
+
group_id,
|
|
162
|
+
name_field='ID',
|
|
163
|
+
)
|
|
@@ -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.v3 import common
|
|
@@ -18,24 +19,27 @@ from openstackclient.tests.functional.volume.v3 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 test volume used by all snapshot tests
|
|
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()
|
|
@@ -47,7 +51,7 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
47
51
|
cmd_output = self.openstack(
|
|
48
52
|
'volume snapshot create '
|
|
49
53
|
+ '--volume '
|
|
50
|
-
+ self.
|
|
54
|
+
+ self.VOLUME_NAME
|
|
51
55
|
+ ' --description aaaa '
|
|
52
56
|
+ '--property Alpha=a '
|
|
53
57
|
+ name,
|
|
@@ -83,7 +87,7 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
83
87
|
|
|
84
88
|
# list volume snapshot --volume
|
|
85
89
|
cmd_output = self.openstack(
|
|
86
|
-
'volume snapshot list ' + '--volume ' + self.
|
|
90
|
+
'volume snapshot list ' + '--volume ' + self.VOLUME_NAME,
|
|
87
91
|
parse_output=True,
|
|
88
92
|
)
|
|
89
93
|
names = [x["Name"] for x in cmd_output]
|
|
@@ -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',
|