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
|
@@ -23,7 +23,7 @@ class FailoverVolumeHost(command.Command):
|
|
|
23
23
|
_description = _("Failover volume host to different backend")
|
|
24
24
|
|
|
25
25
|
def get_parser(self, prog_name):
|
|
26
|
-
parser = super(
|
|
26
|
+
parser = super().get_parser(prog_name)
|
|
27
27
|
parser.add_argument(
|
|
28
28
|
"host", metavar="<host-name>", help=_("Name of volume host")
|
|
29
29
|
)
|
|
@@ -49,7 +49,7 @@ class SetVolumeHost(command.Command):
|
|
|
49
49
|
_description = _("Set volume host properties")
|
|
50
50
|
|
|
51
51
|
def get_parser(self, prog_name):
|
|
52
|
-
parser = super(
|
|
52
|
+
parser = super().get_parser(prog_name)
|
|
53
53
|
parser.add_argument(
|
|
54
54
|
"host", metavar="<host-name>", help=_("Name of volume host")
|
|
55
55
|
)
|
|
@@ -45,7 +45,7 @@ class VolumeIdColumn(cliff_columns.FormattableColumn):
|
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
def __init__(self, value, volume_cache=None):
|
|
48
|
-
super(
|
|
48
|
+
super().__init__(value)
|
|
49
49
|
self._volume_cache = volume_cache or {}
|
|
50
50
|
|
|
51
51
|
def human_readable(self):
|
|
@@ -64,7 +64,7 @@ class CreateVolumeSnapshot(command.ShowOne):
|
|
|
64
64
|
_description = _("Create new volume snapshot")
|
|
65
65
|
|
|
66
66
|
def get_parser(self, prog_name):
|
|
67
|
-
parser = super(
|
|
67
|
+
parser = super().get_parser(prog_name)
|
|
68
68
|
parser.add_argument(
|
|
69
69
|
"snapshot_name",
|
|
70
70
|
metavar="<snapshot-name>",
|
|
@@ -159,7 +159,7 @@ class DeleteVolumeSnapshot(command.Command):
|
|
|
159
159
|
_description = _("Delete volume snapshot(s)")
|
|
160
160
|
|
|
161
161
|
def get_parser(self, prog_name):
|
|
162
|
-
parser = super(
|
|
162
|
+
parser = super().get_parser(prog_name)
|
|
163
163
|
parser.add_argument(
|
|
164
164
|
"snapshots",
|
|
165
165
|
metavar="<snapshot>",
|
|
@@ -210,7 +210,7 @@ class ListVolumeSnapshot(command.Lister):
|
|
|
210
210
|
_description = _("List volume snapshots")
|
|
211
211
|
|
|
212
212
|
def get_parser(self, prog_name):
|
|
213
|
-
parser = super(
|
|
213
|
+
parser = super().get_parser(prog_name)
|
|
214
214
|
parser.add_argument(
|
|
215
215
|
'--all-projects',
|
|
216
216
|
action='store_true',
|
|
@@ -289,7 +289,7 @@ class ListVolumeSnapshot(command.Lister):
|
|
|
289
289
|
volume_cache[s.id] = s
|
|
290
290
|
except Exception:
|
|
291
291
|
# Just forget it if there's any trouble
|
|
292
|
-
pass
|
|
292
|
+
pass # nosec: B110
|
|
293
293
|
_VolumeIdColumn = functools.partial(
|
|
294
294
|
VolumeIdColumn, volume_cache=volume_cache
|
|
295
295
|
)
|
|
@@ -346,7 +346,7 @@ class SetVolumeSnapshot(command.Command):
|
|
|
346
346
|
_description = _("Set volume snapshot properties")
|
|
347
347
|
|
|
348
348
|
def get_parser(self, prog_name):
|
|
349
|
-
parser = super(
|
|
349
|
+
parser = super().get_parser(prog_name)
|
|
350
350
|
parser.add_argument(
|
|
351
351
|
'snapshot',
|
|
352
352
|
metavar='<snapshot>',
|
|
@@ -461,7 +461,7 @@ class ShowVolumeSnapshot(command.ShowOne):
|
|
|
461
461
|
_description = _("Display volume snapshot details")
|
|
462
462
|
|
|
463
463
|
def get_parser(self, prog_name):
|
|
464
|
-
parser = super(
|
|
464
|
+
parser = super().get_parser(prog_name)
|
|
465
465
|
parser.add_argument(
|
|
466
466
|
"snapshot",
|
|
467
467
|
metavar="<snapshot>",
|
|
@@ -488,7 +488,7 @@ class UnsetVolumeSnapshot(command.Command):
|
|
|
488
488
|
_description = _("Unset volume snapshot properties")
|
|
489
489
|
|
|
490
490
|
def get_parser(self, prog_name):
|
|
491
|
-
parser = super(
|
|
491
|
+
parser = super().get_parser(prog_name)
|
|
492
492
|
parser.add_argument(
|
|
493
493
|
'snapshot',
|
|
494
494
|
metavar='<snapshot>',
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
import logging
|
|
18
18
|
|
|
19
|
-
from cinderclient import api_versions
|
|
20
19
|
from osc_lib.command import command
|
|
21
20
|
from osc_lib import exceptions
|
|
22
21
|
from osc_lib import utils
|
|
@@ -31,7 +30,7 @@ class AcceptTransferRequest(command.ShowOne):
|
|
|
31
30
|
_description = _("Accept volume transfer request.")
|
|
32
31
|
|
|
33
32
|
def get_parser(self, prog_name):
|
|
34
|
-
parser = super(
|
|
33
|
+
parser = super().get_parser(prog_name)
|
|
35
34
|
parser.add_argument(
|
|
36
35
|
'transfer_request',
|
|
37
36
|
metavar="<transfer-request-id>",
|
|
@@ -70,31 +69,12 @@ class CreateTransferRequest(command.ShowOne):
|
|
|
70
69
|
_description = _("Create volume transfer request.")
|
|
71
70
|
|
|
72
71
|
def get_parser(self, prog_name):
|
|
73
|
-
parser = super(
|
|
72
|
+
parser = super().get_parser(prog_name)
|
|
74
73
|
parser.add_argument(
|
|
75
74
|
'--name',
|
|
76
75
|
metavar="<name>",
|
|
77
76
|
help=_('New transfer request name (default to None)'),
|
|
78
77
|
)
|
|
79
|
-
parser.add_argument(
|
|
80
|
-
'--snapshots',
|
|
81
|
-
action='store_true',
|
|
82
|
-
dest='snapshots',
|
|
83
|
-
help=_(
|
|
84
|
-
'Allow transfer volumes without snapshots (default) '
|
|
85
|
-
'(supported by --os-volume-api-version 3.55 or later)'
|
|
86
|
-
),
|
|
87
|
-
default=None,
|
|
88
|
-
)
|
|
89
|
-
parser.add_argument(
|
|
90
|
-
'--no-snapshots',
|
|
91
|
-
action='store_false',
|
|
92
|
-
dest='snapshots',
|
|
93
|
-
help=_(
|
|
94
|
-
'Disallow transfer volumes without snapshots '
|
|
95
|
-
'(supported by --os-volume-api-version 3.55 or later)'
|
|
96
|
-
),
|
|
97
|
-
)
|
|
98
78
|
parser.add_argument(
|
|
99
79
|
'volume',
|
|
100
80
|
metavar="<volume>",
|
|
@@ -107,18 +87,6 @@ class CreateTransferRequest(command.ShowOne):
|
|
|
107
87
|
|
|
108
88
|
kwargs = {}
|
|
109
89
|
|
|
110
|
-
if parsed_args.snapshots is not None:
|
|
111
|
-
if volume_client.api_version < api_versions.APIVersion('3.55'):
|
|
112
|
-
msg = _(
|
|
113
|
-
"--os-volume-api-version 3.55 or greater is required to "
|
|
114
|
-
"support the '--(no-)snapshots' option"
|
|
115
|
-
)
|
|
116
|
-
raise exceptions.CommandError(msg)
|
|
117
|
-
|
|
118
|
-
# unfortunately this option is negative so we have to reverse
|
|
119
|
-
# things
|
|
120
|
-
kwargs['no_snapshots'] = not parsed_args.snapshots
|
|
121
|
-
|
|
122
90
|
volume_id = utils.find_resource(
|
|
123
91
|
volume_client.volumes,
|
|
124
92
|
parsed_args.volume,
|
|
@@ -137,7 +105,7 @@ class DeleteTransferRequest(command.Command):
|
|
|
137
105
|
_description = _("Delete volume transfer request(s).")
|
|
138
106
|
|
|
139
107
|
def get_parser(self, prog_name):
|
|
140
|
-
parser = super(
|
|
108
|
+
parser = super().get_parser(prog_name)
|
|
141
109
|
parser.add_argument(
|
|
142
110
|
'transfer_request',
|
|
143
111
|
metavar="<transfer-request>",
|
|
@@ -180,7 +148,7 @@ class ListTransferRequest(command.Lister):
|
|
|
180
148
|
_description = _("Lists all volume transfer requests.")
|
|
181
149
|
|
|
182
150
|
def get_parser(self, prog_name):
|
|
183
|
-
parser = super(
|
|
151
|
+
parser = super().get_parser(prog_name)
|
|
184
152
|
parser.add_argument(
|
|
185
153
|
'--all-projects',
|
|
186
154
|
dest='all_projects',
|
|
@@ -214,7 +182,7 @@ class ShowTransferRequest(command.ShowOne):
|
|
|
214
182
|
_description = _("Show volume transfer request details.")
|
|
215
183
|
|
|
216
184
|
def get_parser(self, prog_name):
|
|
217
|
-
parser = super(
|
|
185
|
+
parser = super().get_parser(prog_name)
|
|
218
186
|
parser.add_argument(
|
|
219
187
|
'transfer_request',
|
|
220
188
|
metavar="<transfer-request>",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
import functools
|
|
18
18
|
import logging
|
|
19
19
|
|
|
20
|
-
from cinderclient import api_versions
|
|
21
20
|
from cliff import columns as cliff_columns
|
|
22
21
|
from osc_lib.cli import format_columns
|
|
23
22
|
from osc_lib.cli import parseractions
|
|
@@ -44,7 +43,7 @@ class EncryptionInfoColumn(cliff_columns.FormattableColumn):
|
|
|
44
43
|
"""
|
|
45
44
|
|
|
46
45
|
def __init__(self, value, encryption_data=None):
|
|
47
|
-
super(
|
|
46
|
+
super().__init__(value)
|
|
48
47
|
self._encryption_data = encryption_data or {}
|
|
49
48
|
|
|
50
49
|
def _get_encryption_info(self):
|
|
@@ -110,7 +109,7 @@ class CreateVolumeType(command.ShowOne):
|
|
|
110
109
|
_description = _("Create new volume type")
|
|
111
110
|
|
|
112
111
|
def get_parser(self, prog_name):
|
|
113
|
-
parser = super(
|
|
112
|
+
parser = super().get_parser(prog_name)
|
|
114
113
|
parser.add_argument(
|
|
115
114
|
"name",
|
|
116
115
|
metavar="<name>",
|
|
@@ -331,7 +330,7 @@ class DeleteVolumeType(command.Command):
|
|
|
331
330
|
_description = _("Delete volume type(s)")
|
|
332
331
|
|
|
333
332
|
def get_parser(self, prog_name):
|
|
334
|
-
parser = super(
|
|
333
|
+
parser = super().get_parser(prog_name)
|
|
335
334
|
parser.add_argument(
|
|
336
335
|
"volume_types",
|
|
337
336
|
metavar="<volume-type>",
|
|
@@ -373,7 +372,7 @@ class ListVolumeType(command.Lister):
|
|
|
373
372
|
_description = _("List volume types")
|
|
374
373
|
|
|
375
374
|
def get_parser(self, prog_name):
|
|
376
|
-
parser = super(
|
|
375
|
+
parser = super().get_parser(prog_name)
|
|
377
376
|
parser.add_argument(
|
|
378
377
|
'--long',
|
|
379
378
|
action='store_true',
|
|
@@ -409,59 +408,6 @@ class ListVolumeType(command.Lister):
|
|
|
409
408
|
"(admin only)"
|
|
410
409
|
),
|
|
411
410
|
)
|
|
412
|
-
parser.add_argument(
|
|
413
|
-
'--property',
|
|
414
|
-
metavar='<key=value>',
|
|
415
|
-
action=parseractions.KeyValueAction,
|
|
416
|
-
dest='properties',
|
|
417
|
-
help=_(
|
|
418
|
-
'Filter by a property on the volume types '
|
|
419
|
-
'(repeat option to filter by multiple properties) '
|
|
420
|
-
'(admin only except for user-visible extra specs) '
|
|
421
|
-
'(supported by --os-volume-api-version 3.52 or above)'
|
|
422
|
-
),
|
|
423
|
-
)
|
|
424
|
-
parser.add_argument(
|
|
425
|
-
'--multiattach',
|
|
426
|
-
action='store_true',
|
|
427
|
-
default=False,
|
|
428
|
-
help=_(
|
|
429
|
-
"List only volume types with multi-attach enabled "
|
|
430
|
-
"(this is an alias for '--property multiattach=<is> True') "
|
|
431
|
-
"(supported by --os-volume-api-version 3.52 or above)"
|
|
432
|
-
),
|
|
433
|
-
)
|
|
434
|
-
parser.add_argument(
|
|
435
|
-
'--cacheable',
|
|
436
|
-
action='store_true',
|
|
437
|
-
default=False,
|
|
438
|
-
help=_(
|
|
439
|
-
"List only volume types with caching enabled "
|
|
440
|
-
"(this is an alias for '--property cacheable=<is> True') "
|
|
441
|
-
"(admin only) "
|
|
442
|
-
"(supported by --os-volume-api-version 3.52 or above)"
|
|
443
|
-
),
|
|
444
|
-
)
|
|
445
|
-
parser.add_argument(
|
|
446
|
-
'--replicated',
|
|
447
|
-
action='store_true',
|
|
448
|
-
default=False,
|
|
449
|
-
help=_(
|
|
450
|
-
"List only volume types with replication enabled "
|
|
451
|
-
"(this is an alias for '--property replication_enabled=<is> True') " # noqa: E501
|
|
452
|
-
"(supported by --os-volume-api-version 3.52 or above)"
|
|
453
|
-
),
|
|
454
|
-
)
|
|
455
|
-
parser.add_argument(
|
|
456
|
-
'--availability-zone',
|
|
457
|
-
action='append',
|
|
458
|
-
dest='availability_zones',
|
|
459
|
-
help=_(
|
|
460
|
-
"List only volume types with this availability configured "
|
|
461
|
-
"(this is an alias for '--property RESKEY:availability_zones:<az>') " # noqa: E501
|
|
462
|
-
"(repeat option to filter on multiple availability zones)"
|
|
463
|
-
),
|
|
464
|
-
)
|
|
465
411
|
return parser
|
|
466
412
|
|
|
467
413
|
def take_action(self, parsed_args):
|
|
@@ -473,14 +419,12 @@ class ListVolumeType(command.Lister):
|
|
|
473
419
|
'Name',
|
|
474
420
|
'Is Public',
|
|
475
421
|
'Description',
|
|
476
|
-
'Extra Specs',
|
|
477
422
|
]
|
|
478
423
|
column_headers = [
|
|
479
424
|
'ID',
|
|
480
425
|
'Name',
|
|
481
426
|
'Is Public',
|
|
482
427
|
'Description',
|
|
483
|
-
'Properties',
|
|
484
428
|
]
|
|
485
429
|
else:
|
|
486
430
|
columns = ['ID', 'Name', 'Is Public']
|
|
@@ -489,33 +433,7 @@ class ListVolumeType(command.Lister):
|
|
|
489
433
|
if parsed_args.default:
|
|
490
434
|
data = [volume_client.volume_types.default()]
|
|
491
435
|
else:
|
|
492
|
-
search_opts = {}
|
|
493
|
-
properties = {}
|
|
494
|
-
if parsed_args.properties:
|
|
495
|
-
properties.update(parsed_args.properties)
|
|
496
|
-
if parsed_args.multiattach:
|
|
497
|
-
properties['multiattach'] = '<is> True'
|
|
498
|
-
if parsed_args.cacheable:
|
|
499
|
-
properties['cacheable'] = '<is> True'
|
|
500
|
-
if parsed_args.replicated:
|
|
501
|
-
properties['replication_enabled'] = '<is> True'
|
|
502
|
-
if parsed_args.availability_zones:
|
|
503
|
-
properties['RESKEY:availability_zones'] = ','.join(
|
|
504
|
-
parsed_args.availability_zones
|
|
505
|
-
)
|
|
506
|
-
if properties:
|
|
507
|
-
if volume_client.api_version < api_versions.APIVersion('3.52'):
|
|
508
|
-
msg = _(
|
|
509
|
-
"--os-volume-api-version 3.52 or greater is required "
|
|
510
|
-
"to use the '--property' option or any of the alias "
|
|
511
|
-
"options"
|
|
512
|
-
)
|
|
513
|
-
raise exceptions.CommandError(msg)
|
|
514
|
-
|
|
515
|
-
search_opts['extra_specs'] = properties
|
|
516
|
-
|
|
517
436
|
data = volume_client.volume_types.list(
|
|
518
|
-
search_opts=search_opts,
|
|
519
437
|
is_public=parsed_args.is_public,
|
|
520
438
|
)
|
|
521
439
|
|
|
@@ -565,7 +483,7 @@ class SetVolumeType(command.Command):
|
|
|
565
483
|
_description = _("Set volume type properties")
|
|
566
484
|
|
|
567
485
|
def get_parser(self, prog_name):
|
|
568
|
-
parser = super(
|
|
486
|
+
parser = super().get_parser(prog_name)
|
|
569
487
|
parser.add_argument(
|
|
570
488
|
'volume_type',
|
|
571
489
|
metavar='<volume-type>',
|
|
@@ -804,7 +722,7 @@ class ShowVolumeType(command.ShowOne):
|
|
|
804
722
|
_description = _("Display volume type details")
|
|
805
723
|
|
|
806
724
|
def get_parser(self, prog_name):
|
|
807
|
-
parser = super(
|
|
725
|
+
parser = super().get_parser(prog_name)
|
|
808
726
|
parser.add_argument(
|
|
809
727
|
"volume_type",
|
|
810
728
|
metavar="<volume-type>",
|
|
@@ -875,7 +793,7 @@ class UnsetVolumeType(command.Command):
|
|
|
875
793
|
_description = _("Unset volume type properties")
|
|
876
794
|
|
|
877
795
|
def get_parser(self, prog_name):
|
|
878
|
-
parser = super(
|
|
796
|
+
parser = super().get_parser(prog_name)
|
|
879
797
|
parser.add_argument(
|
|
880
798
|
'volume_type',
|
|
881
799
|
metavar='<volume-type>',
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
3
|
+
# not use this file except in compliance with the License. You may obtain
|
|
4
|
+
# a copy of the License at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
10
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
11
|
+
# License for the specific language governing permissions and limitations
|
|
12
|
+
# under the License.
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
"""Service action implementations"""
|
|
16
|
+
|
|
17
|
+
from cinderclient import api_versions
|
|
18
|
+
from osc_lib import utils
|
|
19
|
+
|
|
20
|
+
from openstackclient.volume.v2 import service as service_v2
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ListService(service_v2.ListService):
|
|
24
|
+
|
|
25
|
+
def take_action(self, parsed_args):
|
|
26
|
+
service_client = self.app.client_manager.volume
|
|
27
|
+
|
|
28
|
+
columns = [
|
|
29
|
+
"Binary",
|
|
30
|
+
"Host",
|
|
31
|
+
"Zone",
|
|
32
|
+
"Status",
|
|
33
|
+
"State",
|
|
34
|
+
"Updated At",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
if service_client.api_version >= api_versions.APIVersion('3.7'):
|
|
38
|
+
columns.append("Cluster")
|
|
39
|
+
if service_client.api_version >= api_versions.APIVersion('3.49'):
|
|
40
|
+
columns.append("Backend State")
|
|
41
|
+
if parsed_args.long:
|
|
42
|
+
columns.append("Disabled Reason")
|
|
43
|
+
|
|
44
|
+
data = service_client.services.list(
|
|
45
|
+
parsed_args.host, parsed_args.service
|
|
46
|
+
)
|
|
47
|
+
return (
|
|
48
|
+
columns,
|
|
49
|
+
(
|
|
50
|
+
utils.get_item_properties(
|
|
51
|
+
s,
|
|
52
|
+
columns,
|
|
53
|
+
)
|
|
54
|
+
for s in data
|
|
55
|
+
),
|
|
56
|
+
)
|