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
openstackclient/__init__.py
CHANGED
|
@@ -11,12 +11,8 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
#
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import importlib.metadata
|
|
15
15
|
|
|
16
16
|
__all__ = ['__version__']
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
try:
|
|
20
|
-
__version__ = version_info.version_string()
|
|
21
|
-
except AttributeError:
|
|
22
|
-
__version__ = None
|
|
18
|
+
__version__ = importlib.metadata.version('python-openstackclient')
|
openstackclient/api/api.py
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
"""Base API Library"""
|
|
15
15
|
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
16
18
|
from keystoneauth1 import exceptions as ks_exceptions
|
|
17
19
|
from keystoneauth1 import session as ks_session
|
|
18
20
|
from osc_lib import exceptions
|
|
@@ -30,7 +32,9 @@ class KeystoneSession:
|
|
|
30
32
|
|
|
31
33
|
"""
|
|
32
34
|
|
|
33
|
-
def __init__(
|
|
35
|
+
def __init__(
|
|
36
|
+
self, session: Any = None, endpoint: str | None = None, **kwargs: Any
|
|
37
|
+
) -> None:
|
|
34
38
|
"""Base object that contains some common API objects and methods
|
|
35
39
|
|
|
36
40
|
:param Session session:
|
|
@@ -46,7 +50,9 @@ class KeystoneSession:
|
|
|
46
50
|
self.session = session
|
|
47
51
|
self.endpoint = endpoint
|
|
48
52
|
|
|
49
|
-
def _request(
|
|
53
|
+
def _request(
|
|
54
|
+
self, method: str, url: str, session: Any = None, **kwargs: Any
|
|
55
|
+
) -> Any:
|
|
50
56
|
"""Perform call into session
|
|
51
57
|
|
|
52
58
|
All API calls are funneled through this method to provide a common
|
|
@@ -82,8 +88,12 @@ class BaseAPI(KeystoneSession):
|
|
|
82
88
|
"""Base API"""
|
|
83
89
|
|
|
84
90
|
def __init__(
|
|
85
|
-
self,
|
|
86
|
-
|
|
91
|
+
self,
|
|
92
|
+
session: Any = None,
|
|
93
|
+
service_type: str | None = None,
|
|
94
|
+
endpoint: str | None = None,
|
|
95
|
+
**kwargs: Any,
|
|
96
|
+
) -> None:
|
|
87
97
|
"""Base object that contains some common API objects and methods
|
|
88
98
|
|
|
89
99
|
:param Session session:
|
|
@@ -101,7 +111,13 @@ class BaseAPI(KeystoneSession):
|
|
|
101
111
|
|
|
102
112
|
# The basic action methods all take a Session and return dict/lists
|
|
103
113
|
|
|
104
|
-
def create(
|
|
114
|
+
def create(
|
|
115
|
+
self,
|
|
116
|
+
url: str,
|
|
117
|
+
session: Any = None,
|
|
118
|
+
method: str | None = None,
|
|
119
|
+
**params: Any,
|
|
120
|
+
) -> Any:
|
|
105
121
|
"""Create a new resource
|
|
106
122
|
|
|
107
123
|
:param string url:
|
|
@@ -121,7 +137,7 @@ class BaseAPI(KeystoneSession):
|
|
|
121
137
|
except requests.JSONDecodeError:
|
|
122
138
|
return ret
|
|
123
139
|
|
|
124
|
-
def delete(self, url, session=None, **params):
|
|
140
|
+
def delete(self, url: str, session: Any = None, **params: Any) -> Any:
|
|
125
141
|
"""Delete a resource
|
|
126
142
|
|
|
127
143
|
:param string url:
|
|
@@ -132,7 +148,14 @@ class BaseAPI(KeystoneSession):
|
|
|
132
148
|
|
|
133
149
|
return self._request('DELETE', url, **params)
|
|
134
150
|
|
|
135
|
-
def list(
|
|
151
|
+
def list(
|
|
152
|
+
self,
|
|
153
|
+
path: str,
|
|
154
|
+
session: Any = None,
|
|
155
|
+
body: Any = None,
|
|
156
|
+
detailed: bool = False,
|
|
157
|
+
**params: Any,
|
|
158
|
+
) -> Any:
|
|
136
159
|
"""Return a list of resources
|
|
137
160
|
|
|
138
161
|
GET ${ENDPOINT}/${PATH}?${PARAMS}
|
|
@@ -177,11 +200,11 @@ class BaseAPI(KeystoneSession):
|
|
|
177
200
|
|
|
178
201
|
def find_attr(
|
|
179
202
|
self,
|
|
180
|
-
path,
|
|
181
|
-
value=None,
|
|
182
|
-
attr=None,
|
|
183
|
-
resource=None,
|
|
184
|
-
):
|
|
203
|
+
path: str,
|
|
204
|
+
value: str | None = None,
|
|
205
|
+
attr: str | None = None,
|
|
206
|
+
resource: str | None = None,
|
|
207
|
+
) -> Any:
|
|
185
208
|
"""Find a resource via attribute or ID
|
|
186
209
|
|
|
187
210
|
Most APIs return a list wrapped by a dict with the resource
|
|
@@ -211,7 +234,7 @@ class BaseAPI(KeystoneSession):
|
|
|
211
234
|
if resource is None:
|
|
212
235
|
resource = path
|
|
213
236
|
|
|
214
|
-
def getlist(kw):
|
|
237
|
+
def getlist(kw: dict[str, Any]) -> Any:
|
|
215
238
|
"""Do list call, unwrap resource dict if present"""
|
|
216
239
|
ret = self.list(path, **kw)
|
|
217
240
|
if isinstance(ret, dict) and resource in ret:
|
|
@@ -219,7 +242,7 @@ class BaseAPI(KeystoneSession):
|
|
|
219
242
|
return ret
|
|
220
243
|
|
|
221
244
|
# Search by attribute
|
|
222
|
-
kwargs = {attr: value}
|
|
245
|
+
kwargs: dict[str, Any] = {attr: value}
|
|
223
246
|
data = getlist(kwargs)
|
|
224
247
|
if isinstance(data, dict):
|
|
225
248
|
return data
|
|
@@ -241,7 +264,7 @@ class BaseAPI(KeystoneSession):
|
|
|
241
264
|
msg % {'resource': resource, 'attr': attr, 'value': value}
|
|
242
265
|
)
|
|
243
266
|
|
|
244
|
-
def find_bulk(self, path, **kwargs):
|
|
267
|
+
def find_bulk(self, path: str, **kwargs: Any) -> Any:
|
|
245
268
|
"""Bulk load and filter locally
|
|
246
269
|
|
|
247
270
|
:param string path:
|
|
@@ -254,7 +277,7 @@ class BaseAPI(KeystoneSession):
|
|
|
254
277
|
items = self.list(path)
|
|
255
278
|
if isinstance(items, dict):
|
|
256
279
|
# strip off the enclosing dict
|
|
257
|
-
key =
|
|
280
|
+
key = next(iter(items.keys()))
|
|
258
281
|
items = items[key]
|
|
259
282
|
|
|
260
283
|
ret = []
|
|
@@ -267,7 +290,7 @@ class BaseAPI(KeystoneSession):
|
|
|
267
290
|
|
|
268
291
|
return ret
|
|
269
292
|
|
|
270
|
-
def find_one(self, path, **kwargs):
|
|
293
|
+
def find_one(self, path: str, **kwargs: Any) -> Any:
|
|
271
294
|
"""Find a resource by name or ID
|
|
272
295
|
|
|
273
296
|
:param string path:
|
|
@@ -286,12 +309,7 @@ class BaseAPI(KeystoneSession):
|
|
|
286
309
|
raise RuntimeError(msg)
|
|
287
310
|
return bulk_list[0]
|
|
288
311
|
|
|
289
|
-
def find(
|
|
290
|
-
self,
|
|
291
|
-
path,
|
|
292
|
-
value=None,
|
|
293
|
-
attr=None,
|
|
294
|
-
):
|
|
312
|
+
def find(self, path: str, value: str, attr: str) -> Any:
|
|
295
313
|
"""Find a single resource by name or ID
|
|
296
314
|
|
|
297
315
|
:param string path:
|
|
@@ -17,6 +17,7 @@ intentionally supported by SDK. Most of these are proxy APIs.
|
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
import http
|
|
20
|
+
from typing import Any
|
|
20
21
|
|
|
21
22
|
from openstack import exceptions as sdk_exceptions
|
|
22
23
|
from osc_lib import exceptions
|
|
@@ -25,7 +26,11 @@ from osc_lib import exceptions
|
|
|
25
26
|
# security groups
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
def create_security_group(
|
|
29
|
+
def create_security_group(
|
|
30
|
+
compute_client: Any,
|
|
31
|
+
name: str | None = None,
|
|
32
|
+
description: str | None = None,
|
|
33
|
+
) -> Any:
|
|
29
34
|
"""Create a new security group
|
|
30
35
|
|
|
31
36
|
https://docs.openstack.org/api-ref/compute/#create-security-group
|
|
@@ -46,7 +51,9 @@ def create_security_group(compute_client, name=None, description=None):
|
|
|
46
51
|
return response.json()['security_group']
|
|
47
52
|
|
|
48
53
|
|
|
49
|
-
def list_security_groups(
|
|
54
|
+
def list_security_groups(
|
|
55
|
+
compute_client: Any, all_projects: bool | None = None
|
|
56
|
+
) -> Any:
|
|
50
57
|
"""Get all security groups
|
|
51
58
|
|
|
52
59
|
https://docs.openstack.org/api-ref/compute/#list-security-groups
|
|
@@ -63,7 +70,7 @@ def list_security_groups(compute_client, all_projects=None):
|
|
|
63
70
|
return response.json()['security_groups']
|
|
64
71
|
|
|
65
72
|
|
|
66
|
-
def find_security_group(compute_client, name_or_id):
|
|
73
|
+
def find_security_group(compute_client: Any, name_or_id: str) -> Any:
|
|
67
74
|
"""Find the security group for a given name or ID
|
|
68
75
|
|
|
69
76
|
https://docs.openstack.org/api-ref/compute/#show-security-group-details
|
|
@@ -101,8 +108,11 @@ def find_security_group(compute_client, name_or_id):
|
|
|
101
108
|
|
|
102
109
|
|
|
103
110
|
def update_security_group(
|
|
104
|
-
compute_client
|
|
105
|
-
|
|
111
|
+
compute_client: Any,
|
|
112
|
+
security_group_id: str,
|
|
113
|
+
name: str | None = None,
|
|
114
|
+
description: str | None = None,
|
|
115
|
+
) -> Any:
|
|
106
116
|
"""Update an existing security group
|
|
107
117
|
|
|
108
118
|
https://docs.openstack.org/api-ref/compute/#update-security-group
|
|
@@ -127,7 +137,9 @@ def update_security_group(
|
|
|
127
137
|
return response.json()['security_group']
|
|
128
138
|
|
|
129
139
|
|
|
130
|
-
def delete_security_group(
|
|
140
|
+
def delete_security_group(
|
|
141
|
+
compute_client: Any, security_group_id: str | None = None
|
|
142
|
+
) -> None:
|
|
131
143
|
"""Delete a security group
|
|
132
144
|
|
|
133
145
|
https://docs.openstack.org/api-ref/compute/#delete-security-group
|
|
@@ -146,14 +158,14 @@ def delete_security_group(compute_client, security_group_id=None):
|
|
|
146
158
|
|
|
147
159
|
|
|
148
160
|
def create_security_group_rule(
|
|
149
|
-
compute_client,
|
|
150
|
-
security_group_id=None,
|
|
151
|
-
ip_protocol=None,
|
|
152
|
-
from_port=None,
|
|
153
|
-
to_port=None,
|
|
154
|
-
remote_ip=None,
|
|
155
|
-
remote_group=None,
|
|
156
|
-
):
|
|
161
|
+
compute_client: Any,
|
|
162
|
+
security_group_id: str | None = None,
|
|
163
|
+
ip_protocol: str | None = None,
|
|
164
|
+
from_port: int | None = None,
|
|
165
|
+
to_port: int | None = None,
|
|
166
|
+
remote_ip: str | None = None,
|
|
167
|
+
remote_group: str | None = None,
|
|
168
|
+
) -> Any:
|
|
157
169
|
"""Create a new security group rule
|
|
158
170
|
|
|
159
171
|
https://docs.openstack.org/api-ref/compute/#create-security-group-rule
|
|
@@ -182,7 +194,9 @@ def create_security_group_rule(
|
|
|
182
194
|
return response.json()['security_group_rule']
|
|
183
195
|
|
|
184
196
|
|
|
185
|
-
def delete_security_group_rule(
|
|
197
|
+
def delete_security_group_rule(
|
|
198
|
+
compute_client: Any, security_group_rule_id: str | None = None
|
|
199
|
+
) -> None:
|
|
186
200
|
"""Delete a security group rule
|
|
187
201
|
|
|
188
202
|
https://docs.openstack.org/api-ref/compute/#delete-security-group-rule
|
|
@@ -201,7 +215,12 @@ def delete_security_group_rule(compute_client, security_group_rule_id=None):
|
|
|
201
215
|
# networks
|
|
202
216
|
|
|
203
217
|
|
|
204
|
-
def create_network(
|
|
218
|
+
def create_network(
|
|
219
|
+
compute_client: Any,
|
|
220
|
+
name: str,
|
|
221
|
+
subnet: str,
|
|
222
|
+
share_subnet: bool | None = None,
|
|
223
|
+
) -> Any:
|
|
205
224
|
"""Create a new network
|
|
206
225
|
|
|
207
226
|
https://docs.openstack.org/api-ref/compute/#create-network
|
|
@@ -212,7 +231,7 @@ def create_network(compute_client, name, subnet, share_subnet=None):
|
|
|
212
231
|
:param bool share_subnet: Shared subnet between projects
|
|
213
232
|
:returns: A network object
|
|
214
233
|
"""
|
|
215
|
-
data = {
|
|
234
|
+
data: dict[str, Any] = {
|
|
216
235
|
'label': name,
|
|
217
236
|
'cidr': subnet,
|
|
218
237
|
}
|
|
@@ -226,7 +245,7 @@ def create_network(compute_client, name, subnet, share_subnet=None):
|
|
|
226
245
|
return response.json()['network']
|
|
227
246
|
|
|
228
247
|
|
|
229
|
-
def list_networks(compute_client):
|
|
248
|
+
def list_networks(compute_client: Any) -> Any:
|
|
230
249
|
"""Get all networks
|
|
231
250
|
|
|
232
251
|
https://docs.openstack.org/api-ref/compute/#list-networks
|
|
@@ -239,7 +258,7 @@ def list_networks(compute_client):
|
|
|
239
258
|
return response.json()['networks']
|
|
240
259
|
|
|
241
260
|
|
|
242
|
-
def find_network(compute_client, name_or_id):
|
|
261
|
+
def find_network(compute_client: Any, name_or_id: str) -> Any:
|
|
243
262
|
"""Find the network for a given name or ID
|
|
244
263
|
|
|
245
264
|
https://docs.openstack.org/api-ref/compute/#show-network-details
|
|
@@ -276,7 +295,7 @@ def find_network(compute_client, name_or_id):
|
|
|
276
295
|
return found
|
|
277
296
|
|
|
278
297
|
|
|
279
|
-
def delete_network(compute_client, network_id):
|
|
298
|
+
def delete_network(compute_client: Any, network_id: str) -> None:
|
|
280
299
|
"""Delete a network
|
|
281
300
|
|
|
282
301
|
https://docs.openstack.org/api-ref/compute/#delete-network
|
|
@@ -294,7 +313,7 @@ def delete_network(compute_client, network_id):
|
|
|
294
313
|
# floating ips
|
|
295
314
|
|
|
296
315
|
|
|
297
|
-
def create_floating_ip(compute_client, network):
|
|
316
|
+
def create_floating_ip(compute_client: Any, network: str) -> Any:
|
|
298
317
|
"""Create a new floating ip
|
|
299
318
|
|
|
300
319
|
https://docs.openstack.org/api-ref/compute/#create-allocate-floating-ip-address
|
|
@@ -309,7 +328,7 @@ def create_floating_ip(compute_client, network):
|
|
|
309
328
|
return response.json()['floating_ip']
|
|
310
329
|
|
|
311
330
|
|
|
312
|
-
def list_floating_ips(compute_client):
|
|
331
|
+
def list_floating_ips(compute_client: Any) -> Any:
|
|
313
332
|
"""Get all floating IPs
|
|
314
333
|
|
|
315
334
|
https://docs.openstack.org/api-ref/compute/#list-floating-ip-addresses
|
|
@@ -321,7 +340,7 @@ def list_floating_ips(compute_client):
|
|
|
321
340
|
return response.json()['floating_ips']
|
|
322
341
|
|
|
323
342
|
|
|
324
|
-
def get_floating_ip(compute_client, floating_ip_id):
|
|
343
|
+
def get_floating_ip(compute_client: Any, floating_ip_id: str) -> Any:
|
|
325
344
|
"""Get a floating IP
|
|
326
345
|
|
|
327
346
|
https://docs.openstack.org/api-ref/compute/#show-floating-ip-address-details
|
|
@@ -336,7 +355,7 @@ def get_floating_ip(compute_client, floating_ip_id):
|
|
|
336
355
|
return response.json()['floating_ip']
|
|
337
356
|
|
|
338
357
|
|
|
339
|
-
def delete_floating_ip(compute_client, floating_ip_id):
|
|
358
|
+
def delete_floating_ip(compute_client: Any, floating_ip_id: str) -> None:
|
|
340
359
|
"""Delete a floating IP
|
|
341
360
|
|
|
342
361
|
https://docs.openstack.org/api-ref/compute/#delete-deallocate-floating-ip-address
|
|
@@ -353,7 +372,7 @@ def delete_floating_ip(compute_client, floating_ip_id):
|
|
|
353
372
|
# floating ip pools
|
|
354
373
|
|
|
355
374
|
|
|
356
|
-
def list_floating_ip_pools(compute_client):
|
|
375
|
+
def list_floating_ip_pools(compute_client: Any) -> Any:
|
|
357
376
|
"""Get all floating IP pools
|
|
358
377
|
|
|
359
378
|
https://docs.openstack.org/api-ref/compute/#list-floating-ip-pools
|