python-openstackclient 7.4.0__py3-none-any.whl → 8.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.
Files changed (234) hide show
  1. openstackclient/common/availability_zone.py +3 -6
  2. openstackclient/common/clientmanager.py +2 -1
  3. openstackclient/common/envvars.py +57 -0
  4. openstackclient/common/extension.py +3 -11
  5. openstackclient/common/limits.py +1 -1
  6. openstackclient/common/project_cleanup.py +3 -2
  7. openstackclient/common/quota.py +54 -28
  8. openstackclient/compute/client.py +2 -5
  9. openstackclient/compute/v2/agent.py +5 -5
  10. openstackclient/compute/v2/aggregate.py +17 -15
  11. openstackclient/compute/v2/console.py +3 -4
  12. openstackclient/compute/v2/flavor.py +14 -18
  13. openstackclient/compute/v2/host.py +3 -3
  14. openstackclient/compute/v2/hypervisor.py +10 -4
  15. openstackclient/compute/v2/hypervisor_stats.py +1 -1
  16. openstackclient/compute/v2/keypair.py +8 -10
  17. openstackclient/compute/v2/server.py +70 -112
  18. openstackclient/compute/v2/server_backup.py +1 -1
  19. openstackclient/compute/v2/server_event.py +7 -16
  20. openstackclient/compute/v2/server_group.py +6 -6
  21. openstackclient/compute/v2/server_image.py +1 -1
  22. openstackclient/compute/v2/server_migration.py +6 -6
  23. openstackclient/compute/v2/server_volume.py +4 -4
  24. openstackclient/compute/v2/service.py +9 -13
  25. openstackclient/compute/v2/usage.py +4 -6
  26. openstackclient/identity/client.py +2 -4
  27. openstackclient/identity/common.py +16 -17
  28. openstackclient/identity/v2_0/ec2creds.py +4 -3
  29. openstackclient/identity/v2_0/endpoint.py +12 -10
  30. openstackclient/identity/v2_0/project.py +6 -6
  31. openstackclient/identity/v2_0/role.py +1 -1
  32. openstackclient/identity/v2_0/service.py +7 -7
  33. openstackclient/identity/v2_0/user.py +6 -21
  34. openstackclient/identity/v3/access_rule.py +2 -5
  35. openstackclient/identity/v3/consumer.py +4 -3
  36. openstackclient/identity/v3/credential.py +6 -7
  37. openstackclient/identity/v3/domain.py +1 -1
  38. openstackclient/identity/v3/ec2creds.py +4 -3
  39. openstackclient/identity/v3/endpoint.py +104 -88
  40. openstackclient/identity/v3/endpoint_group.py +1 -1
  41. openstackclient/identity/v3/group.py +3 -4
  42. openstackclient/identity/v3/identity_provider.py +1 -2
  43. openstackclient/identity/v3/limit.py +4 -9
  44. openstackclient/identity/v3/mapping.py +4 -3
  45. openstackclient/identity/v3/policy.py +5 -8
  46. openstackclient/identity/v3/project.py +6 -6
  47. openstackclient/identity/v3/region.py +2 -5
  48. openstackclient/identity/v3/registered_limit.py +4 -8
  49. openstackclient/identity/v3/role.py +15 -16
  50. openstackclient/identity/v3/service.py +8 -8
  51. openstackclient/identity/v3/service_provider.py +3 -6
  52. openstackclient/identity/v3/tag.py +2 -2
  53. openstackclient/identity/v3/token.py +1 -2
  54. openstackclient/identity/v3/trust.py +74 -25
  55. openstackclient/identity/v3/user.py +9 -6
  56. openstackclient/image/client.py +2 -5
  57. openstackclient/image/v1/image.py +11 -15
  58. openstackclient/image/v2/cache.py +2 -4
  59. openstackclient/image/v2/image.py +30 -37
  60. openstackclient/image/v2/metadef_namespaces.py +4 -3
  61. openstackclient/image/v2/metadef_resource_type_association.py +1 -2
  62. openstackclient/image/v2/metadef_resource_types.py +1 -2
  63. openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +9 -1370
  64. openstackclient/network/client.py +4 -10
  65. openstackclient/network/common.py +16 -12
  66. openstackclient/network/utils.py +3 -3
  67. openstackclient/network/v2/address_group.py +5 -9
  68. openstackclient/network/v2/address_scope.py +2 -3
  69. openstackclient/network/v2/default_security_group_rule.py +1 -2
  70. openstackclient/network/v2/floating_ip.py +14 -21
  71. openstackclient/network/v2/floating_ip_port_forwarding.py +7 -7
  72. openstackclient/network/v2/ip_availability.py +1 -2
  73. openstackclient/network/v2/l3_conntrack_helper.py +8 -12
  74. openstackclient/network/v2/local_ip.py +24 -26
  75. openstackclient/network/v2/local_ip_association.py +4 -5
  76. openstackclient/network/v2/ndp_proxy.py +9 -10
  77. openstackclient/network/v2/network.py +12 -16
  78. openstackclient/network/v2/network_agent.py +29 -37
  79. openstackclient/network/v2/network_auto_allocated_topology.py +4 -5
  80. openstackclient/network/v2/network_flavor.py +1 -1
  81. openstackclient/network/v2/network_flavor_profile.py +5 -5
  82. openstackclient/network/v2/network_meter.py +3 -3
  83. openstackclient/network/v2/network_meter_rule.py +5 -8
  84. openstackclient/network/v2/network_qos_policy.py +4 -4
  85. openstackclient/network/v2/network_qos_rule.py +4 -5
  86. openstackclient/network/v2/network_rbac.py +4 -4
  87. openstackclient/network/v2/network_segment.py +6 -7
  88. openstackclient/network/v2/network_segment_range.py +16 -20
  89. openstackclient/network/v2/network_trunk.py +24 -16
  90. openstackclient/network/v2/port.py +28 -29
  91. openstackclient/network/v2/router.py +52 -41
  92. openstackclient/network/v2/security_group.py +8 -15
  93. openstackclient/network/v2/security_group_rule.py +9 -10
  94. openstackclient/network/v2/subnet.py +31 -30
  95. openstackclient/network/v2/subnet_pool.py +4 -4
  96. openstackclient/object/client.py +2 -3
  97. openstackclient/object/v1/container.py +2 -3
  98. openstackclient/object/v1/object.py +2 -9
  99. openstackclient/shell.py +22 -5
  100. openstackclient/tests/functional/base.py +2 -2
  101. openstackclient/tests/functional/common/test_quota.py +3 -1
  102. openstackclient/tests/functional/compute/v2/common.py +12 -6
  103. openstackclient/tests/functional/compute/v2/test_server.py +2 -3
  104. openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
  105. openstackclient/tests/functional/identity/v2/test_user.py +1 -1
  106. openstackclient/tests/functional/identity/v3/common.py +3 -8
  107. openstackclient/tests/functional/identity/v3/test_application_credential.py +10 -10
  108. openstackclient/tests/functional/identity/v3/test_endpoint.py +3 -3
  109. openstackclient/tests/functional/identity/v3/test_group.py +3 -3
  110. openstackclient/tests/functional/identity/v3/test_idp.py +3 -7
  111. openstackclient/tests/functional/identity/v3/test_limit.py +4 -4
  112. openstackclient/tests/functional/identity/v3/test_project.py +5 -14
  113. openstackclient/tests/functional/identity/v3/test_region.py +1 -3
  114. openstackclient/tests/functional/identity/v3/test_registered_limit.py +3 -3
  115. openstackclient/tests/functional/identity/v3/test_role.py +1 -1
  116. openstackclient/tests/functional/identity/v3/test_role_assignment.py +13 -31
  117. openstackclient/tests/functional/identity/v3/test_service_provider.py +3 -7
  118. openstackclient/tests/functional/identity/v3/test_user.py +8 -8
  119. openstackclient/tests/functional/network/v2/common.py +7 -3
  120. openstackclient/tests/functional/network/v2/test_address_group.py +4 -0
  121. openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +15 -11
  122. openstackclient/tests/functional/network/v2/test_local_ip.py +4 -0
  123. openstackclient/tests/functional/network/v2/test_network_meter_rule.py +2 -2
  124. openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +2 -3
  125. openstackclient/tests/functional/network/v2/test_network_rbac.py +2 -2
  126. openstackclient/tests/functional/network/v2/test_network_trunk.py +1 -1
  127. openstackclient/tests/functional/network/v2/test_port.py +17 -7
  128. openstackclient/tests/functional/network/v2/test_router.py +42 -0
  129. openstackclient/tests/functional/network/v2/test_subnet_pool.py +4 -0
  130. openstackclient/tests/unit/api/test_compute_v2.py +67 -87
  131. openstackclient/tests/unit/common/test_availability_zone.py +6 -14
  132. openstackclient/tests/unit/common/test_command.py +1 -1
  133. openstackclient/tests/unit/common/test_extension.py +5 -7
  134. openstackclient/tests/unit/common/test_limits.py +1 -1
  135. openstackclient/tests/unit/common/test_project_cleanup.py +5 -6
  136. openstackclient/tests/unit/common/test_quota.py +51 -28
  137. openstackclient/tests/unit/compute/v2/fakes.py +4 -10
  138. openstackclient/tests/unit/compute/v2/test_agent.py +16 -16
  139. openstackclient/tests/unit/compute/v2/test_aggregate.py +56 -60
  140. openstackclient/tests/unit/compute/v2/test_console.py +16 -16
  141. openstackclient/tests/unit/compute/v2/test_flavor.py +71 -71
  142. openstackclient/tests/unit/compute/v2/test_host.py +8 -8
  143. openstackclient/tests/unit/compute/v2/test_hypervisor.py +22 -30
  144. openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
  145. openstackclient/tests/unit/compute/v2/test_keypair.py +24 -24
  146. openstackclient/tests/unit/compute/v2/test_server.py +524 -560
  147. openstackclient/tests/unit/compute/v2/test_server_backup.py +5 -7
  148. openstackclient/tests/unit/compute/v2/test_server_event.py +16 -18
  149. openstackclient/tests/unit/compute/v2/test_server_group.py +25 -31
  150. openstackclient/tests/unit/compute/v2/test_server_image.py +6 -8
  151. openstackclient/tests/unit/compute/v2/test_server_migration.py +37 -37
  152. openstackclient/tests/unit/compute/v2/test_server_volume.py +12 -12
  153. openstackclient/tests/unit/compute/v2/test_service.py +39 -45
  154. openstackclient/tests/unit/compute/v2/test_usage.py +5 -5
  155. openstackclient/tests/unit/identity/v2_0/fakes.py +1 -1
  156. openstackclient/tests/unit/identity/v3/test_access_rule.py +1 -3
  157. openstackclient/tests/unit/identity/v3/test_application_credential.py +1 -1
  158. openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
  159. openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
  160. openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
  161. openstackclient/tests/unit/identity/v3/test_user.py +16 -0
  162. openstackclient/tests/unit/image/v1/fakes.py +2 -2
  163. openstackclient/tests/unit/image/v2/test_image.py +39 -1
  164. openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
  165. openstackclient/tests/unit/network/test_common.py +2 -2
  166. openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
  167. openstackclient/tests/unit/network/v2/test_floating_ip_network.py +49 -35
  168. openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
  169. openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
  170. openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
  171. openstackclient/tests/unit/network/v2/test_port.py +4 -5
  172. openstackclient/tests/unit/network/v2/test_router.py +63 -0
  173. openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
  174. openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +14 -14
  175. openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
  176. openstackclient/tests/unit/test_shell.py +16 -13
  177. openstackclient/tests/unit/volume/v2/test_volume.py +1 -1
  178. openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +1 -1
  179. openstackclient/tests/unit/volume/v3/fakes.py +2 -8
  180. openstackclient/tests/unit/volume/v3/test_volume.py +1 -1
  181. openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -3
  182. openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +1 -2
  183. openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +1 -1
  184. openstackclient/volume/client.py +1 -3
  185. openstackclient/volume/v2/consistency_group.py +4 -8
  186. openstackclient/volume/v2/consistency_group_snapshot.py +1 -2
  187. openstackclient/volume/v2/qos_specs.py +1 -2
  188. openstackclient/volume/v2/volume.py +8 -16
  189. openstackclient/volume/v2/volume_backup.py +6 -7
  190. openstackclient/volume/v2/volume_snapshot.py +8 -9
  191. openstackclient/volume/v2/volume_transfer_request.py +0 -3
  192. openstackclient/volume/v2/volume_type.py +10 -21
  193. openstackclient/volume/v3/block_storage_cluster.py +3 -3
  194. openstackclient/volume/v3/block_storage_manage.py +1 -3
  195. openstackclient/volume/v3/volume.py +18 -19
  196. openstackclient/volume/v3/volume_attachment.py +3 -2
  197. openstackclient/volume/v3/volume_backup.py +7 -8
  198. openstackclient/volume/v3/volume_group.py +2 -1
  199. openstackclient/volume/v3/volume_group_snapshot.py +2 -1
  200. openstackclient/volume/v3/volume_snapshot.py +4 -3
  201. openstackclient/volume/v3/volume_type.py +10 -21
  202. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/AUTHORS +3 -0
  203. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/METADATA +7 -13
  204. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/RECORD +209 -232
  205. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/WHEEL +1 -1
  206. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/entry_points.txt +0 -41
  207. python_openstackclient-8.0.0.dist-info/pbr.json +1 -0
  208. openstackclient/tests/functional/volume/v1/__init__.py +0 -0
  209. openstackclient/tests/functional/volume/v1/common.py +0 -35
  210. openstackclient/tests/functional/volume/v1/test_qos.py +0 -100
  211. openstackclient/tests/functional/volume/v1/test_service.py +0 -76
  212. openstackclient/tests/functional/volume/v1/test_snapshot.py +0 -232
  213. openstackclient/tests/functional/volume/v1/test_transfer_request.py +0 -111
  214. openstackclient/tests/functional/volume/v1/test_volume.py +0 -228
  215. openstackclient/tests/functional/volume/v1/test_volume_type.py +0 -213
  216. openstackclient/tests/unit/volume/v1/__init__.py +0 -0
  217. openstackclient/tests/unit/volume/v1/fakes.py +0 -615
  218. openstackclient/tests/unit/volume/v1/test_qos_specs.py +0 -471
  219. openstackclient/tests/unit/volume/v1/test_service.py +0 -295
  220. openstackclient/tests/unit/volume/v1/test_transfer_request.py +0 -380
  221. openstackclient/tests/unit/volume/v1/test_type.py +0 -633
  222. openstackclient/tests/unit/volume/v1/test_volume.py +0 -1447
  223. openstackclient/tests/unit/volume/v1/test_volume_backup.py +0 -435
  224. openstackclient/volume/v1/__init__.py +0 -0
  225. openstackclient/volume/v1/qos_specs.py +0 -377
  226. openstackclient/volume/v1/service.py +0 -136
  227. openstackclient/volume/v1/volume.py +0 -734
  228. openstackclient/volume/v1/volume_backup.py +0 -302
  229. openstackclient/volume/v1/volume_snapshot.py +0 -433
  230. openstackclient/volume/v1/volume_transfer_request.py +0 -200
  231. openstackclient/volume/v1/volume_type.py +0 -520
  232. python_openstackclient-7.4.0.dist-info/pbr.json +0 -1
  233. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/LICENSE +0 -0
  234. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -521,47 +521,6 @@ object_store_account_show = openstackclient.object.v1.account:ShowAccount
