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
|
@@ -25,12 +25,12 @@ from openstackclient.tests.unit import utils as tests_utils
|
|
|
25
25
|
|
|
26
26
|
class TestSecurityGroupRuleNetwork(network_fakes.TestNetworkV2):
|
|
27
27
|
def setUp(self):
|
|
28
|
-
super(
|
|
28
|
+
super().setUp()
|
|
29
29
|
|
|
30
30
|
# Get a shortcut to the ProjectManager Mock
|
|
31
|
-
self.projects_mock = self.
|
|
31
|
+
self.projects_mock = self.identity_client.projects
|
|
32
32
|
# Get a shortcut to the DomainManager Mock
|
|
33
|
-
self.domains_mock = self.
|
|
33
|
+
self.domains_mock = self.identity_client.domains
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class TestCreateSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
@@ -89,7 +89,7 @@ class TestCreateSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
89
89
|
)
|
|
90
90
|
|
|
91
91
|
def setUp(self):
|
|
92
|
-
super(
|
|
92
|
+
super().setUp()
|
|
93
93
|
|
|
94
94
|
self.network_client.find_security_group = mock.Mock(
|
|
95
95
|
return_value=self._security_group
|
|
@@ -103,9 +103,7 @@ class TestCreateSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
103
103
|
self.domains_mock.get.return_value = self.domain
|
|
104
104
|
|
|
105
105
|
# Get the command object to test
|
|
106
|
-
self.cmd = security_group_rule.CreateSecurityGroupRule(
|
|
107
|
-
self.app, self.namespace
|
|
108
|
-
)
|
|
106
|
+
self.cmd = security_group_rule.CreateSecurityGroupRule(self.app, None)
|
|
109
107
|
|
|
110
108
|
def test_create_no_options(self):
|
|
111
109
|
self.assertRaises(
|
|
@@ -972,7 +970,7 @@ class TestDeleteSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
972
970
|
)
|
|
973
971
|
|
|
974
972
|
def setUp(self):
|
|
975
|
-
super(
|
|
973
|
+
super().setUp()
|
|
976
974
|
|
|
977
975
|
self.network_client.delete_security_group_rule = mock.Mock(
|
|
978
976
|
return_value=None
|
|
@@ -985,9 +983,7 @@ class TestDeleteSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
985
983
|
)
|
|
986
984
|
|
|
987
985
|
# Get the command object to test
|
|
988
|
-
self.cmd = security_group_rule.DeleteSecurityGroupRule(
|
|
989
|
-
self.app, self.namespace
|
|
990
|
-
)
|
|
986
|
+
self.cmd = security_group_rule.DeleteSecurityGroupRule(self.app, None)
|
|
991
987
|
|
|
992
988
|
def test_security_group_rule_delete(self):
|
|
993
989
|
arglist = [
|
|
@@ -1146,7 +1142,7 @@ class TestListSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
1146
1142
|
)
|
|
1147
1143
|
|
|
1148
1144
|
def setUp(self):
|
|
1149
|
-
super(
|
|
1145
|
+
super().setUp()
|
|
1150
1146
|
|
|
1151
1147
|
self.network_client.find_security_group = mock.Mock(
|
|
1152
1148
|
return_value=self._security_group
|
|
@@ -1156,9 +1152,7 @@ class TestListSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
1156
1152
|
)
|
|
1157
1153
|
|
|
1158
1154
|
# Get the command object to test
|
|
1159
|
-
self.cmd = security_group_rule.ListSecurityGroupRule(
|
|
1160
|
-
self.app, self.namespace
|
|
1161
|
-
)
|
|
1155
|
+
self.cmd = security_group_rule.ListSecurityGroupRule(self.app, None)
|
|
1162
1156
|
|
|
1163
1157
|
def test_list_default(self):
|
|
1164
1158
|
self._security_group_rule_tcp.port_range_min = 80
|
|
@@ -1305,16 +1299,14 @@ class TestShowSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
1305
1299
|
)
|
|
1306
1300
|
|
|
1307
1301
|
def setUp(self):
|
|
1308
|
-
super(
|
|
1302
|
+
super().setUp()
|
|
1309
1303
|
|
|
1310
1304
|
self.network_client.find_security_group_rule = mock.Mock(
|
|
1311
1305
|
return_value=self._security_group_rule
|
|
1312
1306
|
)
|
|
1313
1307
|
|
|
1314
1308
|
# Get the command object to test
|
|
1315
|
-
self.cmd = security_group_rule.ShowSecurityGroupRule(
|
|
1316
|
-
self.app, self.namespace
|
|
1317
|
-
)
|
|
1309
|
+
self.cmd = security_group_rule.ShowSecurityGroupRule(self.app, None)
|
|
1318
1310
|
|
|
1319
1311
|
def test_show_no_options(self):
|
|
1320
1312
|
self.assertRaises(
|
|
@@ -25,12 +25,12 @@ from openstackclient.tests.unit import utils as tests_utils
|
|
|
25
25
|
|
|
26
26
|
class TestSubnet(network_fakes.TestNetworkV2):
|
|
27
27
|
def setUp(self):
|
|
28
|
-
super(
|
|
28
|
+
super().setUp()
|
|
29
29
|
|
|
30
30
|
# Get a shortcut to the ProjectManager Mock
|
|
31
|
-
self.projects_mock = self.
|
|
31
|
+
self.projects_mock = self.identity_client.projects
|
|
32
32
|
# Get a shortcut to the DomainManager Mock
|
|
33
|
-
self.domains_mock = self.
|
|
33
|
+
self.domains_mock = self.identity_client.domains
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class TestCreateSubnet(TestSubnet):
|
|
@@ -167,7 +167,7 @@ class TestCreateSubnet(TestSubnet):
|
|
|
167
167
|
subnet_v2.AllocationPoolsColumn(self._subnet.allocation_pools),
|
|
168
168
|
self._subnet.cidr,
|
|
169
169
|
self._subnet.description,
|
|
170
|
-
|
|
170
|
+
subnet_v2.UnsortedListColumn(self._subnet.dns_nameservers),
|
|
171
171
|
self._subnet.enable_dhcp,
|
|
172
172
|
self._subnet.gateway_ip,
|
|
173
173
|
subnet_v2.HostRoutesColumn(self._subnet.host_routes),
|
|
@@ -190,7 +190,9 @@ class TestCreateSubnet(TestSubnet):
|
|
|
190
190
|
),
|
|
191
191
|
self._subnet_from_pool.cidr,
|
|
192
192
|
self._subnet_from_pool.description,
|
|
193
|
-
|
|
193
|
+
subnet_v2.UnsortedListColumn(
|
|
194
|
+
self._subnet_from_pool.dns_nameservers
|
|
195
|
+
),
|
|
194
196
|
self._subnet_from_pool.enable_dhcp,
|
|
195
197
|
self._subnet_from_pool.gateway_ip,
|
|
196
198
|
subnet_v2.HostRoutesColumn(self._subnet_from_pool.host_routes),
|
|
@@ -213,7 +215,7 @@ class TestCreateSubnet(TestSubnet):
|
|
|
213
215
|
),
|
|
214
216
|
self._subnet_ipv6.cidr,
|
|
215
217
|
self._subnet_ipv6.description,
|
|
216
|
-
|
|
218
|
+
subnet_v2.UnsortedListColumn(self._subnet_ipv6.dns_nameservers),
|
|
217
219
|
self._subnet_ipv6.enable_dhcp,
|
|
218
220
|
self._subnet_ipv6.gateway_ip,
|
|
219
221
|
subnet_v2.HostRoutesColumn(self._subnet_ipv6.host_routes),
|
|
@@ -236,7 +238,7 @@ class TestCreateSubnet(TestSubnet):
|
|
|
236
238
|
),
|
|
237
239
|
self._subnet_ipv6_pd.cidr,
|
|
238
240
|
self._subnet_ipv6_pd.description,
|
|
239
|
-
|
|
241
|
+
subnet_v2.UnsortedListColumn(self._subnet_ipv6_pd.dns_nameservers),
|
|
240
242
|
self._subnet_ipv6_pd.enable_dhcp,
|
|
241
243
|
self._subnet_ipv6_pd.gateway_ip,
|
|
242
244
|
subnet_v2.HostRoutesColumn(self._subnet_ipv6_pd.host_routes),
|
|
@@ -255,10 +257,10 @@ class TestCreateSubnet(TestSubnet):
|
|
|
255
257
|
|
|
256
258
|
def setUp(self):
|
|
257
259
|
self._init_subnet_variables()
|
|
258
|
-
super(
|
|
260
|
+
super().setUp()
|
|
259
261
|
|
|
260
262
|
# Get the command object to test
|
|
261
|
-
self.cmd = subnet_v2.CreateSubnet(self.app,
|
|
263
|
+
self.cmd = subnet_v2.CreateSubnet(self.app, None)
|
|
262
264
|
|
|
263
265
|
self.projects_mock.get.return_value = self.project
|
|
264
266
|
self.domains_mock.get.return_value = self.domain
|
|
@@ -717,7 +719,7 @@ class TestDeleteSubnet(TestSubnet):
|
|
|
717
719
|
_subnets = network_fakes.FakeSubnet.create_subnets(count=2)
|
|
718
720
|
|
|
719
721
|
def setUp(self):
|
|
720
|
-
super(
|
|
722
|
+
super().setUp()
|
|
721
723
|
|
|
722
724
|
self.network_client.delete_subnet = mock.Mock(return_value=None)
|
|
723
725
|
|
|
@@ -726,7 +728,7 @@ class TestDeleteSubnet(TestSubnet):
|
|
|
726
728
|
)
|
|
727
729
|
|
|
728
730
|
# Get the command object to test
|
|
729
|
-
self.cmd = subnet_v2.DeleteSubnet(self.app,
|
|
731
|
+
self.cmd = subnet_v2.DeleteSubnet(self.app, None)
|
|
730
732
|
|
|
731
733
|
def test_subnet_delete(self):
|
|
732
734
|
arglist = [
|
|
@@ -837,7 +839,7 @@ class TestListSubnet(TestSubnet):
|
|
|
837
839
|
subnet.cidr,
|
|
838
840
|
subnet.project_id,
|
|
839
841
|
subnet.enable_dhcp,
|
|
840
|
-
|
|
842
|
+
subnet_v2.UnsortedListColumn(subnet.dns_nameservers),
|
|
841
843
|
subnet_v2.AllocationPoolsColumn(subnet.allocation_pools),
|
|
842
844
|
subnet_v2.HostRoutesColumn(subnet.host_routes),
|
|
843
845
|
subnet.ip_version,
|
|
@@ -848,10 +850,10 @@ class TestListSubnet(TestSubnet):
|
|
|
848
850
|
)
|
|
849
851
|
|
|
850
852
|
def setUp(self):
|
|
851
|
-
super(
|
|
853
|
+
super().setUp()
|
|
852
854
|
|
|
853
855
|
# Get the command object to test
|
|
854
|
-
self.cmd = subnet_v2.ListSubnet(self.app,
|
|
856
|
+
self.cmd = subnet_v2.ListSubnet(self.app, None)
|
|
855
857
|
|
|
856
858
|
self.network_client.subnets = mock.Mock(return_value=self._subnet)
|
|
857
859
|
|
|
@@ -1179,11 +1181,11 @@ class TestSetSubnet(TestSubnet):
|
|
|
1179
1181
|
)
|
|
1180
1182
|
|
|
1181
1183
|
def setUp(self):
|
|
1182
|
-
super(
|
|
1184
|
+
super().setUp()
|
|
1183
1185
|
self.network_client.update_subnet = mock.Mock(return_value=None)
|
|
1184
1186
|
self.network_client.set_tags = mock.Mock(return_value=None)
|
|
1185
1187
|
self.network_client.find_subnet = mock.Mock(return_value=self._subnet)
|
|
1186
|
-
self.cmd = subnet_v2.SetSubnet(self.app,
|
|
1188
|
+
self.cmd = subnet_v2.SetSubnet(self.app, None)
|
|
1187
1189
|
|
|
1188
1190
|
def test_set_this(self):
|
|
1189
1191
|
arglist = [
|
|
@@ -1489,7 +1491,7 @@ class TestShowSubnet(TestSubnet):
|
|
|
1489
1491
|
subnet_v2.AllocationPoolsColumn(_subnet.allocation_pools),
|
|
1490
1492
|
_subnet.cidr,
|
|
1491
1493
|
_subnet.description,
|
|
1492
|
-
|
|
1494
|
+
subnet_v2.UnsortedListColumn(_subnet.dns_nameservers),
|
|
1493
1495
|
_subnet.enable_dhcp,
|
|
1494
1496
|
_subnet.gateway_ip,
|
|
1495
1497
|
subnet_v2.HostRoutesColumn(_subnet.host_routes),
|
|
@@ -1507,10 +1509,10 @@ class TestShowSubnet(TestSubnet):
|
|
|
1507
1509
|
)
|
|
1508
1510
|
|
|
1509
1511
|
def setUp(self):
|
|
1510
|
-
super(
|
|
1512
|
+
super().setUp()
|
|
1511
1513
|
|
|
1512
1514
|
# Get the command object to test
|
|
1513
|
-
self.cmd = subnet_v2.ShowSubnet(self.app,
|
|
1515
|
+
self.cmd = subnet_v2.ShowSubnet(self.app, None)
|
|
1514
1516
|
|
|
1515
1517
|
self.network_client.find_subnet = mock.Mock(return_value=self._subnet)
|
|
1516
1518
|
|
|
@@ -1549,10 +1551,11 @@ class TestShowSubnet(TestSubnet):
|
|
|
1549
1551
|
|
|
1550
1552
|
class TestUnsetSubnet(TestSubnet):
|
|
1551
1553
|
def setUp(self):
|
|
1552
|
-
super(
|
|
1554
|
+
super().setUp()
|
|
1555
|
+
# Add three dns_nameserver entries so we can verify ordering
|
|
1553
1556
|
self._testsubnet = network_fakes.FakeSubnet.create_one_subnet(
|
|
1554
1557
|
{
|
|
1555
|
-
'dns_nameservers': ['8.8.8.8', '8.8.8.4'],
|
|
1558
|
+
'dns_nameservers': ['8.8.8.8', '8.8.8.4', '8.8.4.4'],
|
|
1556
1559
|
'host_routes': [
|
|
1557
1560
|
{'destination': '10.20.20.0/24', 'nexthop': '10.20.20.1'},
|
|
1558
1561
|
{'destination': '10.30.30.30/24', 'nexthop': '10.30.30.1'},
|
|
@@ -1575,12 +1578,13 @@ class TestUnsetSubnet(TestSubnet):
|
|
|
1575
1578
|
self.network_client.update_subnet = mock.Mock(return_value=None)
|
|
1576
1579
|
self.network_client.set_tags = mock.Mock(return_value=None)
|
|
1577
1580
|
# Get the command object to test
|
|
1578
|
-
self.cmd = subnet_v2.UnsetSubnet(self.app,
|
|
1581
|
+
self.cmd = subnet_v2.UnsetSubnet(self.app, None)
|
|
1579
1582
|
|
|
1580
1583
|
def test_unset_subnet_params(self):
|
|
1584
|
+
# Remove just the middle dns_nameserver entry, verify still in order
|
|
1581
1585
|
arglist = [
|
|
1582
1586
|
'--dns-nameserver',
|
|
1583
|
-
'8.8.8.
|
|
1587
|
+
'8.8.8.4',
|
|
1584
1588
|
'--host-route',
|
|
1585
1589
|
'destination=10.30.30.30/24,gateway=10.30.30.1',
|
|
1586
1590
|
'--allocation-pool',
|
|
@@ -1591,7 +1595,7 @@ class TestUnsetSubnet(TestSubnet):
|
|
|
1591
1595
|
self._testsubnet.name,
|
|
1592
1596
|
]
|
|
1593
1597
|
verifylist = [
|
|
1594
|
-
('dns_nameservers', ['8.8.8.
|
|
1598
|
+
('dns_nameservers', ['8.8.8.4']),
|
|
1595
1599
|
(
|
|
1596
1600
|
'host_routes',
|
|
1597
1601
|
[{"destination": "10.30.30.30/24", "gateway": "10.30.30.1"}],
|
|
@@ -1605,7 +1609,7 @@ class TestUnsetSubnet(TestSubnet):
|
|
|
1605
1609
|
result = self.cmd.take_action(parsed_args)
|
|
1606
1610
|
|
|
1607
1611
|
attrs = {
|
|
1608
|
-
'dns_nameservers': ['8.8.8.4'],
|
|
1612
|
+
'dns_nameservers': ['8.8.8.8', '8.8.4.4'],
|
|
1609
1613
|
'host_routes': [
|
|
1610
1614
|
{"destination": "10.20.20.0/24", "nexthop": "10.20.20.1"}
|
|
1611
1615
|
],
|
|
@@ -24,12 +24,12 @@ from openstackclient.tests.unit import utils as test_utils
|
|
|
24
24
|
|
|
25
25
|
class TestSubnetPool(network_fakes.TestNetworkV2):
|
|
26
26
|
def setUp(self):
|
|
27
|
-
super(
|
|
27
|
+
super().setUp()
|
|
28
28
|
|
|
29
29
|
# Get a shortcut to the ProjectManager Mock
|
|
30
|
-
self.projects_mock = self.
|
|
30
|
+
self.projects_mock = self.identity_client.projects
|
|
31
31
|
# Get a shortcut to the DomainManager Mock
|
|
32
|
-
self.domains_mock = self.
|
|
32
|
+
self.domains_mock = self.identity_client.domains
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class TestCreateSubnetPool(TestSubnetPool):
|
|
@@ -74,7 +74,7 @@ class TestCreateSubnetPool(TestSubnetPool):
|
|
|
74
74
|
)
|
|
75
75
|
|
|
76
76
|
def setUp(self):
|
|
77
|
-
super(
|
|
77
|
+
super().setUp()
|
|
78
78
|
|
|
79
79
|
self.network_client.create_subnet_pool = mock.Mock(
|
|
80
80
|
return_value=self._subnet_pool
|
|
@@ -82,7 +82,7 @@ class TestCreateSubnetPool(TestSubnetPool):
|
|
|
82
82
|
self.network_client.set_tags = mock.Mock(return_value=None)
|
|
83
83
|
|
|
84
84
|
# Get the command object to test
|
|
85
|
-
self.cmd = subnet_pool.CreateSubnetPool(self.app,
|
|
85
|
+
self.cmd = subnet_pool.CreateSubnetPool(self.app, None)
|
|
86
86
|
|
|
87
87
|
self.network_client.find_address_scope = mock.Mock(
|
|
88
88
|
return_value=self._address_scope
|
|
@@ -385,7 +385,7 @@ class TestDeleteSubnetPool(TestSubnetPool):
|
|
|
385
385
|
_subnet_pools = network_fakes.FakeSubnetPool.create_subnet_pools(count=2)
|
|
386
386
|
|
|
387
387
|
def setUp(self):
|
|
388
|
-
super(
|
|
388
|
+
super().setUp()
|
|
389
389
|
|
|
390
390
|
self.network_client.delete_subnet_pool = mock.Mock(return_value=None)
|
|
391
391
|
|
|
@@ -394,7 +394,7 @@ class TestDeleteSubnetPool(TestSubnetPool):
|
|
|
394
394
|
)
|
|
395
395
|
|
|
396
396
|
# Get the command object to test
|
|
397
|
-
self.cmd = subnet_pool.DeleteSubnetPool(self.app,
|
|
397
|
+
self.cmd = subnet_pool.DeleteSubnetPool(self.app, None)
|
|
398
398
|
|
|
399
399
|
def test_subnet_pool_delete(self):
|
|
400
400
|
arglist = [
|
|
@@ -509,10 +509,10 @@ class TestListSubnetPool(TestSubnetPool):
|
|
|
509
509
|
)
|
|
510
510
|
|
|
511
511
|
def setUp(self):
|
|
512
|
-
super(
|
|
512
|
+
super().setUp()
|
|
513
513
|
|
|
514
514
|
# Get the command object to test
|
|
515
|
-
self.cmd = subnet_pool.ListSubnetPool(self.app,
|
|
515
|
+
self.cmd = subnet_pool.ListSubnetPool(self.app, None)
|
|
516
516
|
|
|
517
517
|
self.network_client.subnet_pools = mock.Mock(
|
|
518
518
|
return_value=self._subnet_pools
|
|
@@ -732,7 +732,7 @@ class TestSetSubnetPool(TestSubnetPool):
|
|
|
732
732
|
_address_scope = network_fakes.create_one_address_scope()
|
|
733
733
|
|
|
734
734
|
def setUp(self):
|
|
735
|
-
super(
|
|
735
|
+
super().setUp()
|
|
736
736
|
|
|
737
737
|
self.network_client.update_subnet_pool = mock.Mock(return_value=None)
|
|
738
738
|
self.network_client.set_tags = mock.Mock(return_value=None)
|
|
@@ -746,7 +746,7 @@ class TestSetSubnetPool(TestSubnetPool):
|
|
|
746
746
|
)
|
|
747
747
|
|
|
748
748
|
# Get the command object to test
|
|
749
|
-
self.cmd = subnet_pool.SetSubnetPool(self.app,
|
|
749
|
+
self.cmd = subnet_pool.SetSubnetPool(self.app, None)
|
|
750
750
|
|
|
751
751
|
def test_set_this(self):
|
|
752
752
|
arglist = [
|
|
@@ -1077,14 +1077,14 @@ class TestShowSubnetPool(TestSubnetPool):
|
|
|
1077
1077
|
)
|
|
1078
1078
|
|
|
1079
1079
|
def setUp(self):
|
|
1080
|
-
super(
|
|
1080
|
+
super().setUp()
|
|
1081
1081
|
|
|
1082
1082
|
self.network_client.find_subnet_pool = mock.Mock(
|
|
1083
1083
|
return_value=self._subnet_pool
|
|
1084
1084
|
)
|
|
1085
1085
|
|
|
1086
1086
|
# Get the command object to test
|
|
1087
|
-
self.cmd = subnet_pool.ShowSubnetPool(self.app,
|
|
1087
|
+
self.cmd = subnet_pool.ShowSubnetPool(self.app, None)
|
|
1088
1088
|
|
|
1089
1089
|
def test_show_no_options(self):
|
|
1090
1090
|
arglist = []
|
|
@@ -1118,7 +1118,7 @@ class TestShowSubnetPool(TestSubnetPool):
|
|
|
1118
1118
|
|
|
1119
1119
|
class TestUnsetSubnetPool(TestSubnetPool):
|
|
1120
1120
|
def setUp(self):
|
|
1121
|
-
super(
|
|
1121
|
+
super().setUp()
|
|
1122
1122
|
self._subnetpool = network_fakes.FakeSubnetPool.create_one_subnet_pool(
|
|
1123
1123
|
{'tags': ['green', 'red']}
|
|
1124
1124
|
)
|
|
@@ -1128,7 +1128,7 @@ class TestUnsetSubnetPool(TestSubnetPool):
|
|
|
1128
1128
|
self.network_client.update_subnet_pool = mock.Mock(return_value=None)
|
|
1129
1129
|
self.network_client.set_tags = mock.Mock(return_value=None)
|
|
1130
1130
|
# Get the command object to test
|
|
1131
|
-
self.cmd = subnet_pool.UnsetSubnetPool(self.app,
|
|
1131
|
+
self.cmd = subnet_pool.UnsetSubnetPool(self.app, None)
|
|
1132
1132
|
|
|
1133
1133
|
def _test_unset_tags(self, with_tags=True):
|
|
1134
1134
|
if with_tags:
|
|
@@ -82,7 +82,7 @@ object_upload_name = 'test-object-name'
|
|
|
82
82
|
|
|
83
83
|
class TestObjectv1(utils.TestCommand):
|
|
84
84
|
def setUp(self):
|
|
85
|
-
super(
|
|
85
|
+
super().setUp()
|
|
86
86
|
|
|
87
87
|
self.app.client_manager.session = session.Session()
|
|
88
88
|
self.app.client_manager.object_store = object_store.APIv1(
|
|
@@ -25,7 +25,7 @@ AUTH_TOKEN = "foobar"
|
|
|
25
25
|
AUTH_URL = "http://0.0.0.0"
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
class FakeClient
|
|
28
|
+
class FakeClient:
|
|
29
29
|
def __init__(self, endpoint=None, **kwargs):
|
|
30
30
|
self.endpoint = AUTH_URL
|
|
31
31
|
self.token = AUTH_TOKEN
|
|
@@ -35,7 +35,7 @@ class TestContainer(object_fakes.TestObjectv1):
|
|
|
35
35
|
columns = ('Name',)
|
|
36
36
|
|
|
37
37
|
def setUp(self):
|
|
38
|
-
super(
|
|
38
|
+
super().setUp()
|
|
39
39
|
self.app.client_manager.object_store = object_store.APIv1(
|
|
40
40
|
session=mock.Mock(),
|
|
41
41
|
service_type="object-store",
|
|
@@ -48,7 +48,7 @@ class TestContainer(object_fakes.TestObjectv1):
|
|
|
48
48
|
@mock.patch('openstackclient.api.object_store_v1.APIv1.container_delete')
|
|
49
49
|
class TestContainerDelete(TestContainer):
|
|
50
50
|
def setUp(self):
|
|
51
|
-
super(
|
|
51
|
+
super().setUp()
|
|
52
52
|
|
|
53
53
|
# Get the command object to test
|
|
54
54
|
self.cmd = container.DeleteContainer(self.app, None)
|
|
@@ -132,7 +132,7 @@ class TestContainerDelete(TestContainer):
|
|
|
132
132
|
@mock.patch('openstackclient.api.object_store_v1.APIv1.container_list')
|
|
133
133
|
class TestContainerList(TestContainer):
|
|
134
134
|
def setUp(self):
|
|
135
|
-
super(
|
|
135
|
+
super().setUp()
|
|
136
136
|
|
|
137
137
|
# Get the command object to test
|
|
138
138
|
self.cmd = container.ListContainer(self.app, None)
|
|
@@ -345,7 +345,7 @@ class TestContainerList(TestContainer):
|
|
|
345
345
|
@mock.patch('openstackclient.api.object_store_v1.APIv1.container_show')
|
|
346
346
|
class TestContainerShow(TestContainer):
|
|
347
347
|
def setUp(self):
|
|
348
|
-
super(
|
|
348
|
+
super().setUp()
|
|
349
349
|
|
|
350
350
|
# Get the command object to test
|
|
351
351
|
self.cmd = container.ShowContainer(self.app, None)
|
|
@@ -21,7 +21,7 @@ from openstackclient.tests.unit.object.v1 import fakes as object_fakes
|
|
|
21
21
|
|
|
22
22
|
class TestContainerAll(object_fakes.TestObjectv1):
|
|
23
23
|
def setUp(self):
|
|
24
|
-
super(
|
|
24
|
+
super().setUp()
|
|
25
25
|
|
|
26
26
|
self.requests_mock = self.useFixture(fixture.Fixture())
|
|
27
27
|
|
|
@@ -34,7 +34,7 @@ class TestContainerCreate(TestContainerAll):
|
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
def setUp(self):
|
|
37
|
-
super(
|
|
37
|
+
super().setUp()
|
|
38
38
|
|
|
39
39
|
# Get the command object to test
|
|
40
40
|
self.cmd = container_cmds.CreateContainer(self.app, None)
|
|
@@ -182,7 +182,7 @@ class TestContainerCreate(TestContainerAll):
|
|
|
182
182
|
|
|
183
183
|
class TestContainerDelete(TestContainerAll):
|
|
184
184
|
def setUp(self):
|
|
185
|
-
super(
|
|
185
|
+
super().setUp()
|
|
186
186
|
|
|
187
187
|
# Get the command object to test
|
|
188
188
|
self.cmd = container_cmds.DeleteContainer(self.app, None)
|
|
@@ -242,7 +242,7 @@ class TestContainerList(TestContainerAll):
|
|
|
242
242
|
columns = ('Name',)
|
|
243
243
|
|
|
244
244
|
def setUp(self):
|
|
245
|
-
super(
|
|
245
|
+
super().setUp()
|
|
246
246
|
|
|
247
247
|
# Get the command object to test
|
|
248
248
|
self.cmd = container_cmds.ListContainer(self.app, None)
|
|
@@ -309,7 +309,7 @@ class TestContainerList(TestContainerAll):
|
|
|
309
309
|
|
|
310
310
|
class TestContainerSave(TestContainerAll):
|
|
311
311
|
def setUp(self):
|
|
312
|
-
super(
|
|
312
|
+
super().setUp()
|
|
313
313
|
|
|
314
314
|
# Get the command object to test
|
|
315
315
|
self.cmd = container_cmds.SaveContainer(self.app, None)
|
|
@@ -357,7 +357,7 @@ class TestContainerSave(TestContainerAll):
|
|
|
357
357
|
|
|
358
358
|
class TestContainerShow(TestContainerAll):
|
|
359
359
|
def setUp(self):
|
|
360
|
-
super(
|
|
360
|
+
super().setUp()
|
|
361
361
|
|
|
362
362
|
# Get the command object to test
|
|
363
363
|
self.cmd = container_cmds.ShowContainer(self.app, None)
|
|
@@ -27,7 +27,7 @@ AUTH_URL = "http://0.0.0.0"
|
|
|
27
27
|
|
|
28
28
|
class TestObject(object_fakes.TestObjectv1):
|
|
29
29
|
def setUp(self):
|
|
30
|
-
super(
|
|
30
|
+
super().setUp()
|
|
31
31
|
self.app.client_manager.object_store = object_store.APIv1(
|
|
32
32
|
session=mock.Mock(),
|
|
33
33
|
service_type="object-store",
|
|
@@ -41,7 +41,7 @@ class TestObjectList(TestObject):
|
|
|
41
41
|
datalist = ((object_fakes.object_name_2,),)
|
|
42
42
|
|
|
43
43
|
def setUp(self):
|
|
44
|
-
super(
|
|
44
|
+
super().setUp()
|
|
45
45
|
|
|
46
46
|
# Get the command object to test
|
|
47
47
|
self.cmd = obj.ListObject(self.app, None)
|
|
@@ -323,7 +323,7 @@ class TestObjectList(TestObject):
|
|
|
323
323
|
@mock.patch('openstackclient.api.object_store_v1.APIv1.object_show')
|
|
324
324
|
class TestObjectShow(TestObject):
|
|
325
325
|
def setUp(self):
|
|
326
|
-
super(
|
|
326
|
+
super().setUp()
|
|
327
327
|
|
|
328
328
|
# Get the command object to test
|
|
329
329
|
self.cmd = obj.ShowObject(self.app, None)
|
|
@@ -24,14 +24,14 @@ from openstackclient.tests.unit.object.v1 import fakes as object_fakes
|
|
|
24
24
|
|
|
25
25
|
class TestObjectAll(object_fakes.TestObjectv1):
|
|
26
26
|
def setUp(self):
|
|
27
|
-
super(
|
|
27
|
+
super().setUp()
|
|
28
28
|
|
|
29
29
|
self.requests_mock = self.useFixture(fixture.Fixture())
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class TestObjectCreate(TestObjectAll):
|
|
33
33
|
def setUp(self):
|
|
34
|
-
super(
|
|
34
|
+
super().setUp()
|
|
35
35
|
|
|
36
36
|
# Get the command object to test
|
|
37
37
|
self.cmd = object_cmds.CreateObject(self.app, None)
|
|
@@ -65,7 +65,7 @@ class TestObjectList(TestObjectAll):
|
|
|
65
65
|
columns = ('Name',)
|
|
66
66
|
|
|
67
67
|
def setUp(self):
|
|
68
|
-
super(
|
|
68
|
+
super().setUp()
|
|
69
69
|
|
|
70
70
|
# Get the command object to test
|
|
71
71
|
self.cmd = object_cmds.ListObject(self.app, None)
|
|
@@ -140,7 +140,7 @@ class TestObjectList(TestObjectAll):
|
|
|
140
140
|
|
|
141
141
|
class TestObjectShow(TestObjectAll):
|
|
142
142
|
def setUp(self):
|
|
143
|
-
super(
|
|
143
|
+
super().setUp()
|
|
144
144
|
|
|
145
145
|
# Get the command object to test
|
|
146
146
|
self.cmd = object_cmds.ShowObject(self.app, None)
|
|
@@ -208,7 +208,7 @@ class TestObjectShow(TestObjectAll):
|
|
|
208
208
|
|
|
209
209
|
class TestObjectSave(TestObjectAll):
|
|
210
210
|
def setUp(self):
|
|
211
|
-
super(
|
|
211
|
+
super().setUp()
|
|
212
212
|
|
|
213
213
|
# Get the command object to test
|
|
214
214
|
self.cmd = object_cmds.SaveObject(self.app, None)
|
|
@@ -142,7 +142,7 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
142
142
|
shell_class_name = "openstackclient.shell.OpenStackShell"
|
|
143
143
|
|
|
144
144
|
def setUp(self):
|
|
145
|
-
super(
|
|
145
|
+
super().setUp()
|
|
146
146
|
# TODO(dtroyer): remove this once the shell_class_patch patch is
|
|
147
147
|
# released in osc-lib
|
|
148
148
|
mod_str, _sep, class_str = self.shell_class_name.rpartition('.')
|
|
@@ -228,7 +228,7 @@ class TestShell(osc_lib_test_utils.TestShell):
|
|
|
228
228
|
|
|
229
229
|
class TestShellOptions(TestShell):
|
|
230
230
|
def setUp(self):
|
|
231
|
-
super(
|
|
231
|
+
super().setUp()
|
|
232
232
|
self.useFixture(osc_lib_test_utils.EnvFixture())
|
|
233
233
|
|
|
234
234
|
def _test_options_init_app(self, test_opts):
|
|
@@ -290,7 +290,7 @@ class TestShellOptions(TestShell):
|
|
|
290
290
|
|
|
291
291
|
class TestShellTokenAuthEnv(TestShell):
|
|
292
292
|
def setUp(self):
|
|
293
|
-
super(
|
|
293
|
+
super().setUp()
|
|
294
294
|
env = {
|
|
295
295
|
"OS_TOKEN": DEFAULT_TOKEN,
|
|
296
296
|
"OS_AUTH_URL": DEFAULT_AUTH_URL,
|
|
@@ -333,7 +333,7 @@ class TestShellTokenAuthEnv(TestShell):
|
|
|
333
333
|
|
|
334
334
|
class TestShellTokenEndpointAuthEnv(TestShell):
|
|
335
335
|
def setUp(self):
|
|
336
|
-
super(
|
|
336
|
+
super().setUp()
|
|
337
337
|
env = {
|
|
338
338
|
"OS_TOKEN": DEFAULT_TOKEN,
|
|
339
339
|
"OS_ENDPOINT": DEFAULT_SERVICE_URL,
|
|
@@ -376,7 +376,7 @@ class TestShellTokenEndpointAuthEnv(TestShell):
|
|
|
376
376
|
|
|
377
377
|
class TestShellCli(TestShell):
|
|
378
378
|
def setUp(self):
|
|
379
|
-
super(
|
|
379
|
+
super().setUp()
|
|
380
380
|
env = {
|
|
381
381
|
"OS_COMPUTE_API_VERSION": DEFAULT_COMPUTE_API_VERSION,
|
|
382
382
|
"OS_IDENTITY_API_VERSION": DEFAULT_IDENTITY_API_VERSION,
|
|
@@ -35,6 +35,9 @@ class CompareBySet(list):
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class TestCase(testtools.TestCase):
|
|
38
|
+
# provide additional context for failures
|
|
39
|
+
maxDiff = None
|
|
40
|
+
|
|
38
41
|
def setUp(self):
|
|
39
42
|
testtools.TestCase.setUp(self)
|
|
40
43
|
|
|
@@ -67,7 +70,7 @@ class TestCommand(TestCase):
|
|
|
67
70
|
"""Test cliff command classes"""
|
|
68
71
|
|
|
69
72
|
def setUp(self):
|
|
70
|
-
super(
|
|
73
|
+
super().setUp()
|
|
71
74
|
# Build up a fake app
|
|
72
75
|
self.fake_stdout = fakes.FakeStdout()
|
|
73
76
|
self.fake_log = fakes.FakeLog()
|
|
@@ -37,7 +37,7 @@ NAME = 'PhilSpector'
|
|
|
37
37
|
|
|
38
38
|
class TestFindResourceVolumes(test_utils.TestCase):
|
|
39
39
|
def setUp(self):
|
|
40
|
-
super(
|
|
40
|
+
super().setUp()
|
|
41
41
|
api = mock.Mock()
|
|
42
42
|
api.client = mock.Mock()
|
|
43
43
|
api.client.get = mock.Mock()
|
|
@@ -62,7 +62,7 @@ class TestFindResourceVolumes(test_utils.TestCase):
|
|
|
62
62
|
|
|
63
63
|
class TestFindResourceVolumeSnapshots(test_utils.TestCase):
|
|
64
64
|
def setUp(self):
|
|
65
|
-
super(
|
|
65
|
+
super().setUp()
|
|
66
66
|
api = mock.Mock()
|
|
67
67
|
api.client = mock.Mock()
|
|
68
68
|
api.client.get = mock.Mock()
|
|
@@ -64,15 +64,14 @@ class FakeClientMixin:
|
|
|
64
64
|
self.volume_client = self.app.client_manager.volume
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
class TestVolumev1(
|
|
67
|
+
class TestVolumev1(
|
|
68
|
+
identity_fakes.FakeClientMixin,
|
|
69
|
+
FakeClientMixin,
|
|
70
|
+
utils.TestCommand,
|
|
71
|
+
):
|
|
68
72
|
def setUp(self):
|
|
69
73
|
super().setUp()
|
|
70
74
|
|
|
71
|
-
self.app.client_manager.identity = identity_fakes.FakeIdentityv2Client(
|
|
72
|
-
endpoint=fakes.AUTH_URL,
|
|
73
|
-
token=fakes.AUTH_TOKEN,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
75
|
# avoid circular imports by defining this manually rather than using
|
|
77
76
|
# openstackclient.tests.unit.image.v1.fakes.FakeClientMixin
|
|
78
77
|
self.app.client_manager.image = mock.Mock(spec=image_v1_proxy.Proxy)
|