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,19 +13,25 @@
|
|
|
13
13
|
|
|
14
14
|
"""Service Provider 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 service_provider as _service_provider
|
|
22
|
+
from openstack import utils as sdk_utils
|
|
18
23
|
from osc_lib import exceptions
|
|
19
24
|
from osc_lib import utils
|
|
20
25
|
|
|
21
26
|
from openstackclient import command
|
|
22
27
|
from openstackclient.i18n import _
|
|
23
28
|
|
|
24
|
-
|
|
25
29
|
LOG = logging.getLogger(__name__)
|
|
26
30
|
|
|
27
31
|
|
|
28
|
-
def _format_service_provider(
|
|
32
|
+
def _format_service_provider(
|
|
33
|
+
sp: _service_provider.ServiceProvider,
|
|
34
|
+
) -> tuple[tuple[str, ...], tuple[Any, ...]]:
|
|
29
35
|
column_headers = (
|
|
30
36
|
'id',
|
|
31
37
|
'enabled',
|
|
@@ -51,7 +57,7 @@ def _format_service_provider(sp):
|
|
|
51
57
|
class CreateServiceProvider(command.ShowOne):
|
|
52
58
|
_description = _("Create new service provider")
|
|
53
59
|
|
|
54
|
-
def get_parser(self, prog_name):
|
|
60
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
55
61
|
parser = super().get_parser(prog_name)
|
|
56
62
|
parser.add_argument(
|
|
57
63
|
'service_provider_id',
|
|
@@ -98,8 +104,12 @@ class CreateServiceProvider(command.ShowOne):
|
|
|
98
104
|
|
|
99
105
|
return parser
|
|
100
106
|
|
|
101
|
-
def take_action(
|
|
102
|
-
|
|
107
|
+
def take_action(
|
|
108
|
+
self, parsed_args: argparse.Namespace
|
|
109
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
110
|
+
service_client = sdk_utils.ensure_service_version(
|
|
111
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
112
|
+
)
|
|
103
113
|
|
|
104
114
|
kwargs = {}
|
|
105
115
|
|
|
@@ -125,7 +135,7 @@ class CreateServiceProvider(command.ShowOne):
|
|
|
125
135
|
class DeleteServiceProvider(command.Command):
|
|
126
136
|
_description = _("Delete service provider(s)")
|
|
127
137
|
|
|
128
|
-
def get_parser(self, prog_name):
|
|
138
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
129
139
|
parser = super().get_parser(prog_name)
|
|
130
140
|
parser.add_argument(
|
|
131
141
|
'service_provider',
|
|
@@ -135,8 +145,10 @@ class DeleteServiceProvider(command.Command):
|
|
|
135
145
|
)
|
|
136
146
|
return parser
|
|
137
147
|
|
|
138
|
-
def take_action(self, parsed_args):
|
|
139
|
-
service_client =
|
|
148
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
149
|
+
service_client = sdk_utils.ensure_service_version(
|
|
150
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
151
|
+
)
|
|
140
152
|
result = 0
|
|
141
153
|
for i in parsed_args.service_provider:
|
|
142
154
|
try:
|
|
@@ -162,8 +174,12 @@ class DeleteServiceProvider(command.Command):
|
|
|
162
174
|
class ListServiceProvider(command.Lister):
|
|
163
175
|
_description = _("List service providers")
|
|
164
176
|
|
|
165
|
-
def take_action(
|
|
166
|
-
|
|
177
|
+
def take_action(
|
|
178
|
+
self, parsed_args: argparse.Namespace
|
|
179
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
180
|
+
service_client = sdk_utils.ensure_service_version(
|
|
181
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
182
|
+
)
|
|
167
183
|
data = service_client.service_providers()
|
|
168
184
|
|
|
169
185
|
column_headers = (
|
|
@@ -191,7 +207,7 @@ class ListServiceProvider(command.Lister):
|
|
|
191
207
|
class SetServiceProvider(command.ShowOne):
|
|
192
208
|
_description = _("Set service provider properties")
|
|
193
209
|
|
|
194
|
-
def get_parser(self, prog_name):
|
|
210
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
195
211
|
parser = super().get_parser(prog_name)
|
|
196
212
|
parser.add_argument(
|
|
197
213
|
'service_provider',
|
|
@@ -233,8 +249,12 @@ class SetServiceProvider(command.ShowOne):
|
|
|
233
249
|
)
|
|
234
250
|
return parser
|
|
235
251
|
|
|
236
|
-
def take_action(
|
|
237
|
-
|
|
252
|
+
def take_action(
|
|
253
|
+
self, parsed_args: argparse.Namespace
|
|
254
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
255
|
+
service_client = sdk_utils.ensure_service_version(
|
|
256
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
257
|
+
)
|
|
238
258
|
|
|
239
259
|
kwargs = {}
|
|
240
260
|
|
|
@@ -261,7 +281,7 @@ class SetServiceProvider(command.ShowOne):
|
|
|
261
281
|
class ShowServiceProvider(command.ShowOne):
|
|
262
282
|
_description = _("Display service provider details")
|
|
263
283
|
|
|
264
|
-
def get_parser(self, prog_name):
|
|
284
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
265
285
|
parser = super().get_parser(prog_name)
|
|
266
286
|
parser.add_argument(
|
|
267
287
|
'service_provider',
|
|
@@ -270,8 +290,12 @@ class ShowServiceProvider(command.ShowOne):
|
|
|
270
290
|
)
|
|
271
291
|
return parser
|
|
272
292
|
|
|
273
|
-
def take_action(
|
|
274
|
-
|
|
293
|
+
def take_action(
|
|
294
|
+
self, parsed_args: argparse.Namespace
|
|
295
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
296
|
+
service_client = sdk_utils.ensure_service_version(
|
|
297
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
298
|
+
)
|
|
275
299
|
service_provider = service_client.find_service_provider(
|
|
276
300
|
parsed_args.service_provider,
|
|
277
301
|
ignore_missing=False,
|
|
@@ -11,16 +11,27 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import argparse
|
|
14
|
+
from collections.abc import Sequence
|
|
15
|
+
from typing import Any
|
|
14
16
|
|
|
15
17
|
from openstackclient.i18n import _
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
class _CommaListAction(argparse.Action):
|
|
19
|
-
def __call__(
|
|
20
|
-
|
|
21
|
+
def __call__(
|
|
22
|
+
self,
|
|
23
|
+
parser: argparse.ArgumentParser,
|
|
24
|
+
namespace: argparse.Namespace,
|
|
25
|
+
values: str | Sequence[Any] | None,
|
|
26
|
+
option_string: str | None = None,
|
|
27
|
+
) -> None:
|
|
28
|
+
values = values.split(',') if isinstance(values, str) else values
|
|
29
|
+
setattr(namespace, self.dest, values)
|
|
21
30
|
|
|
22
31
|
|
|
23
|
-
def add_tag_filtering_option_to_parser(
|
|
32
|
+
def add_tag_filtering_option_to_parser(
|
|
33
|
+
parser: argparse.ArgumentParser, collection_name: str
|
|
34
|
+
) -> None:
|
|
24
35
|
parser.add_argument(
|
|
25
36
|
'--tags',
|
|
26
37
|
metavar='<tag>[,<tag>,...]',
|
|
@@ -63,7 +74,9 @@ def add_tag_filtering_option_to_parser(parser, collection_name):
|
|
|
63
74
|
)
|
|
64
75
|
|
|
65
76
|
|
|
66
|
-
def get_tag_filtering_args(
|
|
77
|
+
def get_tag_filtering_args(
|
|
78
|
+
parsed_args: argparse.Namespace, args: dict[str, Any]
|
|
79
|
+
) -> None:
|
|
67
80
|
if parsed_args.tags:
|
|
68
81
|
args['tags'] = ','.join(parsed_args.tags)
|
|
69
82
|
if parsed_args.tags_any:
|
|
@@ -74,7 +87,9 @@ def get_tag_filtering_args(parsed_args, args):
|
|
|
74
87
|
args['not-tags-any'] = ','.join(parsed_args.not_tags_any)
|
|
75
88
|
|
|
76
89
|
|
|
77
|
-
def add_tag_option_to_parser_for_create(
|
|
90
|
+
def add_tag_option_to_parser_for_create(
|
|
91
|
+
parser: argparse.ArgumentParser, resource_name: str
|
|
92
|
+
) -> None:
|
|
78
93
|
tag_group = parser.add_mutually_exclusive_group()
|
|
79
94
|
tag_group.add_argument(
|
|
80
95
|
'--tag',
|
|
@@ -89,7 +104,9 @@ def add_tag_option_to_parser_for_create(parser, resource_name):
|
|
|
89
104
|
)
|
|
90
105
|
|
|
91
106
|
|
|
92
|
-
def add_tag_option_to_parser_for_set(
|
|
107
|
+
def add_tag_option_to_parser_for_set(
|
|
108
|
+
parser: argparse.ArgumentParser, resource_name: str
|
|
109
|
+
) -> None:
|
|
93
110
|
parser.add_argument(
|
|
94
111
|
'--tag',
|
|
95
112
|
action='append',
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
"""Identity v3 Token action implementations"""
|
|
17
17
|
|
|
18
|
+
import argparse
|
|
19
|
+
from collections.abc import Iterable, Sequence
|
|
20
|
+
from typing import Any
|
|
21
|
+
|
|
18
22
|
from osc_lib import exceptions
|
|
19
23
|
from osc_lib import utils
|
|
20
24
|
|
|
@@ -26,7 +30,7 @@ from openstackclient.identity import common
|
|
|
26
30
|
class AuthorizeRequestToken(command.ShowOne):
|
|
27
31
|
_description = _("Authorize a request token")
|
|
28
32
|
|
|
29
|
-
def get_parser(self, prog_name):
|
|
33
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
30
34
|
parser = super().get_parser(prog_name)
|
|
31
35
|
parser.add_argument(
|
|
32
36
|
'--request-key',
|
|
@@ -48,7 +52,9 @@ class AuthorizeRequestToken(command.ShowOne):
|
|
|
48
52
|
)
|
|
49
53
|
return parser
|
|
50
54
|
|
|
51
|
-
def take_action(
|
|
55
|
+
def take_action(
|
|
56
|
+
self, parsed_args: argparse.Namespace
|
|
57
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
52
58
|
identity_client = self.app.client_manager.identity
|
|
53
59
|
|
|
54
60
|
# NOTE(stevemar): We want a list of role ids
|
|
@@ -64,13 +70,14 @@ class AuthorizeRequestToken(command.ShowOne):
|
|
|
64
70
|
parsed_args.request_key, roles
|
|
65
71
|
)
|
|
66
72
|
|
|
67
|
-
|
|
73
|
+
col_headers, col_data = zip(*sorted(verifier_pin._info.items()))
|
|
74
|
+
return col_headers, col_data
|
|
68
75
|
|
|
69
76
|
|
|
70
77
|
class CreateAccessToken(command.ShowOne):
|
|
71
78
|
_description = _("Create an access token")
|
|
72
79
|
|
|
73
|
-
def get_parser(self, prog_name):
|
|
80
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
74
81
|
parser = super().get_parser(prog_name)
|
|
75
82
|
parser.add_argument(
|
|
76
83
|
'--consumer-key',
|
|
@@ -104,7 +111,9 @@ class CreateAccessToken(command.ShowOne):
|
|
|
104
111
|
)
|
|
105
112
|
return parser
|
|
106
113
|
|
|
107
|
-
def take_action(
|
|
114
|
+
def take_action(
|
|
115
|
+
self, parsed_args: argparse.Namespace
|
|
116
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
108
117
|
token_client = self.app.client_manager.identity.oauth1.access_tokens
|
|
109
118
|
access_token = token_client.create(
|
|
110
119
|
parsed_args.consumer_key,
|
|
@@ -113,13 +122,14 @@ class CreateAccessToken(command.ShowOne):
|
|
|
113
122
|
parsed_args.request_secret,
|
|
114
123
|
parsed_args.verifier,
|
|
115
124
|
)
|
|
116
|
-
|
|
125
|
+
col_headers, col_data = zip(*sorted(access_token._info.items()))
|
|
126
|
+
return col_headers, col_data
|
|
117
127
|
|
|
118
128
|
|
|
119
129
|
class CreateRequestToken(command.ShowOne):
|
|
120
130
|
_description = _("Create a request token")
|
|
121
131
|
|
|
122
|
-
def get_parser(self, prog_name):
|
|
132
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
123
133
|
parser = super().get_parser(prog_name)
|
|
124
134
|
parser.add_argument(
|
|
125
135
|
'--consumer-key',
|
|
@@ -148,7 +158,9 @@ class CreateRequestToken(command.ShowOne):
|
|
|
148
158
|
)
|
|
149
159
|
return parser
|
|
150
160
|
|
|
151
|
-
def take_action(
|
|
161
|
+
def take_action(
|
|
162
|
+
self, parsed_args: argparse.Namespace
|
|
163
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
152
164
|
identity_client = self.app.client_manager.identity
|
|
153
165
|
|
|
154
166
|
if parsed_args.domain:
|
|
@@ -168,7 +180,8 @@ class CreateRequestToken(command.ShowOne):
|
|
|
168
180
|
request_token = token_client.create(
|
|
169
181
|
parsed_args.consumer_key, parsed_args.consumer_secret, project.id
|
|
170
182
|
)
|
|
171
|
-
|
|
183
|
+
col_headers, col_data = zip(*sorted(request_token._info.items()))
|
|
184
|
+
return col_headers, col_data
|
|
172
185
|
|
|
173
186
|
|
|
174
187
|
class IssueToken(command.ShowOne):
|
|
@@ -177,11 +190,13 @@ class IssueToken(command.ShowOne):
|
|
|
177
190
|
# scoped token is optional
|
|
178
191
|
required_scope = False
|
|
179
192
|
|
|
180
|
-
def get_parser(self, prog_name):
|
|
193
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
181
194
|
parser = super().get_parser(prog_name)
|
|
182
195
|
return parser
|
|
183
196
|
|
|
184
|
-
def take_action(
|
|
197
|
+
def take_action(
|
|
198
|
+
self, parsed_args: argparse.Namespace
|
|
199
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
185
200
|
auth_ref = self.app.client_manager.auth_ref
|
|
186
201
|
if not auth_ref:
|
|
187
202
|
raise exceptions.AuthorizationFailure(
|
|
@@ -207,13 +222,14 @@ class IssueToken(command.ShowOne):
|
|
|
207
222
|
# deployment system. When that happens, this will have to relay
|
|
208
223
|
# scope information and IDs like we do for projects and domains.
|
|
209
224
|
data['system'] = 'all'
|
|
210
|
-
|
|
225
|
+
col_headers, col_data = zip(*sorted(data.items()))
|
|
226
|
+
return col_headers, col_data
|
|
211
227
|
|
|
212
228
|
|
|
213
229
|
class RevokeToken(command.Command):
|
|
214
230
|
_description = _("Revoke existing token")
|
|
215
231
|
|
|
216
|
-
def get_parser(self, prog_name):
|
|
232
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
217
233
|
parser = super().get_parser(prog_name)
|
|
218
234
|
parser.add_argument(
|
|
219
235
|
'token',
|
|
@@ -222,7 +238,7 @@ class RevokeToken(command.Command):
|
|
|
222
238
|
)
|
|
223
239
|
return parser
|
|
224
240
|
|
|
225
|
-
def take_action(self, parsed_args):
|
|
241
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
226
242
|
identity_client = self.app.client_manager.identity
|
|
227
243
|
|
|
228
244
|
identity_client.tokens.revoke_token(parsed_args.token)
|
|
@@ -13,11 +13,16 @@
|
|
|
13
13
|
|
|
14
14
|
"""Identity v3 Trust action implementations"""
|
|
15
15
|
|
|
16
|
+
import argparse
|
|
17
|
+
from collections.abc import Iterable, Sequence
|
|
16
18
|
import datetime
|
|
17
19
|
import itertools
|
|
18
20
|
import logging
|
|
21
|
+
from typing import Any
|
|
19
22
|
|
|
20
23
|
from openstack import exceptions as sdk_exceptions
|
|
24
|
+
from openstack.identity.v3 import trust as _trust
|
|
25
|
+
from openstack import utils as sdk_utils
|
|
21
26
|
from osc_lib import exceptions
|
|
22
27
|
from osc_lib import utils
|
|
23
28
|
|
|
@@ -25,11 +30,12 @@ from openstackclient import command
|
|
|
25
30
|
from openstackclient.i18n import _
|
|
26
31
|
from openstackclient.identity import common
|
|
27
32
|
|
|
28
|
-
|
|
29
33
|
LOG = logging.getLogger(__name__)
|
|
30
34
|
|
|
31
35
|
|
|
32
|
-
def _format_trust(
|
|
36
|
+
def _format_trust(
|
|
37
|
+
trust: _trust.Trust,
|
|
38
|
+
) -> tuple[tuple[str, ...], tuple[Any, ...]]:
|
|
33
39
|
columns = (
|
|
34
40
|
'expires_at',
|
|
35
41
|
'id',
|
|
@@ -51,7 +57,7 @@ def _format_trust(trust):
|
|
|
51
57
|
class CreateTrust(command.ShowOne):
|
|
52
58
|
_description = _("Create new trust")
|
|
53
59
|
|
|
54
|
-
def get_parser(self, prog_name):
|
|
60
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
55
61
|
parser = super().get_parser(prog_name)
|
|
56
62
|
parser.add_argument(
|
|
57
63
|
'trustor',
|
|
@@ -112,10 +118,14 @@ class CreateTrust(command.ShowOne):
|
|
|
112
118
|
)
|
|
113
119
|
return parser
|
|
114
120
|
|
|
115
|
-
def take_action(
|
|
116
|
-
|
|
121
|
+
def take_action(
|
|
122
|
+
self, parsed_args: argparse.Namespace
|
|
123
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
124
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
125
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
126
|
+
)
|
|
117
127
|
|
|
118
|
-
kwargs = {}
|
|
128
|
+
kwargs: dict[str, Any] = {}
|
|
119
129
|
|
|
120
130
|
# NOTE(stevemar): Find the two users, project and roles that
|
|
121
131
|
# are necessary for making a trust usable, the API dictates that
|
|
@@ -203,7 +213,7 @@ class CreateTrust(command.ShowOne):
|
|
|
203
213
|
class DeleteTrust(command.Command):
|
|
204
214
|
_description = _("Delete trust(s)")
|
|
205
215
|
|
|
206
|
-
def get_parser(self, prog_name):
|
|
216
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
207
217
|
parser = super().get_parser(prog_name)
|
|
208
218
|
parser.add_argument(
|
|
209
219
|
'trust',
|
|
@@ -213,8 +223,10 @@ class DeleteTrust(command.Command):
|
|
|
213
223
|
)
|
|
214
224
|
return parser
|
|
215
225
|
|
|
216
|
-
def take_action(self, parsed_args):
|
|
217
|
-
identity_client =
|
|
226
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
227
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
228
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
229
|
+
)
|
|
218
230
|
|
|
219
231
|
errors = 0
|
|
220
232
|
for trust in parsed_args.trust:
|
|
@@ -245,7 +257,7 @@ class DeleteTrust(command.Command):
|
|
|
245
257
|
class ListTrust(command.Lister):
|
|
246
258
|
_description = _("List trusts")
|
|
247
259
|
|
|
248
|
-
def get_parser(self, prog_name):
|
|
260
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
249
261
|
parser = super().get_parser(prog_name)
|
|
250
262
|
parser.add_argument(
|
|
251
263
|
'--trustor',
|
|
@@ -275,8 +287,12 @@ class ListTrust(command.Lister):
|
|
|
275
287
|
)
|
|
276
288
|
return parser
|
|
277
289
|
|
|
278
|
-
def take_action(
|
|
279
|
-
|
|
290
|
+
def take_action(
|
|
291
|
+
self, parsed_args: argparse.Namespace
|
|
292
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
293
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
294
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
295
|
+
)
|
|
280
296
|
auth_ref = self.app.client_manager.auth_ref
|
|
281
297
|
|
|
282
298
|
if parsed_args.authuser and any(
|
|
@@ -357,9 +373,10 @@ class ListTrust(command.Lister):
|
|
|
357
373
|
except sdk_exceptions.ForbiddenException:
|
|
358
374
|
trustee = parsed_args.trustee
|
|
359
375
|
|
|
360
|
-
data =
|
|
361
|
-
|
|
362
|
-
|
|
376
|
+
data = list(
|
|
377
|
+
identity_client.trusts(
|
|
378
|
+
trustor_user_id=trustor, trustee_user_id=trustee
|
|
379
|
+
)
|
|
363
380
|
)
|
|
364
381
|
|
|
365
382
|
column_headers = (
|
|
@@ -395,7 +412,7 @@ class ListTrust(command.Lister):
|
|
|
395
412
|
class ShowTrust(command.ShowOne):
|
|
396
413
|
_description = _("Display trust details")
|
|
397
414
|
|
|
398
|
-
def get_parser(self, prog_name):
|
|
415
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
399
416
|
parser = super().get_parser(prog_name)
|
|
400
417
|
parser.add_argument(
|
|
401
418
|
'trust',
|
|
@@ -404,8 +421,12 @@ class ShowTrust(command.ShowOne):
|
|
|
404
421
|
)
|
|
405
422
|
return parser
|
|
406
423
|
|
|
407
|
-
def take_action(
|
|
408
|
-
|
|
424
|
+
def take_action(
|
|
425
|
+
self, parsed_args: argparse.Namespace
|
|
426
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
427
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
428
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
429
|
+
)
|
|
409
430
|
trust = identity_client.find_trust(
|
|
410
431
|
parsed_args.trust, ignore_missing=False
|
|
411
432
|
)
|
|
@@ -17,6 +17,10 @@ The first step of federated auth is to fetch an unscoped token. From there,
|
|
|
17
17
|
the user can list domains and projects they are allowed to access, and request
|
|
18
18
|
a scoped token."""
|
|
19
19
|
|
|
20
|
+
import argparse
|
|
21
|
+
from collections.abc import Iterable
|
|
22
|
+
from typing import Any
|
|
23
|
+
|
|
20
24
|
from osc_lib import utils
|
|
21
25
|
|
|
22
26
|
from openstackclient import command
|
|
@@ -26,7 +30,9 @@ from openstackclient.i18n import _
|
|
|
26
30
|
class ListAccessibleDomains(command.Lister):
|
|
27
31
|
_description = _("List accessible domains")
|
|
28
32
|
|
|
29
|
-
def take_action(
|
|
33
|
+
def take_action(
|
|
34
|
+
self, parsed_args: argparse.Namespace
|
|
35
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
30
36
|
columns = ('ID', 'Enabled', 'Name', 'Description')
|
|
31
37
|
identity_client = self.app.client_manager.identity
|
|
32
38
|
data = identity_client.federation.domains.list()
|
|
@@ -46,7 +52,9 @@ class ListAccessibleDomains(command.Lister):
|
|
|
46
52
|
class ListAccessibleProjects(command.Lister):
|
|
47
53
|
_description = _("List accessible projects")
|
|
48
54
|
|
|
49
|
-
def take_action(
|
|
55
|
+
def take_action(
|
|
56
|
+
self, parsed_args: argparse.Namespace
|
|
57
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
50
58
|
columns = ('ID', 'Domain ID', 'Enabled', 'Name')
|
|
51
59
|
identity_client = self.app.client_manager.identity
|
|
52
60
|
data = identity_client.federation.projects.list()
|