python-openstackclient 6.6.1__py3-none-any.whl → 7.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/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 +24 -20
- openstackclient/common/configuration.py +1 -1
- openstackclient/common/extension.py +1 -1
- openstackclient/common/limits.py +67 -34
- openstackclient/common/module.py +3 -3
- openstackclient/common/progressbar.py +2 -2
- openstackclient/common/project_cleanup.py +5 -2
- openstackclient/common/quota.py +299 -423
- openstackclient/common/versions.py +1 -1
- openstackclient/compute/client.py +7 -116
- openstackclient/compute/v2/agent.py +75 -49
- openstackclient/compute/v2/aggregate.py +38 -32
- 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 +9 -6
- openstackclient/compute/v2/keypair.py +7 -8
- openstackclient/compute/v2/server.py +479 -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 +125 -43
- 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/releasenotes/notes/volume-backup-created-at-list-b49ec893ae1f6b0d.yaml +4 -0
- 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 +12 -4
- openstackclient/tests/functional/identity/v3/test_application_credential.py +6 -12
- 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_region.py +1 -3
- 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 +1 -3
- 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 +87 -57
- 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 +57 -34
- 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 +2850 -2453
- 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 +12 -12
- 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 +207 -230
- 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 +90 -94
- 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 +10 -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 +9 -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.1.0.dist-info}/AUTHORS +6 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/METADATA +4 -4
- python_openstackclient-7.1.0.dist-info/RECORD +503 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/entry_points.txt +33 -27
- python_openstackclient-7.1.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.1.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
-
from cinderclient import api_versions
|
|
14
13
|
from osc_lib.cli import format_columns
|
|
15
14
|
from osc_lib import exceptions
|
|
16
15
|
|
|
@@ -24,22 +23,12 @@ class TestVolumeAttachment(volume_fakes.TestVolume):
|
|
|
24
23
|
def setUp(self):
|
|
25
24
|
super().setUp()
|
|
26
25
|
|
|
27
|
-
self.volumes_mock = self.volume_client.volumes
|
|
28
|
-
self.volumes_mock.reset_mock()
|
|
29
|
-
|
|
30
|
-
self.volume_attachments_mock = self.volume_client.attachments
|
|
31
|
-
self.volume_attachments_mock.reset_mock()
|
|
32
|
-
|
|
33
26
|
self.projects_mock = self.app.client_manager.identity.projects
|
|
34
|
-
self.projects_mock.reset_mock()
|
|
35
|
-
|
|
36
|
-
self.servers_mock = self.compute_client.servers
|
|
37
|
-
self.servers_mock.reset_mock()
|
|
38
27
|
|
|
39
28
|
|
|
40
29
|
class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
41
30
|
volume = volume_fakes.create_one_volume()
|
|
42
|
-
server = compute_fakes.
|
|
31
|
+
server = compute_fakes.create_one_sdk_server()
|
|
43
32
|
volume_attachment = volume_fakes.create_one_volume_attachment(
|
|
44
33
|
attrs={'instance': server.id, 'volume_id': volume.id},
|
|
45
34
|
)
|
|
@@ -68,17 +57,16 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
68
57
|
def setUp(self):
|
|
69
58
|
super().setUp()
|
|
70
59
|
|
|
71
|
-
self.
|
|
72
|
-
self.
|
|
73
|
-
# VolumeAttachmentManager.create returns a dict
|
|
74
|
-
self.volume_attachments_mock.create.return_value = (
|
|
60
|
+
self.volume_sdk_client.find_volume.return_value = self.volume
|
|
61
|
+
self.volume_sdk_client.create_attachment.return_value = (
|
|
75
62
|
self.volume_attachment.to_dict()
|
|
76
63
|
)
|
|
64
|
+
self.compute_sdk_client.find_server.return_value = self.server
|
|
77
65
|
|
|
78
66
|
self.cmd = volume_attachment.CreateVolumeAttachment(self.app, None)
|
|
79
67
|
|
|
80
68
|
def test_volume_attachment_create(self):
|
|
81
|
-
self.
|
|
69
|
+
self.set_volume_api_version('3.27')
|
|
82
70
|
|
|
83
71
|
arglist = [
|
|
84
72
|
self.volume.id,
|
|
@@ -101,19 +89,23 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
101
89
|
|
|
102
90
|
columns, data = self.cmd.take_action(parsed_args)
|
|
103
91
|
|
|
104
|
-
self.
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
self.volume_sdk_client.find_volume.assert_called_once_with(
|
|
93
|
+
self.volume.id, ignore_missing=False
|
|
94
|
+
)
|
|
95
|
+
self.compute_sdk_client.find_server.assert_called_once_with(
|
|
96
|
+
self.server.id, ignore_missing=False
|
|
97
|
+
)
|
|
98
|
+
self.volume_sdk_client.create_attachment.assert_called_once_with(
|
|
107
99
|
self.volume.id,
|
|
108
|
-
{},
|
|
109
|
-
self.server.id,
|
|
110
|
-
None,
|
|
100
|
+
connector={},
|
|
101
|
+
instance=self.server.id,
|
|
102
|
+
mode=None,
|
|
111
103
|
)
|
|
112
104
|
self.assertEqual(self.columns, columns)
|
|
113
105
|
self.assertCountEqual(self.data, data)
|
|
114
106
|
|
|
115
107
|
def test_volume_attachment_create_with_connect(self):
|
|
116
|
-
self.
|
|
108
|
+
self.set_volume_api_version('3.54')
|
|
117
109
|
|
|
118
110
|
arglist = [
|
|
119
111
|
self.volume.id,
|
|
@@ -164,19 +156,23 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
164
156
|
]
|
|
165
157
|
)
|
|
166
158
|
|
|
167
|
-
self.
|
|
168
|
-
|
|
169
|
-
|
|
159
|
+
self.volume_sdk_client.find_volume.assert_called_once_with(
|
|
160
|
+
self.volume.id, ignore_missing=False
|
|
161
|
+
)
|
|
162
|
+
self.compute_sdk_client.find_server.assert_called_once_with(
|
|
163
|
+
self.server.id, ignore_missing=False
|
|
164
|
+
)
|
|
165
|
+
self.volume_sdk_client.create_attachment.assert_called_once_with(
|
|
170
166
|
self.volume.id,
|
|
171
|
-
connect_info,
|
|
172
|
-
self.server.id,
|
|
173
|
-
'null',
|
|
167
|
+
connector=connect_info,
|
|
168
|
+
instance=self.server.id,
|
|
169
|
+
mode='null',
|
|
174
170
|
)
|
|
175
171
|
self.assertEqual(self.columns, columns)
|
|
176
172
|
self.assertCountEqual(self.data, data)
|
|
177
173
|
|
|
178
174
|
def test_volume_attachment_create_pre_v327(self):
|
|
179
|
-
self.
|
|
175
|
+
self.set_volume_api_version('3.26')
|
|
180
176
|
|
|
181
177
|
arglist = [
|
|
182
178
|
self.volume.id,
|
|
@@ -196,7 +192,7 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
196
192
|
)
|
|
197
193
|
|
|
198
194
|
def test_volume_attachment_create_with_mode_pre_v354(self):
|
|
199
|
-
self.
|
|
195
|
+
self.set_volume_api_version('3.53')
|
|
200
196
|
|
|
201
197
|
arglist = [
|
|
202
198
|
self.volume.id,
|
|
@@ -219,7 +215,7 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment):
|
|
|
219
215
|
)
|
|
220
216
|
|
|
221
217
|
def test_volume_attachment_create_with_connect_missing_arg(self):
|
|
222
|
-
self.
|
|
218
|
+
self.set_volume_api_version('3.54')
|
|
223
219
|
|
|
224
220
|
arglist = [
|
|
225
221
|
self.volume.id,
|
|
@@ -249,12 +245,12 @@ class TestVolumeAttachmentDelete(TestVolumeAttachment):
|
|
|
249
245
|
def setUp(self):
|
|
250
246
|
super().setUp()
|
|
251
247
|
|
|
252
|
-
self.
|
|
248
|
+
self.volume_sdk_client.delete_attachment.return_value = None
|
|
253
249
|
|
|
254
250
|
self.cmd = volume_attachment.DeleteVolumeAttachment(self.app, None)
|
|
255
251
|
|
|
256
252
|
def test_volume_attachment_delete(self):
|
|
257
|
-
self.
|
|
253
|
+
self.set_volume_api_version('3.27')
|
|
258
254
|
|
|
259
255
|
arglist = [
|
|
260
256
|
self.volume_attachment.id,
|
|
@@ -266,13 +262,13 @@ class TestVolumeAttachmentDelete(TestVolumeAttachment):
|
|
|
266
262
|
|
|
267
263
|
result = self.cmd.take_action(parsed_args)
|
|
268
264
|
|
|
269
|
-
self.
|
|
265
|
+
self.volume_sdk_client.delete_attachment.assert_called_once_with(
|
|
270
266
|
self.volume_attachment.id,
|
|
271
267
|
)
|
|
272
268
|
self.assertIsNone(result)
|
|
273
269
|
|
|
274
270
|
def test_volume_attachment_delete_pre_v327(self):
|
|
275
|
-
self.
|
|
271
|
+
self.set_volume_api_version('3.26')
|
|
276
272
|
|
|
277
273
|
arglist = [
|
|
278
274
|
self.volume_attachment.id,
|
|
@@ -317,14 +313,14 @@ class TestVolumeAttachmentSet(TestVolumeAttachment):
|
|
|
317
313
|
def setUp(self):
|
|
318
314
|
super().setUp()
|
|
319
315
|
|
|
320
|
-
self.
|
|
316
|
+
self.volume_sdk_client.update_attachment.return_value = (
|
|
321
317
|
self.volume_attachment
|
|
322
318
|
)
|
|
323
319
|
|
|
324
320
|
self.cmd = volume_attachment.SetVolumeAttachment(self.app, None)
|
|
325
321
|
|
|
326
322
|
def test_volume_attachment_set(self):
|
|
327
|
-
self.
|
|
323
|
+
self.set_volume_api_version('3.27')
|
|
328
324
|
|
|
329
325
|
arglist = [
|
|
330
326
|
self.volume_attachment.id,
|
|
@@ -368,15 +364,15 @@ class TestVolumeAttachmentSet(TestVolumeAttachment):
|
|
|
368
364
|
]
|
|
369
365
|
)
|
|
370
366
|
|
|
371
|
-
self.
|
|
367
|
+
self.volume_sdk_client.update_attachment.assert_called_once_with(
|
|
372
368
|
self.volume_attachment.id,
|
|
373
|
-
connect_info,
|
|
369
|
+
connector=connect_info,
|
|
374
370
|
)
|
|
375
371
|
self.assertEqual(self.columns, columns)
|
|
376
372
|
self.assertCountEqual(self.data, data)
|
|
377
373
|
|
|
378
374
|
def test_volume_attachment_set_pre_v327(self):
|
|
379
|
-
self.
|
|
375
|
+
self.set_volume_api_version('3.26')
|
|
380
376
|
|
|
381
377
|
arglist = [
|
|
382
378
|
self.volume_attachment.id,
|
|
@@ -403,12 +399,12 @@ class TestVolumeAttachmentComplete(TestVolumeAttachment):
|
|
|
403
399
|
def setUp(self):
|
|
404
400
|
super().setUp()
|
|
405
401
|
|
|
406
|
-
self.
|
|
402
|
+
self.volume_sdk_client.complete_attachment.return_value = None
|
|
407
403
|
|
|
408
404
|
self.cmd = volume_attachment.CompleteVolumeAttachment(self.app, None)
|
|
409
405
|
|
|
410
406
|
def test_volume_attachment_complete(self):
|
|
411
|
-
self.
|
|
407
|
+
self.set_volume_api_version('3.44')
|
|
412
408
|
|
|
413
409
|
arglist = [
|
|
414
410
|
self.volume_attachment.id,
|
|
@@ -420,13 +416,13 @@ class TestVolumeAttachmentComplete(TestVolumeAttachment):
|
|
|
420
416
|
|
|
421
417
|
result = self.cmd.take_action(parsed_args)
|
|
422
418
|
|
|
423
|
-
self.
|
|
419
|
+
self.volume_sdk_client.complete_attachment.assert_called_once_with(
|
|
424
420
|
self.volume_attachment.id,
|
|
425
421
|
)
|
|
426
422
|
self.assertIsNone(result)
|
|
427
423
|
|
|
428
424
|
def test_volume_attachment_complete_pre_v344(self):
|
|
429
|
-
self.
|
|
425
|
+
self.set_volume_api_version('3.43')
|
|
430
426
|
|
|
431
427
|
arglist = [
|
|
432
428
|
self.volume_attachment.id,
|
|
@@ -468,14 +464,14 @@ class TestVolumeAttachmentList(TestVolumeAttachment):
|
|
|
468
464
|
super().setUp()
|
|
469
465
|
|
|
470
466
|
self.projects_mock.get.return_value = self.project
|
|
471
|
-
self.
|
|
467
|
+
self.volume_sdk_client.attachments.return_value = (
|
|
472
468
|
self.volume_attachments
|
|
473
469
|
)
|
|
474
470
|
|
|
475
471
|
self.cmd = volume_attachment.ListVolumeAttachment(self.app, None)
|
|
476
472
|
|
|
477
473
|
def test_volume_attachment_list(self):
|
|
478
|
-
self.
|
|
474
|
+
self.set_volume_api_version('3.27')
|
|
479
475
|
|
|
480
476
|
arglist = []
|
|
481
477
|
verifylist = [
|
|
@@ -490,7 +486,7 @@ class TestVolumeAttachmentList(TestVolumeAttachment):
|
|
|
490
486
|
|
|
491
487
|
columns, data = self.cmd.take_action(parsed_args)
|
|
492
488
|
|
|
493
|
-
self.
|
|
489
|
+
self.volume_sdk_client.attachments.assert_called_once_with(
|
|
494
490
|
search_opts={
|
|
495
491
|
'all_tenants': False,
|
|
496
492
|
'project_id': None,
|
|
@@ -504,7 +500,7 @@ class TestVolumeAttachmentList(TestVolumeAttachment):
|
|
|
504
500
|
self.assertCountEqual(tuple(self.data), data)
|
|
505
501
|
|
|
506
502
|
def test_volume_attachment_list_with_options(self):
|
|
507
|
-
self.
|
|
503
|
+
self.set_volume_api_version('3.27')
|
|
508
504
|
|
|
509
505
|
arglist = [
|
|
510
506
|
'--project',
|
|
@@ -530,7 +526,7 @@ class TestVolumeAttachmentList(TestVolumeAttachment):
|
|
|
530
526
|
|
|
531
527
|
columns, data = self.cmd.take_action(parsed_args)
|
|
532
528
|
|
|
533
|
-
self.
|
|
529
|
+
self.volume_sdk_client.attachments.assert_called_once_with(
|
|
534
530
|
search_opts={
|
|
535
531
|
'all_tenants': True,
|
|
536
532
|
'project_id': self.project.id,
|
|
@@ -544,7 +540,7 @@ class TestVolumeAttachmentList(TestVolumeAttachment):
|
|
|
544
540
|
self.assertCountEqual(tuple(self.data), data)
|
|
545
541
|
|
|
546
542
|
def test_volume_attachment_list_pre_v327(self):
|
|
547
|
-
self.
|
|
543
|
+
self.set_volume_api_version('3.26')
|
|
548
544
|
|
|
549
545
|
arglist = []
|
|
550
546
|
verifylist = [
|