521
521
  object_store_account_unset = openstackclient.object.v1.account:UnsetAccount
522
522
  object_unset = openstackclient.object.v1.object:UnsetObject
523
523
 
524
- [openstack.volume.v1]
525
- volume_backup_create = openstackclient.volume.v1.volume_backup:CreateVolumeBackup
526
- volume_backup_delete = openstackclient.volume.v1.volume_backup:DeleteVolumeBackup
527
- volume_backup_list = openstackclient.volume.v1.volume_backup:ListVolumeBackup
528
- volume_backup_restore = openstackclient.volume.v1.volume_backup:RestoreVolumeBackup
529
- volume_backup_show = openstackclient.volume.v1.volume_backup:ShowVolumeBackup
530
- volume_create = openstackclient.volume.v1.volume:CreateVolume
531
- volume_delete = openstackclient.volume.v1.volume:DeleteVolume
532
- volume_list = openstackclient.volume.v1.volume:ListVolume
533
- volume_migrate = openstackclient.volume.v1.volume:MigrateVolume
534
- volume_qos_associate = openstackclient.volume.v1.qos_specs:AssociateQos
535
- volume_qos_create = openstackclient.volume.v1.qos_specs:CreateQos
536
- volume_qos_delete = openstackclient.volume.v1.qos_specs:DeleteQos
537
- volume_qos_disassociate = openstackclient.volume.v1.qos_specs:DisassociateQos
538
- volume_qos_list = openstackclient.volume.v1.qos_specs:ListQos
539
- volume_qos_set = openstackclient.volume.v1.qos_specs:SetQos
540
- volume_qos_show = openstackclient.volume.v1.qos_specs:ShowQos
541
- volume_qos_unset = openstackclient.volume.v1.qos_specs:UnsetQos
542
- volume_service_list = openstackclient.volume.v1.service:ListService
543
- volume_service_set = openstackclient.volume.v1.service:SetService
544
- volume_set = openstackclient.volume.v1.volume:SetVolume
545
- volume_show = openstackclient.volume.v1.volume:ShowVolume
546
- volume_snapshot_create = openstackclient.volume.v1.volume_snapshot:CreateVolumeSnapshot
547
- volume_snapshot_delete = openstackclient.volume.v1.volume_snapshot:DeleteVolumeSnapshot
548
- volume_snapshot_list = openstackclient.volume.v1.volume_snapshot:ListVolumeSnapshot
549
- volume_snapshot_set = openstackclient.volume.v1.volume_snapshot:SetVolumeSnapshot
550
- volume_snapshot_show = openstackclient.volume.v1.volume_snapshot:ShowVolumeSnapshot
551
- volume_snapshot_unset = openstackclient.volume.v1.volume_snapshot:UnsetVolumeSnapshot
552
- volume_transfer_request_accept = openstackclient.volume.v1.volume_transfer_request:AcceptTransferRequest
553
- volume_transfer_request_create = openstackclient.volume.v1.volume_transfer_request:CreateTransferRequest
554
- volume_transfer_request_delete = openstackclient.volume.v1.volume_transfer_request:DeleteTransferRequest
555
- volume_transfer_request_list = openstackclient.volume.v1.volume_transfer_request:ListTransferRequest
556
- volume_transfer_request_show = openstackclient.volume.v1.volume_transfer_request:ShowTransferRequest
557
- volume_type_create = openstackclient.volume.v1.volume_type:CreateVolumeType
558
- volume_type_delete = openstackclient.volume.v1.volume_type:DeleteVolumeType
559
- volume_type_list = openstackclient.volume.v1.volume_type:ListVolumeType
560
- volume_type_set = openstackclient.volume.v1.volume_type:SetVolumeType
561
- volume_type_show = openstackclient.volume.v1.volume_type:ShowVolumeType
562
- volume_type_unset = openstackclient.volume.v1.volume_type:UnsetVolumeType
563
- volume_unset = openstackclient.volume.v1.volume:UnsetVolume
564
-
565
524
  [openstack.volume.v2]
