python-openstackclient 9.0.0__py3-none-any.whl → 10.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/__init__.py +2 -6
- openstackclient/api/api.py +41 -23
- openstackclient/api/compute_v2.py +44 -25
- openstackclient/api/object_store_v1.py +75 -97
- openstackclient/api/volume_v2.py +2 -1
- openstackclient/api/volume_v3.py +2 -1
- openstackclient/common/availability_zone.py +59 -43
- openstackclient/common/clientmanager.py +56 -29
- openstackclient/common/configuration.py +10 -3
- openstackclient/common/envvars.py +2 -2
- openstackclient/common/extension.py +14 -5
- openstackclient/common/limits.py +10 -5
- openstackclient/common/module.py +36 -34
- openstackclient/common/pagination.py +50 -6
- openstackclient/common/progressbar.py +7 -6
- openstackclient/common/project_cleanup.py +11 -6
- openstackclient/common/quota.py +105 -103
- openstackclient/common/versions.py +8 -2
- openstackclient/compute/client.py +7 -3
- openstackclient/compute/v2/agent.py +17 -10
- openstackclient/compute/v2/aggregate.py +36 -22
- openstackclient/compute/v2/console.py +14 -8
- openstackclient/compute/v2/console_connection.py +11 -3
- openstackclient/compute/v2/flavor.py +42 -22
- openstackclient/compute/v2/host.py +14 -6
- openstackclient/compute/v2/hypervisor.py +16 -5
- openstackclient/compute/v2/hypervisor_stats.py +10 -2
- openstackclient/compute/v2/keypair.py +35 -16
- openstackclient/compute/v2/server.py +268 -179
- openstackclient/compute/v2/server_backup.py +10 -4
- openstackclient/compute/v2/server_event.py +28 -12
- openstackclient/compute/v2/server_group.py +23 -11
- openstackclient/compute/v2/server_image.py +19 -10
- openstackclient/compute/v2/server_migration.py +27 -10
- openstackclient/compute/v2/server_share.py +274 -0
- openstackclient/compute/v2/server_volume.py +13 -5
- openstackclient/compute/v2/service.py +17 -8
- openstackclient/compute/v2/usage.py +28 -23
- openstackclient/identity/client.py +8 -3
- openstackclient/identity/common.py +82 -47
- openstackclient/identity/v2_0/catalog.py +14 -7
- openstackclient/identity/v2_0/ec2creds.py +21 -10
- openstackclient/identity/v2_0/endpoint.py +23 -11
- openstackclient/identity/v2_0/project.py +25 -14
- openstackclient/identity/v2_0/role.py +28 -14
- openstackclient/identity/v2_0/role_assignment.py +9 -3
- openstackclient/identity/v2_0/service.py +23 -11
- openstackclient/identity/v2_0/token.py +12 -5
- openstackclient/identity/v2_0/user.py +26 -15
- openstackclient/identity/v3/access_rule.py +32 -12
- openstackclient/identity/v3/application_credential.py +66 -24
- openstackclient/identity/v3/catalog.py +14 -7
- openstackclient/identity/v3/consumer.py +22 -11
- openstackclient/identity/v3/credential.py +39 -17
- openstackclient/identity/v3/domain.py +40 -19
- openstackclient/identity/v3/ec2creds.py +25 -12
- openstackclient/identity/v3/endpoint.py +98 -64
- openstackclient/identity/v3/endpoint_group.py +28 -17
- openstackclient/identity/v3/federation_protocol.py +44 -20
- openstackclient/identity/v3/group.py +64 -40
- openstackclient/identity/v3/identity_provider.py +95 -57
- openstackclient/identity/v3/implied_role.py +21 -9
- openstackclient/identity/v3/limit.py +42 -17
- openstackclient/identity/v3/mapping.py +58 -28
- openstackclient/identity/v3/policy.py +23 -12
- openstackclient/identity/v3/project.py +59 -26
- openstackclient/identity/v3/region.py +39 -17
- openstackclient/identity/v3/registered_limit.py +41 -16
- openstackclient/identity/v3/role.py +62 -31
- openstackclient/identity/v3/role_assignment.py +25 -7
- openstackclient/identity/v3/service.py +39 -17
- openstackclient/identity/v3/service_provider.py +40 -16
- openstackclient/identity/v3/tag.py +23 -6
- openstackclient/identity/v3/token.py +30 -14
- openstackclient/identity/v3/trust.py +39 -18
- openstackclient/identity/v3/unscoped_saml.py +10 -2
- openstackclient/identity/v3/user.py +86 -36
- openstackclient/image/client.py +7 -3
- openstackclient/image/v1/image.py +33 -26
- openstackclient/image/v2/cache.py +16 -11
- openstackclient/image/v2/image.py +88 -56
- openstackclient/image/v2/info.py +7 -1
- openstackclient/image/v2/metadef_namespaces.py +117 -20
- openstackclient/image/v2/metadef_objects.py +32 -19
- openstackclient/image/v2/metadef_properties.py +30 -16
- openstackclient/image/v2/metadef_resource_type_association.py +14 -7
- openstackclient/image/v2/metadef_resource_types.py +7 -1
- openstackclient/image/v2/task.py +25 -27
- openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +7 -192
- openstackclient/network/client.py +7 -2
- openstackclient/network/common.py +16 -241
- openstackclient/network/utils.py +27 -54
- openstackclient/network/v2/address_group.py +39 -16
- openstackclient/network/v2/address_scope.py +36 -20
- openstackclient/network/v2/bgpvpn/bgpvpn.py +477 -0
- openstackclient/network/v2/bgpvpn/constants.py +30 -0
- openstackclient/network/v2/bgpvpn/network_association.py +226 -0
- openstackclient/network/v2/bgpvpn/port_association.py +504 -0
- openstackclient/network/v2/bgpvpn/router_association.py +301 -0
- openstackclient/network/v2/default_security_group_rule.py +31 -14
- openstackclient/network/v2/floating_ip.py +121 -162
- openstackclient/network/v2/floating_ip_port_forwarding.py +41 -19
- openstackclient/network/v2/fwaas/__init__.py +0 -0
- openstackclient/network/v2/fwaas/group.py +499 -0
- openstackclient/network/v2/fwaas/policy.py +518 -0
- openstackclient/network/v2/fwaas/rule.py +610 -0
- openstackclient/network/v2/ip_availability.py +25 -8
- openstackclient/network/v2/l3_conntrack_helper.py +35 -13
- openstackclient/network/v2/local_ip.py +27 -13
- openstackclient/network/v2/local_ip_association.py +17 -7
- openstackclient/network/v2/ndp_proxy.py +23 -11
- openstackclient/network/v2/network.py +213 -213
- openstackclient/network/v2/network_agent.py +77 -34
- openstackclient/network/v2/network_auto_allocated_topology.py +27 -15
- openstackclient/network/v2/network_flavor.py +45 -21
- openstackclient/network/v2/network_flavor_profile.py +42 -17
- openstackclient/network/v2/network_meter.py +39 -15
- openstackclient/network/v2/network_meter_rule.py +40 -12
- openstackclient/network/v2/network_qos_policy.py +39 -21
- openstackclient/network/v2/network_qos_rule.py +48 -18
- openstackclient/network/v2/network_qos_rule_type.py +28 -9
- openstackclient/network/v2/network_rbac.py +34 -16
- openstackclient/network/v2/network_segment.py +32 -11
- openstackclient/network/v2/network_segment_range.py +70 -31
- openstackclient/network/v2/network_service_provider.py +7 -1
- openstackclient/network/v2/network_trunk.py +41 -22
- openstackclient/network/v2/port.py +141 -40
- openstackclient/network/v2/router.py +101 -67
- openstackclient/network/v2/security_group.py +97 -198
- openstackclient/network/v2/security_group_rule.py +115 -282
- openstackclient/network/v2/subnet.py +63 -34
- openstackclient/network/v2/subnet_pool.py +42 -24
- openstackclient/network/v2/taas/tap_flow.py +35 -14
- openstackclient/network/v2/taas/tap_mirror.py +28 -14
- openstackclient/network/v2/taas/tap_service.py +26 -12
- openstackclient/object/client.py +7 -2
- openstackclient/object/v1/account.py +13 -6
- openstackclient/object/v1/container.py +28 -16
- openstackclient/object/v1/object.py +28 -16
- openstackclient/py.typed +0 -0
- openstackclient/shell.py +46 -10
- openstackclient/tests/functional/base.py +55 -20
- openstackclient/tests/functional/common/test_extension.py +4 -0
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +14 -13
- openstackclient/tests/functional/compute/v2/test_flavor.py +3 -1
- openstackclient/tests/functional/compute/v2/test_server.py +3 -0
- openstackclient/tests/functional/identity/v2/common.py +10 -6
- openstackclient/tests/functional/identity/v2/test_role.py +4 -4
- openstackclient/tests/functional/identity/v3/common.py +59 -19
- openstackclient/tests/functional/identity/v3/test_application_credential.py +1 -1
- openstackclient/tests/functional/identity/v3/test_group.py +20 -20
- openstackclient/tests/functional/identity/v3/test_idp.py +3 -1
- openstackclient/tests/functional/identity/v3/test_mapping.py +81 -0
- openstackclient/tests/functional/identity/v3/test_project.py +10 -10
- openstackclient/tests/functional/identity/v3/test_role.py +18 -18
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +12 -12
- openstackclient/tests/functional/identity/v3/test_user.py +8 -8
- openstackclient/tests/functional/image/base.py +1 -6
- openstackclient/tests/functional/network/v2/common.py +5 -2
- openstackclient/tests/functional/network/v2/test_floating_ip.py +10 -4
- openstackclient/tests/functional/network/v2/test_ip_availability.py +4 -0
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +3 -2
- openstackclient/tests/functional/network/v2/test_network_segment.py +5 -0
- openstackclient/tests/functional/network/v2/test_subnet.py +13 -9
- openstackclient/tests/functional/object/v1/common.py +4 -0
- openstackclient/tests/functional/volume/v2/common.py +4 -0
- openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +27 -11
- openstackclient/tests/functional/volume/v2/test_volume_type.py +2 -2
- openstackclient/tests/functional/volume/v3/common.py +4 -0
- openstackclient/tests/functional/volume/v3/test_volume_group.py +163 -0
- openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +11 -7
- openstackclient/tests/functional/volume/v3/test_volume_type.py +2 -2
- openstackclient/tests/unit/common/test_availability_zone.py +35 -49
- openstackclient/tests/unit/common/test_extension.py +2 -2
- openstackclient/tests/unit/common/test_limits.py +1 -1
- openstackclient/tests/unit/common/test_module.py +82 -44
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
- openstackclient/tests/unit/common/test_quota.py +15 -26
- openstackclient/tests/unit/compute/v2/fakes.py +26 -57
- openstackclient/tests/unit/compute/v2/test_agent.py +4 -4
- openstackclient/tests/unit/compute/v2/test_aggregate.py +1 -1
- openstackclient/tests/unit/compute/v2/test_console.py +2 -2
- openstackclient/tests/unit/compute/v2/test_console_connection.py +1 -1
- openstackclient/tests/unit/compute/v2/test_flavor.py +29 -3
- openstackclient/tests/unit/compute/v2/test_host.py +3 -3
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +2 -2
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +1 -1
- openstackclient/tests/unit/compute/v2/test_keypair.py +7 -7
- openstackclient/tests/unit/compute/v2/test_server.py +26 -111
- openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_event.py +2 -2
- openstackclient/tests/unit/compute/v2/test_server_group.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_image.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_migration.py +4 -4
- openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
- openstackclient/tests/unit/compute/v2/test_server_volume.py +2 -2
- openstackclient/tests/unit/compute/v2/test_service.py +3 -3
- openstackclient/tests/unit/compute/v2/test_usage.py +1 -1
- openstackclient/tests/unit/identity/v2_0/fakes.py +3 -7
- openstackclient/tests/unit/identity/v2_0/test_endpoint.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_project.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_role.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_role_assignment.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_service.py +1 -1
- openstackclient/tests/unit/identity/v2_0/test_token.py +2 -2
- openstackclient/tests/unit/identity/v2_0/test_user.py +1 -1
- openstackclient/tests/unit/identity/v3/fakes.py +8 -38
- openstackclient/tests/unit/identity/v3/test_access_rule.py +3 -3
- openstackclient/tests/unit/identity/v3/test_application_credential.py +4 -4
- openstackclient/tests/unit/identity/v3/test_credential.py +5 -5
- openstackclient/tests/unit/identity/v3/test_domain.py +5 -5
- openstackclient/tests/unit/identity/v3/test_endpoint.py +6 -6
- openstackclient/tests/unit/identity/v3/test_endpoint_group.py +1 -1
- openstackclient/tests/unit/identity/v3/test_group.py +12 -22
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
- openstackclient/tests/unit/identity/v3/test_implied_role.py +1 -1
- openstackclient/tests/unit/identity/v3/test_limit.py +5 -5
- openstackclient/tests/unit/identity/v3/test_mappings.py +163 -79
- openstackclient/tests/unit/identity/v3/test_project.py +28 -5
- openstackclient/tests/unit/identity/v3/test_protocol.py +3 -3
- openstackclient/tests/unit/identity/v3/test_region.py +5 -5
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +5 -5
- openstackclient/tests/unit/identity/v3/test_role.py +8 -8
- openstackclient/tests/unit/identity/v3/test_role_assignment.py +1 -1
- openstackclient/tests/unit/identity/v3/test_service.py +5 -5
- openstackclient/tests/unit/identity/v3/test_token.py +2 -2
- openstackclient/tests/unit/identity/v3/test_trust.py +4 -4
- openstackclient/tests/unit/identity/v3/test_user.py +77 -10
- openstackclient/tests/unit/image/v2/test_image.py +11 -11
- openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +105 -6
- openstackclient/tests/unit/network/test_common.py +0 -155
- openstackclient/tests/unit/network/v2/bgpvpn/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/bgpvpn/fakes.py +179 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_bgpvpn.py +584 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_network_association.py +285 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_port_association.py +384 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_router_association.py +297 -0
- openstackclient/tests/unit/network/v2/fakes.py +5 -77
- openstackclient/tests/unit/network/v2/fwaas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/fwaas/test_group.py +923 -0
- openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
- openstackclient/tests/unit/network/v2/fwaas/test_rule.py +1005 -0
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_flow.py → test_tap_flow.py} +18 -25
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_mirror.py → test_tap_mirror.py} +19 -29
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_service.py → test_tap_service.py} +19 -29
- openstackclient/tests/unit/network/v2/test_address_group.py +26 -2
- openstackclient/tests/unit/network/v2/test_address_scope.py +24 -0
- openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +27 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +37 -13
- openstackclient/tests/unit/network/v2/test_ip_availability.py +25 -0
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +29 -3
- openstackclient/tests/unit/network/v2/test_network.py +74 -12
- openstackclient/tests/unit/network/v2/test_network_agent.py +58 -5
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
- openstackclient/tests/unit/network/v2/test_network_flavor.py +26 -2
- openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +24 -0
- openstackclient/tests/unit/network/v2/test_network_meter.py +24 -0
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +25 -1
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +24 -0
- openstackclient/tests/unit/network/v2/test_network_rbac.py +25 -1
- openstackclient/tests/unit/network/v2/test_network_segment.py +25 -1
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +31 -10
- openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/unit/network/v2/test_port.py +166 -0
- openstackclient/tests/unit/network/v2/test_router.py +36 -16
- openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +11 -8
- openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +28 -37
- openstackclient/tests/unit/network/v2/test_subnet.py +30 -5
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +26 -1
- openstackclient/tests/unit/object/v1/fakes.py +8 -7
- openstackclient/tests/unit/object/v1/test_container.py +65 -101
- openstackclient/tests/unit/object/v1/test_container_all.py +8 -1
- openstackclient/tests/unit/object/v1/test_object.py +44 -84
- openstackclient/tests/unit/object/v1/test_object_all.py +8 -1
- openstackclient/tests/unit/test_hacking.py +108 -0
- openstackclient/tests/unit/volume/v2/fakes.py +21 -140
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +6 -14
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +8 -1
- openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
- openstackclient/tests/unit/volume/v3/fakes.py +205 -100
- openstackclient/tests/unit/volume/v3/test_backup_record.py +114 -0
- openstackclient/tests/unit/volume/v3/test_consistency_group.py +720 -0
- openstackclient/tests/unit/volume/v3/test_consistency_group_snapshot.py +354 -0
- openstackclient/tests/unit/volume/v3/test_qos_specs.py +455 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -1
- openstackclient/tests/unit/volume/v3/test_volume_backend.py +158 -0
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +6 -14
- openstackclient/tests/unit/volume/v3/test_volume_group_type.py +65 -0
- openstackclient/tests/unit/volume/v3/test_volume_host.py +115 -0
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +61 -1
- openstackclient/tests/unit/volume/v3/test_volume_type.py +2 -4
- openstackclient/volume/client.py +7 -3
- openstackclient/volume/v2/backup_record.py +15 -6
- openstackclient/volume/v2/consistency_group.py +29 -17
- openstackclient/volume/v2/consistency_group_snapshot.py +25 -10
- openstackclient/volume/v2/qos_specs.py +28 -17
- openstackclient/volume/v2/service.py +17 -6
- openstackclient/volume/v2/volume.py +60 -30
- openstackclient/volume/v2/volume_backend.py +19 -6
- openstackclient/volume/v2/volume_backup.py +48 -23
- openstackclient/volume/v2/volume_host.py +6 -4
- openstackclient/volume/v2/volume_snapshot.py +49 -24
- openstackclient/volume/v2/volume_transfer_request.py +31 -13
- openstackclient/volume/v2/volume_type.py +43 -24
- openstackclient/volume/v3/backup_record.py +94 -0
- openstackclient/volume/v3/block_storage_cleanup.py +11 -3
- openstackclient/volume/v3/block_storage_cluster.py +19 -7
- openstackclient/volume/v3/block_storage_log_level.py +15 -6
- openstackclient/volume/v3/block_storage_manage.py +10 -4
- openstackclient/volume/v3/block_storage_resource_filter.py +17 -5
- openstackclient/volume/v3/consistency_group.py +400 -0
- openstackclient/volume/v3/consistency_group_snapshot.py +225 -0
- openstackclient/volume/v3/qos_specs.py +389 -0
- openstackclient/volume/v3/service.py +16 -6
- openstackclient/volume/v3/volume.py +92 -40
- openstackclient/volume/v3/volume_attachment.py +47 -21
- openstackclient/volume/v3/volume_backend.py +130 -0
- openstackclient/volume/v3/volume_backup.py +55 -27
- openstackclient/volume/v3/volume_group.py +23 -13
- openstackclient/volume/v3/volume_group_snapshot.py +34 -17
- openstackclient/volume/v3/volume_group_type.py +27 -14
- openstackclient/volume/v3/volume_host.py +74 -0
- openstackclient/volume/v3/volume_message.py +18 -8
- openstackclient/volume/v3/volume_snapshot.py +70 -32
- openstackclient/volume/v3/volume_transfer_request.py +31 -13
- openstackclient/volume/v3/volume_type.py +42 -24
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/METADATA +7 -8
- python_openstackclient-10.1.0.dist-info/RECORD +524 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/entry_points.txt +77 -25
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/licenses/AUTHORS +9 -0
- python_openstackclient-10.1.0.dist-info/pbr.json +1 -0
- openstackclient/api/image_v1.py +0 -69
- openstackclient/api/image_v2.py +0 -79
- openstackclient/network/v2/floating_ip_pool.py +0 -38
- openstackclient/tests/functional/image/v1/test_image.py +0 -97
- openstackclient/tests/unit/api/test_image_v1.py +0 -96
- openstackclient/tests/unit/api/test_image_v2.py +0 -96
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +0 -248
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +0 -49
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +0 -39
- openstackclient/tests/unit/network/v2/test_network_compute.py +0 -404
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +0 -392
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +0 -555
- python_openstackclient-9.0.0.dist-info/RECORD +0 -499
- python_openstackclient-9.0.0.dist-info/pbr.json +0 -1
- /openstackclient/{tests/functional/image/v1 → network/v2/bgpvpn}/__init__.py +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/licenses/LICENSE +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/top_level.txt +0 -0
|
@@ -13,8 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
"""Identity v3 IdentityProvider action implementations"""
|
|
15
15
|
|
|
16
|
+
import argparse
|
|
17
|
+
from collections.abc import Iterable, Sequence
|
|
16
18
|
import logging
|
|
19
|
+
from typing import Any
|
|
17
20
|
|
|
21
|
+
from openstack.identity.v3 import identity_provider as _identity_provider
|
|
22
|
+
from openstack import utils as sdk_utils
|
|
18
23
|
from osc_lib.cli import format_columns
|
|
19
24
|
from osc_lib import exceptions
|
|
20
25
|
from osc_lib import utils
|
|
@@ -27,10 +32,37 @@ from openstackclient.identity import common
|
|
|
27
32
|
LOG = logging.getLogger(__name__)
|
|
28
33
|
|
|
29
34
|
|
|
35
|
+
def _format_identity_provider(
|
|
36
|
+
idp: _identity_provider.IdentityProvider,
|
|
37
|
+
) -> tuple[tuple[str, ...], tuple[Any, ...]]:
|
|
38
|
+
columns = (
|
|
39
|
+
'authorization_ttl',
|
|
40
|
+
'description',
|
|
41
|
+
'domain_id',
|
|
42
|
+
'is_enabled',
|
|
43
|
+
'name',
|
|
44
|
+
'remote_ids',
|
|
45
|
+
)
|
|
46
|
+
column_headers = (
|
|
47
|
+
'authorization_ttl',
|
|
48
|
+
'description',
|
|
49
|
+
'domain_id',
|
|
50
|
+
'enabled',
|
|
51
|
+
'id',
|
|
52
|
+
'remote_ids',
|
|
53
|
+
)
|
|
54
|
+
return (
|
|
55
|
+
column_headers,
|
|
56
|
+
utils.get_item_properties(
|
|
57
|
+
idp, columns, formatters={'remote_ids': format_columns.ListColumn}
|
|
58
|
+
),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
30
62
|
class CreateIdentityProvider(command.ShowOne):
|
|
31
63
|
_description = _("Create new identity provider")
|
|
32
64
|
|
|
33
|
-
def get_parser(self, prog_name):
|
|
65
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
34
66
|
parser = super().get_parser(prog_name)
|
|
35
67
|
parser.add_argument(
|
|
36
68
|
'identity_provider_id',
|
|
@@ -98,26 +130,34 @@ class CreateIdentityProvider(command.ShowOne):
|
|
|
98
130
|
)
|
|
99
131
|
return parser
|
|
100
132
|
|
|
101
|
-
def take_action(
|
|
102
|
-
|
|
103
|
-
|
|
133
|
+
def take_action(
|
|
134
|
+
self, parsed_args: argparse.Namespace
|
|
135
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
136
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
137
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
138
|
+
)
|
|
139
|
+
kwargs = {'is_enabled': parsed_args.enabled}
|
|
140
|
+
if parsed_args.identity_provider_id:
|
|
141
|
+
kwargs['id'] = parsed_args.identity_provider_id
|
|
142
|
+
if parsed_args.description:
|
|
143
|
+
kwargs['description'] = parsed_args.description
|
|
144
|
+
|
|
104
145
|
if parsed_args.remote_id_file:
|
|
105
146
|
file_content = utils.read_blob_file_contents(
|
|
106
147
|
parsed_args.remote_id_file
|
|
107
148
|
)
|
|
108
149
|
remote_ids = file_content.splitlines()
|
|
109
|
-
remote_ids = list(map(str.strip, remote_ids))
|
|
150
|
+
kwargs['remote_ids'] = list(map(str.strip, remote_ids))
|
|
110
151
|
elif parsed_args.remote_ids:
|
|
111
|
-
remote_ids = parsed_args.remote_ids
|
|
152
|
+
kwargs['remote_ids'] = parsed_args.remote_ids
|
|
112
153
|
|
|
113
|
-
domain_id = None
|
|
114
154
|
if parsed_args.domain:
|
|
115
|
-
domain_id = common.
|
|
116
|
-
identity_client,
|
|
117
|
-
|
|
155
|
+
kwargs['domain_id'] = common.find_domain_id_sdk(
|
|
156
|
+
identity_client,
|
|
157
|
+
parsed_args.domain,
|
|
158
|
+
validate_actor_existence=False,
|
|
159
|
+
)
|
|
118
160
|
|
|
119
|
-
# TODO(pas-ha) actually check for 3.14 microversion
|
|
120
|
-
kwargs = {}
|
|
121
161
|
auth_ttl = parsed_args.authorization_ttl
|
|
122
162
|
if auth_ttl is not None:
|
|
123
163
|
if auth_ttl < 0:
|
|
@@ -127,26 +167,15 @@ class CreateIdentityProvider(command.ShowOne):
|
|
|
127
167
|
raise exceptions.CommandError(msg)
|
|
128
168
|
kwargs['authorization_ttl'] = auth_ttl
|
|
129
169
|
|
|
130
|
-
idp = identity_client.
|
|
131
|
-
id=parsed_args.identity_provider_id,
|
|
132
|
-
remote_ids=remote_ids,
|
|
133
|
-
description=parsed_args.description,
|
|
134
|
-
domain_id=domain_id,
|
|
135
|
-
enabled=parsed_args.enabled,
|
|
136
|
-
**kwargs,
|
|
137
|
-
)
|
|
170
|
+
idp = identity_client.create_identity_provider(**kwargs)
|
|
138
171
|
|
|
139
|
-
idp
|
|
140
|
-
idp._info['remote_ids'] = format_columns.ListColumn(
|
|
141
|
-
idp._info.pop('remote_ids', [])
|
|
142
|
-
)
|
|
143
|
-
return zip(*sorted(idp._info.items()))
|
|
172
|
+
return _format_identity_provider(idp)
|
|
144
173
|
|
|
145
174
|
|
|
146
175
|
class DeleteIdentityProvider(command.Command):
|
|
147
176
|
_description = _("Delete identity provider(s)")
|
|
148
177
|
|
|
149
|
-
def get_parser(self, prog_name):
|
|
178
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
150
179
|
parser = super().get_parser(prog_name)
|
|
151
180
|
parser.add_argument(
|
|
152
181
|
'identity_provider',
|
|
@@ -156,17 +185,19 @@ class DeleteIdentityProvider(command.Command):
|
|
|
156
185
|
)
|
|
157
186
|
return parser
|
|
158
187
|
|
|
159
|
-
def take_action(self, parsed_args):
|
|
160
|
-
identity_client =
|
|
188
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
189
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
190
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
191
|
+
)
|
|
161
192
|
result = 0
|
|
162
193
|
for i in parsed_args.identity_provider:
|
|
163
194
|
try:
|
|
164
|
-
identity_client.
|
|
195
|
+
identity_client.delete_identity_provider(i)
|
|
165
196
|
except Exception as e:
|
|
166
197
|
result += 1
|
|
167
198
|
LOG.error(
|
|
168
199
|
_(
|
|
169
|
-
"Failed to delete identity
|
|
200
|
+
"Failed to delete identity provider with "
|
|
170
201
|
"name or ID '%(provider)s': %(e)s"
|
|
171
202
|
),
|
|
172
203
|
{'provider': i, 'e': e},
|
|
@@ -183,34 +214,39 @@ class DeleteIdentityProvider(command.Command):
|
|
|
183
214
|
class ListIdentityProvider(command.Lister):
|
|
184
215
|
_description = _("List identity providers")
|
|
185
216
|
|
|
186
|
-
def get_parser(self, prog_name):
|
|
217
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
187
218
|
parser = super().get_parser(prog_name)
|
|
188
219
|
parser.add_argument(
|
|
189
220
|
'--id',
|
|
190
221
|
metavar='<id>',
|
|
191
|
-
help=_('
|
|
222
|
+
help=_('Filter identity providers by ID'),
|
|
192
223
|
)
|
|
193
224
|
parser.add_argument(
|
|
194
225
|
'--enabled',
|
|
195
226
|
dest='enabled',
|
|
196
227
|
action='store_true',
|
|
197
|
-
help=_('
|
|
228
|
+
help=_('List only enabled identity providers'),
|
|
198
229
|
)
|
|
199
230
|
return parser
|
|
200
231
|
|
|
201
|
-
def take_action(
|
|
202
|
-
|
|
203
|
-
|
|
232
|
+
def take_action(
|
|
233
|
+
self, parsed_args: argparse.Namespace
|
|
234
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
235
|
+
columns = ('id', 'is_enabled', 'domain_id', 'description')
|
|
236
|
+
column_headers = ('ID', 'Enabled', 'Domain ID', 'Description')
|
|
237
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
238
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
239
|
+
)
|
|
204
240
|
|
|
205
241
|
kwargs = {}
|
|
206
242
|
if parsed_args.id:
|
|
207
243
|
kwargs['id'] = parsed_args.id
|
|
208
244
|
if parsed_args.enabled:
|
|
209
|
-
kwargs['
|
|
245
|
+
kwargs['is_enabled'] = True
|
|
210
246
|
|
|
211
|
-
data = identity_client.
|
|
247
|
+
data = identity_client.identity_providers(**kwargs)
|
|
212
248
|
return (
|
|
213
|
-
|
|
249
|
+
column_headers,
|
|
214
250
|
(
|
|
215
251
|
utils.get_item_properties(
|
|
216
252
|
s,
|
|
@@ -225,7 +261,7 @@ class ListIdentityProvider(command.Lister):
|
|
|
225
261
|
class SetIdentityProvider(command.Command):
|
|
226
262
|
_description = _("Set identity provider properties")
|
|
227
263
|
|
|
228
|
-
def get_parser(self, prog_name):
|
|
264
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
229
265
|
parser = super().get_parser(prog_name)
|
|
230
266
|
parser.add_argument(
|
|
231
267
|
'identity_provider',
|
|
@@ -279,8 +315,10 @@ class SetIdentityProvider(command.Command):
|
|
|
279
315
|
)
|
|
280
316
|
return parser
|
|
281
317
|
|
|
282
|
-
def take_action(self, parsed_args):
|
|
283
|
-
|
|
318
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
319
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
320
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
321
|
+
)
|
|
284
322
|
|
|
285
323
|
# Always set remote_ids if either is passed in
|
|
286
324
|
if parsed_args.remote_id_file:
|
|
@@ -297,13 +335,14 @@ class SetIdentityProvider(command.Command):
|
|
|
297
335
|
if parsed_args.description:
|
|
298
336
|
kwargs['description'] = parsed_args.description
|
|
299
337
|
if parsed_args.enable:
|
|
300
|
-
kwargs['
|
|
338
|
+
kwargs['is_enabled'] = True
|
|
301
339
|
if parsed_args.disable:
|
|
302
|
-
kwargs['
|
|
340
|
+
kwargs['is_enabled'] = False
|
|
303
341
|
if parsed_args.remote_id_file or parsed_args.remote_ids:
|
|
304
342
|
kwargs['remote_ids'] = remote_ids
|
|
305
343
|
|
|
306
|
-
#
|
|
344
|
+
# NOTE(0weng): This is now possible in SDK! An option should be added.
|
|
345
|
+
# Original comment:
|
|
307
346
|
# TODO(pas-ha) make it possible to reset authorization_ttl
|
|
308
347
|
# back to None value.
|
|
309
348
|
# Currently not possible as filter_kwargs decorator in
|
|
@@ -318,7 +357,7 @@ class SetIdentityProvider(command.Command):
|
|
|
318
357
|
raise exceptions.CommandError(msg)
|
|
319
358
|
kwargs['authorization_ttl'] = auth_ttl
|
|
320
359
|
|
|
321
|
-
|
|
360
|
+
identity_client.update_identity_provider(
|
|
322
361
|
parsed_args.identity_provider, **kwargs
|
|
323
362
|
)
|
|
324
363
|
|
|
@@ -326,7 +365,7 @@ class SetIdentityProvider(command.Command):
|
|
|
326
365
|
class ShowIdentityProvider(command.ShowOne):
|
|
327
366
|
_description = _("Display identity provider details")
|
|
328
367
|
|
|
329
|
-
def get_parser(self, prog_name):
|
|
368
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
330
369
|
parser = super().get_parser(prog_name)
|
|
331
370
|
parser.add_argument(
|
|
332
371
|
'identity_provider',
|
|
@@ -335,15 +374,14 @@ class ShowIdentityProvider(command.ShowOne):
|
|
|
335
374
|
)
|
|
336
375
|
return parser
|
|
337
376
|
|
|
338
|
-
def take_action(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
377
|
+
def take_action(
|
|
378
|
+
self, parsed_args: argparse.Namespace
|
|
379
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
380
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
381
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
382
|
+
)
|
|
383
|
+
idp = identity_client.get_identity_provider(
|
|
384
|
+
parsed_args.identity_provider
|
|
344
385
|
)
|
|
345
386
|
|
|
346
|
-
idp
|
|
347
|
-
remote_ids = format_columns.ListColumn(idp._info.pop('remote_ids', []))
|
|
348
|
-
idp._info['remote_ids'] = remote_ids
|
|
349
|
-
return zip(*sorted(idp._info.items()))
|
|
387
|
+
return _format_identity_provider(idp)
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
"""Identity v3 Implied Role action implementations"""
|
|
17
17
|
|
|
18
|
+
import argparse
|
|
19
|
+
from collections.abc import Iterable, Sequence
|
|
18
20
|
import logging
|
|
21
|
+
from typing import Any
|
|
19
22
|
|
|
20
23
|
|
|
21
24
|
from openstackclient import command
|
|
@@ -25,7 +28,9 @@ from openstackclient.i18n import _
|
|
|
25
28
|
LOG = logging.getLogger(__name__)
|
|
26
29
|
|
|
27
30
|
|
|
28
|
-
def _get_role_ids(
|
|
31
|
+
def _get_role_ids(
|
|
32
|
+
identity_client: Any, parsed_args: argparse.Namespace
|
|
33
|
+
) -> tuple[Any, Any]:
|
|
29
34
|
"""Return prior and implied role id(s)
|
|
30
35
|
|
|
31
36
|
If prior and implied role id(s) are retrievable from identity
|
|
@@ -50,7 +55,7 @@ def _get_role_ids(identity_client, parsed_args):
|
|
|
50
55
|
class CreateImpliedRole(command.ShowOne):
|
|
51
56
|
_description = _("Creates an association between prior and implied roles")
|
|
52
57
|
|
|
53
|
-
def get_parser(self, prog_name):
|
|
58
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
54
59
|
parser = super().get_parser(prog_name)
|
|
55
60
|
parser.add_argument(
|
|
56
61
|
'role',
|
|
@@ -65,7 +70,9 @@ class CreateImpliedRole(command.ShowOne):
|
|
|
65
70
|
)
|
|
66
71
|
return parser
|
|
67
72
|
|
|
68
|
-
def take_action(
|
|
73
|
+
def take_action(
|
|
74
|
+
self, parsed_args: argparse.Namespace
|
|
75
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
69
76
|
identity_client = self.app.client_manager.identity
|
|
70
77
|
(prior_role_id, implied_role_id) = _get_role_ids(
|
|
71
78
|
identity_client, parsed_args
|
|
@@ -74,13 +81,16 @@ class CreateImpliedRole(command.ShowOne):
|
|
|
74
81
|
prior_role_id, implied_role_id
|
|
75
82
|
)
|
|
76
83
|
response._info.pop('links', None)
|
|
77
|
-
|
|
84
|
+
col_headers, col_data = zip(
|
|
85
|
+
*sorted([(k, v['id']) for k, v in response._info.items()])
|
|
86
|
+
)
|
|
87
|
+
return col_headers, col_data
|
|
78
88
|
|
|
79
89
|
|
|
80
90
|
class DeleteImpliedRole(command.Command):
|
|
81
91
|
_description = _("Deletes an association between prior and implied roles")
|
|
82
92
|
|
|
83
|
-
def get_parser(self, prog_name):
|
|
93
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
84
94
|
parser = super().get_parser(prog_name)
|
|
85
95
|
parser.add_argument(
|
|
86
96
|
'role',
|
|
@@ -95,7 +105,7 @@ class DeleteImpliedRole(command.Command):
|
|
|
95
105
|
)
|
|
96
106
|
return parser
|
|
97
107
|
|
|
98
|
-
def take_action(self, parsed_args):
|
|
108
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
99
109
|
identity_client = self.app.client_manager.identity
|
|
100
110
|
(prior_role_id, implied_role_id) = _get_role_ids(
|
|
101
111
|
identity_client, parsed_args
|
|
@@ -112,12 +122,14 @@ class ListImpliedRole(command.Lister):
|
|
|
112
122
|
'Implied Role Name',
|
|
113
123
|
]
|
|
114
124
|
|
|
115
|
-
def get_parser(self, prog_name):
|
|
125
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
116
126
|
parser = super().get_parser(prog_name)
|
|
117
127
|
return parser
|
|
118
128
|
|
|
119
|
-
def take_action(
|
|
120
|
-
|
|
129
|
+
def take_action(
|
|
130
|
+
self, parsed_args: argparse.Namespace
|
|
131
|
+
) -> tuple[Sequence[str], Iterable[tuple[Any, ...]]]:
|
|
132
|
+
def _list_implied(response: Any) -> Iterable[tuple[Any, ...]]:
|
|
121
133
|
for rule in response:
|
|
122
134
|
for implies in rule.implies:
|
|
123
135
|
yield (
|
|
@@ -13,8 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
"""Limits action implementations."""
|
|
15
15
|
|
|
16
|
+
import argparse
|
|
17
|
+
from collections.abc import Iterable, Sequence
|
|
16
18
|
import logging
|
|
19
|
+
from typing import Any
|
|
17
20
|
|
|
21
|
+
from openstack.identity.v3 import limit as _limit
|
|
22
|
+
from openstack import utils as sdk_utils
|
|
18
23
|
from osc_lib import exceptions
|
|
19
24
|
from osc_lib import utils
|
|
20
25
|
|
|
@@ -25,7 +30,9 @@ from openstackclient.identity import common as common_utils
|
|
|
25
30
|
LOG = logging.getLogger(__name__)
|
|
26
31
|
|
|
27
32
|
|
|
28
|
-
def _format_limit(
|
|
33
|
+
def _format_limit(
|
|
34
|
+
limit: _limit.Limit,
|
|
35
|
+
) -> tuple[tuple[str, ...], Iterable[Any]]:
|
|
29
36
|
columns = (
|
|
30
37
|
"description",
|
|
31
38
|
"id",
|
|
@@ -50,7 +57,7 @@ def _format_limit(limit):
|
|
|
50
57
|
class CreateLimit(command.ShowOne):
|
|
51
58
|
_description = _("Create a limit")
|
|
52
59
|
|
|
53
|
-
def get_parser(self, prog_name):
|
|
60
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
54
61
|
parser = super().get_parser(prog_name)
|
|
55
62
|
parser.add_argument(
|
|
56
63
|
'--description',
|
|
@@ -89,8 +96,12 @@ class CreateLimit(command.ShowOne):
|
|
|
89
96
|
)
|
|
90
97
|
return parser
|
|
91
98
|
|
|
92
|
-
def take_action(
|
|
93
|
-
|
|
99
|
+
def take_action(
|
|
100
|
+
self, parsed_args: argparse.Namespace
|
|
101
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
102
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
103
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
104
|
+
)
|
|
94
105
|
|
|
95
106
|
kwargs = {
|
|
96
107
|
"resource_name": parsed_args.resource_name,
|
|
@@ -122,7 +133,7 @@ class CreateLimit(command.ShowOne):
|
|
|
122
133
|
class ListLimit(command.Lister):
|
|
123
134
|
_description = _("List limits")
|
|
124
135
|
|
|
125
|
-
def get_parser(self, prog_name):
|
|
136
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
126
137
|
parser = super().get_parser(prog_name)
|
|
127
138
|
parser.add_argument(
|
|
128
139
|
'--service',
|
|
@@ -149,10 +160,14 @@ class ListLimit(command.Lister):
|
|
|
149
160
|
|
|
150
161
|
return parser
|
|
151
162
|
|
|
152
|
-
def take_action(
|
|
153
|
-
|
|
163
|
+
def take_action(
|
|
164
|
+
self, parsed_args: argparse.Namespace
|
|
165
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
166
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
167
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
168
|
+
)
|
|
154
169
|
|
|
155
|
-
kwargs = {}
|
|
170
|
+
kwargs: dict[str, object] = {}
|
|
156
171
|
if parsed_args.service:
|
|
157
172
|
kwargs["service_id"] = common_utils.find_service_sdk(
|
|
158
173
|
identity_client, parsed_args.service
|
|
@@ -199,7 +214,7 @@ class ListLimit(command.Lister):
|
|
|
199
214
|
class ShowLimit(command.ShowOne):
|
|
200
215
|
_description = _("Display limit details")
|
|
201
216
|
|
|
202
|
-
def get_parser(self, prog_name):
|
|
217
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
203
218
|
parser = super().get_parser(prog_name)
|
|
204
219
|
parser.add_argument(
|
|
205
220
|
'limit_id',
|
|
@@ -208,8 +223,12 @@ class ShowLimit(command.ShowOne):
|
|
|
208
223
|
)
|
|
209
224
|
return parser
|
|
210
225
|
|
|
211
|
-
def take_action(
|
|
212
|
-
|
|
226
|
+
def take_action(
|
|
227
|
+
self, parsed_args: argparse.Namespace
|
|
228
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
229
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
230
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
231
|
+
)
|
|
213
232
|
limit = identity_client.get_limit(parsed_args.limit_id)
|
|
214
233
|
return _format_limit(limit)
|
|
215
234
|
|
|
@@ -217,7 +236,7 @@ class ShowLimit(command.ShowOne):
|
|
|
217
236
|
class SetLimit(command.ShowOne):
|
|
218
237
|
_description = _("Update information about a limit")
|
|
219
238
|
|
|
220
|
-
def get_parser(self, prog_name):
|
|
239
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
221
240
|
parser = super().get_parser(prog_name)
|
|
222
241
|
parser.add_argument(
|
|
223
242
|
'limit_id',
|
|
@@ -238,8 +257,12 @@ class SetLimit(command.ShowOne):
|
|
|
238
257
|
)
|
|
239
258
|
return parser
|
|
240
259
|
|
|
241
|
-
def take_action(
|
|
242
|
-
|
|
260
|
+
def take_action(
|
|
261
|
+
self, parsed_args: argparse.Namespace
|
|
262
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
263
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
264
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
265
|
+
)
|
|
243
266
|
|
|
244
267
|
kwargs = {}
|
|
245
268
|
if parsed_args.description:
|
|
@@ -254,7 +277,7 @@ class SetLimit(command.ShowOne):
|
|
|
254
277
|
class DeleteLimit(command.Command):
|
|
255
278
|
_description = _("Delete a limit")
|
|
256
279
|
|
|
257
|
-
def get_parser(self, prog_name):
|
|
280
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
258
281
|
parser = super().get_parser(prog_name)
|
|
259
282
|
parser.add_argument(
|
|
260
283
|
'limit_id',
|
|
@@ -267,8 +290,10 @@ class DeleteLimit(command.Command):
|
|
|
267
290
|
)
|
|
268
291
|
return parser
|
|
269
292
|
|
|
270
|
-
def take_action(self, parsed_args):
|
|
271
|
-
identity_client =
|
|
293
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
294
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
295
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
296
|
+
)
|
|
272
297
|
|
|
273
298
|
errors = 0
|
|
274
299
|
for limit_id in parsed_args.limit_id:
|