python-openstackclient 9.0.0__py3-none-any.whl → 10.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/__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 +58 -42
- 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 +14 -6
- openstackclient/common/pagination.py +8 -2
- openstackclient/common/progressbar.py +7 -6
- openstackclient/common/project_cleanup.py +13 -7
- openstackclient/common/quota.py +97 -99
- 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 +39 -21
- openstackclient/compute/v2/host.py +14 -6
- openstackclient/compute/v2/hypervisor.py +14 -5
- openstackclient/compute/v2/hypervisor_stats.py +10 -2
- openstackclient/compute/v2/keypair.py +29 -14
- openstackclient/compute/v2/server.py +249 -169
- openstackclient/compute/v2/server_backup.py +10 -4
- openstackclient/compute/v2/server_event.py +21 -12
- openstackclient/compute/v2/server_group.py +21 -11
- openstackclient/compute/v2/server_image.py +19 -10
- openstackclient/compute/v2/server_migration.py +24 -10
- openstackclient/compute/v2/server_share.py +274 -0
- openstackclient/compute/v2/server_volume.py +10 -4
- openstackclient/compute/v2/service.py +14 -7
- openstackclient/compute/v2/usage.py +26 -21
- openstackclient/identity/client.py +8 -3
- openstackclient/identity/common.py +78 -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 +26 -12
- openstackclient/identity/v3/application_credential.py +59 -24
- openstackclient/identity/v3/catalog.py +14 -7
- openstackclient/identity/v3/consumer.py +22 -11
- openstackclient/identity/v3/credential.py +36 -16
- openstackclient/identity/v3/domain.py +37 -18
- openstackclient/identity/v3/ec2creds.py +25 -12
- openstackclient/identity/v3/endpoint.py +42 -20
- openstackclient/identity/v3/endpoint_group.py +28 -17
- openstackclient/identity/v3/federation_protocol.py +38 -16
- openstackclient/identity/v3/group.py +55 -32
- openstackclient/identity/v3/identity_provider.py +92 -57
- openstackclient/identity/v3/implied_role.py +21 -9
- openstackclient/identity/v3/limit.py +38 -16
- openstackclient/identity/v3/mapping.py +26 -13
- openstackclient/identity/v3/policy.py +23 -12
- openstackclient/identity/v3/project.py +43 -23
- openstackclient/identity/v3/region.py +36 -16
- openstackclient/identity/v3/registered_limit.py +40 -16
- openstackclient/identity/v3/role.py +61 -31
- openstackclient/identity/v3/role_assignment.py +23 -6
- openstackclient/identity/v3/service.py +36 -16
- openstackclient/identity/v3/service_provider.py +37 -15
- openstackclient/identity/v3/tag.py +23 -6
- openstackclient/identity/v3/token.py +30 -14
- openstackclient/identity/v3/trust.py +32 -14
- openstackclient/identity/v3/unscoped_saml.py +10 -2
- openstackclient/identity/v3/user.py +49 -26
- openstackclient/image/client.py +7 -3
- openstackclient/image/v1/image.py +33 -26
- openstackclient/image/v2/cache.py +14 -9
- openstackclient/image/v2/image.py +74 -48
- openstackclient/image/v2/info.py +7 -1
- openstackclient/image/v2/metadef_namespaces.py +109 -13
- openstackclient/image/v2/metadef_objects.py +28 -15
- openstackclient/image/v2/metadef_properties.py +24 -13
- openstackclient/image/v2/metadef_resource_type_association.py +14 -7
- openstackclient/image/v2/metadef_resource_types.py +7 -1
- openstackclient/image/v2/task.py +15 -6
- 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 +36 -22
- openstackclient/network/v2/address_group.py +27 -16
- openstackclient/network/v2/address_scope.py +24 -13
- openstackclient/network/v2/bgpvpn/bgpvpn.py +463 -0
- openstackclient/network/v2/bgpvpn/constants.py +30 -0
- openstackclient/network/v2/bgpvpn/network_association.py +214 -0
- openstackclient/network/v2/bgpvpn/port_association.py +490 -0
- openstackclient/network/v2/bgpvpn/router_association.py +288 -0
- openstackclient/network/v2/default_security_group_rule.py +19 -10
- openstackclient/network/v2/floating_ip.py +110 -159
- openstackclient/network/v2/floating_ip_port_forwarding.py +30 -18
- openstackclient/network/v2/fwaas/__init__.py +0 -0
- openstackclient/network/v2/fwaas/group.py +466 -0
- openstackclient/network/v2/fwaas/policy.py +518 -0
- openstackclient/network/v2/fwaas/rule.py +574 -0
- openstackclient/network/v2/ip_availability.py +13 -5
- openstackclient/network/v2/l3_conntrack_helper.py +22 -13
- openstackclient/network/v2/local_ip.py +24 -13
- openstackclient/network/v2/local_ip_association.py +14 -7
- openstackclient/network/v2/ndp_proxy.py +20 -11
- openstackclient/network/v2/network.py +129 -196
- openstackclient/network/v2/network_agent.py +46 -25
- openstackclient/network/v2/network_auto_allocated_topology.py +22 -11
- openstackclient/network/v2/network_flavor.py +27 -16
- openstackclient/network/v2/network_flavor_profile.py +23 -12
- openstackclient/network/v2/network_meter.py +21 -10
- openstackclient/network/v2/network_meter_rule.py +21 -11
- openstackclient/network/v2/network_qos_policy.py +25 -15
- openstackclient/network/v2/network_qos_rule.py +32 -17
- openstackclient/network/v2/network_qos_rule_type.py +13 -5
- openstackclient/network/v2/network_rbac.py +23 -12
- openstackclient/network/v2/network_segment.py +20 -11
- openstackclient/network/v2/network_segment_range.py +56 -29
- openstackclient/network/v2/network_service_provider.py +7 -1
- openstackclient/network/v2/network_trunk.py +38 -22
- openstackclient/network/v2/port.py +54 -29
- openstackclient/network/v2/router.py +75 -52
- openstackclient/network/v2/security_group.py +87 -157
- openstackclient/network/v2/security_group_rule.py +100 -280
- openstackclient/network/v2/subnet.py +49 -28
- openstackclient/network/v2/subnet_pool.py +30 -17
- openstackclient/network/v2/taas/tap_flow.py +22 -11
- openstackclient/network/v2/taas/tap_mirror.py +22 -11
- openstackclient/network/v2/taas/tap_service.py +23 -12
- openstackclient/object/client.py +7 -2
- openstackclient/object/v1/account.py +13 -6
- openstackclient/object/v1/container.py +25 -15
- openstackclient/object/v1/object.py +25 -15
- 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 +25 -19
- 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_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_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_module.py +12 -7
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
- openstackclient/tests/unit/common/test_quota.py +6 -26
- openstackclient/tests/unit/compute/v2/fakes.py +25 -0
- openstackclient/tests/unit/compute/v2/test_flavor.py +28 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +6 -6
- openstackclient/tests/unit/compute/v2/test_server.py +11 -96
- openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
- openstackclient/tests/unit/identity/v3/fakes.py +3 -0
- openstackclient/tests/unit/identity/v3/test_group.py +4 -14
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
- openstackclient/tests/unit/identity/v3/test_user.py +4 -4
- 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/fwaas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/fwaas/test_group.py +897 -0
- openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
- openstackclient/tests/unit/network/v2/fwaas/test_rule.py +980 -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 +2 -2
- openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +3 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +13 -13
- openstackclient/tests/unit/network/v2/test_network_agent.py +8 -4
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
- openstackclient/tests/unit/network/v2/test_network_flavor.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_rbac.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_segment.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +7 -10
- openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/unit/network/v2/test_router.py +8 -9
- openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +1 -20
- openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +7 -41
- openstackclient/tests/unit/network/v2/test_subnet.py +2 -1
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +2 -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 +1 -0
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +1 -5
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +2 -1
- openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
- openstackclient/tests/unit/volume/v3/fakes.py +1 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +1 -1
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +1 -5
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +55 -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 +57 -29
- openstackclient/volume/v2/volume_backend.py +19 -6
- openstackclient/volume/v2/volume_backup.py +46 -20
- openstackclient/volume/v2/volume_host.py +6 -4
- openstackclient/volume/v2/volume_snapshot.py +50 -24
- openstackclient/volume/v2/volume_transfer_request.py +31 -13
- openstackclient/volume/v2/volume_type.py +43 -24
- 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/service.py +16 -6
- openstackclient/volume/v3/volume.py +89 -39
- openstackclient/volume/v3/volume_attachment.py +43 -21
- openstackclient/volume/v3/volume_backup.py +53 -24
- openstackclient/volume/v3/volume_group.py +23 -13
- openstackclient/volume/v3/volume_group_snapshot.py +32 -13
- openstackclient/volume/v3/volume_group_type.py +26 -13
- openstackclient/volume/v3/volume_message.py +15 -7
- openstackclient/volume/v3/volume_snapshot.py +69 -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.0.0.dist-info}/METADATA +6 -6
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/RECORD +271 -260
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/entry_points.txt +53 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/AUTHORS +4 -0
- python_openstackclient-10.0.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/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.0.0.dist-info}/licenses/LICENSE +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/top_level.txt +0 -0
{python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/entry_points.txt
RENAMED
|
@@ -67,6 +67,7 @@ server_add_floating_ip = openstackclient.compute.v2.server:AddFloatingIP
|
|
|
67
67
|
server_add_network = openstackclient.compute.v2.server:AddNetwork
|
|
68
68
|
server_add_port = openstackclient.compute.v2.server:AddPort
|
|
69
69
|
server_add_security_group = openstackclient.compute.v2.server:AddServerSecurityGroup
|
|
70
|
+
server_add_share = openstackclient.compute.v2.server_share:AddServerShare
|
|
70
71
|
server_add_volume = openstackclient.compute.v2.server:AddServerVolume
|
|
71
72
|
server_backup_create = openstackclient.compute.v2.server_backup:CreateServerBackup
|
|
72
73
|
server_create = openstackclient.compute.v2.server:CreateServer
|
|
@@ -99,6 +100,7 @@ server_remove_floating_ip = openstackclient.compute.v2.server:RemoveFloatingIP
|
|
|
99
100
|
server_remove_network = openstackclient.compute.v2.server:RemoveNetwork
|
|
100
101
|
server_remove_port = openstackclient.compute.v2.server:RemovePort
|
|
101
102
|
server_remove_security_group = openstackclient.compute.v2.server:RemoveServerSecurityGroup
|
|
103
|
+
server_remove_share = openstackclient.compute.v2.server_share:RemoveServerShare
|
|
102
104
|
server_remove_volume = openstackclient.compute.v2.server:RemoveServerVolume
|
|
103
105
|
server_rescue = openstackclient.compute.v2.server:RescueServer
|
|
104
106
|
server_resize = openstackclient.compute.v2.server:ResizeServer
|
|
@@ -107,6 +109,8 @@ server_resize_revert = openstackclient.compute.v2.server:ResizeRevert
|
|
|
107
109
|
server_restore = openstackclient.compute.v2.server:RestoreServer
|
|
108
110
|
server_resume = openstackclient.compute.v2.server:ResumeServer
|
|
109
111
|
server_set = openstackclient.compute.v2.server:SetServer
|
|
112
|
+
server_share_list = openstackclient.compute.v2.server_share:ListServerShare
|
|
113
|
+
server_share_show = openstackclient.compute.v2.server_share:ShowServerShare
|
|
110
114
|
server_shelve = openstackclient.compute.v2.server:ShelveServer
|
|
111
115
|
server_show = openstackclient.compute.v2.server:ShowServer
|
|
112
116
|
server_ssh = openstackclient.compute.v2.server:SshServer
|
|
@@ -316,6 +320,7 @@ image_metadef_namespace_delete = openstackclient.image.v2.metadef_namespaces:Del
|
|
|
316
320
|
image_metadef_namespace_list = openstackclient.image.v2.metadef_namespaces:ListMetadefNamespace
|
|
317
321
|
image_metadef_namespace_set = openstackclient.image.v2.metadef_namespaces:SetMetadefNamespace
|
|
318
322
|
image_metadef_namespace_show = openstackclient.image.v2.metadef_namespaces:ShowMetadefNamespace
|
|
323
|
+
image_metadef_namespace_unset = openstackclient.image.v2.metadef_namespaces:UnsetMetadefNamespace
|
|
319
324
|
image_metadef_object_create = openstackclient.image.v2.metadef_objects:CreateMetadefObjects
|
|
320
325
|
image_metadef_object_delete = openstackclient.image.v2.metadef_objects:DeleteMetadefObject
|
|
321
326
|
image_metadef_object_list = openstackclient.image.v2.metadef_objects:ListMetadefObjects
|
|
@@ -360,7 +365,6 @@ default_security_group_rule_show = openstackclient.network.v2.default_security_g
|
|
|
360
365
|
floating_ip_create = openstackclient.network.v2.floating_ip:CreateFloatingIP
|
|
361
366
|
floating_ip_delete = openstackclient.network.v2.floating_ip:DeleteFloatingIP
|
|
362
367
|
floating_ip_list = openstackclient.network.v2.floating_ip:ListFloatingIP
|
|
363
|
-
floating_ip_pool_list = openstackclient.network.v2.floating_ip_pool:ListFloatingIPPool
|
|
364
368
|
floating_ip_port_forwarding_create = openstackclient.network.v2.floating_ip_port_forwarding:CreateFloatingIPPortForwarding
|
|
365
369
|
floating_ip_port_forwarding_delete = openstackclient.network.v2.floating_ip_port_forwarding:DeleteFloatingIPPortForwarding
|
|
366
370
|
floating_ip_port_forwarding_list = openstackclient.network.v2.floating_ip_port_forwarding:ListFloatingIPPortForwarding
|
|
@@ -502,6 +506,54 @@ subnet_pool_unset = openstackclient.network.v2.subnet_pool:UnsetSubnetPool
|
|
|
502
506
|
subnet_set = openstackclient.network.v2.subnet:SetSubnet
|
|
503
507
|
subnet_show = openstackclient.network.v2.subnet:ShowSubnet
|
|
504
508
|
subnet_unset = openstackclient.network.v2.subnet:UnsetSubnet
|
|
509
|
+
|
|
510
|
+
[openstack.network.v2.bgpvpn]
|
|
511
|
+
bgpvpn_create = openstackclient.network.v2.bgpvpn.bgpvpn:CreateBgpvpn
|
|
512
|
+
bgpvpn_delete = openstackclient.network.v2.bgpvpn.bgpvpn:DeleteBgpvpn
|
|
513
|
+
bgpvpn_list = openstackclient.network.v2.bgpvpn.bgpvpn:ListBgpvpn
|
|
514
|
+
bgpvpn_network_association_create = openstackclient.network.v2.bgpvpn.network_association:CreateBgpvpnNetAssoc
|
|
515
|
+
bgpvpn_network_association_delete = openstackclient.network.v2.bgpvpn.network_association:DeleteBgpvpnNetAssoc
|
|
516
|
+
bgpvpn_network_association_list = openstackclient.network.v2.bgpvpn.network_association:ListBgpvpnNetAssoc
|
|
517
|
+
bgpvpn_network_association_show = openstackclient.network.v2.bgpvpn.network_association:ShowBgpvpnNetAssoc
|
|
518
|
+
bgpvpn_port_association_create = openstackclient.network.v2.bgpvpn.port_association:CreateBgpvpnPortAssoc
|
|
519
|
+
bgpvpn_port_association_delete = openstackclient.network.v2.bgpvpn.port_association:DeleteBgpvpnPortAssoc
|
|
520
|
+
bgpvpn_port_association_list = openstackclient.network.v2.bgpvpn.port_association:ListBgpvpnPortAssoc
|
|
521
|
+
bgpvpn_port_association_set = openstackclient.network.v2.bgpvpn.port_association:SetBgpvpnPortAssoc
|
|
522
|
+
bgpvpn_port_association_show = openstackclient.network.v2.bgpvpn.port_association:ShowBgpvpnPortAssoc
|
|
523
|
+
bgpvpn_port_association_unset = openstackclient.network.v2.bgpvpn.port_association:UnsetBgpvpnPortAssoc
|
|
524
|
+
bgpvpn_router_association_create = openstackclient.network.v2.bgpvpn.router_association:CreateBgpvpnRouterAssoc
|
|
525
|
+
bgpvpn_router_association_delete = openstackclient.network.v2.bgpvpn.router_association:DeleteBgpvpnRouterAssoc
|
|
526
|
+
bgpvpn_router_association_list = openstackclient.network.v2.bgpvpn.router_association:ListBgpvpnRouterAssoc
|
|
527
|
+
bgpvpn_router_association_set = openstackclient.network.v2.bgpvpn.router_association:SetBgpvpnRouterAssoc
|
|
528
|
+
bgpvpn_router_association_show = openstackclient.network.v2.bgpvpn.router_association:ShowBgpvpnRouterAssoc
|
|
529
|
+
bgpvpn_router_association_unset = openstackclient.network.v2.bgpvpn.router_association:UnsetBgpvpnRouterAssoc
|
|
530
|
+
bgpvpn_set = openstackclient.network.v2.bgpvpn.bgpvpn:SetBgpvpn
|
|
531
|
+
bgpvpn_show = openstackclient.network.v2.bgpvpn.bgpvpn:ShowBgpvpn
|
|
532
|
+
bgpvpn_unset = openstackclient.network.v2.bgpvpn.bgpvpn:UnsetBgpvpn
|
|
533
|
+
|
|
534
|
+
[openstack.network.v2.fwaas]
|
|
535
|
+
firewall_group_create = openstackclient.network.v2.fwaas.group:CreateFirewallGroup
|
|
536
|
+
firewall_group_delete = openstackclient.network.v2.fwaas.group:DeleteFirewallGroup
|
|
537
|
+
firewall_group_list = openstackclient.network.v2.fwaas.group:ListFirewallGroup
|
|
538
|
+
firewall_group_policy_add_rule = openstackclient.network.v2.fwaas.policy:FirewallPolicyInsertRule
|
|
539
|
+
firewall_group_policy_create = openstackclient.network.v2.fwaas.policy:CreateFirewallPolicy
|
|
540
|
+
firewall_group_policy_delete = openstackclient.network.v2.fwaas.policy:DeleteFirewallPolicy
|
|
541
|
+
firewall_group_policy_list = openstackclient.network.v2.fwaas.policy:ListFirewallPolicy
|
|
542
|
+
firewall_group_policy_remove_rule = openstackclient.network.v2.fwaas.policy:FirewallPolicyRemoveRule
|
|
543
|
+
firewall_group_policy_set = openstackclient.network.v2.fwaas.policy:SetFirewallPolicy
|
|
544
|
+
firewall_group_policy_show = openstackclient.network.v2.fwaas.policy:ShowFirewallPolicy
|
|
545
|
+
firewall_group_policy_unset = openstackclient.network.v2.fwaas.policy:UnsetFirewallPolicy
|
|
546
|
+
firewall_group_rule_create = openstackclient.network.v2.fwaas.rule:CreateFirewallRule
|
|
547
|
+
firewall_group_rule_delete = openstackclient.network.v2.fwaas.rule:DeleteFirewallRule
|
|
548
|
+
firewall_group_rule_list = openstackclient.network.v2.fwaas.rule:ListFirewallRule
|
|
549
|
+
firewall_group_rule_set = openstackclient.network.v2.fwaas.rule:SetFirewallRule
|
|
550
|
+
firewall_group_rule_show = openstackclient.network.v2.fwaas.rule:ShowFirewallRule
|
|
551
|
+
firewall_group_rule_unset = openstackclient.network.v2.fwaas.rule:UnsetFirewallRule
|
|
552
|
+
firewall_group_set = openstackclient.network.v2.fwaas.group:SetFirewallGroup
|
|
553
|
+
firewall_group_show = openstackclient.network.v2.fwaas.group:ShowFirewallGroup
|
|
554
|
+
firewall_group_unset = openstackclient.network.v2.fwaas.group:UnsetFirewallGroup
|
|
555
|
+
|
|
556
|
+
[openstack.network.v2.taas]
|
|
505
557
|
tap_flow_create = openstackclient.network.v2.taas.tap_flow:CreateTapFlow
|
|
506
558
|
tap_flow_delete = openstackclient.network.v2.taas.tap_flow:DeleteTapFlow
|
|
507
559
|
tap_flow_list = openstackclient.network.v2.taas.tap_flow:ListTapFlow
|
{python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/AUTHORS
RENAMED
|
@@ -23,6 +23,7 @@ Alfredo Moralejo <amoralej@redhat.com>
|
|
|
23
23
|
Allain Legacy <Allain.legacy@windriver.com>
|
|
24
24
|
Alvaro Lopez Garcia <aloga@ifca.unican.es>
|
|
25
25
|
Amey Bhide <abhide@vmware.com>
|
|
26
|
+
Amit Uniyal <auniyal@redhat.com>
|
|
26
27
|
Andreas Florath <Andreas.Florath@telekom.de>
|
|
27
28
|
Andreas Jaeger <aj@suse.com>
|
|
28
29
|
Andreas Jaeger <aj@suse.de>
|
|
@@ -126,6 +127,7 @@ Dougal Matthews <dougal@redhat.com>
|
|
|
126
127
|
Douglas Mendizábal <dmendiza@redhat.com>
|
|
127
128
|
Douglas Viroel <viroel@gmail.com>
|
|
128
129
|
Dr. Jens Harbott <harbott@osism.tech>
|
|
130
|
+
Dylan McCulloch <dylan.mcculloch@gmail.com>
|
|
129
131
|
Einst Crazy <yu.changcai@99cloud.net>
|
|
130
132
|
Elena Ezhova <eezhova@mirantis.com>
|
|
131
133
|
Elod Illes <elod.illes@est.tech>
|
|
@@ -205,6 +207,7 @@ Jan Ueberacker <jan.ueberacker@inovex.de>
|
|
|
205
207
|
Jas <singhj@us.ibm.com>
|
|
206
208
|
Jaspreet Singh Rawel <jaspreetsinghrawel@gmail.com>
|
|
207
209
|
Javier Pena <jpena@redhat.com>
|
|
210
|
+
Jay Faulkner <jay@jvf.cc>
|
|
208
211
|
Jean-Philippe Evrard <jean-philippe@evrard.me>
|
|
209
212
|
Jens Harbott (frickler) <j.harbott@x-ion.de>
|
|
210
213
|
Jens Harbott <j.harbott@x-ion.de>
|
|
@@ -512,6 +515,7 @@ jiwonjang <kooriangman@gmail.com>
|
|
|
512
515
|
jqjiang.1@gmail.com <jqjiang.1@gmail.com>
|
|
513
516
|
judy-yu <yujie@cmss.chinamobile.com>
|
|
514
517
|
kafka <guowang@unitedstack.com>
|
|
518
|
+
lajoskatona <lajos.katona@est.tech>
|
|
515
519
|
licanwei <li.canwei2@zte.com.cn>
|
|
516
520
|
lihaijing <lihaijing@fiberhome.com>
|
|
517
521
|
likui <likui@yovole.com>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "b1e4be80", "is_release": true}
|
openstackclient/api/image_v1.py
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
-
# not use this file except in compliance with the License. You may obtain
|
|
3
|
-
# a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
-
# License for the specific language governing permissions and limitations
|
|
11
|
-
# under the License.
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
"""Image v1 API Library"""
|
|
15
|
-
|
|
16
|
-
from openstackclient.api import api
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class APIv1(api.BaseAPI):
|
|
20
|
-
"""Image v1 API"""
|
|
21
|
-
|
|
22
|
-
_endpoint_suffix = '/v1'
|
|
23
|
-
|
|
24
|
-
def __init__(self, endpoint=None, **kwargs):
|
|
25
|
-
super().__init__(endpoint=endpoint, **kwargs)
|
|
26
|
-
|
|
27
|
-
self.endpoint = self.endpoint.rstrip('/')
|
|
28
|
-
self._munge_url()
|
|
29
|
-
|
|
30
|
-
def _munge_url(self):
|
|
31
|
-
# Hack this until discovery is up
|
|
32
|
-
if not self.endpoint.endswith(self._endpoint_suffix):
|
|
33
|
-
self.endpoint = self.endpoint + self._endpoint_suffix
|
|
34
|
-
|
|
35
|
-
def image_list(
|
|
36
|
-
self, detailed=False, public=False, private=False, **filter
|
|
37
|
-
):
|
|
38
|
-
"""Get available images
|
|
39
|
-
|
|
40
|
-
:param detailed:
|
|
41
|
-
Retrieve detailed response from server if True
|
|
42
|
-
:param public:
|
|
43
|
-
Return public images if True
|
|
44
|
-
:param private:
|
|
45
|
-
Return private images if True
|
|
46
|
-
|
|
47
|
-
If public and private are both True or both False then all images are
|
|
48
|
-
returned. Both arguments False is equivalent to no filter and all
|
|
49
|
-
images are returned. Both arguments True is a filter that includes
|
|
50
|
-
both public and private images which is the same set as all images.
|
|
51
|
-
|
|
52
|
-
http://docs.openstack.org/api/openstack-image-service/1.1/content/requesting-a-list-of-public-vm-images.html
|
|
53
|
-
http://docs.openstack.org/api/openstack-image-service/1.1/content/requesting-detailed-metadata-on-public-vm-images.html
|
|
54
|
-
http://docs.openstack.org/api/openstack-image-service/1.1/content/filtering-images-returned-via-get-images-and-get-imagesdetail.html
|
|
55
|
-
"""
|
|
56
|
-
|
|
57
|
-
url = "/images"
|
|
58
|
-
if detailed or public or private:
|
|
59
|
-
# Because we can't all use /details
|
|
60
|
-
url += "/detail"
|
|
61
|
-
|
|
62
|
-
image_list = self.list(url, **filter)['images']
|
|
63
|
-
|
|
64
|
-
if public != private:
|
|
65
|
-
# One is True and one is False, so public represents the filter
|
|
66
|
-
# state in either case
|
|
67
|
-
image_list = [i for i in image_list if i['is_public'] == public]
|
|
68
|
-
|
|
69
|
-
return image_list
|
openstackclient/api/image_v2.py
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
-
# not use this file except in compliance with the License. You may obtain
|
|
3
|
-
# a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
-
# License for the specific language governing permissions and limitations
|
|
11
|
-
# under the License.
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
"""Image v2 API Library"""
|
|
15
|
-
|
|
16
|
-
from openstackclient.api import image_v1
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class APIv2(image_v1.APIv1):
|
|
20
|
-
"""Image v2 API"""
|
|
21
|
-
|
|
22
|
-
_endpoint_suffix = '/v2'
|
|
23
|
-
|
|
24
|
-
def _munge_url(self):
|
|
25
|
-
# Hack this until discovery is up, and ignore parent endpoint setting
|
|
26
|
-
if not self.endpoint.endswith(self._endpoint_suffix):
|
|
27
|
-
self.endpoint = self.endpoint + self._endpoint_suffix
|
|
28
|
-
|
|
29
|
-
def image_list(
|
|
30
|
-
self,
|
|
31
|
-
detailed=False,
|
|
32
|
-
public=False,
|
|
33
|
-
private=False,
|
|
34
|
-
community=False,
|
|
35
|
-
shared=False,
|
|
36
|
-
**filter,
|
|
37
|
-
):
|
|
38
|
-
"""Get available images
|
|
39
|
-
|
|
40
|
-
can add limit/marker
|
|
41
|
-
|
|
42
|
-
:param detailed:
|
|
43
|
-
For v1 compatibility only, ignored as v2 is always 'detailed'
|
|
44
|
-
:param public:
|
|
45
|
-
Return public images if True
|
|
46
|
-
:param private:
|
|
47
|
-
Return private images if True
|
|
48
|
-
:param community:
|
|
49
|
-
Return commuity images if True
|
|
50
|
-
:param shared:
|
|
51
|
-
Return shared images if True
|
|
52
|
-
|
|
53
|
-
If public, private, community and shared are all True or all False
|
|
54
|
-
then all images are returned. All arguments False is equivalent to no
|
|
55
|
-
filter and all images are returned. All arguments True is a filter
|
|
56
|
-
that includes all public, private, community and shared images which
|
|
57
|
-
is the same set as all images.
|
|
58
|
-
|
|
59
|
-
http://docs.openstack.org/api/openstack-image-service/2.0/content/list-images.html
|
|
60
|
-
"""
|
|
61
|
-
|
|
62
|
-
if not public and not private and not community and not shared:
|
|
63
|
-
# No filtering for all False
|
|
64
|
-
filter.pop('visibility', None)
|
|
65
|
-
elif public:
|
|
66
|
-
filter['visibility'] = 'public'
|
|
67
|
-
elif private:
|
|
68
|
-
filter['visibility'] = 'private'
|
|
69
|
-
elif community:
|
|
70
|
-
filter['visibility'] = 'community'
|
|
71
|
-
elif shared:
|
|
72
|
-
filter['visibility'] = 'shared'
|
|
73
|
-
|
|
74
|
-
url = "/images"
|
|
75
|
-
if detailed:
|
|
76
|
-
# Because we can't all use /details
|
|
77
|
-
url += "/detail"
|
|
78
|
-
|
|
79
|
-
return self.list(url, **filter)['images']
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
-
# not use this file except in compliance with the License. You may obtain
|
|
3
|
-
# a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
-
# License for the specific language governing permissions and limitations
|
|
11
|
-
# under the License.
|
|
12
|
-
|
|
13
|
-
"""Floating IP Pool action implementations"""
|
|
14
|
-
|
|
15
|
-
from osc_lib import exceptions
|
|
16
|
-
|
|
17
|
-
from openstackclient.api import compute_v2
|
|
18
|
-
from openstackclient.i18n import _
|
|
19
|
-
from openstackclient.network import common
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ListFloatingIPPool(common.NetworkAndComputeLister):
|
|
23
|
-
_description = _("List pools of floating IP addresses")
|
|
24
|
-
|
|
25
|
-
def take_action_network(self, client, parsed_args):
|
|
26
|
-
msg = _(
|
|
27
|
-
"Floating ip pool operations are only available for "
|
|
28
|
-
"Compute v2 network."
|
|
29
|
-
)
|
|
30
|
-
raise exceptions.CommandError(msg)
|
|
31
|
-
|
|
32
|
-
def take_action_compute(self, client, parsed_args):
|
|
33
|
-
columns = ('Name',)
|
|
34
|
-
data = [
|
|
35
|
-
(x['name'],) for x in compute_v2.list_floating_ip_pools(client)
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
return (columns, data)
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
-
# not use this file except in compliance with the License. You may obtain
|
|
3
|
-
# a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
-
# License for the specific language governing permissions and limitations
|
|
11
|
-
# under the License.
|
|
12
|
-
|
|
13
|
-
import uuid
|
|
14
|
-
|
|
15
|
-
import fixtures
|
|
16
|
-
|
|
17
|
-
from openstackclient.tests.functional.image import base
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ImageTests(base.BaseImageTests):
|
|
21
|
-
"""Functional tests for Image commands"""
|
|
22
|
-
|
|
23
|
-
def setUp(self):
|
|
24
|
-
super().setUp()
|
|
25
|
-
|
|
26
|
-
if not self.haz_v1_api:
|
|
27
|
-
self.skipTest('No Image v1 API present')
|
|
28
|
-
|
|
29
|
-
ver_fixture = fixtures.EnvironmentVariable('OS_IMAGE_API_VERSION', '1')
|
|
30
|
-
self.useFixture(ver_fixture)
|
|
31
|
-
|
|
32
|
-
self.name = uuid.uuid4().hex
|
|
33
|
-
output = self.openstack(
|
|
34
|
-
'image create ' + self.name,
|
|
35
|
-
parse_output=True,
|
|
36
|
-
)
|
|
37
|
-
self.image_id = output["id"]
|
|
38
|
-
self.assertOutput(self.name, output['name'])
|
|
39
|
-
|
|
40
|
-
def tearDown(self):
|
|
41
|
-
try:
|
|
42
|
-
self.openstack('image delete ' + self.image_id)
|
|
43
|
-
finally:
|
|
44
|
-
super().tearDown()
|
|
45
|
-
|
|
46
|
-
def test_image_list(self):
|
|
47
|
-
output = self.openstack('image list')
|
|
48
|
-
self.assertIn(self.name, [img['Name'] for img in output])
|
|
49
|
-
|
|
50
|
-
def test_image_attributes(self):
|
|
51
|
-
"""Test set, unset, show on attributes, tags and properties"""
|
|
52
|
-
|
|
53
|
-
# Test explicit attributes
|
|
54
|
-
self.openstack(
|
|
55
|
-
'image set '
|
|
56
|
-
+ '--min-disk 4 '
|
|
57
|
-
+ '--min-ram 5 '
|
|
58
|
-
+ '--disk-format qcow2 '
|
|
59
|
-
+ '--public '
|
|
60
|
-
+ self.name
|
|
61
|
-
)
|
|
62
|
-
output = self.openstack(
|
|
63
|
-
'image show ' + self.name,
|
|
64
|
-
parse_output=True,
|
|
65
|
-
)
|
|
66
|
-
self.assertEqual(
|
|
67
|
-
4,
|
|
68
|
-
output["min_disk"],
|
|
69
|
-
)
|
|
70
|
-
self.assertEqual(
|
|
71
|
-
5,
|
|
72
|
-
output["min_ram"],
|
|
73
|
-
)
|
|
74
|
-
self.assertEqual(
|
|
75
|
-
'qcow2',
|
|
76
|
-
output['disk_format'],
|
|
77
|
-
)
|
|
78
|
-
self.assertTrue(
|
|
79
|
-
output["is_public"],
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
# Test properties
|
|
83
|
-
self.openstack(
|
|
84
|
-
'image set '
|
|
85
|
-
+ '--property a=b '
|
|
86
|
-
+ '--property c=d '
|
|
87
|
-
+ '--public '
|
|
88
|
-
+ self.name
|
|
89
|
-
)
|
|
90
|
-
output = self.openstack(
|
|
91
|
-
'image show ' + self.name,
|
|
92
|
-
parse_output=True,
|
|
93
|
-
)
|
|
94
|
-
self.assertEqual(
|
|
95
|
-
{'a': 'b', 'c': 'd'},
|
|
96
|
-
output["properties"],
|
|
97
|
-
)
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
-
# not use this file except in compliance with the License. You may obtain
|
|
3
|
-
# a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
-
# License for the specific language governing permissions and limitations
|
|
11
|
-
# under the License.
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
"""Image v1 API Library Tests"""
|
|
15
|
-
|
|
16
|
-
from keystoneauth1 import session
|
|
17
|
-
from requests_mock.contrib import fixture
|
|
18
|
-
|
|
19
|
-
from openstackclient.api import image_v1
|
|
20
|
-
from openstackclient.tests.unit import utils
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
FAKE_PROJECT = 'xyzpdq'
|
|
24
|
-
FAKE_URL = 'http://gopher.dev10.com'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class TestImageAPIv1(utils.TestCase):
|
|
28
|
-
def setUp(self):
|
|
29
|
-
super().setUp()
|
|
30
|
-
|
|
31
|
-
sess = session.Session()
|
|
32
|
-
self.api = image_v1.APIv1(session=sess, endpoint=FAKE_URL)
|
|
33
|
-
self.requests_mock = self.useFixture(fixture.Fixture())
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class TestImage(TestImageAPIv1):
|
|
37
|
-
PUB_PROT = {
|
|
38
|
-
'id': '1',
|
|
39
|
-
'name': 'pub1',
|
|
40
|
-
'is_public': True,
|
|
41
|
-
'protected': True,
|
|
42
|
-
}
|
|
43
|
-
PUB_NOPROT = {
|
|
44
|
-
'id': '2',
|
|
45
|
-
'name': 'pub2-noprot',
|
|
46
|
-
'is_public': True,
|
|
47
|
-
'protected': False,
|
|
48
|
-
}
|
|
49
|
-
NOPUB_PROT = {
|
|
50
|
-
'id': '3',
|
|
51
|
-
'name': 'priv3',
|
|
52
|
-
'is_public': False,
|
|
53
|
-
'protected': True,
|
|
54
|
-
}
|
|
55
|
-
NOPUB_NOPROT = {
|
|
56
|
-
'id': '4',
|
|
57
|
-
'name': 'priv4-noprot',
|
|
58
|
-
'is_public': False,
|
|
59
|
-
'protected': False,
|
|
60
|
-
}
|
|
61
|
-
LIST_IMAGE_RESP = [
|
|
62
|
-
PUB_PROT,
|
|
63
|
-
PUB_NOPROT,
|
|
64
|
-
NOPUB_PROT,
|
|
65
|
-
NOPUB_NOPROT,
|
|
66
|
-
]
|
|
67
|
-
|
|
68
|
-
def test_image_list_no_options(self):
|
|
69
|
-
self.requests_mock.register_uri(
|
|
70
|
-
'GET',
|
|
71
|
-
FAKE_URL + '/v1/images',
|
|
72
|
-
json={'images': self.LIST_IMAGE_RESP},
|
|
73
|
-
status_code=200,
|
|
74
|
-
)
|
|
75
|
-
ret = self.api.image_list()
|
|
76
|
-
self.assertEqual(self.LIST_IMAGE_RESP, ret)
|
|
77
|
-
|
|
78
|
-
def test_image_list_public(self):
|
|
79
|
-
self.requests_mock.register_uri(
|
|
80
|
-
'GET',
|
|
81
|
-
FAKE_URL + '/v1/images/detail',
|
|
82
|
-
json={'images': self.LIST_IMAGE_RESP},
|
|
83
|
-
status_code=200,
|
|
84
|
-
)
|
|
85
|
-
ret = self.api.image_list(public=True)
|
|
86
|
-
self.assertEqual([self.PUB_PROT, self.PUB_NOPROT], ret)
|
|
87
|
-
|
|
88
|
-
def test_image_list_private(self):
|
|
89
|
-
self.requests_mock.register_uri(
|
|
90
|
-
'GET',
|
|
91
|
-
FAKE_URL + '/v1/images/detail',
|
|
92
|
-
json={'images': self.LIST_IMAGE_RESP},
|
|
93
|
-
status_code=200,
|
|
94
|
-
)
|
|
95
|
-
ret = self.api.image_list(private=True)
|
|
96
|
-
self.assertEqual([self.NOPUB_PROT, self.NOPUB_NOPROT], ret)
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
2
|
-
# not use this file except in compliance with the License. You may obtain
|
|
3
|
-
# a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
10
|
-
# License for the specific language governing permissions and limitations
|
|
11
|
-
# under the License.
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
"""Image v2 API Library Tests"""
|
|
15
|
-
|
|
16
|
-
from keystoneauth1 import session
|
|
17
|
-
from requests_mock.contrib import fixture
|
|
18
|
-
|
|
19
|
-
from openstackclient.api import image_v2
|
|
20
|
-
from openstackclient.tests.unit import utils
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
FAKE_PROJECT = 'xyzpdq'
|
|
24
|
-
FAKE_URL = 'http://gopher.dev20.com'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class TestImageAPIv2(utils.TestCase):
|
|
28
|
-
def setUp(self):
|
|
29
|
-
super().setUp()
|
|
30
|
-
|
|
31
|
-
sess = session.Session()
|
|
32
|
-
self.api = image_v2.APIv2(session=sess, endpoint=FAKE_URL)
|
|
33
|
-
self.requests_mock = self.useFixture(fixture.Fixture())
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class TestImage(TestImageAPIv2):
|
|
37
|
-
PUB_PROT = {
|
|
38
|
-
'id': '1',
|
|
39
|
-
'name': 'pub1',
|
|
40
|
-
'visibility': 'public',
|
|
41
|
-
'protected': True,
|
|
42
|
-
}
|
|
43
|
-
PUB_NOPROT = {
|
|
44
|
-
'id': '2',
|
|
45
|
-
'name': 'pub2-noprot',
|
|
46
|
-
'visibility': 'public',
|
|
47
|
-
'protected': False,
|
|
48
|
-
}
|
|
49
|
-
NOPUB_PROT = {
|
|
50
|
-
'id': '3',
|
|
51
|
-
'name': 'priv3',
|
|
52
|
-
'visibility': 'private',
|
|
53
|
-
'protected': True,
|
|
54
|
-
}
|
|
55
|
-
NOPUB_NOPROT = {
|
|
56
|
-
'id': '4',
|
|
57
|
-
'name': 'priv4-noprot',
|
|
58
|
-
'visibility': 'private',
|
|
59
|
-
'protected': False,
|
|
60
|
-
}
|
|
61
|
-
LIST_IMAGE_RESP = [
|
|
62
|
-
PUB_PROT,
|
|
63
|
-
PUB_NOPROT,
|
|
64
|
-
NOPUB_PROT,
|
|
65
|
-
NOPUB_NOPROT,
|
|
66
|
-
]
|
|
67
|
-
|
|
68
|
-
def test_image_list_no_options(self):
|
|
69
|
-
self.requests_mock.register_uri(
|
|
70
|
-
'GET',
|
|
71
|
-
FAKE_URL + '/v2/images',
|
|
72
|
-
json={'images': self.LIST_IMAGE_RESP},
|
|
73
|
-
status_code=200,
|
|
74
|
-
)
|
|
75
|
-
ret = self.api.image_list()
|
|
76
|
-
self.assertEqual(self.LIST_IMAGE_RESP, ret)
|
|
77
|
-
|
|
78
|
-
def test_image_list_public(self):
|
|
79
|
-
self.requests_mock.register_uri(
|
|
80
|
-
'GET',
|
|
81
|
-
FAKE_URL + '/v2/images',
|
|
82
|
-
json={'images': [self.PUB_PROT, self.PUB_NOPROT]},
|
|
83
|
-
status_code=200,
|
|
84
|
-
)
|
|
85
|
-
ret = self.api.image_list(public=True)
|
|
86
|
-
self.assertEqual([self.PUB_PROT, self.PUB_NOPROT], ret)
|
|
87
|
-
|
|
88
|
-
def test_image_list_private(self):
|
|
89
|
-
self.requests_mock.register_uri(
|
|
90
|
-
'GET',
|
|
91
|
-
FAKE_URL + '/v2/images',
|
|
92
|
-
json={'images': [self.NOPUB_PROT, self.NOPUB_NOPROT]},
|
|
93
|
-
status_code=200,
|
|
94
|
-
)
|
|
95
|
-
ret = self.api.image_list(public=True)
|
|
96
|
-
self.assertEqual([self.NOPUB_PROT, self.NOPUB_NOPROT], ret)
|