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
|
@@ -15,9 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
"""Identity v3 Domain 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
|
from openstack import exceptions as sdk_exceptions
|
|
24
|
+
from openstack.identity.v3 import domain as _domain
|
|
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_domain(
|
|
36
|
+
def _format_domain(
|
|
37
|
+
domain: _domain.Domain,
|
|
38
|
+
) -> tuple[tuple[str, ...], tuple[Any, ...]]:
|
|
33
39
|
columns = (
|
|
34
40
|
'id',
|
|
35
41
|
'name',
|
|
@@ -57,7 +63,7 @@ def _format_domain(domain):
|
|
|
57
63
|
class CreateDomain(command.ShowOne):
|
|
58
64
|
_description = _("Create new domain")
|
|
59
65
|
|
|
60
|
-
def get_parser(self, prog_name):
|
|
66
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
61
67
|
parser = super().get_parser(prog_name)
|
|
62
68
|
parser.add_argument(
|
|
63
69
|
'name',
|
|
@@ -91,8 +97,12 @@ class CreateDomain(command.ShowOne):
|
|
|
91
97
|
common.add_resource_option_to_parser(parser)
|
|
92
98
|
return parser
|
|
93
99
|
|
|
94
|
-
def take_action(
|
|
95
|
-
|
|
100
|
+
def take_action(
|
|
101
|
+
self, parsed_args: argparse.Namespace
|
|
102
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
103
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
104
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
105
|
+
)
|
|
96
106
|
|
|
97
107
|
options = {}
|
|
98
108
|
if parsed_args.immutable is not None:
|
|
@@ -120,7 +130,7 @@ class CreateDomain(command.ShowOne):
|
|
|
120
130
|
class DeleteDomain(command.Command):
|
|
121
131
|
_description = _("Delete domain(s)")
|
|
122
132
|
|
|
123
|
-
def get_parser(self, prog_name):
|
|
133
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
124
134
|
parser = super().get_parser(prog_name)
|
|
125
135
|
parser.add_argument(
|
|
126
136
|
'domain',
|
|
@@ -130,8 +140,10 @@ class DeleteDomain(command.Command):
|
|
|
130
140
|
)
|
|
131
141
|
return parser
|
|
132
142
|
|
|
133
|
-
def take_action(self, parsed_args):
|
|
134
|
-
identity_client =
|
|
143
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
144
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
145
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
146
|
+
)
|
|
135
147
|
result = 0
|
|
136
148
|
for i in parsed_args.domain:
|
|
137
149
|
try:
|
|
@@ -159,7 +171,7 @@ class DeleteDomain(command.Command):
|
|
|
159
171
|
class ListDomain(command.Lister):
|
|
160
172
|
_description = _("List domains")
|
|
161
173
|
|
|
162
|
-
def get_parser(self, prog_name):
|
|
174
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
163
175
|
parser = super().get_parser(prog_name)
|
|
164
176
|
parser.add_argument(
|
|
165
177
|
'--name',
|
|
@@ -174,7 +186,12 @@ class ListDomain(command.Lister):
|
|
|
174
186
|
)
|
|
175
187
|
return parser
|
|
176
188
|
|
|
177
|
-
def take_action(
|
|
189
|
+
def take_action(
|
|
190
|
+
self, parsed_args: argparse.Namespace
|
|
191
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
192
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
193
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
194
|
+
)
|
|
178
195
|
kwargs = {}
|
|
179
196
|
if parsed_args.name:
|
|
180
197
|
kwargs['name'] = parsed_args.name
|
|
@@ -183,9 +200,7 @@ class ListDomain(command.Lister):
|
|
|
183
200
|
|
|
184
201
|
columns = ('id', 'name', 'is_enabled', 'description')
|
|
185
202
|
column_headers = ('ID', 'Name', 'Enabled', 'Description')
|
|
186
|
-
data =
|
|
187
|
-
**kwargs
|
|
188
|
-
)
|
|
203
|
+
data = identity_client.domains(**kwargs)
|
|
189
204
|
|
|
190
205
|
return (
|
|
191
206
|
column_headers,
|
|
@@ -203,7 +218,7 @@ class ListDomain(command.Lister):
|
|
|
203
218
|
class SetDomain(command.Command):
|
|
204
219
|
_description = _("Set domain properties")
|
|
205
220
|
|
|
206
|
-
def get_parser(self, prog_name):
|
|
221
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
207
222
|
parser = super().get_parser(prog_name)
|
|
208
223
|
parser.add_argument(
|
|
209
224
|
'domain',
|
|
@@ -238,8 +253,10 @@ class SetDomain(command.Command):
|
|
|
238
253
|
common.add_resource_option_to_parser(parser)
|
|
239
254
|
return parser
|
|
240
255
|
|
|
241
|
-
def take_action(self, parsed_args):
|
|
242
|
-
identity_client =
|
|
256
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
257
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
258
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
259
|
+
)
|
|
243
260
|
domain = identity_client.find_domain(
|
|
244
261
|
parsed_args.domain, ignore_missing=False
|
|
245
262
|
)
|
|
@@ -259,7 +276,7 @@ class SetDomain(command.Command):
|
|
|
259
276
|
class ShowDomain(command.ShowOne):
|
|
260
277
|
_description = _("Display domain details")
|
|
261
278
|
|
|
262
|
-
def get_parser(self, prog_name):
|
|
279
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
263
280
|
parser = super().get_parser(prog_name)
|
|
264
281
|
parser.add_argument(
|
|
265
282
|
'domain',
|
|
@@ -268,8 +285,12 @@ class ShowDomain(command.ShowOne):
|
|
|
268
285
|
)
|
|
269
286
|
return parser
|
|
270
287
|
|
|
271
|
-
def take_action(
|
|
272
|
-
|
|
288
|
+
def take_action(
|
|
289
|
+
self, parsed_args: argparse.Namespace
|
|
290
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
291
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
292
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
293
|
+
)
|
|
273
294
|
domain = identity_client.find_domain(
|
|
274
295
|
parsed_args.domain, ignore_missing=False
|
|
275
296
|
)
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
"""Identity v3 EC2 Credentials action implementations"""
|
|
14
14
|
|
|
15
|
+
import argparse
|
|
16
|
+
from collections.abc import Iterable, Sequence
|
|
15
17
|
import logging
|
|
18
|
+
from typing import Any, cast
|
|
16
19
|
|
|
17
20
|
from osc_lib import exceptions
|
|
18
21
|
from osc_lib import utils
|
|
@@ -25,7 +28,9 @@ from openstackclient.identity import common
|
|
|
25
28
|
LOG = logging.getLogger(__name__)
|
|
26
29
|
|
|
27
30
|
|
|
28
|
-
def _determine_ec2_user(
|
|
31
|
+
def _determine_ec2_user(
|
|
32
|
+
parsed_args: argparse.Namespace, client_manager: Any
|
|
33
|
+
) -> str:
|
|
29
34
|
"""Determine a user several different ways.
|
|
30
35
|
|
|
31
36
|
Assumes parsed_args has user and user_domain arguments. Attempts to find
|
|
@@ -53,13 +58,13 @@ def _determine_ec2_user(parsed_args, client_manager):
|
|
|
53
58
|
else:
|
|
54
59
|
# Get the user from the current auth
|
|
55
60
|
user = client_manager.auth_ref.user_id
|
|
56
|
-
return user
|
|
61
|
+
return cast(str, user)
|
|
57
62
|
|
|
58
63
|
|
|
59
64
|
class CreateEC2Creds(command.ShowOne):
|
|
60
65
|
_description = _("Create EC2 credentials")
|
|
61
66
|
|
|
62
|
-
def get_parser(self, prog_name):
|
|
67
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
63
68
|
parser = super().get_parser(prog_name)
|
|
64
69
|
parser.add_argument(
|
|
65
70
|
'--project',
|
|
@@ -81,7 +86,9 @@ class CreateEC2Creds(command.ShowOne):
|
|
|
81
86
|
common.add_project_domain_option_to_parser(parser)
|
|
82
87
|
return parser
|
|
83
88
|
|
|
84
|
-
def take_action(
|
|
89
|
+
def take_action(
|
|
90
|
+
self, parsed_args: argparse.Namespace
|
|
91
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
85
92
|
identity_client = self.app.client_manager.identity
|
|
86
93
|
client_manager = self.app.client_manager
|
|
87
94
|
user = _determine_ec2_user(parsed_args, client_manager)
|
|
@@ -115,13 +122,14 @@ class CreateEC2Creds(command.ShowOne):
|
|
|
115
122
|
if 'tenant_id' in info:
|
|
116
123
|
info.update({'project_id': info.pop('tenant_id')})
|
|
117
124
|
|
|
118
|
-
|
|
125
|
+
col_headers, col_data = zip(*sorted(info.items()))
|
|
126
|
+
return col_headers, col_data
|
|
119
127
|
|
|
120
128
|
|
|
121
129
|
class DeleteEC2Creds(command.Command):
|
|
122
130
|
_description = _("Delete EC2 credentials")
|
|
123
131
|
|
|
124
|
-
def get_parser(self, prog_name):
|
|
132
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
125
133
|
parser = super().get_parser(prog_name)
|
|
126
134
|
parser.add_argument(
|
|
127
135
|
'access_key',
|
|
@@ -137,7 +145,7 @@ class DeleteEC2Creds(command.Command):
|
|
|
137
145
|
common.add_user_domain_option_to_parser(parser)
|
|
138
146
|
return parser
|
|
139
147
|
|
|
140
|
-
def take_action(self, parsed_args):
|
|
148
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
141
149
|
client_manager = self.app.client_manager
|
|
142
150
|
user = _determine_ec2_user(parsed_args, client_manager)
|
|
143
151
|
result = 0
|
|
@@ -166,7 +174,7 @@ class DeleteEC2Creds(command.Command):
|
|
|
166
174
|
class ListEC2Creds(command.Lister):
|
|
167
175
|
_description = _("List EC2 credentials")
|
|
168
176
|
|
|
169
|
-
def get_parser(self, prog_name):
|
|
177
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
170
178
|
parser = super().get_parser(prog_name)
|
|
171
179
|
parser.add_argument(
|
|
172
180
|
'--user',
|
|
@@ -176,7 +184,9 @@ class ListEC2Creds(command.Lister):
|
|
|
176
184
|
common.add_user_domain_option_to_parser(parser)
|
|
177
185
|
return parser
|
|
178
186
|
|
|
179
|
-
def take_action(
|
|
187
|
+
def take_action(
|
|
188
|
+
self, parsed_args: argparse.Namespace
|
|
189
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
180
190
|
client_manager = self.app.client_manager
|
|
181
191
|
user = _determine_ec2_user(parsed_args, client_manager)
|
|
182
192
|
|
|
@@ -200,7 +210,7 @@ class ListEC2Creds(command.Lister):
|
|
|
200
210
|
class ShowEC2Creds(command.ShowOne):
|
|
201
211
|
_description = _("Display EC2 credentials details")
|
|
202
212
|
|
|
203
|
-
def get_parser(self, prog_name):
|
|
213
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
204
214
|
parser = super().get_parser(prog_name)
|
|
205
215
|
parser.add_argument(
|
|
206
216
|
'access_key',
|
|
@@ -215,7 +225,9 @@ class ShowEC2Creds(command.ShowOne):
|
|
|
215
225
|
common.add_user_domain_option_to_parser(parser)
|
|
216
226
|
return parser
|
|
217
227
|
|
|
218
|
-
def take_action(
|
|
228
|
+
def take_action(
|
|
229
|
+
self, parsed_args: argparse.Namespace
|
|
230
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
219
231
|
client_manager = self.app.client_manager
|
|
220
232
|
user = _determine_ec2_user(parsed_args, client_manager)
|
|
221
233
|
creds = client_manager.identity.ec2.get(user, parsed_args.access_key)
|
|
@@ -226,4 +238,5 @@ class ShowEC2Creds(command.ShowOne):
|
|
|
226
238
|
if 'tenant_id' in info:
|
|
227
239
|
info.update({'project_id': info.pop('tenant_id')})
|
|
228
240
|
|
|
229
|
-
|
|
241
|
+
col_headers, col_data = zip(*sorted(info.items()))
|
|
242
|
+
return col_headers, col_data
|
|
@@ -15,8 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
"""Identity v3 Endpoint 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
|
|
|
23
|
+
from openstack.identity.v3 import endpoint as _endpoint
|
|
24
|
+
from openstack.identity.v3 import service as _service
|
|
25
|
+
from openstack import utils as sdk_utils
|
|
20
26
|
from osc_lib import exceptions
|
|
21
27
|
from osc_lib import utils
|
|
22
28
|
|
|
@@ -24,11 +30,12 @@ from openstackclient import command
|
|
|
24
30
|
from openstackclient.i18n import _
|
|
25
31
|
from openstackclient.identity import common
|
|
26
32
|
|
|
27
|
-
|
|
28
33
|
LOG = logging.getLogger(__name__)
|
|
29
34
|
|
|
30
35
|
|
|
31
|
-
def _format_endpoint(
|
|
36
|
+
def _format_endpoint(
|
|
37
|
+
endpoint: _endpoint.Endpoint, service: _service.Service
|
|
38
|
+
) -> tuple[tuple[str, ...], Any]:
|
|
32
39
|
columns = (
|
|
33
40
|
'is_enabled',
|
|
34
41
|
'id',
|
|
@@ -58,7 +65,7 @@ def _format_endpoint(endpoint, service):
|
|
|
58
65
|
class AddProjectToEndpoint(command.Command):
|
|
59
66
|
_description = _("Associate a project to an endpoint")
|
|
60
67
|
|
|
61
|
-
def get_parser(self, prog_name):
|
|
68
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
62
69
|
parser = super().get_parser(prog_name)
|
|
63
70
|
parser.add_argument(
|
|
64
71
|
'endpoint',
|
|
@@ -75,7 +82,7 @@ class AddProjectToEndpoint(command.Command):
|
|
|
75
82
|
common.add_project_domain_option_to_parser(parser)
|
|
76
83
|
return parser
|
|
77
84
|
|
|
78
|
-
def take_action(self, parsed_args):
|
|
85
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
79
86
|
client = self.app.client_manager.identity
|
|
80
87
|
|
|
81
88
|
endpoint = utils.find_resource(client.endpoints, parsed_args.endpoint)
|
|
@@ -92,7 +99,7 @@ class AddProjectToEndpoint(command.Command):
|
|
|
92
99
|
class CreateEndpoint(command.ShowOne):
|
|
93
100
|
_description = _("Create new endpoint")
|
|
94
101
|
|
|
95
|
-
def get_parser(self, prog_name):
|
|
102
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
96
103
|
parser = super().get_parser(prog_name)
|
|
97
104
|
parser.add_argument(
|
|
98
105
|
'service',
|
|
@@ -131,8 +138,12 @@ class CreateEndpoint(command.ShowOne):
|
|
|
131
138
|
)
|
|
132
139
|
return parser
|
|
133
140
|
|
|
134
|
-
def take_action(
|
|
135
|
-
|
|
141
|
+
def take_action(
|
|
142
|
+
self, parsed_args: argparse.Namespace
|
|
143
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
144
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
145
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
146
|
+
)
|
|
136
147
|
service = common.find_service_sdk(identity_client, parsed_args.service)
|
|
137
148
|
|
|
138
149
|
kwargs = {}
|
|
@@ -154,7 +165,7 @@ class CreateEndpoint(command.ShowOne):
|
|
|
154
165
|
class DeleteEndpoint(command.Command):
|
|
155
166
|
_description = _("Delete endpoint(s)")
|
|
156
167
|
|
|
157
|
-
def get_parser(self, prog_name):
|
|
168
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
158
169
|
parser = super().get_parser(prog_name)
|
|
159
170
|
parser.add_argument(
|
|
160
171
|
'endpoint',
|
|
@@ -164,8 +175,10 @@ class DeleteEndpoint(command.Command):
|
|
|
164
175
|
)
|
|
165
176
|
return parser
|
|
166
177
|
|
|
167
|
-
def take_action(self, parsed_args):
|
|
168
|
-
identity_client =
|
|
178
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
179
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
180
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
181
|
+
)
|
|
169
182
|
result = 0
|
|
170
183
|
for i in parsed_args.endpoint:
|
|
171
184
|
try:
|
|
@@ -195,7 +208,7 @@ class DeleteEndpoint(command.Command):
|
|
|
195
208
|
class ListEndpoint(command.Lister):
|
|
196
209
|
_description = _("List endpoints")
|
|
197
210
|
|
|
198
|
-
def get_parser(self, prog_name):
|
|
211
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
199
212
|
parser = super().get_parser(prog_name)
|
|
200
213
|
parser.add_argument(
|
|
201
214
|
'--service',
|
|
@@ -227,8 +240,12 @@ class ListEndpoint(command.Lister):
|
|
|
227
240
|
common.add_project_domain_option_to_parser(parser)
|
|
228
241
|
return parser
|
|
229
242
|
|
|
230
|
-
def take_action(
|
|
231
|
-
|
|
243
|
+
def take_action(
|
|
244
|
+
self, parsed_args: argparse.Namespace
|
|
245
|
+
) -> tuple[tuple[str, ...], Iterable[tuple[Any, ...]]]:
|
|
246
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
247
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
248
|
+
)
|
|
232
249
|
|
|
233
250
|
endpoint = None
|
|
234
251
|
if parsed_args.endpoint:
|
|
@@ -253,54 +270,65 @@ class ListEndpoint(command.Lister):
|
|
|
253
270
|
domain_id=project_domain_id,
|
|
254
271
|
)
|
|
255
272
|
|
|
273
|
+
# FIXME(stephenfin): This belongs under the project list command
|
|
256
274
|
if endpoint:
|
|
257
275
|
column_headers: tuple[str, ...] = ('ID', 'Name')
|
|
258
276
|
columns: tuple[str, ...] = ('id', 'name')
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
277
|
+
projects = identity_client.endpoint_projects(endpoint=endpoint.id)
|
|
278
|
+
return (
|
|
279
|
+
column_headers,
|
|
280
|
+
(
|
|
281
|
+
utils.get_item_properties(
|
|
282
|
+
s,
|
|
283
|
+
columns,
|
|
284
|
+
formatters={},
|
|
285
|
+
)
|
|
286
|
+
for s in projects
|
|
287
|
+
),
|
|
269
288
|
)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
289
|
+
|
|
290
|
+
column_headers = (
|
|
291
|
+
'ID',
|
|
292
|
+
'Region',
|
|
293
|
+
'Service Name',
|
|
294
|
+
'Service Type',
|
|
295
|
+
'Enabled',
|
|
296
|
+
'Interface',
|
|
297
|
+
'URL',
|
|
298
|
+
)
|
|
299
|
+
columns = (
|
|
300
|
+
'id',
|
|
301
|
+
'region_id',
|
|
302
|
+
'service_name',
|
|
303
|
+
'service_type',
|
|
304
|
+
'is_enabled',
|
|
305
|
+
'interface',
|
|
306
|
+
'url',
|
|
307
|
+
)
|
|
308
|
+
kwargs = {}
|
|
309
|
+
if parsed_args.service:
|
|
310
|
+
service = common.find_service_sdk(
|
|
311
|
+
identity_client, parsed_args.service
|
|
278
312
|
)
|
|
279
|
-
kwargs =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if parsed_args.interface:
|
|
286
|
-
kwargs['interface'] = parsed_args.interface
|
|
287
|
-
if parsed_args.region:
|
|
288
|
-
region = identity_client.get_region(parsed_args.region)
|
|
289
|
-
kwargs['region_id'] = region.id
|
|
290
|
-
|
|
291
|
-
if project_id:
|
|
292
|
-
data = list(
|
|
293
|
-
identity_client.project_endpoints(project=project_id)
|
|
294
|
-
)
|
|
295
|
-
else:
|
|
296
|
-
data = list(identity_client.endpoints(**kwargs))
|
|
313
|
+
kwargs['service_id'] = service.id
|
|
314
|
+
if parsed_args.interface:
|
|
315
|
+
kwargs['interface'] = parsed_args.interface
|
|
316
|
+
if parsed_args.region:
|
|
317
|
+
region = identity_client.get_region(parsed_args.region)
|
|
318
|
+
kwargs['region_id'] = region.id
|
|
297
319
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
320
|
+
data: list[_endpoint.Endpoint]
|
|
321
|
+
if project_id:
|
|
322
|
+
data = list(identity_client.project_endpoints(project=project_id))
|
|
323
|
+
else:
|
|
324
|
+
data = list(identity_client.endpoints(**kwargs))
|
|
325
|
+
|
|
326
|
+
for ep in data:
|
|
327
|
+
service = identity_client.find_service(
|
|
328
|
+
ep.service_id, ignore_missing=False
|
|
329
|
+
)
|
|
330
|
+
setattr(ep, 'service_name', getattr(service, 'name', ''))
|
|
331
|
+
setattr(ep, 'service_type', service.type)
|
|
304
332
|
|
|
305
333
|
return (
|
|
306
334
|
column_headers,
|
|
@@ -318,7 +346,7 @@ class ListEndpoint(command.Lister):
|
|
|
318
346
|
class RemoveProjectFromEndpoint(command.Command):
|
|
319
347
|
_description = _("Dissociate a project from an endpoint")
|
|
320
348
|
|
|
321
|
-
def get_parser(self, prog_name):
|
|
349
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
322
350
|
parser = super().get_parser(prog_name)
|
|
323
351
|
parser.add_argument(
|
|
324
352
|
'endpoint',
|
|
@@ -337,7 +365,7 @@ class RemoveProjectFromEndpoint(command.Command):
|
|
|
337
365
|
common.add_project_domain_option_to_parser(parser)
|
|
338
366
|
return parser
|
|
339
367
|
|
|
340
|
-
def take_action(self, parsed_args):
|
|
368
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
341
369
|
client = self.app.client_manager.identity
|
|
342
370
|
|
|
343
371
|
endpoint = utils.find_resource(client.endpoints, parsed_args.endpoint)
|
|
@@ -354,7 +382,7 @@ class RemoveProjectFromEndpoint(command.Command):
|
|
|
354
382
|
class SetEndpoint(command.Command):
|
|
355
383
|
_description = _("Set endpoint properties")
|
|
356
384
|
|
|
357
|
-
def get_parser(self, prog_name):
|
|
385
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
358
386
|
parser = super().get_parser(prog_name)
|
|
359
387
|
parser.add_argument(
|
|
360
388
|
'endpoint',
|
|
@@ -397,13 +425,15 @@ class SetEndpoint(command.Command):
|
|
|
397
425
|
)
|
|
398
426
|
return parser
|
|
399
427
|
|
|
400
|
-
def take_action(self, parsed_args):
|
|
401
|
-
identity_client =
|
|
428
|
+
def take_action(self, parsed_args: argparse.Namespace) -> None:
|
|
429
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
430
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
431
|
+
)
|
|
402
432
|
endpoint = identity_client.find_endpoint(
|
|
403
433
|
parsed_args.endpoint, ignore_missing=False
|
|
404
434
|
)
|
|
405
435
|
|
|
406
|
-
kwargs = {}
|
|
436
|
+
kwargs: dict[str, object] = {}
|
|
407
437
|
|
|
408
438
|
if parsed_args.service:
|
|
409
439
|
service = common.find_service_sdk(
|
|
@@ -434,7 +464,7 @@ class SetEndpoint(command.Command):
|
|
|
434
464
|
class ShowEndpoint(command.ShowOne):
|
|
435
465
|
_description = _("Display endpoint details")
|
|
436
466
|
|
|
437
|
-
def get_parser(self, prog_name):
|
|
467
|
+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
|
|
438
468
|
parser = super().get_parser(prog_name)
|
|
439
469
|
parser.add_argument(
|
|
440
470
|
'endpoint',
|
|
@@ -446,8 +476,12 @@ class ShowEndpoint(command.ShowOne):
|
|
|
446
476
|
)
|
|
447
477
|
return parser
|
|
448
478
|
|
|
449
|
-
def take_action(
|
|
450
|
-
|
|
479
|
+
def take_action(
|
|
480
|
+
self, parsed_args: argparse.Namespace
|
|
481
|
+
) -> tuple[Sequence[str], Iterable[Any]]:
|
|
482
|
+
identity_client = sdk_utils.ensure_service_version(
|
|
483
|
+
self.app.client_manager.sdk_connection.identity, '3'
|
|
484
|
+
)
|
|
451
485
|
endpoint = identity_client.find_endpoint(
|
|
452
486
|
parsed_args.endpoint, ignore_missing=False
|
|
453
487
|
)
|