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
|
@@ -15,40 +15,14 @@
|
|
|
15
15
|
from unittest import mock
|
|
16
16
|
|
|
17
17
|
import iso8601
|
|
18
|
-
from novaclient import api_versions
|
|
19
|
-
from openstack import utils as sdk_utils
|
|
20
18
|
from osc_lib import exceptions
|
|
21
19
|
|
|
22
20
|
from openstackclient.compute.v2 import server_event
|
|
23
21
|
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes
|
|
24
22
|
|
|
25
23
|
|
|
26
|
-
class
|
|
27
|
-
fake_server = compute_fakes.
|
|
28
|
-
|
|
29
|
-
def setUp(self):
|
|
30
|
-
super(TestServerEvent, self).setUp()
|
|
31
|
-
|
|
32
|
-
patcher = mock.patch.object(
|
|
33
|
-
sdk_utils, 'supports_microversion', return_value=True
|
|
34
|
-
)
|
|
35
|
-
self.addCleanup(patcher.stop)
|
|
36
|
-
self.supports_microversion_mock = patcher.start()
|
|
37
|
-
self._set_mock_microversion(
|
|
38
|
-
self.compute_client.api_version.get_string()
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
def _set_mock_microversion(self, mock_v):
|
|
42
|
-
"""Set a specific microversion for the mock supports_microversion()."""
|
|
43
|
-
self.supports_microversion_mock.reset_mock(return_value=True)
|
|
44
|
-
|
|
45
|
-
self.supports_microversion_mock.side_effect = (
|
|
46
|
-
lambda _, v: api_versions.APIVersion(v)
|
|
47
|
-
<= api_versions.APIVersion(mock_v)
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class TestListServerEvent(TestServerEvent):
|
|
24
|
+
class TestListServerEvent(compute_fakes.TestComputev2):
|
|
25
|
+
fake_server = compute_fakes.create_one_sdk_server()
|
|
52
26
|
fake_event = compute_fakes.create_one_server_action()
|
|
53
27
|
|
|
54
28
|
columns = (
|
|
@@ -145,7 +119,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
145
119
|
self.assertEqual(self.long_data, tuple(data))
|
|
146
120
|
|
|
147
121
|
def test_server_event_list_with_changes_since(self):
|
|
148
|
-
self.
|
|
122
|
+
self.set_compute_api_version('2.58')
|
|
149
123
|
|
|
150
124
|
arglist = [
|
|
151
125
|
'--changes-since',
|
|
@@ -177,7 +151,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
177
151
|
self,
|
|
178
152
|
mock_parse_isotime,
|
|
179
153
|
):
|
|
180
|
-
self.
|
|
154
|
+
self.set_compute_api_version('2.58')
|
|
181
155
|
|
|
182
156
|
arglist = [
|
|
183
157
|
'--changes-since',
|
|
@@ -200,7 +174,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
200
174
|
mock_parse_isotime.assert_called_once_with('Invalid time value')
|
|
201
175
|
|
|
202
176
|
def test_server_event_list_with_changes_since_pre_v258(self):
|
|
203
|
-
self.
|
|
177
|
+
self.set_compute_api_version('2.57')
|
|
204
178
|
|
|
205
179
|
arglist = [
|
|
206
180
|
'--changes-since',
|
|
@@ -225,7 +199,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
225
199
|
)
|
|
226
200
|
|
|
227
201
|
def test_server_event_list_with_changes_before(self):
|
|
228
|
-
self.
|
|
202
|
+
self.set_compute_api_version('2.66')
|
|
229
203
|
|
|
230
204
|
arglist = [
|
|
231
205
|
'--changes-before',
|
|
@@ -257,7 +231,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
257
231
|
self,
|
|
258
232
|
mock_parse_isotime,
|
|
259
233
|
):
|
|
260
|
-
self.
|
|
234
|
+
self.set_compute_api_version('2.66')
|
|
261
235
|
|
|
262
236
|
arglist = [
|
|
263
237
|
'--changes-before',
|
|
@@ -278,7 +252,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
278
252
|
mock_parse_isotime.assert_called_once_with('Invalid time value')
|
|
279
253
|
|
|
280
254
|
def test_server_event_list_with_changes_before_pre_v266(self):
|
|
281
|
-
self.
|
|
255
|
+
self.set_compute_api_version('2.65')
|
|
282
256
|
|
|
283
257
|
arglist = [
|
|
284
258
|
'--changes-before',
|
|
@@ -301,7 +275,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
301
275
|
)
|
|
302
276
|
|
|
303
277
|
def test_server_event_list_with_limit(self):
|
|
304
|
-
self.
|
|
278
|
+
self.set_compute_api_version('2.58')
|
|
305
279
|
|
|
306
280
|
arglist = [
|
|
307
281
|
'--limit',
|
|
@@ -323,7 +297,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
323
297
|
)
|
|
324
298
|
|
|
325
299
|
def test_server_event_list_with_limit_pre_v258(self):
|
|
326
|
-
self.
|
|
300
|
+
self.set_compute_api_version('2.57')
|
|
327
301
|
|
|
328
302
|
arglist = [
|
|
329
303
|
'--limit',
|
|
@@ -348,7 +322,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
348
322
|
)
|
|
349
323
|
|
|
350
324
|
def test_server_event_list_with_marker(self):
|
|
351
|
-
self.
|
|
325
|
+
self.set_compute_api_version('2.58')
|
|
352
326
|
|
|
353
327
|
arglist = [
|
|
354
328
|
'--marker',
|
|
@@ -369,7 +343,7 @@ class TestListServerEvent(TestServerEvent):
|
|
|
369
343
|
)
|
|
370
344
|
|
|
371
345
|
def test_server_event_list_with_marker_pre_v258(self):
|
|
372
|
-
self.
|
|
346
|
+
self.set_compute_api_version('2.57')
|
|
373
347
|
|
|
374
348
|
arglist = [
|
|
375
349
|
'--marker',
|
|
@@ -391,7 +365,8 @@ class TestListServerEvent(TestServerEvent):
|
|
|
391
365
|
)
|
|
392
366
|
|
|
393
367
|
|
|
394
|
-
class TestShowServerEvent(
|
|
368
|
+
class TestShowServerEvent(compute_fakes.TestComputev2):
|
|
369
|
+
fake_server = compute_fakes.create_one_sdk_server()
|
|
395
370
|
fake_event = compute_fakes.create_one_server_action()
|
|
396
371
|
columns = (
|
|
397
372
|
'action',
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
# under the License.
|
|
14
14
|
#
|
|
15
15
|
|
|
16
|
-
from unittest import mock
|
|
17
|
-
|
|
18
|
-
from openstack import utils as sdk_utils
|
|
19
16
|
from osc_lib.cli import format_columns
|
|
20
17
|
from osc_lib import exceptions
|
|
21
18
|
|
|
@@ -57,8 +54,9 @@ class TestServerGroupCreate(TestServerGroup):
|
|
|
57
54
|
)
|
|
58
55
|
self.cmd = server_group.CreateServerGroup(self.app, None)
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
def test_server_group_create(self):
|
|
58
|
+
self.set_compute_api_version('2.64')
|
|
59
|
+
|
|
62
60
|
arglist = [
|
|
63
61
|
'--policy',
|
|
64
62
|
'anti-affinity',
|
|
@@ -78,8 +76,9 @@ class TestServerGroupCreate(TestServerGroup):
|
|
|
78
76
|
self.assertCountEqual(self.columns, columns)
|
|
79
77
|
self.assertCountEqual(self.data, data)
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
def test_server_group_create_with_soft_policies(self):
|
|
80
|
+
self.set_compute_api_version('2.64')
|
|
81
|
+
|
|
83
82
|
arglist = [
|
|
84
83
|
'--policy',
|
|
85
84
|
'soft-anti-affinity',
|
|
@@ -99,8 +98,9 @@ class TestServerGroupCreate(TestServerGroup):
|
|
|
99
98
|
self.assertCountEqual(self.columns, columns)
|
|
100
99
|
self.assertCountEqual(self.data, data)
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
def test_server_group_create_with_soft_policies_pre_v215(self):
|
|
102
|
+
self.set_compute_api_version('2.14')
|
|
103
|
+
|
|
104
104
|
arglist = [
|
|
105
105
|
'--policy',
|
|
106
106
|
'soft-anti-affinity',
|
|
@@ -118,8 +118,9 @@ class TestServerGroupCreate(TestServerGroup):
|
|
|
118
118
|
'--os-compute-api-version 2.15 or greater is required', str(ex)
|
|
119
119
|
)
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
def test_server_group_create_with_rules(self):
|
|
122
|
+
self.set_compute_api_version('2.64')
|
|
123
|
+
|
|
123
124
|
arglist = [
|
|
124
125
|
'--policy',
|
|
125
126
|
'soft-anti-affinity',
|
|
@@ -143,10 +144,9 @@ class TestServerGroupCreate(TestServerGroup):
|
|
|
143
144
|
self.assertCountEqual(self.columns, columns)
|
|
144
145
|
self.assertCountEqual(self.data, data)
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
def test_server_group_create_with_rules_pre_v264(self, sm_mock):
|
|
147
|
+
def test_server_group_create_with_rules_pre_v264(self):
|
|
148
|
+
self.set_compute_api_version('2.63')
|
|
149
|
+
|
|
150
150
|
arglist = [
|
|
151
151
|
'--policy',
|
|
152
152
|
'soft-anti-affinity',
|
|
@@ -346,8 +346,7 @@ class TestServerGroupList(TestServerGroup):
|
|
|
346
346
|
]
|
|
347
347
|
self.cmd = server_group.ListServerGroup(self.app, None)
|
|
348
348
|
|
|
349
|
-
|
|
350
|
-
def test_server_group_list(self, sm_mock):
|
|
349
|
+
def test_server_group_list(self):
|
|
351
350
|
arglist = []
|
|
352
351
|
verifylist = [
|
|
353
352
|
('all_projects', False),
|
|
@@ -363,8 +362,7 @@ class TestServerGroupList(TestServerGroup):
|
|
|
363
362
|
self.assertCountEqual(self.list_columns, columns)
|
|
364
363
|
self.assertCountEqual(self.list_data, tuple(data))
|
|
365
364
|
|
|
366
|
-
|
|
367
|
-
def test_server_group_list_with_all_projects_and_long(self, sm_mock):
|
|
365
|
+
def test_server_group_list_with_all_projects_and_long(self):
|
|
368
366
|
arglist = [
|
|
369
367
|
'--all-projects',
|
|
370
368
|
'--long',
|
|
@@ -384,8 +382,7 @@ class TestServerGroupList(TestServerGroup):
|
|
|
384
382
|
self.assertCountEqual(self.list_columns_long, columns)
|
|
385
383
|
self.assertCountEqual(self.list_data_long, tuple(data))
|
|
386
384
|
|
|
387
|
-
|
|
388
|
-
def test_server_group_list_with_limit(self, sm_mock):
|
|
385
|
+
def test_server_group_list_with_limit(self):
|
|
389
386
|
arglist = [
|
|
390
387
|
'--limit',
|
|
391
388
|
'1',
|
|
@@ -402,8 +399,7 @@ class TestServerGroupList(TestServerGroup):
|
|
|
402
399
|
|
|
403
400
|
self.compute_sdk_client.server_groups.assert_called_once_with(limit=1)
|
|
404
401
|
|
|
405
|
-
|
|
406
|
-
def test_server_group_list_with_offset(self, sm_mock):
|
|
402
|
+
def test_server_group_list_with_offset(self):
|
|
407
403
|
arglist = [
|
|
408
404
|
'--offset',
|
|
409
405
|
'5',
|
|
@@ -420,8 +416,9 @@ class TestServerGroupList(TestServerGroup):
|
|
|
420
416
|
|
|
421
417
|
self.compute_sdk_client.server_groups.assert_called_once_with(offset=5)
|
|
422
418
|
|
|
423
|
-
|
|
424
|
-
|
|
419
|
+
def test_server_group_list_v264(self):
|
|
420
|
+
self.set_compute_api_version('2.64')
|
|
421
|
+
|
|
425
422
|
arglist = []
|
|
426
423
|
verifylist = [
|
|
427
424
|
('all_projects', False),
|
|
@@ -434,8 +431,9 @@ class TestServerGroupList(TestServerGroup):
|
|
|
434
431
|
self.assertCountEqual(self.list_columns_v264, columns)
|
|
435
432
|
self.assertCountEqual(self.list_data_v264, tuple(data))
|
|
436
433
|
|
|
437
|
-
|
|
438
|
-
|
|
434
|
+
def test_server_group_list_with_all_projects_and_long_v264(self):
|
|
435
|
+
self.set_compute_api_version('2.64')
|
|
436
|
+
|
|
439
437
|
arglist = [
|
|
440
438
|
'--all-projects',
|
|
441
439
|
'--long',
|
|
@@ -463,8 +461,9 @@ class TestServerGroupShow(TestServerGroup):
|
|
|
463
461
|
)
|
|
464
462
|
self.cmd = server_group.ShowServerGroup(self.app, None)
|
|
465
463
|
|
|
466
|
-
|
|
467
|
-
|
|
464
|
+
def test_server_group_show(self):
|
|
465
|
+
self.set_compute_api_version('2.64')
|
|
466
|
+
|
|
468
467
|
arglist = [
|
|
469
468
|
'affinity_group',
|
|
470
469
|
]
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
-
from unittest import mock
|
|
14
|
-
|
|
15
|
-
from novaclient import api_versions
|
|
16
|
-
from openstack import utils as sdk_utils
|
|
17
13
|
from osc_lib import exceptions
|
|
18
14
|
from osc_lib import utils as common_utils
|
|
19
15
|
|
|
@@ -22,34 +18,7 @@ from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes
|
|
|
22
18
|
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
23
19
|
|
|
24
20
|
|
|
25
|
-
class
|
|
26
|
-
def setUp(self):
|
|
27
|
-
super().setUp()
|
|
28
|
-
|
|
29
|
-
# Get a shortcut to the compute client ServerManager Mock
|
|
30
|
-
self.servers_mock = self.compute_client.servers
|
|
31
|
-
self.servers_mock.reset_mock()
|
|
32
|
-
|
|
33
|
-
# Get a shortcut to the compute client ServerMigrationsManager Mock
|
|
34
|
-
self.server_migrations_mock = self.compute_client.server_migrations
|
|
35
|
-
self.server_migrations_mock.reset_mock()
|
|
36
|
-
|
|
37
|
-
patcher = mock.patch.object(
|
|
38
|
-
sdk_utils, 'supports_microversion', return_value=True
|
|
39
|
-
)
|
|
40
|
-
self.addCleanup(patcher.stop)
|
|
41
|
-
self.supports_microversion_mock = patcher.start()
|
|
42
|
-
|
|
43
|
-
def _set_mock_microversion(self, mock_v):
|
|
44
|
-
"""Set a specific microversion for the mock supports_microversion()."""
|
|
45
|
-
self.supports_microversion_mock.reset_mock(return_value=True)
|
|
46
|
-
self.supports_microversion_mock.side_effect = (
|
|
47
|
-
lambda _, v: api_versions.APIVersion(v)
|
|
48
|
-
<= api_versions.APIVersion(mock_v)
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class TestListMigration(TestServerMigration):
|
|
21
|
+
class TestListMigration(compute_fakes.TestComputev2):
|
|
53
22
|
"""Test fetch all migrations."""
|
|
54
23
|
|
|
55
24
|
MIGRATION_COLUMNS = [
|
|
@@ -83,8 +52,6 @@ class TestListMigration(TestServerMigration):
|
|
|
83
52
|
def setUp(self):
|
|
84
53
|
super().setUp()
|
|
85
54
|
|
|
86
|
-
self._set_mock_microversion('2.1')
|
|
87
|
-
|
|
88
55
|
self.server = compute_fakes.create_one_sdk_server()
|
|
89
56
|
self.compute_sdk_client.find_server.return_value = self.server
|
|
90
57
|
|
|
@@ -189,7 +156,7 @@ class TestListMigrationV223(TestListMigration):
|
|
|
189
156
|
def setUp(self):
|
|
190
157
|
super().setUp()
|
|
191
158
|
|
|
192
|
-
self.
|
|
159
|
+
self.set_compute_api_version('2.23')
|
|
193
160
|
|
|
194
161
|
def test_server_migration_list(self):
|
|
195
162
|
arglist = ['--status', 'migrating']
|
|
@@ -249,7 +216,7 @@ class TestListMigrationV259(TestListMigration):
|
|
|
249
216
|
def setUp(self):
|
|
250
217
|
super().setUp()
|
|
251
218
|
|
|
252
|
-
self.
|
|
219
|
+
self.set_compute_api_version('2.59')
|
|
253
220
|
|
|
254
221
|
def test_server_migration_list(self):
|
|
255
222
|
arglist = [
|
|
@@ -286,7 +253,8 @@ class TestListMigrationV259(TestListMigration):
|
|
|
286
253
|
self.assertEqual(tuple(self.data), tuple(data))
|
|
287
254
|
|
|
288
255
|
def test_server_migration_list_with_limit_pre_v259(self):
|
|
289
|
-
self.
|
|
256
|
+
self.set_compute_api_version('2.58')
|
|
257
|
+
|
|
290
258
|
arglist = ['--status', 'migrating', '--limit', '1']
|
|
291
259
|
verifylist = [('status', 'migrating'), ('limit', 1)]
|
|
292
260
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
@@ -298,7 +266,8 @@ class TestListMigrationV259(TestListMigration):
|
|
|
298
266
|
)
|
|
299
267
|
|
|
300
268
|
def test_server_migration_list_with_marker_pre_v259(self):
|
|
301
|
-
self.
|
|
269
|
+
self.set_compute_api_version('2.58')
|
|
270
|
+
|
|
302
271
|
arglist = ['--status', 'migrating', '--marker', 'test_kp']
|
|
303
272
|
verifylist = [('status', 'migrating'), ('marker', 'test_kp')]
|
|
304
273
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
@@ -310,7 +279,8 @@ class TestListMigrationV259(TestListMigration):
|
|
|
310
279
|
)
|
|
311
280
|
|
|
312
281
|
def test_server_migration_list_with_changes_since_pre_v259(self):
|
|
313
|
-
self.
|
|
282
|
+
self.set_compute_api_version('2.58')
|
|
283
|
+
|
|
314
284
|
arglist = [
|
|
315
285
|
'--status',
|
|
316
286
|
'migrating',
|
|
@@ -371,7 +341,7 @@ class TestListMigrationV266(TestListMigration):
|
|
|
371
341
|
def setUp(self):
|
|
372
342
|
super().setUp()
|
|
373
343
|
|
|
374
|
-
self.
|
|
344
|
+
self.set_compute_api_version('2.66')
|
|
375
345
|
|
|
376
346
|
def test_server_migration_list_with_changes_before(self):
|
|
377
347
|
arglist = [
|
|
@@ -412,7 +382,8 @@ class TestListMigrationV266(TestListMigration):
|
|
|
412
382
|
self.assertEqual(tuple(self.data), tuple(data))
|
|
413
383
|
|
|
414
384
|
def test_server_migration_list_with_changes_before_pre_v266(self):
|
|
415
|
-
self.
|
|
385
|
+
self.set_compute_api_version('2.65')
|
|
386
|
+
|
|
416
387
|
arglist = [
|
|
417
388
|
'--status',
|
|
418
389
|
'migrating',
|
|
@@ -476,16 +447,16 @@ class TestListMigrationV280(TestListMigration):
|
|
|
476
447
|
def setUp(self):
|
|
477
448
|
super().setUp()
|
|
478
449
|
|
|
479
|
-
self.projects_mock = self.
|
|
450
|
+
self.projects_mock = self.identity_client.projects
|
|
480
451
|
self.projects_mock.reset_mock()
|
|
481
452
|
|
|
482
|
-
self.users_mock = self.
|
|
453
|
+
self.users_mock = self.identity_client.users
|
|
483
454
|
self.users_mock.reset_mock()
|
|
484
455
|
|
|
485
456
|
self.projects_mock.get.return_value = self.project
|
|
486
457
|
self.users_mock.get.return_value = self.user
|
|
487
458
|
|
|
488
|
-
self.
|
|
459
|
+
self.set_compute_api_version('2.80')
|
|
489
460
|
|
|
490
461
|
def test_server_migration_list_with_project(self):
|
|
491
462
|
arglist = [
|
|
@@ -540,7 +511,8 @@ class TestListMigrationV280(TestListMigration):
|
|
|
540
511
|
self.MIGRATION_FIELDS.remove('project_id')
|
|
541
512
|
|
|
542
513
|
def test_get_migrations_with_project_pre_v280(self):
|
|
543
|
-
self.
|
|
514
|
+
self.set_compute_api_version('2.79')
|
|
515
|
+
|
|
544
516
|
arglist = [
|
|
545
517
|
'--status',
|
|
546
518
|
'migrating',
|
|
@@ -612,7 +584,8 @@ class TestListMigrationV280(TestListMigration):
|
|
|
612
584
|
self.MIGRATION_FIELDS.remove('user_id')
|
|
613
585
|
|
|
614
586
|
def test_get_migrations_with_user_pre_v280(self):
|
|
615
|
-
self.
|
|
587
|
+
self.set_compute_api_version('2.79')
|
|
588
|
+
|
|
616
589
|
arglist = [
|
|
617
590
|
'--status',
|
|
618
591
|
'migrating',
|
|
@@ -690,7 +663,8 @@ class TestListMigrationV280(TestListMigration):
|
|
|
690
663
|
self.MIGRATION_FIELDS.remove('user_id')
|
|
691
664
|
|
|
692
665
|
def test_get_migrations_with_project_and_user_pre_v280(self):
|
|
693
|
-
self.
|
|
666
|
+
self.set_compute_api_version('2.79')
|
|
667
|
+
|
|
694
668
|
arglist = [
|
|
695
669
|
'--status',
|
|
696
670
|
'migrating',
|
|
@@ -716,7 +690,7 @@ class TestListMigrationV280(TestListMigration):
|
|
|
716
690
|
)
|
|
717
691
|
|
|
718
692
|
|
|
719
|
-
class TestServerMigrationShow(
|
|
693
|
+
class TestServerMigrationShow(compute_fakes.TestComputev2):
|
|
720
694
|
def setUp(self):
|
|
721
695
|
super().setUp()
|
|
722
696
|
|
|
@@ -793,12 +767,12 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
793
767
|
)
|
|
794
768
|
|
|
795
769
|
def test_server_migration_show(self):
|
|
796
|
-
self.
|
|
770
|
+
self.set_compute_api_version('2.24')
|
|
797
771
|
|
|
798
772
|
self._test_server_migration_show()
|
|
799
773
|
|
|
800
774
|
def test_server_migration_show_v259(self):
|
|
801
|
-
self.
|
|
775
|
+
self.set_compute_api_version('2.59')
|
|
802
776
|
|
|
803
777
|
self.columns += ('UUID',)
|
|
804
778
|
self.data += (self.server_migration.uuid,)
|
|
@@ -806,7 +780,7 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
806
780
|
self._test_server_migration_show()
|
|
807
781
|
|
|
808
782
|
def test_server_migration_show_v280(self):
|
|
809
|
-
self.
|
|
783
|
+
self.set_compute_api_version('2.80')
|
|
810
784
|
|
|
811
785
|
self.columns += ('UUID', 'User ID', 'Project ID')
|
|
812
786
|
self.data += (
|
|
@@ -818,7 +792,7 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
818
792
|
self._test_server_migration_show()
|
|
819
793
|
|
|
820
794
|
def test_server_migration_show_pre_v224(self):
|
|
821
|
-
self.
|
|
795
|
+
self.set_compute_api_version('2.23')
|
|
822
796
|
|
|
823
797
|
arglist = [
|
|
824
798
|
self.server.id,
|
|
@@ -835,7 +809,7 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
835
809
|
)
|
|
836
810
|
|
|
837
811
|
def test_server_migration_show_by_uuid(self):
|
|
838
|
-
self.
|
|
812
|
+
self.set_compute_api_version('2.59')
|
|
839
813
|
|
|
840
814
|
self.compute_sdk_client.server_migrations.return_value = iter(
|
|
841
815
|
[self.server_migration]
|
|
@@ -865,7 +839,8 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
865
839
|
self.compute_sdk_client.get_server_migration.assert_not_called()
|
|
866
840
|
|
|
867
841
|
def test_server_migration_show_by_uuid_no_matches(self):
|
|
868
|
-
self.
|
|
842
|
+
self.set_compute_api_version('2.59')
|
|
843
|
+
|
|
869
844
|
self.compute_sdk_client.server_migrations.return_value = iter([])
|
|
870
845
|
|
|
871
846
|
arglist = [
|
|
@@ -884,7 +859,7 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
884
859
|
)
|
|
885
860
|
|
|
886
861
|
def test_server_migration_show_by_uuid_pre_v259(self):
|
|
887
|
-
self.
|
|
862
|
+
self.set_compute_api_version('2.58')
|
|
888
863
|
|
|
889
864
|
arglist = [
|
|
890
865
|
self.server.id,
|
|
@@ -901,7 +876,7 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
901
876
|
)
|
|
902
877
|
|
|
903
878
|
def test_server_migration_show_invalid_id(self):
|
|
904
|
-
self.
|
|
879
|
+
self.set_compute_api_version('2.24')
|
|
905
880
|
|
|
906
881
|
arglist = [
|
|
907
882
|
self.server.id,
|
|
@@ -918,7 +893,7 @@ class TestServerMigrationShow(TestServerMigration):
|
|
|
918
893
|
)
|
|
919
894
|
|
|
920
895
|
|
|
921
|
-
class TestServerMigrationAbort(
|
|
896
|
+
class TestServerMigrationAbort(compute_fakes.TestComputev2):
|
|
922
897
|
def setUp(self):
|
|
923
898
|
super().setUp()
|
|
924
899
|
|
|
@@ -931,7 +906,7 @@ class TestServerMigrationAbort(TestServerMigration):
|
|
|
931
906
|
self.cmd = server_migration.AbortMigration(self.app, None)
|
|
932
907
|
|
|
933
908
|
def test_migration_abort(self):
|
|
934
|
-
self.
|
|
909
|
+
self.set_compute_api_version('2.24')
|
|
935
910
|
|
|
936
911
|
arglist = [
|
|
937
912
|
self.server.id,
|
|
@@ -951,7 +926,7 @@ class TestServerMigrationAbort(TestServerMigration):
|
|
|
951
926
|
self.assertIsNone(result)
|
|
952
927
|
|
|
953
928
|
def test_migration_abort_pre_v224(self):
|
|
954
|
-
self.
|
|
929
|
+
self.set_compute_api_version('2.23')
|
|
955
930
|
|
|
956
931
|
arglist = [
|
|
957
932
|
self.server.id,
|
|
@@ -968,7 +943,7 @@ class TestServerMigrationAbort(TestServerMigration):
|
|
|
968
943
|
)
|
|
969
944
|
|
|
970
945
|
def test_server_migration_abort_by_uuid(self):
|
|
971
|
-
self.
|
|
946
|
+
self.set_compute_api_version('2.59')
|
|
972
947
|
|
|
973
948
|
self.server_migration = compute_fakes.create_one_server_migration()
|
|
974
949
|
self.compute_sdk_client.server_migrations.return_value = iter(
|
|
@@ -996,7 +971,7 @@ class TestServerMigrationAbort(TestServerMigration):
|
|
|
996
971
|
self.assertIsNone(result)
|
|
997
972
|
|
|
998
973
|
def test_server_migration_abort_by_uuid_no_matches(self):
|
|
999
|
-
self.
|
|
974
|
+
self.set_compute_api_version('2.59')
|
|
1000
975
|
|
|
1001
976
|
self.compute_sdk_client.server_migrations.return_value = iter([])
|
|
1002
977
|
|
|
@@ -1016,7 +991,7 @@ class TestServerMigrationAbort(TestServerMigration):
|
|
|
1016
991
|
)
|
|
1017
992
|
|
|
1018
993
|
def test_server_migration_abort_by_uuid_pre_v259(self):
|
|
1019
|
-
self.
|
|
994
|
+
self.set_compute_api_version('2.58')
|
|
1020
995
|
|
|
1021
996
|
arglist = [
|
|
1022
997
|
self.server.id,
|
|
@@ -1033,7 +1008,7 @@ class TestServerMigrationAbort(TestServerMigration):
|
|
|
1033
1008
|
)
|
|
1034
1009
|
|
|
1035
1010
|
|
|
1036
|
-
class TestServerMigrationForceComplete(
|
|
1011
|
+
class TestServerMigrationForceComplete(compute_fakes.TestComputev2):
|
|
1037
1012
|
def setUp(self):
|
|
1038
1013
|
super().setUp()
|
|
1039
1014
|
|
|
@@ -1046,7 +1021,7 @@ class TestServerMigrationForceComplete(TestServerMigration):
|
|
|
1046
1021
|
self.cmd = server_migration.ForceCompleteMigration(self.app, None)
|
|
1047
1022
|
|
|
1048
1023
|
def test_migration_force_complete(self):
|
|
1049
|
-
self.
|
|
1024
|
+
self.set_compute_api_version('2.22')
|
|
1050
1025
|
|
|
1051
1026
|
arglist = [
|
|
1052
1027
|
self.server.id,
|
|
@@ -1066,7 +1041,7 @@ class TestServerMigrationForceComplete(TestServerMigration):
|
|
|
1066
1041
|
self.assertIsNone(result)
|
|
1067
1042
|
|
|
1068
1043
|
def test_migration_force_complete_pre_v222(self):
|
|
1069
|
-
self.
|
|
1044
|
+
self.set_compute_api_version('2.21')
|
|
1070
1045
|
|
|
1071
1046
|
arglist = [
|
|
1072
1047
|
self.server.id,
|
|
@@ -1083,7 +1058,7 @@ class TestServerMigrationForceComplete(TestServerMigration):
|
|
|
1083
1058
|
)
|
|
1084
1059
|
|
|
1085
1060
|
def test_server_migration_force_complete_by_uuid(self):
|
|
1086
|
-
self.
|
|
1061
|
+
self.set_compute_api_version('2.59')
|
|
1087
1062
|
|
|
1088
1063
|
self.server_migration = compute_fakes.create_one_server_migration()
|
|
1089
1064
|
self.compute_sdk_client.server_migrations.return_value = iter(
|
|
@@ -1111,7 +1086,7 @@ class TestServerMigrationForceComplete(TestServerMigration):
|
|
|
1111
1086
|
self.assertIsNone(result)
|
|
1112
1087
|
|
|
1113
1088
|
def test_server_migration_force_complete_by_uuid_no_matches(self):
|
|
1114
|
-
self.
|
|
1089
|
+
self.set_compute_api_version('2.59')
|
|
1115
1090
|
|
|
1116
1091
|
self.compute_sdk_client.server_migrations.return_value = iter([])
|
|
1117
1092
|
|
|
@@ -1131,7 +1106,7 @@ class TestServerMigrationForceComplete(TestServerMigration):
|
|
|
1131
1106
|
)
|
|
1132
1107
|
|
|
1133
1108
|
def test_server_migration_force_complete_by_uuid_pre_v259(self):
|
|
1134
|
-
self.
|
|
1109
|
+
self.set_compute_api_version('2.58')
|
|
1135
1110
|
|
|
1136
1111
|
arglist = [
|
|
1137
1112
|
self.server.id,
|