python-openstackclient 6.6.0__py3-none-any.whl → 7.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/api/api.py +7 -8
- openstackclient/api/compute_v2.py +352 -638
- openstackclient/api/image_v1.py +1 -1
- openstackclient/api/object_store_v1.py +3 -4
- openstackclient/common/availability_zone.py +1 -1
- openstackclient/common/clientmanager.py +16 -4
- openstackclient/common/configuration.py +1 -1
- openstackclient/common/extension.py +1 -1
- openstackclient/common/limits.py +66 -32
- openstackclient/common/module.py +3 -3
- openstackclient/common/progressbar.py +2 -2
- openstackclient/common/project_cleanup.py +5 -2
- openstackclient/common/quota.py +281 -410
- openstackclient/common/versions.py +1 -1
- openstackclient/compute/client.py +7 -116
- openstackclient/compute/v2/agent.py +75 -49
- openstackclient/compute/v2/aggregate.py +9 -9
- openstackclient/compute/v2/console.py +2 -2
- openstackclient/compute/v2/flavor.py +6 -6
- openstackclient/compute/v2/host.py +38 -33
- openstackclient/compute/v2/hypervisor.py +4 -3
- openstackclient/compute/v2/keypair.py +7 -8
- openstackclient/compute/v2/server.py +478 -396
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_group.py +4 -4
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +3 -4
- openstackclient/compute/v2/service.py +4 -4
- openstackclient/compute/v2/usage.py +3 -3
- openstackclient/identity/common.py +34 -0
- openstackclient/identity/v2_0/catalog.py +2 -2
- openstackclient/identity/v2_0/ec2creds.py +4 -4
- openstackclient/identity/v2_0/endpoint.py +4 -4
- openstackclient/identity/v2_0/project.py +6 -6
- openstackclient/identity/v2_0/role.py +5 -5
- openstackclient/identity/v2_0/role_assignment.py +1 -1
- openstackclient/identity/v2_0/service.py +4 -4
- openstackclient/identity/v2_0/token.py +2 -2
- openstackclient/identity/v2_0/user.py +7 -7
- openstackclient/identity/v3/access_rule.py +3 -3
- openstackclient/identity/v3/application_credential.py +127 -45
- openstackclient/identity/v3/catalog.py +2 -2
- openstackclient/identity/v3/consumer.py +4 -4
- openstackclient/identity/v3/credential.py +5 -5
- openstackclient/identity/v3/domain.py +5 -5
- openstackclient/identity/v3/ec2creds.py +4 -4
- openstackclient/identity/v3/endpoint.py +7 -7
- openstackclient/identity/v3/endpoint_group.py +8 -10
- openstackclient/identity/v3/federation_protocol.py +5 -5
- openstackclient/identity/v3/group.py +8 -8
- openstackclient/identity/v3/identity_provider.py +5 -5
- openstackclient/identity/v3/implied_role.py +3 -3
- openstackclient/identity/v3/limit.py +5 -5
- openstackclient/identity/v3/mapping.py +5 -5
- openstackclient/identity/v3/policy.py +5 -5
- openstackclient/identity/v3/project.py +5 -5
- openstackclient/identity/v3/region.py +5 -5
- openstackclient/identity/v3/registered_limit.py +5 -5
- openstackclient/identity/v3/role.py +7 -7
- openstackclient/identity/v3/role_assignment.py +92 -140
- openstackclient/identity/v3/service.py +64 -34
- openstackclient/identity/v3/service_provider.py +4 -4
- openstackclient/identity/v3/tag.py +2 -2
- openstackclient/identity/v3/token.py +5 -5
- openstackclient/identity/v3/trust.py +3 -3
- openstackclient/identity/v3/user.py +144 -80
- openstackclient/image/client.py +4 -4
- openstackclient/image/v1/image.py +8 -9
- openstackclient/image/v2/cache.py +12 -10
- openstackclient/image/v2/metadef_objects.py +44 -0
- openstackclient/image/v2/metadef_resource_type_association.py +189 -0
- openstackclient/image/v2/task.py +1 -1
- openstackclient/network/common.py +6 -5
- openstackclient/network/utils.py +2 -2
- openstackclient/network/v2/address_group.py +6 -6
- openstackclient/network/v2/address_scope.py +5 -5
- openstackclient/network/v2/default_security_group_rule.py +1 -1
- openstackclient/network/v2/floating_ip.py +8 -10
- openstackclient/network/v2/floating_ip_pool.py +6 -15
- openstackclient/network/v2/floating_ip_port_forwarding.py +5 -13
- openstackclient/network/v2/ip_availability.py +2 -2
- openstackclient/network/v2/l3_conntrack_helper.py +5 -5
- openstackclient/network/v2/network.py +8 -8
- openstackclient/network/v2/network_agent.py +8 -8
- openstackclient/network/v2/network_auto_allocated_topology.py +2 -2
- openstackclient/network/v2/network_flavor.py +6 -8
- openstackclient/network/v2/network_flavor_profile.py +4 -4
- openstackclient/network/v2/network_meter.py +3 -3
- openstackclient/network/v2/network_meter_rule.py +3 -3
- openstackclient/network/v2/network_qos_policy.py +5 -5
- openstackclient/network/v2/network_qos_rule.py +9 -9
- openstackclient/network/v2/network_qos_rule_type.py +1 -1
- openstackclient/network/v2/network_rbac.py +5 -5
- openstackclient/network/v2/network_segment.py +5 -5
- openstackclient/network/v2/network_segment_range.py +7 -7
- openstackclient/network/v2/network_trunk.py +7 -7
- openstackclient/network/v2/port.py +26 -12
- openstackclient/network/v2/router.py +403 -54
- openstackclient/network/v2/security_group.py +18 -14
- openstackclient/network/v2/security_group_rule.py +18 -15
- openstackclient/network/v2/subnet.py +15 -8
- openstackclient/network/v2/subnet_pool.py +6 -6
- openstackclient/object/v1/account.py +2 -2
- openstackclient/object/v1/container.py +7 -7
- openstackclient/object/v1/object.py +7 -7
- openstackclient/shell.py +4 -6
- openstackclient/tests/functional/base.py +1 -1
- openstackclient/tests/functional/common/test_extension.py +1 -1
- openstackclient/tests/functional/common/test_help.py +2 -2
- openstackclient/tests/functional/common/test_module.py +1 -1
- openstackclient/tests/functional/common/test_quota.py +43 -61
- openstackclient/tests/functional/compute/v2/common.py +2 -2
- openstackclient/tests/functional/compute/v2/test_flavor.py +2 -2
- openstackclient/tests/functional/compute/v2/test_keypair.py +1 -1
- openstackclient/tests/functional/compute/v2/test_server.py +5 -5
- openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
- openstackclient/tests/functional/identity/v2/common.py +3 -3
- openstackclient/tests/functional/identity/v3/common.py +14 -6
- openstackclient/tests/functional/identity/v3/test_application_credential.py +13 -19
- openstackclient/tests/functional/identity/v3/test_domain.py +1 -3
- openstackclient/tests/functional/identity/v3/test_endpoint.py +1 -1
- openstackclient/tests/functional/identity/v3/test_idp.py +1 -1
- openstackclient/tests/functional/identity/v3/test_limit.py +2 -2
- openstackclient/tests/functional/identity/v3/test_region.py +1 -3
- openstackclient/tests/functional/identity/v3/test_registered_limit.py +1 -1
- openstackclient/tests/functional/identity/v3/test_role.py +2 -2
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +210 -0
- openstackclient/tests/functional/identity/v3/test_service.py +4 -6
- openstackclient/tests/functional/identity/v3/test_service_provider.py +1 -3
- openstackclient/tests/functional/image/base.py +1 -1
- openstackclient/tests/functional/image/v2/test_image.py +1 -1
- openstackclient/tests/functional/image/v2/test_info.py +1 -1
- openstackclient/tests/functional/network/v2/common.py +4 -6
- openstackclient/tests/functional/network/v2/test_network.py +5 -3
- openstackclient/tests/functional/network/v2/test_network_agent.py +7 -5
- openstackclient/tests/functional/network/v2/test_network_qos_rule.py +4 -4
- openstackclient/tests/functional/network/v2/test_port.py +11 -7
- openstackclient/tests/functional/network/v2/test_router.py +2 -2
- openstackclient/tests/functional/object/v1/common.py +1 -1
- openstackclient/tests/functional/object/v1/test_container.py +3 -3
- openstackclient/tests/functional/object/v1/test_object.py +9 -13
- openstackclient/tests/functional/volume/base.py +1 -1
- openstackclient/tests/functional/volume/v1/test_service.py +1 -1
- openstackclient/tests/functional/volume/v1/test_snapshot.py +2 -2
- openstackclient/tests/functional/volume/v1/test_transfer_request.py +2 -2
- openstackclient/tests/functional/volume/v1/test_volume_type.py +1 -1
- openstackclient/tests/functional/volume/v2/test_service.py +2 -2
- openstackclient/tests/functional/volume/v2/test_volume_backup.py +2 -2
- openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +2 -2
- openstackclient/tests/functional/volume/v2/test_volume_type.py +1 -1
- openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +2 -2
- openstackclient/tests/functional/volume/v3/test_volume_type.py +1 -1
- openstackclient/tests/unit/api/fakes.py +1 -1
- openstackclient/tests/unit/api/test_api.py +2 -2
- openstackclient/tests/unit/api/test_compute_v2.py +522 -707
- openstackclient/tests/unit/api/test_image_v1.py +1 -1
- openstackclient/tests/unit/api/test_image_v2.py +1 -1
- openstackclient/tests/unit/api/test_object_store_v1.py +4 -4
- openstackclient/tests/unit/common/test_limits.py +73 -35
- openstackclient/tests/unit/common/test_logs.py +2 -2
- openstackclient/tests/unit/common/test_module.py +4 -2
- openstackclient/tests/unit/common/test_project_cleanup.py +31 -6
- openstackclient/tests/unit/common/test_quota.py +490 -630
- openstackclient/tests/unit/compute/v2/fakes.py +37 -286
- openstackclient/tests/unit/compute/v2/test_agent.py +189 -147
- openstackclient/tests/unit/compute/v2/test_aggregate.py +18 -16
- openstackclient/tests/unit/compute/v2/test_console.py +4 -5
- openstackclient/tests/unit/compute/v2/test_flavor.py +59 -68
- openstackclient/tests/unit/compute/v2/test_host.py +83 -54
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +28 -31
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +65 -50
- openstackclient/tests/unit/compute/v2/test_server.py +2895 -2459
- openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_event.py +14 -39
- openstackclient/tests/unit/compute/v2/test_server_group.py +28 -29
- openstackclient/tests/unit/compute/v2/test_server_migration.py +43 -68
- openstackclient/tests/unit/compute/v2/test_server_volume.py +17 -34
- openstackclient/tests/unit/compute/v2/test_service.py +34 -52
- openstackclient/tests/unit/compute/v2/test_usage.py +4 -4
- openstackclient/tests/unit/fakes.py +11 -11
- openstackclient/tests/unit/identity/v2_0/fakes.py +27 -10
- openstackclient/tests/unit/identity/v2_0/test_catalog.py +3 -3
- openstackclient/tests/unit/identity/v2_0/test_endpoint.py +7 -7
- openstackclient/tests/unit/identity/v2_0/test_project.py +8 -8
- openstackclient/tests/unit/identity/v2_0/test_role.py +10 -10
- openstackclient/tests/unit/identity/v2_0/test_role_assignment.py +4 -4
- openstackclient/tests/unit/identity/v2_0/test_service.py +6 -6
- openstackclient/tests/unit/identity/v2_0/test_token.py +4 -4
- openstackclient/tests/unit/identity/v2_0/test_user.py +8 -8
- openstackclient/tests/unit/identity/v3/fakes.py +59 -20
- openstackclient/tests/unit/identity/v3/test_access_rule.py +5 -5
- openstackclient/tests/unit/identity/v3/test_application_credential.py +212 -235
- openstackclient/tests/unit/identity/v3/test_catalog.py +3 -3
- openstackclient/tests/unit/identity/v3/test_consumer.py +7 -8
- openstackclient/tests/unit/identity/v3/test_credential.py +9 -9
- openstackclient/tests/unit/identity/v3/test_domain.py +8 -8
- openstackclient/tests/unit/identity/v3/test_endpoint.py +13 -13
- openstackclient/tests/unit/identity/v3/test_endpoint_group.py +12 -14
- openstackclient/tests/unit/identity/v3/test_group.py +12 -12
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +8 -8
- openstackclient/tests/unit/identity/v3/test_implied_role.py +5 -5
- openstackclient/tests/unit/identity/v3/test_limit.py +7 -7
- openstackclient/tests/unit/identity/v3/test_mappings.py +7 -7
- openstackclient/tests/unit/identity/v3/test_oauth.py +5 -5
- openstackclient/tests/unit/identity/v3/test_project.py +16 -16
- openstackclient/tests/unit/identity/v3/test_protocol.py +7 -7
- openstackclient/tests/unit/identity/v3/test_region.py +7 -7
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +12 -13
- openstackclient/tests/unit/identity/v3/test_role.py +13 -13
- openstackclient/tests/unit/identity/v3/test_role_assignment.py +410 -331
- openstackclient/tests/unit/identity/v3/test_service.py +93 -97
- openstackclient/tests/unit/identity/v3/test_service_provider.py +7 -7
- openstackclient/tests/unit/identity/v3/test_token.py +4 -4
- openstackclient/tests/unit/identity/v3/test_trust.py +9 -9
- openstackclient/tests/unit/identity/v3/test_unscoped_saml.py +4 -4
- openstackclient/tests/unit/identity/v3/test_user.py +299 -327
- openstackclient/tests/unit/image/v1/test_image.py +6 -6
- openstackclient/tests/unit/image/v2/fakes.py +46 -9
- openstackclient/tests/unit/image/v2/test_cache.py +2 -2
- openstackclient/tests/unit/image/v2/test_image.py +3 -3
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +62 -0
- openstackclient/tests/unit/image/v2/test_metadef_resource_type_association.py +131 -0
- openstackclient/tests/unit/integ/base.py +1 -1
- openstackclient/tests/unit/integ/cli/test_project.py +4 -4
- openstackclient/tests/unit/integ/cli/test_shell.py +7 -7
- openstackclient/tests/unit/network/test_common.py +12 -21
- openstackclient/tests/unit/network/v2/fakes.py +64 -130
- openstackclient/tests/unit/network/v2/test_address_group.py +15 -15
- openstackclient/tests/unit/network/v2/test_address_scope.py +13 -13
- openstackclient/tests/unit/network/v2/test_default_security_group_rule.py +49 -27
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +40 -38
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +15 -15
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +4 -7
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +3 -5
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +11 -11
- openstackclient/tests/unit/network/v2/test_ip_availability.py +6 -6
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +11 -21
- openstackclient/tests/unit/network/v2/test_local_ip.py +7 -7
- openstackclient/tests/unit/network/v2/test_local_ip_association.py +3 -5
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +13 -13
- openstackclient/tests/unit/network/v2/test_network.py +23 -28
- openstackclient/tests/unit/network/v2/test_network_agent.py +17 -21
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +8 -8
- openstackclient/tests/unit/network/v2/test_network_compute.py +66 -65
- openstackclient/tests/unit/network/v2/test_network_flavor.py +17 -19
- openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +13 -13
- openstackclient/tests/unit/network/v2/test_network_meter.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_meter_rule.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +11 -21
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +51 -77
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +5 -9
- openstackclient/tests/unit/network/v2/test_network_rbac.py +12 -12
- openstackclient/tests/unit/network/v2/test_network_segment.py +11 -15
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +11 -13
- openstackclient/tests/unit/network/v2/test_network_service_provider.py +3 -5
- openstackclient/tests/unit/network/v2/test_network_trunk.py +11 -11
- openstackclient/tests/unit/network/v2/test_port.py +22 -25
- openstackclient/tests/unit/network/v2/test_router.py +721 -51
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +65 -49
- openstackclient/tests/unit/network/v2/test_security_group_network.py +15 -15
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +57 -45
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +11 -19
- openstackclient/tests/unit/network/v2/test_subnet.py +29 -25
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +15 -15
- openstackclient/tests/unit/object/v1/fakes.py +1 -1
- openstackclient/tests/unit/object/v1/test_container.py +5 -5
- openstackclient/tests/unit/object/v1/test_container_all.py +6 -6
- openstackclient/tests/unit/object/v1/test_object.py +3 -3
- openstackclient/tests/unit/object/v1/test_object_all.py +5 -5
- openstackclient/tests/unit/test_shell.py +5 -5
- openstackclient/tests/unit/utils.py +4 -1
- openstackclient/tests/unit/volume/test_find_resource.py +2 -2
- openstackclient/tests/unit/volume/v1/fakes.py +5 -6
- openstackclient/tests/unit/volume/v1/test_volume.py +5 -4
- openstackclient/tests/unit/volume/v2/fakes.py +39 -259
- openstackclient/tests/unit/volume/v2/test_consistency_group_snapshot.py +5 -5
- openstackclient/tests/unit/volume/v2/test_qos_specs.py +9 -9
- openstackclient/tests/unit/volume/v2/test_volume.py +21 -87
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +7 -368
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +0 -44
- openstackclient/tests/unit/volume/v2/test_volume_type.py +6 -87
- openstackclient/tests/unit/volume/v3/fakes.py +505 -22
- openstackclient/tests/unit/volume/v3/test_block_storage_cleanup.py +2 -3
- openstackclient/tests/unit/volume/v3/test_block_storage_cluster.py +10 -11
- openstackclient/tests/unit/volume/v3/test_block_storage_log_level.py +10 -6
- openstackclient/tests/unit/volume/v3/test_block_storage_manage.py +25 -17
- openstackclient/tests/unit/volume/v3/test_block_storage_resource_filter.py +6 -32
- openstackclient/tests/unit/volume/v3/test_service.py +271 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +2177 -33
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +48 -52
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +892 -0
- openstackclient/tests/unit/volume/v3/test_volume_group.py +19 -20
- openstackclient/tests/unit/volume/v3/test_volume_group_snapshot.py +14 -34
- openstackclient/tests/unit/volume/v3/test_volume_group_type.py +13 -16
- openstackclient/tests/unit/volume/v3/test_volume_message.py +10 -11
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +161 -0
- openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +425 -0
- openstackclient/tests/unit/volume/v3/test_volume_type.py +1109 -0
- openstackclient/volume/v1/qos_specs.py +7 -7
- openstackclient/volume/v1/service.py +2 -2
- openstackclient/volume/v1/volume.py +12 -12
- openstackclient/volume/v1/volume_backup.py +7 -7
- openstackclient/volume/v1/volume_snapshot.py +8 -8
- openstackclient/volume/v1/volume_transfer_request.py +5 -5
- openstackclient/volume/v1/volume_type.py +7 -7
- openstackclient/volume/v2/backup_record.py +2 -2
- openstackclient/volume/v2/consistency_group.py +7 -9
- openstackclient/volume/v2/consistency_group_snapshot.py +4 -12
- openstackclient/volume/v2/qos_specs.py +7 -7
- openstackclient/volume/v2/service.py +2 -2
- openstackclient/volume/v2/volume.py +80 -80
- openstackclient/volume/v2/volume_backend.py +2 -2
- openstackclient/volume/v2/volume_backup.py +7 -217
- openstackclient/volume/v2/volume_host.py +2 -2
- openstackclient/volume/v2/volume_snapshot.py +8 -8
- openstackclient/volume/v2/volume_transfer_request.py +5 -37
- openstackclient/volume/v2/volume_type.py +7 -89
- openstackclient/volume/v3/service.py +56 -0
- openstackclient/volume/v3/volume.py +971 -0
- openstackclient/volume/v3/volume_attachment.py +31 -29
- openstackclient/volume/v3/volume_backup.py +670 -0
- openstackclient/volume/v3/volume_message.py +1 -1
- openstackclient/volume/v3/volume_snapshot.py +97 -0
- openstackclient/volume/v3/volume_transfer_request.py +233 -0
- openstackclient/volume/v3/volume_type.py +967 -0
- {python_openstackclient-6.6.0.dist-info → python_openstackclient-7.0.0.dist-info}/AUTHORS +4 -0
- {python_openstackclient-6.6.0.dist-info → python_openstackclient-7.0.0.dist-info}/METADATA +3 -3
- python_openstackclient-7.0.0.dist-info/RECORD +502 -0
- {python_openstackclient-6.6.0.dist-info → python_openstackclient-7.0.0.dist-info}/entry_points.txt +33 -27
- python_openstackclient-7.0.0.dist-info/pbr.json +1 -0
- python_openstackclient-6.6.0.dist-info/RECORD +0 -489
- python_openstackclient-6.6.0.dist-info/pbr.json +0 -1
- {python_openstackclient-6.6.0.dist-info → python_openstackclient-7.0.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-6.6.0.dist-info → python_openstackclient-7.0.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-6.6.0.dist-info → python_openstackclient-7.0.0.dist-info}/top_level.txt +0 -0
|
@@ -39,40 +39,6 @@ class QuotaTests(base.TestCase):
|
|
|
39
39
|
cls.openstack(f'project delete {cls.PROJECT_NAME}')
|
|
40
40
|
super().tearDownClass()
|
|
41
41
|
|
|
42
|
-
def test_quota_list_details_compute(self):
|
|
43
|
-
expected_headers = ["Resource", "In Use", "Reserved", "Limit"]
|
|
44
|
-
cmd_output = self.openstack(
|
|
45
|
-
'quota list --detail --compute',
|
|
46
|
-
parse_output=True,
|
|
47
|
-
)
|
|
48
|
-
self.assertIsNotNone(cmd_output)
|
|
49
|
-
resources = []
|
|
50
|
-
for row in cmd_output:
|
|
51
|
-
row_headers = [str(r) for r in row.keys()]
|
|
52
|
-
self.assertEqual(sorted(expected_headers), sorted(row_headers))
|
|
53
|
-
resources.append(row['Resource'])
|
|
54
|
-
# Ensure that returned quota is compute quota
|
|
55
|
-
self.assertIn("instances", resources)
|
|
56
|
-
# and that there is no network quota here
|
|
57
|
-
self.assertNotIn("networks", resources)
|
|
58
|
-
|
|
59
|
-
def test_quota_list_details_network(self):
|
|
60
|
-
expected_headers = ["Resource", "In Use", "Reserved", "Limit"]
|
|
61
|
-
cmd_output = self.openstack(
|
|
62
|
-
'quota list --detail --network',
|
|
63
|
-
parse_output=True,
|
|
64
|
-
)
|
|
65
|
-
self.assertIsNotNone(cmd_output)
|
|
66
|
-
resources = []
|
|
67
|
-
for row in cmd_output:
|
|
68
|
-
row_headers = [str(r) for r in row.keys()]
|
|
69
|
-
self.assertEqual(sorted(expected_headers), sorted(row_headers))
|
|
70
|
-
resources.append(row['Resource'])
|
|
71
|
-
# Ensure that returned quota is network quota
|
|
72
|
-
self.assertIn("networks", resources)
|
|
73
|
-
# and that there is no compute quota here
|
|
74
|
-
self.assertNotIn("instances", resources)
|
|
75
|
-
|
|
76
42
|
def test_quota_list_network_option(self):
|
|
77
43
|
if not self.haz_network:
|
|
78
44
|
self.skipTest("No Network service present")
|
|
@@ -155,41 +121,23 @@ class QuotaTests(base.TestCase):
|
|
|
155
121
|
if self.haz_network:
|
|
156
122
|
self.assertTrue(cmd_output["routers"] >= 0)
|
|
157
123
|
|
|
158
|
-
def
|
|
124
|
+
def test_quota_set_default(self):
|
|
159
125
|
self.openstack(
|
|
160
|
-
'quota set --key-pairs 33 --snapshots 43
|
|
126
|
+
'quota set --key-pairs 33 --snapshots 43 --class default'
|
|
161
127
|
)
|
|
162
128
|
cmd_output = self.openstack(
|
|
163
|
-
'quota show --
|
|
164
|
-
parse_output=True,
|
|
165
|
-
)
|
|
166
|
-
self.assertIsNotNone(cmd_output)
|
|
167
|
-
cmd_output = {x['Resource']: x['Limit'] for x in cmd_output}
|
|
168
|
-
self.assertEqual(
|
|
169
|
-
33,
|
|
170
|
-
cmd_output["key-pairs"],
|
|
171
|
-
)
|
|
172
|
-
self.assertEqual(
|
|
173
|
-
43,
|
|
174
|
-
cmd_output["snapshots"],
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
# Check default quota class
|
|
178
|
-
cmd_output = self.openstack(
|
|
179
|
-
'quota show --class',
|
|
129
|
+
'quota show --default',
|
|
180
130
|
parse_output=True,
|
|
181
131
|
)
|
|
182
132
|
self.assertIsNotNone(cmd_output)
|
|
183
|
-
# We don't necessarily know the default quotas, we're checking the
|
|
184
|
-
# returned attributes
|
|
185
133
|
cmd_output = {x['Resource']: x['Limit'] for x in cmd_output}
|
|
186
|
-
self.
|
|
187
|
-
self.
|
|
134
|
+
self.assertEqual(33, cmd_output["key-pairs"])
|
|
135
|
+
self.assertEqual(43, cmd_output["snapshots"])
|
|
188
136
|
|
|
189
137
|
def _restore_quota_limit(self, resource, limit, project):
|
|
190
|
-
self.openstack('quota set
|
|
138
|
+
self.openstack(f'quota set --{resource} {limit} {project}')
|
|
191
139
|
|
|
192
|
-
def
|
|
140
|
+
def test_quota_set_network(self):
|
|
193
141
|
if not self.haz_network:
|
|
194
142
|
self.skipTest('No Network service present')
|
|
195
143
|
if not self.is_extension_enabled('quota-check-limit'):
|
|
@@ -224,10 +172,10 @@ class QuotaTests(base.TestCase):
|
|
|
224
172
|
self.assertRaises(
|
|
225
173
|
exceptions.CommandFailed,
|
|
226
174
|
self.openstack,
|
|
227
|
-
'quota set --networks 1
|
|
175
|
+
'quota set --networks 1 ' + self.PROJECT_NAME,
|
|
228
176
|
)
|
|
229
177
|
|
|
230
|
-
def
|
|
178
|
+
def test_quota_set_network_with_force(self):
|
|
231
179
|
self.skipTest('story 2010110')
|
|
232
180
|
if not self.haz_network:
|
|
233
181
|
self.skipTest('No Network service present')
|
|
@@ -274,3 +222,37 @@ class QuotaTests(base.TestCase):
|
|
|
274
222
|
)
|
|
275
223
|
self.assertIsNotNone(cmd_output)
|
|
276
224
|
self.assertEqual(1, cmd_output[0]['Networks'])
|
|
225
|
+
|
|
226
|
+
def test_quota_show(self):
|
|
227
|
+
expected_headers = ["Resource", "Limit"]
|
|
228
|
+
cmd_output = self.openstack(
|
|
229
|
+
'quota show',
|
|
230
|
+
parse_output=True,
|
|
231
|
+
)
|
|
232
|
+
self.assertIsNotNone(cmd_output)
|
|
233
|
+
resources = []
|
|
234
|
+
for row in cmd_output:
|
|
235
|
+
row_headers = [str(r) for r in row.keys()]
|
|
236
|
+
self.assertEqual(sorted(expected_headers), sorted(row_headers))
|
|
237
|
+
resources.append(row['Resource'])
|
|
238
|
+
# Ensure that returned quota has network quota...
|
|
239
|
+
self.assertIn("networks", resources)
|
|
240
|
+
# ...and compute quota
|
|
241
|
+
self.assertIn("instances", resources)
|
|
242
|
+
|
|
243
|
+
def test_quota_show_usage_option(self):
|
|
244
|
+
expected_headers = ["Resource", "Limit", "In Use", "Reserved"]
|
|
245
|
+
cmd_output = self.openstack(
|
|
246
|
+
'quota show --usage',
|
|
247
|
+
parse_output=True,
|
|
248
|
+
)
|
|
249
|
+
self.assertIsNotNone(cmd_output)
|
|
250
|
+
resources = []
|
|
251
|
+
for row in cmd_output:
|
|
252
|
+
row_headers = [str(r) for r in row.keys()]
|
|
253
|
+
self.assertEqual(sorted(expected_headers), sorted(row_headers))
|
|
254
|
+
resources.append(row['Resource'])
|
|
255
|
+
# Ensure that returned quota has network quota...
|
|
256
|
+
self.assertIn("networks", resources)
|
|
257
|
+
# ...and compute quota
|
|
258
|
+
self.assertIn("instances", resources)
|
|
@@ -28,7 +28,7 @@ class ComputeTestCase(base.TestCase):
|
|
|
28
28
|
|
|
29
29
|
def setUp(self):
|
|
30
30
|
"""Select common resources"""
|
|
31
|
-
super(
|
|
31
|
+
super().setUp()
|
|
32
32
|
self.flavor_name = self.get_flavor()
|
|
33
33
|
self.image_name = self.get_image()
|
|
34
34
|
self.network_arg = self.get_network()
|
|
@@ -129,7 +129,7 @@ class ComputeTestCase(base.TestCase):
|
|
|
129
129
|
)
|
|
130
130
|
status = cmd_output['status']
|
|
131
131
|
if status == expected_status:
|
|
132
|
-
print('Server {} now has status {}'
|
|
132
|
+
print(f'Server {name} now has status {status}')
|
|
133
133
|
break
|
|
134
134
|
print(
|
|
135
135
|
'Server {}: Waiting for {}, current status: {}'.format(
|
|
@@ -22,7 +22,7 @@ class FlavorTests(base.TestCase):
|
|
|
22
22
|
|
|
23
23
|
@classmethod
|
|
24
24
|
def setUpClass(cls):
|
|
25
|
-
super(
|
|
25
|
+
super().setUpClass()
|
|
26
26
|
# Make a project
|
|
27
27
|
cmd_output = cls.openstack(
|
|
28
28
|
"project create --enable " + cls.PROJECT_NAME,
|
|
@@ -36,7 +36,7 @@ class FlavorTests(base.TestCase):
|
|
|
36
36
|
raw_output = cls.openstack("project delete " + cls.PROJECT_NAME)
|
|
37
37
|
cls.assertOutput('', raw_output)
|
|
38
38
|
finally:
|
|
39
|
-
super(
|
|
39
|
+
super().tearDownClass()
|
|
40
40
|
|
|
41
41
|
def test_flavor_delete(self):
|
|
42
42
|
"""Test create w/project, delete multiple"""
|
|
@@ -57,7 +57,7 @@ class KeypairTests(KeypairBase):
|
|
|
57
57
|
|
|
58
58
|
def setUp(self):
|
|
59
59
|
"""Create keypair with randomized name for tests."""
|
|
60
|
-
super(
|
|
60
|
+
super().setUp()
|
|
61
61
|
self.KPName = data_utils.rand_name('TestKeyPair')
|
|
62
62
|
self.keypair = self.keypair_create(self.KPName)
|
|
63
63
|
|
|
@@ -210,10 +210,10 @@ class ServerTests(common.ComputeTestCase):
|
|
|
210
210
|
self.flavor_name,
|
|
211
211
|
flavor['name'],
|
|
212
212
|
)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
)
|
|
213
|
+
# assume the v2.47+ output format
|
|
214
|
+
self.assertIsInstance(cmd_output['flavor'], dict)
|
|
215
|
+
self.assertIn('name', cmd_output['flavor'])
|
|
216
|
+
self.assertEqual(flavor['name'], cmd_output['flavor']['name'])
|
|
217
217
|
image = self.openstack(
|
|
218
218
|
'image show ' + self.image_name,
|
|
219
219
|
parse_output=True,
|
|
@@ -223,7 +223,7 @@ class ServerTests(common.ComputeTestCase):
|
|
|
223
223
|
image['name'],
|
|
224
224
|
)
|
|
225
225
|
self.assertEqual(
|
|
226
|
-
'
|
|
226
|
+
'{} ({})'.format(image['name'], image['id']),
|
|
227
227
|
cmd_output["image"],
|
|
228
228
|
)
|
|
229
229
|
|
|
@@ -20,7 +20,7 @@ class ServerEventTests(common.ComputeTestCase):
|
|
|
20
20
|
"""Functional tests for server event"""
|
|
21
21
|
|
|
22
22
|
def setUp(self):
|
|
23
|
-
super(
|
|
23
|
+
super().setUp()
|
|
24
24
|
|
|
25
25
|
# NOTE(dtroyer): As long as these tests are read-only we can get away
|
|
26
26
|
# with using the same server instance for all of them.
|
|
@@ -59,7 +59,7 @@ class IdentityTests(base.TestCase):
|
|
|
59
59
|
|
|
60
60
|
@classmethod
|
|
61
61
|
def setUpClass(cls):
|
|
62
|
-
super(
|
|
62
|
+
super().setUpClass()
|
|
63
63
|
# create dummy project
|
|
64
64
|
cls.project_name = data_utils.rand_name('TestProject')
|
|
65
65
|
cls.project_description = data_utils.rand_name('description')
|
|
@@ -90,10 +90,10 @@ class IdentityTests(base.TestCase):
|
|
|
90
90
|
'project delete %s' % cls.project_name
|
|
91
91
|
)
|
|
92
92
|
finally:
|
|
93
|
-
super(
|
|
93
|
+
super().tearDownClass()
|
|
94
94
|
|
|
95
95
|
def setUp(self):
|
|
96
|
-
super(
|
|
96
|
+
super().setUp()
|
|
97
97
|
# prepare v2 env
|
|
98
98
|
ver_fixture = fixtures.EnvironmentVariable(
|
|
99
99
|
'OS_IDENTITY_API_VERSION', '2.0'
|
|
@@ -33,7 +33,6 @@ class IdentityTests(base.TestCase):
|
|
|
33
33
|
'enabled',
|
|
34
34
|
'id',
|
|
35
35
|
'name',
|
|
36
|
-
'name',
|
|
37
36
|
'domain_id',
|
|
38
37
|
'default_project_id',
|
|
39
38
|
'description',
|
|
@@ -49,7 +48,7 @@ class IdentityTests(base.TestCase):
|
|
|
49
48
|
'parent_id',
|
|
50
49
|
]
|
|
51
50
|
ROLE_FIELDS = ['id', 'name', 'domain_id', 'description']
|
|
52
|
-
SERVICE_FIELDS = ['
|
|
51
|
+
SERVICE_FIELDS = ['ID', 'Enabled', 'Name', 'Type', 'Description']
|
|
53
52
|
REGION_FIELDS = ['description', 'enabled', 'parent_region', 'region']
|
|
54
53
|
ENDPOINT_FIELDS = [
|
|
55
54
|
'id',
|
|
@@ -104,6 +103,15 @@ class IdentityTests(base.TestCase):
|
|
|
104
103
|
'Implied Role ID',
|
|
105
104
|
'Implied Role Name',
|
|
106
105
|
]
|
|
106
|
+
ROLE_ASSIGNMENT_LIST_HEADERS = [
|
|
107
|
+
'Role',
|
|
108
|
+
'User',
|
|
109
|
+
'Group',
|
|
110
|
+
'Project',
|
|
111
|
+
'Domain',
|
|
112
|
+
'System',
|
|
113
|
+
'Inherited',
|
|
114
|
+
]
|
|
107
115
|
REGISTERED_LIMIT_FIELDS = [
|
|
108
116
|
'id',
|
|
109
117
|
'service_id',
|
|
@@ -141,7 +149,7 @@ class IdentityTests(base.TestCase):
|
|
|
141
149
|
|
|
142
150
|
@classmethod
|
|
143
151
|
def setUpClass(cls):
|
|
144
|
-
super(
|
|
152
|
+
super().setUpClass()
|
|
145
153
|
# create dummy domain
|
|
146
154
|
cls.domain_name = data_utils.rand_name('TestDomain')
|
|
147
155
|
cls.domain_description = data_utils.rand_name('description')
|
|
@@ -189,10 +197,10 @@ class IdentityTests(base.TestCase):
|
|
|
189
197
|
'domain delete %s' % cls.domain_name
|
|
190
198
|
)
|
|
191
199
|
finally:
|
|
192
|
-
super(
|
|
200
|
+
super().tearDownClass()
|
|
193
201
|
|
|
194
202
|
def setUp(self):
|
|
195
|
-
super(
|
|
203
|
+
super().setUp()
|
|
196
204
|
# prepare v3 env
|
|
197
205
|
ver_fixture = fixtures.EnvironmentVariable(
|
|
198
206
|
'OS_IDENTITY_API_VERSION', '3'
|
|
@@ -368,7 +376,7 @@ class IdentityTests(base.TestCase):
|
|
|
368
376
|
if add_clean_up:
|
|
369
377
|
service = self.parse_show_as_object(raw_output)
|
|
370
378
|
self.addCleanup(
|
|
371
|
-
self.openstack, 'service delete %s' % service['
|
|
379
|
+
self.openstack, 'service delete %s' % service['ID']
|
|
372
380
|
)
|
|
373
381
|
items = self.parse_show(raw_output)
|
|
374
382
|
self.assert_show_fields(items, self.SERVICE_FIELDS)
|
|
@@ -21,13 +21,13 @@ from openstackclient.tests.functional.identity.v3 import common
|
|
|
21
21
|
|
|
22
22
|
class ApplicationCredentialTests(common.IdentityTests):
|
|
23
23
|
APPLICATION_CREDENTIAL_FIELDS = [
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
24
|
+
'ID',
|
|
25
|
+
'Name',
|
|
26
|
+
'Project ID',
|
|
27
|
+
'Description',
|
|
28
|
+
'Roles',
|
|
29
|
+
'Expires At',
|
|
30
|
+
'Unrestricted',
|
|
31
31
|
]
|
|
32
32
|
APPLICATION_CREDENTIAL_LIST_HEADERS = [
|
|
33
33
|
'ID',
|
|
@@ -39,12 +39,10 @@ class ApplicationCredentialTests(common.IdentityTests):
|
|
|
39
39
|
|
|
40
40
|
def test_application_credential_create(self):
|
|
41
41
|
name = data_utils.rand_name('name')
|
|
42
|
-
raw_output = self.openstack(
|
|
43
|
-
'application credential create %(name)s' % {'name': name}
|
|
44
|
-
)
|
|
42
|
+
raw_output = self.openstack(f'application credential create {name}')
|
|
45
43
|
self.addCleanup(
|
|
46
44
|
self.openstack,
|
|
47
|
-
'application credential delete
|
|
45
|
+
f'application credential delete {name}',
|
|
48
46
|
)
|
|
49
47
|
items = self.parse_show(raw_output)
|
|
50
48
|
self.assert_show_fields(items, self.APPLICATION_CREDENTIAL_FIELDS)
|
|
@@ -145,16 +143,14 @@ class ApplicationCredentialTests(common.IdentityTests):
|
|
|
145
143
|
)
|
|
146
144
|
self.addCleanup(
|
|
147
145
|
self.openstack,
|
|
148
|
-
'application credential delete
|
|
146
|
+
f'application credential delete {name}',
|
|
149
147
|
)
|
|
150
148
|
items = self.parse_show(raw_output)
|
|
151
149
|
self.assert_show_fields(items, self.APPLICATION_CREDENTIAL_FIELDS)
|
|
152
150
|
|
|
153
151
|
def test_application_credential_delete(self):
|
|
154
152
|
name = data_utils.rand_name('name')
|
|
155
|
-
self.openstack(
|
|
156
|
-
'application credential create %(name)s' % {'name': name}
|
|
157
|
-
)
|
|
153
|
+
self.openstack(f'application credential create {name}')
|
|
158
154
|
raw_output = self.openstack(
|
|
159
155
|
'application credential delete ' '%(name)s' % {'name': name}
|
|
160
156
|
)
|
|
@@ -169,12 +165,10 @@ class ApplicationCredentialTests(common.IdentityTests):
|
|
|
169
165
|
|
|
170
166
|
def test_application_credential_show(self):
|
|
171
167
|
name = data_utils.rand_name('name')
|
|
172
|
-
raw_output = self.openstack(
|
|
173
|
-
'application credential create %(name)s' % {'name': name}
|
|
174
|
-
)
|
|
168
|
+
raw_output = self.openstack(f'application credential create {name}')
|
|
175
169
|
self.addCleanup(
|
|
176
170
|
self.openstack,
|
|
177
|
-
'application credential delete
|
|
171
|
+
f'application credential delete {name}',
|
|
178
172
|
)
|
|
179
173
|
raw_output = self.openstack(
|
|
180
174
|
'application credential show ' '%(name)s' % {'name': name}
|
|
@@ -50,9 +50,7 @@ class DomainTests(common.IdentityTests):
|
|
|
50
50
|
self.assertEqual(0, len(raw_output))
|
|
51
51
|
raw_output = self.openstack('domain set --disable %s' % domain_2)
|
|
52
52
|
self.assertEqual(0, len(raw_output))
|
|
53
|
-
raw_output = self.openstack(
|
|
54
|
-
'domain delete %s %s' % (domain_1, domain_2)
|
|
55
|
-
)
|
|
53
|
+
raw_output = self.openstack(f'domain delete {domain_1} {domain_2}')
|
|
56
54
|
self.assertEqual(0, len(raw_output))
|
|
57
55
|
|
|
58
56
|
def test_domain_delete_failure(self):
|
|
@@ -30,7 +30,7 @@ class EndpointTests(common.IdentityTests):
|
|
|
30
30
|
endpoint_1 = self._create_dummy_endpoint(add_clean_up=False)
|
|
31
31
|
endpoint_2 = self._create_dummy_endpoint(add_clean_up=False)
|
|
32
32
|
raw_output = self.openstack(
|
|
33
|
-
'endpoint delete
|
|
33
|
+
f'endpoint delete {endpoint_1} {endpoint_2}'
|
|
34
34
|
)
|
|
35
35
|
self.assertEqual(0, len(raw_output))
|
|
36
36
|
|
|
@@ -32,7 +32,7 @@ class IdentityProviderTests(common.IdentityTests):
|
|
|
32
32
|
idp_1 = self._create_dummy_idp(add_clean_up=False)
|
|
33
33
|
idp_2 = self._create_dummy_idp(add_clean_up=False)
|
|
34
34
|
raw_output = self.openstack(
|
|
35
|
-
'identity provider delete
|
|
35
|
+
f'identity provider delete {idp_1} {idp_2}'
|
|
36
36
|
)
|
|
37
37
|
self.assertEqual(0, len(raw_output))
|
|
38
38
|
|
|
@@ -32,7 +32,7 @@ class LimitTestCase(common.IdentityTests):
|
|
|
32
32
|
|
|
33
33
|
raw_output = self.openstack('service show %s' % service_id)
|
|
34
34
|
items = self.parse_show(raw_output)
|
|
35
|
-
service_name = self._extract_value_from_items('
|
|
35
|
+
service_name = self._extract_value_from_items('Name', items)
|
|
36
36
|
|
|
37
37
|
project_name = self._create_dummy_project()
|
|
38
38
|
raw_output = self.openstack('project show %s' % project_name)
|
|
@@ -73,7 +73,7 @@ class LimitTestCase(common.IdentityTests):
|
|
|
73
73
|
|
|
74
74
|
raw_output = self.openstack('service show %s' % service_id)
|
|
75
75
|
items = self.parse_show(raw_output)
|
|
76
|
-
service_name = self._extract_value_from_items('
|
|
76
|
+
service_name = self._extract_value_from_items('Name', items)
|
|
77
77
|
|
|
78
78
|
project_name = self._create_dummy_project()
|
|
79
79
|
|
|
@@ -29,9 +29,7 @@ class RegionTests(common.IdentityTests):
|
|
|
29
29
|
def test_region_multi_delete(self):
|
|
30
30
|
region_1 = self._create_dummy_region(add_clean_up=False)
|
|
31
31
|
region_2 = self._create_dummy_region(add_clean_up=False)
|
|
32
|
-
raw_output = self.openstack(
|
|
33
|
-
'region delete %s %s' % (region_1, region_2)
|
|
34
|
-
)
|
|
32
|
+
raw_output = self.openstack(f'region delete {region_1} {region_2}')
|
|
35
33
|
self.assertEqual(0, len(raw_output))
|
|
36
34
|
|
|
37
35
|
def test_region_list(self):
|
|
@@ -29,7 +29,7 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|
|
29
29
|
'service show' ' %(service_name)s' % {'service_name': service_name}
|
|
30
30
|
)
|
|
31
31
|
service_items = self.parse_show(raw_output)
|
|
32
|
-
service_id = self._extract_value_from_items('
|
|
32
|
+
service_id = self._extract_value_from_items('ID', service_items)
|
|
33
33
|
|
|
34
34
|
raw_output = self.openstack(
|
|
35
35
|
'registered limit create'
|
|
@@ -55,7 +55,7 @@ class RoleTests(common.IdentityTests):
|
|
|
55
55
|
role_name = self._create_dummy_role()
|
|
56
56
|
new_role_name = data_utils.rand_name('NewTestRole')
|
|
57
57
|
raw_output = self.openstack(
|
|
58
|
-
'role set --name
|
|
58
|
+
f'role set --name {new_role_name} {role_name}'
|
|
59
59
|
)
|
|
60
60
|
self.assertEqual(0, len(raw_output))
|
|
61
61
|
raw_output = self.openstack('role show %s' % new_role_name)
|
|
@@ -66,7 +66,7 @@ class RoleTests(common.IdentityTests):
|
|
|
66
66
|
role_name = self._create_dummy_role()
|
|
67
67
|
description = data_utils.rand_name("NewDescription")
|
|
68
68
|
raw_output = self.openstack(
|
|
69
|
-
'role set --description
|
|
69
|
+
f'role set --description {description} {role_name}'
|
|
70
70
|
)
|
|
71
71
|
self.assertEqual(0, len(raw_output))
|
|
72
72
|
raw_output = self.openstack('role show %s' % role_name)
|