566
525
  consistency_group_add_volume = openstackclient.volume.v2.consistency_group:AddVolumeToConsistencyGroup
567
526
  consistency_group_create = openstackclient.volume.v2.consistency_group:CreateConsistencyGroup
@@ -0,0 +1 @@
1
+ {"git_version": "30aa27b7", "is_release": true}
File without changes
@@ -1,35 +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 fixtures
14
-
15
- from openstackclient.tests.functional.volume import base as volume_base
16
-
17
-
18
- class BaseVolumeTests(volume_base.BaseVolumeTests):
19
- """Base class for Volume functional tests"""
20
-
21
- @classmethod
22
- def setUpClass(cls):
23
- super().setUpClass()
24
- cls.haz_volume_v1 = cls.is_service_enabled('block-storage', '1.0')
25
-
26
- def setUp(self):
27
- super().setUp()
28
-
29
- if not self.haz_volume_v1:
30
- self.skipTest("No Volume v1 service present")
31
-
32
- ver_fixture = fixtures.EnvironmentVariable(
33
- 'OS_VOLUME_API_VERSION', '1'
34
- )
35
- self.useFixture(ver_fixture)
@@ -1,100 +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
- from openstackclient.tests.functional.volume.v1 import common
16
-
17
-
18
- class QosTests(common.BaseVolumeTests):
19
- """Functional tests for volume qos."""
20
-
21
- def test_volume_qos_create_list(self):
22
- """Test create, list, delete multiple"""
23
- name1 = uuid.uuid4().hex
24
- cmd_output = self.openstack(
25
- 'volume qos create ' + name1,
26
- parse_output=True,
27
- )
28
- self.assertEqual(name1, cmd_output['name'])
29
-
30
- name2 = uuid.uuid4().hex
31
- cmd_output = self.openstack(
32
- 'volume qos create ' + name2,
33
- parse_output=True,
34
- )
35
- self.assertEqual(name2, cmd_output['name'])
36
-
37
- # Test list
38
- cmd_output = self.openstack(
39
- 'volume qos list',
40
- parse_output=True,
41
- )
42
- names = [x["Name"] for x in cmd_output]
43
- self.assertIn(name1, names)
44
- self.assertIn(name2, names)
45
-
46
- # Test delete multiple
47
- del_output = self.openstack('volume qos delete ' + name1 + ' ' + name2)
48
- self.assertOutput('', del_output)
49
-
50
- def test_volume_qos_set_show_unset(self):
51
- """Tests create volume qos, set, unset, show, delete"""
52
-
53
- name = uuid.uuid4().hex
54
- cmd_output = self.openstack(
55
- 'volume qos create '
56
- + '--consumer front-end '
57
- + '--property Alpha=a '
58
- + name,
59
- parse_output=True,
60
- )
61
- self.addCleanup(self.openstack, 'volume qos delete ' + name)
62
- self.assertEqual(name, cmd_output['name'])
63
-
64
- self.assertEqual("front-end", cmd_output['consumer'])
65
-
66
- # Test volume qos set
67
- raw_output = self.openstack(
68
- 'volume qos set '
69
- + '--no-property '
70
- + '--property Beta=b '
71
- + '--property Charlie=c '
72
- + name,
73
- )
74
- self.assertOutput('', raw_output)
75
-
76
- # Test volume qos show
77
- cmd_output = self.openstack(
78
- 'volume qos show ' + name,
79
- parse_output=True,
80
- )
81
- self.assertEqual(name, cmd_output['name'])
82
- self.assertEqual(
83
- {'Beta': 'b', 'Charlie': 'c'},
84
- cmd_output['properties'],
85
- )
86
-
87
- # Test volume qos unset
88
- raw_output = self.openstack(
89
- 'volume qos unset ' + '--property Charlie ' + name,
90
- )
91
- self.assertOutput('', raw_output)
92
-
93
- cmd_output = self.openstack(
94
- 'volume qos show ' + name,
95
- parse_output=True,
96
- )
97
- self.assertEqual(name, cmd_output['name'])
98
- self.assertEqual({'Beta': 'b'}, cmd_output['properties'])
99
-
100
- # TODO(qiangjiahui): Add tests for associate and disassociate volume type
@@ -1,76 +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
- from openstackclient.tests.functional.volume.v1 import common
14
-
15
-
16
- class VolumeServiceTests(common.BaseVolumeTests):
17
- """Functional tests for volume service."""
18
-
19
- def test_volume_service_list(self):
20
- cmd_output = self.openstack('volume service list', parse_output=True)
21
-
22
- # Get the nonredundant services and hosts
23
- services = list({x['Binary'] for x in cmd_output})
24
-
25
- # Test volume service list --service
26
- cmd_output = self.openstack(
27
- 'volume service list ' + '--service ' + services[0],
28
- parse_output=True,
29
- )
30
- for x in cmd_output:
31
- self.assertEqual(services[0], x['Binary'])
32
-
33
- # TODO(zhiyong.dai): test volume service list --host after solving
34
- # https://bugs.launchpad.net/python-openstackclient/+bug/1664451
35
-
36
- def test_volume_service_set(self):
37
- # Get a service and host
38
- cmd_output = self.openstack(
39
- 'volume service list',
40
- parse_output=True,
41
- )
42
- service_1 = cmd_output[0]['Binary']
43
- host_1 = cmd_output[0]['Host']
44
-
45
- # Test volume service set --enable
46
- raw_output = self.openstack(
47
- 'volume service set --enable ' + host_1 + ' ' + service_1
48
- )
49
- self.assertOutput('', raw_output)
50
-
51
- cmd_output = self.openstack(
52
- 'volume service list --long',
53
- parse_output=True,
54
- )
55
- self.assertEqual('enabled', cmd_output[0]['Status'])
56
- self.assertIsNone(cmd_output[0]['Disabled Reason'])
57
-
58
- # Test volume service set --disable and --disable-reason
59
- disable_reason = 'disable_reason'
60
- raw_output = self.openstack(
61
- 'volume service set --disable '
62
- + '--disable-reason '
63
- + disable_reason
64
- + ' '
65
- + host_1
66
- + ' '
67
- + service_1
68
- )
69
- self.assertOutput('', raw_output)
70
-
71
- cmd_output = self.openstack(
72
- 'volume service list --long',
73
- parse_output=True,
74
- )
75
- self.assertEqual('disabled', cmd_output[0]['Status'])
76
- self.assertEqual(disable_reason, cmd_output[0]['Disabled Reason'])
@@ -1,232 +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
- from openstackclient.tests.functional.volume.v1 import common
16
-
17
-
18
- class VolumeSnapshotTests(common.BaseVolumeTests):
19
- """Functional tests for volume snapshot."""
20
-
21
- VOLLY = uuid.uuid4().hex
22
-
23
- @classmethod
24
- def setUpClass(cls):
25
- super().setUpClass()
26
- # create a volume for all tests to create snapshot
27
- cmd_output = cls.openstack(
28
- 'volume create ' + '--size 1 ' + cls.VOLLY,
29
- parse_output=True,
30
- )
31
- cls.wait_for_status('volume', cls.VOLLY, 'available')
32
- cls.VOLUME_ID = cmd_output['id']
33
-
34
- @classmethod
35
- def tearDownClass(cls):
36
- try:
37
- cls.wait_for_status('volume', cls.VOLLY, 'available')
38
- raw_output = cls.openstack('volume delete --force ' + cls.VOLLY)
39
- cls.assertOutput('', raw_output)
40
- finally:
41
- super().tearDownClass()
42
-
43
- def test_volume_snapshot_delete(self):
44
- """Test create, delete multiple"""
45
- name1 = uuid.uuid4().hex
46
- cmd_output = self.openstack(
47
- 'volume snapshot create ' + name1 + ' --volume ' + self.VOLLY,
48
- parse_output=True,
49
- )
50
- self.assertEqual(
51
- name1,
52
- cmd_output["display_name"],
53
- )
54
-
55
- name2 = uuid.uuid4().hex
56
- cmd_output = self.openstack(
57
- 'volume snapshot create ' + name2 + ' --volume ' + self.VOLLY,
58
- parse_output=True,
59
- )
60
- self.assertEqual(
61
- name2,
62
- cmd_output["display_name"],
63
- )
64
-
65
- self.wait_for_status('volume snapshot', name1, 'available')
66
- self.wait_for_status('volume snapshot', name2, 'available')
67
-
68
- del_output = self.openstack(
69
- 'volume snapshot delete ' + name1 + ' ' + name2
70
- )
71
- self.assertOutput('', del_output)
72
- self.wait_for_delete('volume snapshot', name1)
73
- self.wait_for_delete('volume snapshot', name2)
74
-
75
- def test_volume_snapshot_list(self):
76
- """Test create, list filter"""
77
- name1 = uuid.uuid4().hex
78
- cmd_output = self.openstack(
79
- 'volume snapshot create ' + name1 + ' --volume ' + self.VOLLY,
80
- parse_output=True,
81
- )
82
- self.addCleanup(self.wait_for_delete, 'volume snapshot', name1)
83
- self.addCleanup(self.openstack, 'volume snapshot delete ' + name1)
84
- self.assertEqual(
85
- name1,
86
- cmd_output["display_name"],
87
- )
88
- self.assertEqual(
89
- self.VOLUME_ID,
90
- cmd_output["volume_id"],
91
- )
92
- self.assertEqual(
93
- 1,
94
- cmd_output["size"],
95
- )
96
- self.wait_for_status('volume snapshot', name1, 'available')
97
-
98
- name2 = uuid.uuid4().hex
99
- cmd_output = self.openstack(
100
- 'volume snapshot create ' + name2 + ' --volume ' + self.VOLLY,
101
- parse_output=True,
102
- )
103
- self.addCleanup(self.wait_for_delete, 'volume snapshot', name2)
104
- self.addCleanup(self.openstack, 'volume snapshot delete ' + name2)
105
- self.assertEqual(
106
- name2,
107
- cmd_output["display_name"],
108
- )
109
- self.assertEqual(
110
- self.VOLUME_ID,
111
- cmd_output["volume_id"],
112
- )
113
- self.assertEqual(
114
- 1,
115
- cmd_output["size"],
116
- )
117
- self.wait_for_status('volume snapshot', name2, 'available')
118
-
119
- # Test list --long, --status
120
- cmd_output = self.openstack(
121
- 'volume snapshot list ' + '--long ' + '--status error',
122
- parse_output=True,
123
- )
124
- names = [x["Name"] for x in cmd_output]
125
- self.assertNotIn(name1, names)
126
- self.assertNotIn(name2, names)
127
-
128
- # Test list --volume
129
- cmd_output = self.openstack(
130
- 'volume snapshot list ' + '--volume ' + self.VOLLY,
131
- parse_output=True,
132
- )
133
- names = [x["Name"] for x in cmd_output]
134
- self.assertIn(name1, names)
135
- self.assertIn(name2, names)
136
-
137
- # Test list --name
138
- cmd_output = self.openstack(
139
- 'volume snapshot list ' + '--name ' + name1,
140
- parse_output=True,
141
- )
142
- names = [x["Name"] for x in cmd_output]
143
- self.assertIn(name1, names)
144
- self.assertNotIn(name2, names)
145
-
146
- def test_snapshot_set(self):
147
- """Test create, set, unset, show, delete volume snapshot"""
148
- name = uuid.uuid4().hex
149
- new_name = name + "_"
150
- cmd_output = self.openstack(
151
- 'volume snapshot create '
152
- + '--volume '
153
- + self.VOLLY
154
- + ' --description aaaa '
155
- + name,
156
- parse_output=True,
157
- )
158
- self.addCleanup(self.wait_for_delete, 'volume snapshot', new_name)
159
- self.addCleanup(self.openstack, 'volume snapshot delete ' + new_name)
160
- self.assertEqual(
161
- name,
162
- cmd_output["display_name"],
163
- )
164
- self.assertEqual(
165
- 1,
166
- cmd_output["size"],
167
- )
168
- self.assertEqual(
169
- 'aaaa',
170
- cmd_output["display_description"],
171
- )
172
- self.wait_for_status('volume snapshot', name, 'available')
173
-
174
- # Test volume snapshot set
175
- raw_output = self.openstack(
176
- 'volume snapshot set '
177
- + '--name '
178
- + new_name
179
- + ' --description bbbb '
180
- + '--property Alpha=a '
181
- + '--property Beta=b '
182
- + name,
183
- )
184
- self.assertOutput('', raw_output)
185
-
186
- # Show snapshot set result
187
- cmd_output = self.openstack(
188
- 'volume snapshot show ' + new_name,
189
- parse_output=True,
190
- )
191
- self.assertEqual(
192
- new_name,
193
- cmd_output["display_name"],
194
- )
195
- self.assertEqual(
196
- 1,
197
- cmd_output["size"],
198
- )
199
- self.assertEqual(
200
- 'bbbb',
201
- cmd_output["display_description"],
202
- )
203
- self.assertEqual(
204
- {'Alpha': 'a', 'Beta': 'b'},
205
- cmd_output["properties"],
206
- )
207
-
208
- # Test volume unset
209
- raw_output = self.openstack(
210
- 'volume snapshot unset ' + '--property Alpha ' + new_name,
211
- )
212
- self.assertOutput('', raw_output)
213
-
214
- cmd_output = self.openstack(
215
- 'volume snapshot show ' + new_name,
216
- parse_output=True,
217
- )
218
- self.assertEqual(
219
- {'Beta': 'b'},
220
- cmd_output["properties"],
221
- )
222
-
223
- # Test volume snapshot set --no-property
224
- raw_output = self.openstack(
225
- 'volume snapshot set ' + '--no-property ' + new_name,
226
- )
227
- self.assertOutput('', raw_output)
228
- cmd_output = self.openstack(
229
- 'volume snapshot show ' + new_name,
230
- parse_output=True,
231
- )
232
- self.assertEqual({}, cmd_output["properties"])
@@ -1,111 +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
- from openstackclient.tests.functional.volume.v1 import common
16
-
17
-
18
- class TransferRequestTests(common.BaseVolumeTests):
19
- """Functional tests for transfer request."""
20
-
21
- NAME = uuid.uuid4().hex
22
- VOLUME_NAME = uuid.uuid4().hex
23
-
24
- @classmethod
25
- def setUpClass(cls):
26
- super().setUpClass()
27
- cmd_output = cls.openstack(
28
- 'volume create --size 1 ' + cls.VOLUME_NAME,
29
- parse_output=True,
30
- )
31
- cls.assertOutput(cls.VOLUME_NAME, cmd_output['name'])
32
-
33
- cls.wait_for_status("volume", cls.VOLUME_NAME, "available")
34
-
35
- @classmethod
36
- def tearDownClass(cls):
37
- try:
38
- raw_output_volume = cls.openstack(
39
- 'volume delete ' + cls.VOLUME_NAME
40
- )
41
- cls.assertOutput('', raw_output_volume)
42
- finally:
43
- super().tearDownClass()
44
-
45
- def test_volume_transfer_request_accept(self):
46
- volume_name = uuid.uuid4().hex
47
- name = uuid.uuid4().hex
48
-
49
- # create a volume
50
- cmd_output = self.openstack(
51
- 'volume create --size 1 ' + volume_name,
52
- parse_output=True,
53
- )
54
- self.assertEqual(volume_name, cmd_output['name'])
55
-
56
- # create volume transfer request for the volume
57
- # and get the auth_key of the new transfer request
58
- cmd_output = self.openstack(
59
- 'volume transfer request create '
60
- + volume_name
61
- + ' --name '
62
- + name,
63
- parse_output=True,
64
- )
65
- auth_key = cmd_output['auth_key']
66
- self.assertTrue(auth_key)
67
-
68
- # accept the volume transfer request
69
- output = self.openstack(
70
- 'volume transfer request accept '
71
- + name
72
- + ' '
73
- + '--auth-key '
74
- + auth_key,
75
- parse_output=True,
76
- )
77
- self.assertEqual(name, output.get('name'))
78
-
79
- # the volume transfer will be removed by default after accepted
80
- # so just need to delete the volume here
81
- raw_output = self.openstack('volume delete ' + volume_name)
82
- self.assertEqual('', raw_output)
83
-
84
- def test_volume_transfer_request_list_show(self):
85
- name = uuid.uuid4().hex
86
- cmd_output = self.openstack(
87
- 'volume transfer request create '
88
- + ' --name '
89
- + name
90
- + ' '
91
- + self.VOLUME_NAME,
92
- parse_output=True,
93
- )
94
- self.addCleanup(
95
- self.openstack, 'volume transfer request delete ' + name
96
- )
97
- self.assertOutput(name, cmd_output['name'])
98
- auth_key = cmd_output['auth_key']
99
- self.assertTrue(auth_key)
100
-
101
- cmd_output = self.openstack(
102
- 'volume transfer request list',
103
- parse_output=True,
104
- )
105
- self.assertIn(name, [req['Name'] for req in cmd_output])
106
-
107
- cmd_output = self.openstack(
108
- 'volume transfer request show ' + name,
109
- parse_output=True,
110
- )
111
- self.assertEqual(name, cmd_output['name'])