python-openstackclient 6.6.1__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 +4 -4
- 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.1.dist-info → python_openstackclient-7.0.0.dist-info}/AUTHORS +4 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.0.0.dist-info}/METADATA +2 -3
- python_openstackclient-7.0.0.dist-info/RECORD +502 -0
- {python_openstackclient-6.6.1.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.1.dist-info/RECORD +0 -489
- python_openstackclient-6.6.1.dist-info/pbr.json +0 -1
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.0.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.0.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.0.0.dist-info}/top_level.txt +0 -0
|
@@ -56,16 +56,16 @@ class TestProject(identity_fakes.TestIdentityv2):
|
|
|
56
56
|
)
|
|
57
57
|
|
|
58
58
|
def setUp(self):
|
|
59
|
-
super(
|
|
59
|
+
super().setUp()
|
|
60
60
|
|
|
61
61
|
# Get a shortcut to the TenantManager Mock
|
|
62
|
-
self.projects_mock = self.
|
|
62
|
+
self.projects_mock = self.identity_client.tenants
|
|
63
63
|
self.projects_mock.reset_mock()
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
class TestProjectCreate(TestProject):
|
|
67
67
|
def setUp(self):
|
|
68
|
-
super(
|
|
68
|
+
super().setUp()
|
|
69
69
|
|
|
70
70
|
self.projects_mock.create.return_value = self.fake_project
|
|
71
71
|
|
|
@@ -289,7 +289,7 @@ class TestProjectCreate(TestProject):
|
|
|
289
289
|
|
|
290
290
|
class TestProjectDelete(TestProject):
|
|
291
291
|
def setUp(self):
|
|
292
|
-
super(
|
|
292
|
+
super().setUp()
|
|
293
293
|
|
|
294
294
|
# This is the return value for utils.find_resource()
|
|
295
295
|
self.projects_mock.get.return_value = self.fake_project
|
|
@@ -341,7 +341,7 @@ class TestProjectDelete(TestProject):
|
|
|
341
341
|
|
|
342
342
|
class TestProjectList(TestProject):
|
|
343
343
|
def setUp(self):
|
|
344
|
-
super(
|
|
344
|
+
super().setUp()
|
|
345
345
|
|
|
346
346
|
self.projects_mock.list.return_value = [self.fake_project]
|
|
347
347
|
|
|
@@ -431,7 +431,7 @@ class TestProjectList(TestProject):
|
|
|
431
431
|
|
|
432
432
|
class TestProjectSet(TestProject):
|
|
433
433
|
def setUp(self):
|
|
434
|
-
super(
|
|
434
|
+
super().setUp()
|
|
435
435
|
|
|
436
436
|
self.projects_mock.get.return_value = self.fake_project
|
|
437
437
|
self.projects_mock.update.return_value = self.fake_project
|
|
@@ -613,7 +613,7 @@ class TestProjectShow(TestProject):
|
|
|
613
613
|
fake_proj_show = identity_fakes.FakeProject.create_one_project()
|
|
614
614
|
|
|
615
615
|
def setUp(self):
|
|
616
|
-
super(
|
|
616
|
+
super().setUp()
|
|
617
617
|
|
|
618
618
|
self.projects_mock.get.return_value = self.fake_proj_show
|
|
619
619
|
|
|
@@ -654,7 +654,7 @@ class TestProjectUnset(TestProject):
|
|
|
654
654
|
fake_proj = identity_fakes.FakeProject.create_one_project(attr)
|
|
655
655
|
|
|
656
656
|
def setUp(self):
|
|
657
|
-
super(
|
|
657
|
+
super().setUp()
|
|
658
658
|
|
|
659
659
|
self.projects_mock.get.return_value = self.fake_proj
|
|
660
660
|
|
|
@@ -40,18 +40,18 @@ class TestRole(identity_fakes.TestIdentityv2):
|
|
|
40
40
|
fake_user = identity_fakes.FakeUser.create_one_user(attr)
|
|
41
41
|
|
|
42
42
|
def setUp(self):
|
|
43
|
-
super(
|
|
43
|
+
super().setUp()
|
|
44
44
|
|
|
45
45
|
# Get a shortcut to the TenantManager Mock
|
|
46
|
-
self.projects_mock = self.
|
|
46
|
+
self.projects_mock = self.identity_client.tenants
|
|
47
47
|
self.projects_mock.reset_mock()
|
|
48
48
|
|
|
49
49
|
# Get a shortcut to the UserManager Mock
|
|
50
|
-
self.users_mock = self.
|
|
50
|
+
self.users_mock = self.identity_client.users
|
|
51
51
|
self.users_mock.reset_mock()
|
|
52
52
|
|
|
53
53
|
# Get a shortcut to the RoleManager Mock
|
|
54
|
-
self.roles_mock = self.
|
|
54
|
+
self.roles_mock = self.identity_client.roles
|
|
55
55
|
self.roles_mock.reset_mock()
|
|
56
56
|
|
|
57
57
|
auth_ref = identity_fakes.fake_auth_ref(
|
|
@@ -64,7 +64,7 @@ class TestRole(identity_fakes.TestIdentityv2):
|
|
|
64
64
|
|
|
65
65
|
class TestRoleAdd(TestRole):
|
|
66
66
|
def setUp(self):
|
|
67
|
-
super(
|
|
67
|
+
super().setUp()
|
|
68
68
|
|
|
69
69
|
self.projects_mock.get.return_value = self.fake_project
|
|
70
70
|
|
|
@@ -121,7 +121,7 @@ class TestRoleCreate(TestRole):
|
|
|
121
121
|
)
|
|
122
122
|
|
|
123
123
|
def setUp(self):
|
|
124
|
-
super(
|
|
124
|
+
super().setUp()
|
|
125
125
|
|
|
126
126
|
self.roles_mock.create.return_value = self.fake_role_c
|
|
127
127
|
|
|
@@ -212,7 +212,7 @@ class TestRoleCreate(TestRole):
|
|
|
212
212
|
|
|
213
213
|
class TestRoleDelete(TestRole):
|
|
214
214
|
def setUp(self):
|
|
215
|
-
super(
|
|
215
|
+
super().setUp()
|
|
216
216
|
|
|
217
217
|
self.roles_mock.get.return_value = self.fake_role
|
|
218
218
|
self.roles_mock.delete.return_value = None
|
|
@@ -263,7 +263,7 @@ class TestRoleDelete(TestRole):
|
|
|
263
263
|
|
|
264
264
|
class TestRoleList(TestRole):
|
|
265
265
|
def setUp(self):
|
|
266
|
-
super(
|
|
266
|
+
super().setUp()
|
|
267
267
|
|
|
268
268
|
self.roles_mock.list.return_value = [self.fake_role]
|
|
269
269
|
|
|
@@ -295,7 +295,7 @@ class TestRoleList(TestRole):
|
|
|
295
295
|
|
|
296
296
|
class TestRoleRemove(TestRole):
|
|
297
297
|
def setUp(self):
|
|
298
|
-
super(
|
|
298
|
+
super().setUp()
|
|
299
299
|
|
|
300
300
|
self.projects_mock.get.return_value = self.fake_project
|
|
301
301
|
|
|
@@ -335,7 +335,7 @@ class TestRoleRemove(TestRole):
|
|
|
335
335
|
|
|
336
336
|
class TestRoleShow(TestRole):
|
|
337
337
|
def setUp(self):
|
|
338
|
-
super(
|
|
338
|
+
super().setUp()
|
|
339
339
|
|
|
340
340
|
self.roles_mock.get.return_value = self.fake_role
|
|
341
341
|
|
|
@@ -23,7 +23,7 @@ from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes
|
|
|
23
23
|
|
|
24
24
|
class TestRoleAssignment(identity_fakes.TestIdentityv2):
|
|
25
25
|
def setUp(self):
|
|
26
|
-
super(
|
|
26
|
+
super().setUp()
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class TestRoleAssignmentList(TestRoleAssignment):
|
|
@@ -37,15 +37,15 @@ class TestRoleAssignmentList(TestRoleAssignment):
|
|
|
37
37
|
super(TestRoleAssignment, self).setUp()
|
|
38
38
|
|
|
39
39
|
# Get a shortcut to the UserManager Mock
|
|
40
|
-
self.users_mock = self.
|
|
40
|
+
self.users_mock = self.identity_client.users
|
|
41
41
|
self.users_mock.reset_mock()
|
|
42
42
|
|
|
43
43
|
# Get a shortcut to the ProjectManager Mock
|
|
44
|
-
self.projects_mock = self.
|
|
44
|
+
self.projects_mock = self.identity_client.projects
|
|
45
45
|
self.projects_mock.reset_mock()
|
|
46
46
|
|
|
47
47
|
# Get a shortcut to the RoleManager Mock
|
|
48
|
-
self.roles_mock = self.
|
|
48
|
+
self.roles_mock = self.identity_client.roles
|
|
49
49
|
self.roles_mock.reset_mock()
|
|
50
50
|
|
|
51
51
|
self.projects_mock.get.return_value = fakes.FakeResource(
|
|
@@ -24,10 +24,10 @@ class TestService(identity_fakes.TestIdentityv2):
|
|
|
24
24
|
fake_service = identity_fakes.FakeService.create_one_service()
|
|
25
25
|
|
|
26
26
|
def setUp(self):
|
|
27
|
-
super(
|
|
27
|
+
super().setUp()
|
|
28
28
|
|
|
29
29
|
# Get a shortcut to the ServiceManager Mock
|
|
30
|
-
self.services_mock = self.
|
|
30
|
+
self.services_mock = self.identity_client.services
|
|
31
31
|
self.services_mock.reset_mock()
|
|
32
32
|
|
|
33
33
|
|
|
@@ -47,7 +47,7 @@ class TestServiceCreate(TestService):
|
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
def setUp(self):
|
|
50
|
-
super(
|
|
50
|
+
super().setUp()
|
|
51
51
|
|
|
52
52
|
self.services_mock.create.return_value = self.fake_service_c
|
|
53
53
|
|
|
@@ -141,7 +141,7 @@ class TestServiceCreate(TestService):
|
|
|
141
141
|
|
|
142
142
|
class TestServiceDelete(TestService):
|
|
143
143
|
def setUp(self):
|
|
144
|
-
super(
|
|
144
|
+
super().setUp()
|
|
145
145
|
|
|
146
146
|
self.services_mock.get.side_effect = identity_exc.NotFound(None)
|
|
147
147
|
self.services_mock.find.return_value = self.fake_service
|
|
@@ -169,7 +169,7 @@ class TestServiceDelete(TestService):
|
|
|
169
169
|
|
|
170
170
|
class TestServiceList(TestService):
|
|
171
171
|
def setUp(self):
|
|
172
|
-
super(
|
|
172
|
+
super().setUp()
|
|
173
173
|
|
|
174
174
|
self.services_mock.list.return_value = [self.fake_service]
|
|
175
175
|
|
|
@@ -232,7 +232,7 @@ class TestServiceShow(TestService):
|
|
|
232
232
|
fake_service_s = identity_fakes.FakeService.create_one_service()
|
|
233
233
|
|
|
234
234
|
def setUp(self):
|
|
235
|
-
super(
|
|
235
|
+
super().setUp()
|
|
236
236
|
|
|
237
237
|
self.services_mock.get.side_effect = identity_exc.NotFound(None)
|
|
238
238
|
self.services_mock.find.return_value = self.fake_service_s
|
|
@@ -24,7 +24,7 @@ class TestToken(identity_fakes.TestIdentityv2):
|
|
|
24
24
|
fake_project = identity_fakes.FakeProject.create_one_project()
|
|
25
25
|
|
|
26
26
|
def setUp(self):
|
|
27
|
-
super(
|
|
27
|
+
super().setUp()
|
|
28
28
|
|
|
29
29
|
# Get a shortcut to the Auth Ref Mock
|
|
30
30
|
self.ar_mock = mock.PropertyMock()
|
|
@@ -33,7 +33,7 @@ class TestToken(identity_fakes.TestIdentityv2):
|
|
|
33
33
|
|
|
34
34
|
class TestTokenIssue(TestToken):
|
|
35
35
|
def setUp(self):
|
|
36
|
-
super(
|
|
36
|
+
super().setUp()
|
|
37
37
|
|
|
38
38
|
self.cmd = token.IssueToken(self.app, None)
|
|
39
39
|
|
|
@@ -95,8 +95,8 @@ class TestTokenRevoke(TestToken):
|
|
|
95
95
|
TOKEN = 'fob'
|
|
96
96
|
|
|
97
97
|
def setUp(self):
|
|
98
|
-
super(
|
|
99
|
-
self.tokens_mock = self.
|
|
98
|
+
super().setUp()
|
|
99
|
+
self.tokens_mock = self.identity_client.tokens
|
|
100
100
|
self.tokens_mock.reset_mock()
|
|
101
101
|
self.tokens_mock.delete.return_value = True
|
|
102
102
|
self.cmd = token.RevokeToken(self.app, None)
|
|
@@ -31,14 +31,14 @@ class TestUser(identity_fakes.TestIdentityv2):
|
|
|
31
31
|
fake_user = identity_fakes.FakeUser.create_one_user(attr)
|
|
32
32
|
|
|
33
33
|
def setUp(self):
|
|
34
|
-
super(
|
|
34
|
+
super().setUp()
|
|
35
35
|
|
|
36
36
|
# Get a shortcut to the TenantManager Mock
|
|
37
|
-
self.projects_mock = self.
|
|
37
|
+
self.projects_mock = self.identity_client.tenants
|
|
38
38
|
self.projects_mock.reset_mock()
|
|
39
39
|
|
|
40
40
|
# Get a shortcut to the UserManager Mock
|
|
41
|
-
self.users_mock = self.
|
|
41
|
+
self.users_mock = self.identity_client.users
|
|
42
42
|
self.users_mock.reset_mock()
|
|
43
43
|
|
|
44
44
|
|
|
@@ -65,7 +65,7 @@ class TestUserCreate(TestUser):
|
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
def setUp(self):
|
|
68
|
-
super(
|
|
68
|
+
super().setUp()
|
|
69
69
|
|
|
70
70
|
self.projects_mock.get.return_value = self.fake_project_c
|
|
71
71
|
|
|
@@ -363,7 +363,7 @@ class TestUserCreate(TestUser):
|
|
|
363
363
|
|
|
364
364
|
class TestUserDelete(TestUser):
|
|
365
365
|
def setUp(self):
|
|
366
|
-
super(
|
|
366
|
+
super().setUp()
|
|
367
367
|
|
|
368
368
|
# This is the return value for utils.find_resource()
|
|
369
369
|
self.users_mock.get.return_value = self.fake_user
|
|
@@ -432,7 +432,7 @@ class TestUserList(TestUser):
|
|
|
432
432
|
)
|
|
433
433
|
|
|
434
434
|
def setUp(self):
|
|
435
|
-
super(
|
|
435
|
+
super().setUp()
|
|
436
436
|
|
|
437
437
|
self.projects_mock.get.return_value = self.fake_project_l
|
|
438
438
|
self.projects_mock.list.return_value = [self.fake_project_l]
|
|
@@ -513,7 +513,7 @@ class TestUserList(TestUser):
|
|
|
513
513
|
|
|
514
514
|
class TestUserSet(TestUser):
|
|
515
515
|
def setUp(self):
|
|
516
|
-
super(
|
|
516
|
+
super().setUp()
|
|
517
517
|
|
|
518
518
|
self.projects_mock.get.return_value = self.fake_project
|
|
519
519
|
self.users_mock.get.return_value = self.fake_user
|
|
@@ -755,7 +755,7 @@ class TestUserSet(TestUser):
|
|
|
755
755
|
|
|
756
756
|
class TestUserShow(TestUser):
|
|
757
757
|
def setUp(self):
|
|
758
|
-
super(
|
|
758
|
+
super().setUp()
|
|
759
759
|
|
|
760
760
|
self.users_mock.get.return_value = self.fake_user
|
|
761
761
|
|
|
@@ -20,6 +20,7 @@ import uuid
|
|
|
20
20
|
|
|
21
21
|
from keystoneauth1 import access
|
|
22
22
|
from keystoneauth1 import fixture
|
|
23
|
+
from openstack.identity.v3 import _proxy
|
|
23
24
|
from osc_lib.cli import format_columns
|
|
24
25
|
|
|
25
26
|
from openstackclient.tests.unit import fakes
|
|
@@ -564,7 +565,7 @@ def fake_auth_ref(fake_token, fake_service=None):
|
|
|
564
565
|
return auth_ref
|
|
565
566
|
|
|
566
567
|
|
|
567
|
-
class FakeAuth
|
|
568
|
+
class FakeAuth:
|
|
568
569
|
def __init__(self, auth_method_class=None):
|
|
569
570
|
self._auth_method_class = auth_method_class
|
|
570
571
|
|
|
@@ -572,12 +573,12 @@ class FakeAuth(object):
|
|
|
572
573
|
return token_id
|
|
573
574
|
|
|
574
575
|
|
|
575
|
-
class FakeSession
|
|
576
|
+
class FakeSession:
|
|
576
577
|
def __init__(self, **kwargs):
|
|
577
578
|
self.auth = FakeAuth()
|
|
578
579
|
|
|
579
580
|
|
|
580
|
-
class FakeIdentityv3Client
|
|
581
|
+
class FakeIdentityv3Client:
|
|
581
582
|
def __init__(self, **kwargs):
|
|
582
583
|
self.domains = mock.Mock()
|
|
583
584
|
self.domains.resource_class = fakes.FakeResource(None, {})
|
|
@@ -632,7 +633,7 @@ class FakeIdentityv3Client(object):
|
|
|
632
633
|
self.limits.resource_class = fakes.FakeResource(None, {})
|
|
633
634
|
|
|
634
635
|
|
|
635
|
-
class FakeFederationManager
|
|
636
|
+
class FakeFederationManager:
|
|
636
637
|
def __init__(self, **kwargs):
|
|
637
638
|
self.identity_providers = mock.Mock()
|
|
638
639
|
self.identity_providers.resource_class = fakes.FakeResource(None, {})
|
|
@@ -650,13 +651,13 @@ class FakeFederationManager(object):
|
|
|
650
651
|
|
|
651
652
|
class FakeFederatedClient(FakeIdentityv3Client):
|
|
652
653
|
def __init__(self, **kwargs):
|
|
653
|
-
super(
|
|
654
|
+
super().__init__(**kwargs)
|
|
654
655
|
self.federation = FakeFederationManager()
|
|
655
656
|
|
|
656
657
|
|
|
657
658
|
class FakeOAuth1Client(FakeIdentityv3Client):
|
|
658
659
|
def __init__(self, **kwargs):
|
|
659
|
-
super(
|
|
660
|
+
super().__init__(**kwargs)
|
|
660
661
|
|
|
661
662
|
self.access_tokens = mock.Mock()
|
|
662
663
|
self.access_tokens.resource_class = fakes.FakeResource(None, {})
|
|
@@ -666,35 +667,73 @@ class FakeOAuth1Client(FakeIdentityv3Client):
|
|
|
666
667
|
self.request_tokens.resource_class = fakes.FakeResource(None, {})
|
|
667
668
|
|
|
668
669
|
|
|
669
|
-
class
|
|
670
|
+
class FakeClientMixin:
|
|
670
671
|
def setUp(self):
|
|
671
|
-
super(
|
|
672
|
+
super().setUp()
|
|
672
673
|
|
|
673
674
|
self.app.client_manager.identity = FakeIdentityv3Client(
|
|
674
675
|
endpoint=fakes.AUTH_URL,
|
|
675
676
|
token=fakes.AUTH_TOKEN,
|
|
676
677
|
)
|
|
678
|
+
self.identity_client = self.app.client_manager.identity
|
|
679
|
+
|
|
680
|
+
# TODO(stephenfin): Rename to 'identity_client' once all commands are
|
|
681
|
+
# migrated to SDK
|
|
682
|
+
self.app.client_manager.sdk_connection.identity = mock.Mock(
|
|
683
|
+
_proxy.Proxy
|
|
684
|
+
)
|
|
685
|
+
self.identity_sdk_client = (
|
|
686
|
+
self.app.client_manager.sdk_connection.identity
|
|
687
|
+
)
|
|
677
688
|
|
|
678
689
|
|
|
690
|
+
class TestIdentityv3(
|
|
691
|
+
FakeClientMixin,
|
|
692
|
+
utils.TestCommand,
|
|
693
|
+
): ...
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
# We don't use FakeClientMixin since we want a different fake legacy client
|
|
679
697
|
class TestFederatedIdentity(utils.TestCommand):
|
|
680
698
|
def setUp(self):
|
|
681
|
-
super(
|
|
699
|
+
super().setUp()
|
|
682
700
|
|
|
683
701
|
self.app.client_manager.identity = FakeFederatedClient(
|
|
684
702
|
endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN
|
|
685
703
|
)
|
|
704
|
+
self.identity_client = self.app.client_manager.identity
|
|
705
|
+
|
|
706
|
+
# TODO(stephenfin): Rename to 'identity_client' once all commands are
|
|
707
|
+
# migrated to SDK
|
|
708
|
+
self.app.client_manager.sdk_connection.identity = mock.Mock(
|
|
709
|
+
_proxy.Proxy
|
|
710
|
+
)
|
|
711
|
+
self.identity_sdk_client = (
|
|
712
|
+
self.app.client_manager.sdk_connection.identity
|
|
713
|
+
)
|
|
686
714
|
|
|
687
715
|
|
|
716
|
+
# We don't use FakeClientMixin since we want a different fake legacy client
|
|
688
717
|
class TestOAuth1(utils.TestCommand):
|
|
689
718
|
def setUp(self):
|
|
690
|
-
super(
|
|
719
|
+
super().setUp()
|
|
691
720
|
|
|
692
721
|
self.app.client_manager.identity = FakeOAuth1Client(
|
|
693
722
|
endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN
|
|
694
723
|
)
|
|
724
|
+
self.identity_client = self.app.client_manager.identity
|
|
725
|
+
|
|
726
|
+
# TODO(stephenfin): Rename to 'identity_client' once all commands are
|
|
727
|
+
# migrated to SDK
|
|
728
|
+
self.app.client_manager.sdk_connection.identity = mock.Mock(
|
|
729
|
+
_proxy.Proxy
|
|
730
|
+
)
|
|
731
|
+
self.identity_sdk_client = (
|
|
732
|
+
self.app.client_manager.sdk_connection.identity
|
|
733
|
+
)
|
|
695
734
|
|
|
696
735
|
|
|
697
|
-
class FakeProject
|
|
736
|
+
class FakeProject:
|
|
698
737
|
"""Fake one or more project."""
|
|
699
738
|
|
|
700
739
|
@staticmethod
|
|
@@ -746,7 +785,7 @@ class FakeProject(object):
|
|
|
746
785
|
return projects
|
|
747
786
|
|
|
748
787
|
|
|
749
|
-
class FakeDomain
|
|
788
|
+
class FakeDomain:
|
|
750
789
|
"""Fake one or more domain."""
|
|
751
790
|
|
|
752
791
|
@staticmethod
|
|
@@ -778,7 +817,7 @@ class FakeDomain(object):
|
|
|
778
817
|
return domain
|
|
779
818
|
|
|
780
819
|
|
|
781
|
-
class FakeCredential
|
|
820
|
+
class FakeCredential:
|
|
782
821
|
"""Fake one or more credential."""
|
|
783
822
|
|
|
784
823
|
@staticmethod
|
|
@@ -848,7 +887,7 @@ class FakeCredential(object):
|
|
|
848
887
|
return mock.Mock(side_effect=credentials)
|
|
849
888
|
|
|
850
889
|
|
|
851
|
-
class FakeUser
|
|
890
|
+
class FakeUser:
|
|
852
891
|
"""Fake one or more user."""
|
|
853
892
|
|
|
854
893
|
@staticmethod
|
|
@@ -917,7 +956,7 @@ class FakeUser(object):
|
|
|
917
956
|
return mock.Mock(side_effect=users)
|
|
918
957
|
|
|
919
958
|
|
|
920
|
-
class FakeGroup
|
|
959
|
+
class FakeGroup:
|
|
921
960
|
"""Fake one or more group."""
|
|
922
961
|
|
|
923
962
|
@staticmethod
|
|
@@ -984,7 +1023,7 @@ class FakeGroup(object):
|
|
|
984
1023
|
return mock.Mock(side_effect=groups)
|
|
985
1024
|
|
|
986
1025
|
|
|
987
|
-
class FakeEndpoint
|
|
1026
|
+
class FakeEndpoint:
|
|
988
1027
|
"""Fake one or more endpoint."""
|
|
989
1028
|
|
|
990
1029
|
@staticmethod
|
|
@@ -1041,7 +1080,7 @@ class FakeEndpoint(object):
|
|
|
1041
1080
|
return endpoint_filter
|
|
1042
1081
|
|
|
1043
1082
|
|
|
1044
|
-
class FakeEndpointGroup
|
|
1083
|
+
class FakeEndpointGroup:
|
|
1045
1084
|
"""Fake one or more endpoint group."""
|
|
1046
1085
|
|
|
1047
1086
|
@staticmethod
|
|
@@ -1101,7 +1140,7 @@ class FakeEndpointGroup(object):
|
|
|
1101
1140
|
return endpointgroup_filter
|
|
1102
1141
|
|
|
1103
1142
|
|
|
1104
|
-
class FakeService
|
|
1143
|
+
class FakeService:
|
|
1105
1144
|
"""Fake one or more service."""
|
|
1106
1145
|
|
|
1107
1146
|
@staticmethod
|
|
@@ -1133,7 +1172,7 @@ class FakeService(object):
|
|
|
1133
1172
|
return service
|
|
1134
1173
|
|
|
1135
1174
|
|
|
1136
|
-
class FakeRoleAssignment
|
|
1175
|
+
class FakeRoleAssignment:
|
|
1137
1176
|
"""Fake one or more role assignment."""
|
|
1138
1177
|
|
|
1139
1178
|
@staticmethod
|
|
@@ -1163,7 +1202,7 @@ class FakeRoleAssignment(object):
|
|
|
1163
1202
|
return role_assignment
|
|
1164
1203
|
|
|
1165
1204
|
|
|
1166
|
-
class FakeImpliedRoleResponse
|
|
1205
|
+
class FakeImpliedRoleResponse:
|
|
1167
1206
|
"""Fake one or more role assignment."""
|
|
1168
1207
|
|
|
1169
1208
|
def __init__(self, prior_role, implied_roles):
|
|
@@ -25,9 +25,9 @@ from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
|
25
25
|
|
|
26
26
|
class TestAccessRule(identity_fakes.TestIdentityv3):
|
|
27
27
|
def setUp(self):
|
|
28
|
-
super(
|
|
28
|
+
super().setUp()
|
|
29
29
|
|
|
30
|
-
identity_manager = self.
|
|
30
|
+
identity_manager = self.identity_client
|
|
31
31
|
self.access_rules_mock = identity_manager.access_rules
|
|
32
32
|
self.access_rules_mock.reset_mock()
|
|
33
33
|
self.roles_mock = identity_manager.roles
|
|
@@ -36,7 +36,7 @@ class TestAccessRule(identity_fakes.TestIdentityv3):
|
|
|
36
36
|
|
|
37
37
|
class TestAccessRuleDelete(TestAccessRule):
|
|
38
38
|
def setUp(self):
|
|
39
|
-
super(
|
|
39
|
+
super().setUp()
|
|
40
40
|
|
|
41
41
|
# This is the return value for utils.find_resource()
|
|
42
42
|
self.access_rules_mock.get.return_value = fakes.FakeResource(
|
|
@@ -98,7 +98,7 @@ class TestAccessRuleDelete(TestAccessRule):
|
|
|
98
98
|
|
|
99
99
|
class TestAccessRuleList(TestAccessRule):
|
|
100
100
|
def setUp(self):
|
|
101
|
-
super(
|
|
101
|
+
super().setUp()
|
|
102
102
|
|
|
103
103
|
self.access_rules_mock.list.return_value = [
|
|
104
104
|
fakes.FakeResource(
|
|
@@ -135,7 +135,7 @@ class TestAccessRuleList(TestAccessRule):
|
|
|
135
135
|
|
|
136
136
|
class TestAccessRuleShow(TestAccessRule):
|
|
137
137
|
def setUp(self):
|
|
138
|
-
super(
|
|
138
|
+
super().setUp()
|
|
139
139
|
|
|
140
140
|
self.access_rules_mock.get.return_value = fakes.FakeResource(
|
|
141
141
|
None,
|