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.
Files changed (352) hide show
  1. openstackclient/__init__.py +2 -6
  2. openstackclient/api/api.py +41 -23
  3. openstackclient/api/compute_v2.py +44 -25
  4. openstackclient/api/object_store_v1.py +75 -97
  5. openstackclient/api/volume_v2.py +2 -1
  6. openstackclient/api/volume_v3.py +2 -1
  7. openstackclient/common/availability_zone.py +59 -43
  8. openstackclient/common/clientmanager.py +56 -29
  9. openstackclient/common/configuration.py +10 -3
  10. openstackclient/common/envvars.py +2 -2
  11. openstackclient/common/extension.py +14 -5
  12. openstackclient/common/limits.py +10 -5
  13. openstackclient/common/module.py +36 -34
  14. openstackclient/common/pagination.py +50 -6
  15. openstackclient/common/progressbar.py +7 -6
  16. openstackclient/common/project_cleanup.py +11 -6
  17. openstackclient/common/quota.py +105 -103
  18. openstackclient/common/versions.py +8 -2
  19. openstackclient/compute/client.py +7 -3
  20. openstackclient/compute/v2/agent.py +17 -10
  21. openstackclient/compute/v2/aggregate.py +36 -22
  22. openstackclient/compute/v2/console.py +14 -8
  23. openstackclient/compute/v2/console_connection.py +11 -3
  24. openstackclient/compute/v2/flavor.py +42 -22
  25. openstackclient/compute/v2/host.py +14 -6
  26. openstackclient/compute/v2/hypervisor.py +16 -5
  27. openstackclient/compute/v2/hypervisor_stats.py +10 -2
  28. openstackclient/compute/v2/keypair.py +35 -16
  29. openstackclient/compute/v2/server.py +268 -179
  30. openstackclient/compute/v2/server_backup.py +10 -4
  31. openstackclient/compute/v2/server_event.py +28 -12
  32. openstackclient/compute/v2/server_group.py +23 -11
  33. openstackclient/compute/v2/server_image.py +19 -10
  34. openstackclient/compute/v2/server_migration.py +27 -10
  35. openstackclient/compute/v2/server_share.py +274 -0
  36. openstackclient/compute/v2/server_volume.py +13 -5
  37. openstackclient/compute/v2/service.py +17 -8
  38. openstackclient/compute/v2/usage.py +28 -23
  39. openstackclient/identity/client.py +8 -3
  40. openstackclient/identity/common.py +82 -47
  41. openstackclient/identity/v2_0/catalog.py +14 -7
  42. openstackclient/identity/v2_0/ec2creds.py +21 -10
  43. openstackclient/identity/v2_0/endpoint.py +23 -11
  44. openstackclient/identity/v2_0/project.py +25 -14
  45. openstackclient/identity/v2_0/role.py +28 -14
  46. openstackclient/identity/v2_0/role_assignment.py +9 -3
  47. openstackclient/identity/v2_0/service.py +23 -11
  48. openstackclient/identity/v2_0/token.py +12 -5
  49. openstackclient/identity/v2_0/user.py +26 -15
  50. openstackclient/identity/v3/access_rule.py +32 -12
  51. openstackclient/identity/v3/application_credential.py +66 -24
  52. openstackclient/identity/v3/catalog.py +14 -7
  53. openstackclient/identity/v3/consumer.py +22 -11
  54. openstackclient/identity/v3/credential.py +39 -17
  55. openstackclient/identity/v3/domain.py +40 -19
  56. openstackclient/identity/v3/ec2creds.py +25 -12
  57. openstackclient/identity/v3/endpoint.py +98 -64
  58. openstackclient/identity/v3/endpoint_group.py +28 -17
  59. openstackclient/identity/v3/federation_protocol.py +44 -20
  60. openstackclient/identity/v3/group.py +64 -40
  61. openstackclient/identity/v3/identity_provider.py +95 -57
  62. openstackclient/identity/v3/implied_role.py +21 -9
  63. openstackclient/identity/v3/limit.py +42 -17
  64. openstackclient/identity/v3/mapping.py +58 -28
  65. openstackclient/identity/v3/policy.py +23 -12
  66. openstackclient/identity/v3/project.py +59 -26
  67. openstackclient/identity/v3/region.py +39 -17
  68. openstackclient/identity/v3/registered_limit.py +41 -16
  69. openstackclient/identity/v3/role.py +62 -31
  70. openstackclient/identity/v3/role_assignment.py +25 -7
  71. openstackclient/identity/v3/service.py +39 -17
  72. openstackclient/identity/v3/service_provider.py +40 -16
  73. openstackclient/identity/v3/tag.py +23 -6
  74. openstackclient/identity/v3/token.py +30 -14
  75. openstackclient/identity/v3/trust.py +39 -18
  76. openstackclient/identity/v3/unscoped_saml.py +10 -2
  77. openstackclient/identity/v3/user.py +86 -36
  78. openstackclient/image/client.py +7 -3
  79. openstackclient/image/v1/image.py +33 -26
  80. openstackclient/image/v2/cache.py +16 -11
  81. openstackclient/image/v2/image.py +88 -56
  82. openstackclient/image/v2/info.py +7 -1
  83. openstackclient/image/v2/metadef_namespaces.py +117 -20
  84. openstackclient/image/v2/metadef_objects.py +32 -19
  85. openstackclient/image/v2/metadef_properties.py +30 -16
  86. openstackclient/image/v2/metadef_resource_type_association.py +14 -7
  87. openstackclient/image/v2/metadef_resource_types.py +7 -1
  88. openstackclient/image/v2/task.py +25 -27
  89. openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +7 -192
  90. openstackclient/network/client.py +7 -2
  91. openstackclient/network/common.py +16 -241
  92. openstackclient/network/utils.py +27 -54
  93. openstackclient/network/v2/address_group.py +39 -16
  94. openstackclient/network/v2/address_scope.py +36 -20
  95. openstackclient/network/v2/bgpvpn/bgpvpn.py +477 -0
  96. openstackclient/network/v2/bgpvpn/constants.py +30 -0
  97. openstackclient/network/v2/bgpvpn/network_association.py +226 -0
  98. openstackclient/network/v2/bgpvpn/port_association.py +504 -0
  99. openstackclient/network/v2/bgpvpn/router_association.py +301 -0
  100. openstackclient/network/v2/default_security_group_rule.py +31 -14
  101. openstackclient/network/v2/floating_ip.py +121 -162
  102. openstackclient/network/v2/floating_ip_port_forwarding.py +41 -19
  103. openstackclient/network/v2/fwaas/__init__.py +0 -0
  104. openstackclient/network/v2/fwaas/group.py +499 -0
  105. openstackclient/network/v2/fwaas/policy.py +518 -0
  106. openstackclient/network/v2/fwaas/rule.py +610 -0
  107. openstackclient/network/v2/ip_availability.py +25 -8
  108. openstackclient/network/v2/l3_conntrack_helper.py +35 -13
  109. openstackclient/network/v2/local_ip.py +27 -13
  110. openstackclient/network/v2/local_ip_association.py +17 -7
  111. openstackclient/network/v2/ndp_proxy.py +23 -11
  112. openstackclient/network/v2/network.py +213 -213
  113. openstackclient/network/v2/network_agent.py +77 -34
  114. openstackclient/network/v2/network_auto_allocated_topology.py +27 -15
  115. openstackclient/network/v2/network_flavor.py +45 -21
  116. openstackclient/network/v2/network_flavor_profile.py +42 -17
  117. openstackclient/network/v2/network_meter.py +39 -15
  118. openstackclient/network/v2/network_meter_rule.py +40 -12
  119. openstackclient/network/v2/network_qos_policy.py +39 -21
  120. openstackclient/network/v2/network_qos_rule.py +48 -18
  121. openstackclient/network/v2/network_qos_rule_type.py +28 -9
  122. openstackclient/network/v2/network_rbac.py +34 -16
  123. openstackclient/network/v2/network_segment.py +32 -11
  124. openstackclient/network/v2/network_segment_range.py +70 -31
  125. openstackclient/network/v2/network_service_provider.py +7 -1
  126. openstackclient/network/v2/network_trunk.py +41 -22
  127. openstackclient/network/v2/port.py +141 -40
  128. openstackclient/network/v2/router.py +101 -67
  129. openstackclient/network/v2/security_group.py +97 -198
  130. openstackclient/network/v2/security_group_rule.py +115 -282
  131. openstackclient/network/v2/subnet.py +63 -34
  132. openstackclient/network/v2/subnet_pool.py +42 -24
  133. openstackclient/network/v2/taas/tap_flow.py +35 -14
  134. openstackclient/network/v2/taas/tap_mirror.py +28 -14
  135. openstackclient/network/v2/taas/tap_service.py +26 -12
  136. openstackclient/object/client.py +7 -2
  137. openstackclient/object/v1/account.py +13 -6
  138. openstackclient/object/v1/container.py +28 -16
  139. openstackclient/object/v1/object.py +28 -16
  140. openstackclient/py.typed +0 -0
  141. openstackclient/shell.py +46 -10
  142. openstackclient/tests/functional/base.py +55 -20
  143. openstackclient/tests/functional/common/test_extension.py +4 -0
  144. openstackclient/tests/functional/common/test_quota.py +3 -1
  145. openstackclient/tests/functional/compute/v2/common.py +14 -13
  146. openstackclient/tests/functional/compute/v2/test_flavor.py +3 -1
  147. openstackclient/tests/functional/compute/v2/test_server.py +3 -0
  148. openstackclient/tests/functional/identity/v2/common.py +10 -6
  149. openstackclient/tests/functional/identity/v2/test_role.py +4 -4
  150. openstackclient/tests/functional/identity/v3/common.py +59 -19
  151. openstackclient/tests/functional/identity/v3/test_application_credential.py +1 -1
  152. openstackclient/tests/functional/identity/v3/test_group.py +20 -20
  153. openstackclient/tests/functional/identity/v3/test_idp.py +3 -1
  154. openstackclient/tests/functional/identity/v3/test_mapping.py +81 -0
  155. openstackclient/tests/functional/identity/v3/test_project.py +10 -10
  156. openstackclient/tests/functional/identity/v3/test_role.py +18 -18
  157. openstackclient/tests/functional/identity/v3/test_role_assignment.py +12 -12
  158. openstackclient/tests/functional/identity/v3/test_user.py +8 -8
  159. openstackclient/tests/functional/image/base.py +1 -6
  160. openstackclient/tests/functional/network/v2/common.py +5 -2
  161. openstackclient/tests/functional/network/v2/test_floating_ip.py +10 -4
  162. openstackclient/tests/functional/network/v2/test_ip_availability.py +4 -0
  163. openstackclient/tests/functional/network/v2/test_network_meter_rule.py +3 -2
  164. openstackclient/tests/functional/network/v2/test_network_segment.py +5 -0
  165. openstackclient/tests/functional/network/v2/test_subnet.py +13 -9
  166. openstackclient/tests/functional/object/v1/common.py +4 -0
  167. openstackclient/tests/functional/volume/v2/common.py +4 -0
  168. openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +27 -11
  169. openstackclient/tests/functional/volume/v2/test_volume_type.py +2 -2
  170. openstackclient/tests/functional/volume/v3/common.py +4 -0
  171. openstackclient/tests/functional/volume/v3/test_volume_group.py +163 -0
  172. openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +11 -7
  173. openstackclient/tests/functional/volume/v3/test_volume_type.py +2 -2
  174. openstackclient/tests/unit/common/test_availability_zone.py +35 -49
  175. openstackclient/tests/unit/common/test_extension.py +2 -2
  176. openstackclient/tests/unit/common/test_limits.py +1 -1
  177. openstackclient/tests/unit/common/test_module.py +82 -44
  178. openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
  179. openstackclient/tests/unit/common/test_quota.py +15 -26
  180. openstackclient/tests/unit/compute/v2/fakes.py +26 -57
  181. openstackclient/tests/unit/compute/v2/test_agent.py +4 -4
  182. openstackclient/tests/unit/compute/v2/test_aggregate.py +1 -1
  183. openstackclient/tests/unit/compute/v2/test_console.py +2 -2
  184. openstackclient/tests/unit/compute/v2/test_console_connection.py +1 -1
  185. openstackclient/tests/unit/compute/v2/test_flavor.py +29 -3
  186. openstackclient/tests/unit/compute/v2/test_host.py +3 -3
  187. openstackclient/tests/unit/compute/v2/test_hypervisor.py +2 -2
  188. openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +1 -1
  189. openstackclient/tests/unit/compute/v2/test_keypair.py +7 -7
  190. openstackclient/tests/unit/compute/v2/test_server.py +26 -111
  191. openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -1
  192. openstackclient/tests/unit/compute/v2/test_server_event.py +2 -2
  193. openstackclient/tests/unit/compute/v2/test_server_group.py +1 -1
  194. openstackclient/tests/unit/compute/v2/test_server_image.py +1 -1
  195. openstackclient/tests/unit/compute/v2/test_server_migration.py +4 -4
  196. openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
  197. openstackclient/tests/unit/compute/v2/test_server_volume.py +2 -2
  198. openstackclient/tests/unit/compute/v2/test_service.py +3 -3
  199. openstackclient/tests/unit/compute/v2/test_usage.py +1 -1
  200. openstackclient/tests/unit/identity/v2_0/fakes.py +3 -7
  201. openstackclient/tests/unit/identity/v2_0/test_endpoint.py +1 -1
  202. openstackclient/tests/unit/identity/v2_0/test_project.py +1 -1
  203. openstackclient/tests/unit/identity/v2_0/test_role.py +1 -1
  204. openstackclient/tests/unit/identity/v2_0/test_role_assignment.py +1 -1
  205. openstackclient/tests/unit/identity/v2_0/test_service.py +1 -1
  206. openstackclient/tests/unit/identity/v2_0/test_token.py +2 -2
  207. openstackclient/tests/unit/identity/v2_0/test_user.py +1 -1
  208. openstackclient/tests/unit/identity/v3/fakes.py +8 -38
  209. openstackclient/tests/unit/identity/v3/test_access_rule.py +3 -3
  210. openstackclient/tests/unit/identity/v3/test_application_credential.py +4 -4
  211. openstackclient/tests/unit/identity/v3/test_credential.py +5 -5
  212. openstackclient/tests/unit/identity/v3/test_domain.py +5 -5
  213. openstackclient/tests/unit/identity/v3/test_endpoint.py +6 -6
  214. openstackclient/tests/unit/identity/v3/test_endpoint_group.py +1 -1
  215. openstackclient/tests/unit/identity/v3/test_group.py +12 -22
  216. openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
  217. openstackclient/tests/unit/identity/v3/test_implied_role.py +1 -1
  218. openstackclient/tests/unit/identity/v3/test_limit.py +5 -5
  219. openstackclient/tests/unit/identity/v3/test_mappings.py +163 -79
  220. openstackclient/tests/unit/identity/v3/test_project.py +28 -5
  221. openstackclient/tests/unit/identity/v3/test_protocol.py +3 -3
  222. openstackclient/tests/unit/identity/v3/test_region.py +5 -5
  223. openstackclient/tests/unit/identity/v3/test_registered_limit.py +5 -5
  224. openstackclient/tests/unit/identity/v3/test_role.py +8 -8
  225. openstackclient/tests/unit/identity/v3/test_role_assignment.py +1 -1
  226. openstackclient/tests/unit/identity/v3/test_service.py +5 -5
  227. openstackclient/tests/unit/identity/v3/test_token.py +2 -2
  228. openstackclient/tests/unit/identity/v3/test_trust.py +4 -4
  229. openstackclient/tests/unit/identity/v3/test_user.py +77 -10
  230. openstackclient/tests/unit/image/v2/test_image.py +11 -11
  231. openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +105 -6
  232. openstackclient/tests/unit/network/test_common.py +0 -155
  233. openstackclient/tests/unit/network/v2/bgpvpn/__init__.py +0 -0
  234. openstackclient/tests/unit/network/v2/bgpvpn/fakes.py +179 -0
  235. openstackclient/tests/unit/network/v2/bgpvpn/test_bgpvpn.py +584 -0
  236. openstackclient/tests/unit/network/v2/bgpvpn/test_network_association.py +285 -0
  237. openstackclient/tests/unit/network/v2/bgpvpn/test_port_association.py +384 -0
  238. openstackclient/tests/unit/network/v2/bgpvpn/test_router_association.py +297 -0
  239. openstackclient/tests/unit/network/v2/fakes.py +5 -77
  240. openstackclient/tests/unit/network/v2/fwaas/__init__.py +0 -0
  241. openstackclient/tests/unit/network/v2/fwaas/test_group.py +923 -0
  242. openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
  243. openstackclient/tests/unit/network/v2/fwaas/test_rule.py +1005 -0
  244. openstackclient/tests/unit/network/v2/taas/{test_osc_tap_flow.py → test_tap_flow.py} +18 -25
  245. openstackclient/tests/unit/network/v2/taas/{test_osc_tap_mirror.py → test_tap_mirror.py} +19 -29
  246. openstackclient/tests/unit/network/v2/taas/{test_osc_tap_service.py → test_tap_service.py} +19 -29
  247. openstackclient/tests/unit/network/v2/test_address_group.py +26 -2
  248. openstackclient/tests/unit/network/v2/test_address_scope.py +24 -0
  249. openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +27 -2
  250. openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +37 -13
  251. openstackclient/tests/unit/network/v2/test_ip_availability.py +25 -0
  252. openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +29 -3
  253. openstackclient/tests/unit/network/v2/test_network.py +74 -12
  254. openstackclient/tests/unit/network/v2/test_network_agent.py +58 -5
  255. openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
  256. openstackclient/tests/unit/network/v2/test_network_flavor.py +26 -2
  257. openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +24 -0
  258. openstackclient/tests/unit/network/v2/test_network_meter.py +24 -0
  259. openstackclient/tests/unit/network/v2/test_network_qos_policy.py +25 -1
  260. openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
  261. openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +24 -0
  262. openstackclient/tests/unit/network/v2/test_network_rbac.py +25 -1
  263. openstackclient/tests/unit/network/v2/test_network_segment.py +25 -1
  264. openstackclient/tests/unit/network/v2/test_network_segment_range.py +31 -10
  265. openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
  266. openstackclient/tests/unit/network/v2/test_port.py +166 -0
  267. openstackclient/tests/unit/network/v2/test_router.py +36 -16
  268. openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +11 -8
  269. openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +28 -37
  270. openstackclient/tests/unit/network/v2/test_subnet.py +30 -5
  271. openstackclient/tests/unit/network/v2/test_subnet_pool.py +26 -1
  272. openstackclient/tests/unit/object/v1/fakes.py +8 -7
  273. openstackclient/tests/unit/object/v1/test_container.py +65 -101
  274. openstackclient/tests/unit/object/v1/test_container_all.py +8 -1
  275. openstackclient/tests/unit/object/v1/test_object.py +44 -84
  276. openstackclient/tests/unit/object/v1/test_object_all.py +8 -1
  277. openstackclient/tests/unit/test_hacking.py +108 -0
  278. openstackclient/tests/unit/volume/v2/fakes.py +21 -140
  279. openstackclient/tests/unit/volume/v2/test_volume_backup.py +6 -14
  280. openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +8 -1
  281. openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
  282. openstackclient/tests/unit/volume/v3/fakes.py +205 -100
  283. openstackclient/tests/unit/volume/v3/test_backup_record.py +114 -0
  284. openstackclient/tests/unit/volume/v3/test_consistency_group.py +720 -0
  285. openstackclient/tests/unit/volume/v3/test_consistency_group_snapshot.py +354 -0
  286. openstackclient/tests/unit/volume/v3/test_qos_specs.py +455 -0
  287. openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
  288. openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -1
  289. openstackclient/tests/unit/volume/v3/test_volume_backend.py +158 -0
  290. openstackclient/tests/unit/volume/v3/test_volume_backup.py +6 -14
  291. openstackclient/tests/unit/volume/v3/test_volume_group_type.py +65 -0
  292. openstackclient/tests/unit/volume/v3/test_volume_host.py +115 -0
  293. openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +61 -1
  294. openstackclient/tests/unit/volume/v3/test_volume_type.py +2 -4
  295. openstackclient/volume/client.py +7 -3
  296. openstackclient/volume/v2/backup_record.py +15 -6
  297. openstackclient/volume/v2/consistency_group.py +29 -17
  298. openstackclient/volume/v2/consistency_group_snapshot.py +25 -10
  299. openstackclient/volume/v2/qos_specs.py +28 -17
  300. openstackclient/volume/v2/service.py +17 -6
  301. openstackclient/volume/v2/volume.py +60 -30
  302. openstackclient/volume/v2/volume_backend.py +19 -6
  303. openstackclient/volume/v2/volume_backup.py +48 -23
  304. openstackclient/volume/v2/volume_host.py +6 -4
  305. openstackclient/volume/v2/volume_snapshot.py +49 -24
  306. openstackclient/volume/v2/volume_transfer_request.py +31 -13
  307. openstackclient/volume/v2/volume_type.py +43 -24
  308. openstackclient/volume/v3/backup_record.py +94 -0
  309. openstackclient/volume/v3/block_storage_cleanup.py +11 -3
  310. openstackclient/volume/v3/block_storage_cluster.py +19 -7
  311. openstackclient/volume/v3/block_storage_log_level.py +15 -6
  312. openstackclient/volume/v3/block_storage_manage.py +10 -4
  313. openstackclient/volume/v3/block_storage_resource_filter.py +17 -5
  314. openstackclient/volume/v3/consistency_group.py +400 -0
  315. openstackclient/volume/v3/consistency_group_snapshot.py +225 -0
  316. openstackclient/volume/v3/qos_specs.py +389 -0
  317. openstackclient/volume/v3/service.py +16 -6
  318. openstackclient/volume/v3/volume.py +92 -40
  319. openstackclient/volume/v3/volume_attachment.py +47 -21
  320. openstackclient/volume/v3/volume_backend.py +130 -0
  321. openstackclient/volume/v3/volume_backup.py +55 -27
  322. openstackclient/volume/v3/volume_group.py +23 -13
  323. openstackclient/volume/v3/volume_group_snapshot.py +34 -17
  324. openstackclient/volume/v3/volume_group_type.py +27 -14
  325. openstackclient/volume/v3/volume_host.py +74 -0
  326. openstackclient/volume/v3/volume_message.py +18 -8
  327. openstackclient/volume/v3/volume_snapshot.py +70 -32
  328. openstackclient/volume/v3/volume_transfer_request.py +31 -13
  329. openstackclient/volume/v3/volume_type.py +42 -24
  330. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/METADATA +7 -8
  331. python_openstackclient-10.1.0.dist-info/RECORD +524 -0
  332. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/WHEEL +1 -1
  333. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/entry_points.txt +77 -25
  334. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/licenses/AUTHORS +9 -0
  335. python_openstackclient-10.1.0.dist-info/pbr.json +1 -0
  336. openstackclient/api/image_v1.py +0 -69
  337. openstackclient/api/image_v2.py +0 -79
  338. openstackclient/network/v2/floating_ip_pool.py +0 -38
  339. openstackclient/tests/functional/image/v1/test_image.py +0 -97
  340. openstackclient/tests/unit/api/test_image_v1.py +0 -96
  341. openstackclient/tests/unit/api/test_image_v2.py +0 -96
  342. openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +0 -248
  343. openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +0 -49
  344. openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +0 -39
  345. openstackclient/tests/unit/network/v2/test_network_compute.py +0 -404
  346. openstackclient/tests/unit/network/v2/test_security_group_compute.py +0 -392
  347. openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +0 -555
  348. python_openstackclient-9.0.0.dist-info/RECORD +0 -499
  349. python_openstackclient-9.0.0.dist-info/pbr.json +0 -1
  350. /openstackclient/{tests/functional/image/v1 → network/v2/bgpvpn}/__init__.py +0 -0
  351. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/licenses/LICENSE +0 -0
  352. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.1.0.dist-info}/top_level.txt +0 -0
@@ -12,34 +12,48 @@
12
12
 
13
13
  """IP Floating action implementations"""
14
14
 
15
+ import argparse
16
+ from collections.abc import Iterable, Sequence
17
+ import logging
18
+ from typing import Any
19
+
15
20
  from openstack import exceptions as sdk_exceptions
21
+ from openstack.network.v2 import floating_ip as _floating_ip
16
22
  from osc_lib.cli import format_columns
23
+ from osc_lib import exceptions
17
24
  from osc_lib import utils
18
25
  from osc_lib.utils import tags as _tag
19
26
 
20
- from openstackclient.api import compute_v2
27
+ from openstackclient import command
28
+ from openstackclient.common import pagination
21
29
  from openstackclient.i18n import _
22
30
  from openstackclient.identity import common as identity_common
23
31
  from openstackclient.network import common
24
32
 
33
+ LOG = logging.getLogger(__name__)
34
+
25
35
  _formatters = {
26
36
  'port_details': format_columns.DictColumn,
27
37
  }
28
38
 
29
39
 
30
- def _get_network_columns(item):
40
+ def _get_network_columns(
41
+ item: _floating_ip.FloatingIP,
42
+ ) -> tuple[tuple[str, ...], tuple[str, ...]]:
31
43
  hidden_columns = ['location', 'tenant_id']
32
44
  return utils.get_osc_show_columns_for_sdk_resource(
33
45
  item, {}, hidden_columns
34
46
  )
35
47
 
36
48
 
37
- def _get_columns(item):
49
+ def _get_columns(item: Any) -> tuple[str, ...]:
38
50
  columns = list(item.keys())
39
51
  return tuple(sorted(columns))
40
52
 
41
53
 
42
- def _get_attrs(client_manager, parsed_args):
54
+ def _get_attrs(
55
+ client_manager: Any, parsed_args: argparse.Namespace
56
+ ) -> dict[str, Any]:
43
57
  attrs = {}
44
58
  network_client = client_manager.network
45
59
 
@@ -92,104 +106,82 @@ def _get_attrs(client_manager, parsed_args):
92
106
  return attrs
93
107
 
94
108
 
95
- class CreateFloatingIP(
96
- common.NetworkAndComputeShowOne, common.NeutronCommandWithExtraArgs
97
- ):
109
+ class CreateFloatingIP(command.ShowOne, common.NeutronCommandWithExtraArgs):
98
110
  _description = _("Create floating IP")
99
111
 
100
- def update_parser_common(self, parser):
101
- # In Compute v2 network, floating IPs could be allocated from floating
102
- # IP pools, which are actually external networks. So deprecate the
103
- # parameter "pool", and use "network" instead.
112
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
113
+ parser = super().get_parser(prog_name)
104
114
  parser.add_argument(
105
115
  'network',
106
116
  metavar='<network>',
107
117
  help=_("Network to allocate floating IP from (name or ID)"),
108
118
  )
109
- return parser
110
-
111
- def update_parser_network(self, parser):
112
119
  parser.add_argument(
113
120
  '--subnet',
114
121
  metavar='<subnet>',
115
- help=self.enhance_help_neutron(
116
- _(
117
- "Subnet on which you want to create the floating IP "
118
- "(name or ID)"
119
- )
122
+ help=_(
123
+ "Subnet on which you want to create the floating IP "
124
+ "(name or ID)"
120
125
  ),
121
126
  )
122
127
  parser.add_argument(
123
128
  '--port',
124
129
  metavar='<port>',
125
- help=self.enhance_help_neutron(
126
- _("Port to be associated with the floating IP (name or ID)")
127
- ),
130
+ help=_("Port to be associated with the floating IP (name or ID)"),
128
131
  )
129
132
  parser.add_argument(
130
133
  '--floating-ip-address',
131
134
  metavar='<ip-address>',
132
135
  dest='floating_ip_address',
133
- help=self.enhance_help_neutron(_("Floating IP address")),
136
+ help=_("Floating IP address"),
134
137
  )
135
138
  parser.add_argument(
136
139
  '--fixed-ip-address',
137
140
  metavar='<ip-address>',
138
141
  dest='fixed_ip_address',
139
- help=self.enhance_help_neutron(
140
- _("Fixed IP address mapped to the floating IP")
141
- ),
142
+ help=_("Fixed IP address mapped to the floating IP"),
142
143
  )
143
144
  parser.add_argument(
144
145
  '--qos-policy',
145
146
  metavar='<qos-policy>',
146
- help=self.enhance_help_neutron(
147
- _("Attach QoS policy to the floating IP (name or ID)")
148
- ),
147
+ help=_("Attach QoS policy to the floating IP (name or ID)"),
149
148
  )
150
149
  parser.add_argument(
151
150
  '--description',
152
151
  metavar='<description>',
153
- help=self.enhance_help_neutron(_('Set floating IP description')),
152
+ help=_('Set floating IP description'),
154
153
  )
155
154
  parser.add_argument(
156
155
  '--project',
157
156
  metavar='<project>',
158
- help=self.enhance_help_neutron(_("Owner's project (name or ID)")),
157
+ help=_("Owner's project (name or ID)"),
159
158
  )
160
159
  parser.add_argument(
161
160
  '--dns-domain',
162
161
  metavar='<dns-domain>',
163
162
  dest='dns_domain',
164
- help=self.enhance_help_neutron(
165
- _("Set DNS domain for this floating IP")
166
- ),
163
+ help=_("Set DNS domain for this floating IP"),
167
164
  )
168
165
  parser.add_argument(
169
166
  '--dns-name',
170
167
  metavar='<dns-name>',
171
168
  dest='dns_name',
172
- help=self.enhance_help_neutron(
173
- _("Set DNS name for this floating IP")
174
- ),
169
+ help=_("Set DNS name for this floating IP"),
175
170
  )
176
171
 
177
- identity_common.add_project_domain_option_to_parser(
178
- parser, enhance_help=self.enhance_help_neutron
179
- )
180
- _tag.add_tag_option_to_parser_for_create(
181
- parser, _('floating IP'), enhance_help=self.enhance_help_neutron
182
- )
172
+ identity_common.add_project_domain_option_to_parser(parser)
173
+ _tag.add_tag_option_to_parser_for_create(parser, _('floating IP'))
183
174
  return parser
184
175
 
185
- def take_action_network(self, client, parsed_args):
176
+ def take_action(
177
+ self, parsed_args: argparse.Namespace
178
+ ) -> tuple[Sequence[str], Iterable[Any]]:
179
+ client = self.app.client_manager.network
186
180
  attrs = _get_attrs(self.app.client_manager, parsed_args)
187
181
  attrs.update(
188
182
  self._parse_extra_properties(parsed_args.extra_properties)
189
183
  )
190
- with common.check_missing_extension_if_error(
191
- self.app.client_manager.network, attrs
192
- ):
184
+ with common.check_missing_extension_if_error(client, attrs):
193
185
  obj = client.create_ip(**attrs)
194
186
 
195
187
  # tags cannot be set when created, so tags need to be set later.
@@ -199,21 +191,12 @@ class CreateFloatingIP(
199
191
  data = utils.get_item_properties(obj, columns)
200
192
  return (display_columns, data)
201
193
 
202
- def take_action_compute(self, client, parsed_args):
203
- obj = compute_v2.create_floating_ip(client, parsed_args.network)
204
- columns = _get_columns(obj)
205
- data = utils.get_dict_properties(obj, columns)
206
- return (columns, data)
207
194
 
208
-
209
- class DeleteFloatingIP(common.NetworkAndComputeDelete):
195
+ class DeleteFloatingIP(command.Command):
210
196
  _description = _("Delete floating IP(s)")
211
197
 
212
- # Used by base class to find resources in parsed_args.
213
- resource = 'floating_ip'
214
- r = None
215
-
216
- def update_parser_common(self, parser):
198
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
199
+ parser = super().get_parser(prog_name)
217
200
  parser.add_argument(
218
201
  'floating_ip',
219
202
  metavar="<floating-ip>",
@@ -222,35 +205,49 @@ class DeleteFloatingIP(common.NetworkAndComputeDelete):
222
205
  )
223
206
  return parser
224
207
 
225
- def take_action_network(self, client, parsed_args):
226
- obj = client.find_ip(
227
- self.r,
228
- ignore_missing=False,
229
- )
230
- client.delete_ip(obj)
231
-
232
- def take_action_compute(self, client, parsed_args):
233
- compute_v2.delete_floating_ip(client, self.r)
208
+ def take_action(self, parsed_args: argparse.Namespace) -> None:
209
+ client = self.app.client_manager.network
210
+ result = 0
211
+
212
+ for fip in parsed_args.floating_ip:
213
+ try:
214
+ obj = client.find_ip(fip, ignore_missing=False)
215
+ client.delete_ip(obj)
216
+ except Exception as e:
217
+ result += 1
218
+ LOG.error(
219
+ _(
220
+ "Failed to delete floating IP with "
221
+ "name or ID '%(fip)s': %(e)s"
222
+ ),
223
+ {'fip': fip, 'e': e},
224
+ )
234
225
 
226
+ if result > 0:
227
+ total = len(parsed_args.floating_ip)
228
+ msg = _(
229
+ "%(result)s of %(total)s floating IPs failed to delete."
230
+ ) % {
231
+ 'result': result,
232
+ 'total': total,
233
+ }
234
+ raise exceptions.CommandError(msg)
235
235
 
236
- class ListFloatingIP(common.NetworkAndComputeLister):
237
- # TODO(songminglong): Use SDK resource mapped attribute names once
238
- # the OSC minimum requirements include SDK 1.0
239
236
 
237
+ class ListFloatingIP(command.Lister):
240
238
  _description = _("List floating IP(s)")
241
239
 
242
- def update_parser_network(self, parser):
240
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
241
+ parser = super().get_parser(prog_name)
243
242
  parser.add_argument(
244
243
  '--network',
245
244
  metavar='<network>',
246
245
  dest='networks',
247
246
  action='append',
248
- help=self.enhance_help_neutron(
249
- _(
250
- "List only floating IP(s) with the specified network "
251
- "(name or ID) "
252
- "(repeat option to fiter on multiple networks)"
253
- )
247
+ help=_(
248
+ "List only floating IP(s) with the specified network "
249
+ "(name or ID) "
250
+ "(repeat option to fiter on multiple networks)"
254
251
  ),
255
252
  )
256
253
  parser.add_argument(
@@ -258,53 +255,42 @@ class ListFloatingIP(common.NetworkAndComputeLister):
258
255
  metavar='<port>',
259
256
  dest='ports',
260
257
  action='append',
261
- help=self.enhance_help_neutron(
262
- _(
263
- "List only floating IP(s) with the specified port "
264
- "(name or ID) "
265
- "(repeat option to fiter on multiple ports)"
266
- )
258
+ help=_(
259
+ "List only floating IP(s) with the specified port "
260
+ "(name or ID) "
261
+ "(repeat option to fiter on multiple ports)"
267
262
  ),
268
263
  )
269
264
  parser.add_argument(
270
265
  '--fixed-ip-address',
271
266
  metavar='<ip-address>',
272
- help=self.enhance_help_neutron(
273
- _(
274
- "List only floating IP(s) with the specified fixed IP "
275
- "address"
276
- )
267
+ help=_(
268
+ "List only floating IP(s) with the specified fixed IP address"
277
269
  ),
278
270
  )
279
271
  parser.add_argument(
280
272
  '--floating-ip-address',
281
273
  metavar='<ip-address>',
282
- help=self.enhance_help_neutron(
283
- _(
284
- "List only floating IP(s) with the specified floating IP "
285
- "address"
286
- )
274
+ help=_(
275
+ "List only floating IP(s) with the specified floating IP "
276
+ "address"
287
277
  ),
288
278
  )
289
279
  parser.add_argument(
290
280
  '--status',
291
281
  metavar='<status>',
292
282
  choices=['ACTIVE', 'DOWN'],
293
- help=self.enhance_help_neutron(
294
- _(
295
- "List only floating IP(s) with the specified status "
296
- "('ACTIVE', 'DOWN')"
297
- )
283
+ help=_(
284
+ "List only floating IP(s) with the specified status "
285
+ "('ACTIVE', 'DOWN')"
298
286
  ),
299
287
  )
300
288
  parser.add_argument(
301
289
  '--project',
302
290
  metavar='<project>',
303
- help=self.enhance_help_neutron(
304
- _(
305
- "List only floating IP(s) with the specified project "
306
- "(name or ID)"
307
- )
291
+ help=_(
292
+ "List only floating IP(s) with the specified project "
293
+ "(name or ID)"
308
294
  ),
309
295
  )
310
296
  identity_common.add_project_domain_option_to_parser(parser)
@@ -313,29 +299,25 @@ class ListFloatingIP(common.NetworkAndComputeLister):
313
299
  metavar='<router>',
314
300
  dest='routers',
315
301
  action='append',
316
- help=self.enhance_help_neutron(
317
- _(
318
- "List only floating IP(s) with the specified router "
319
- "(name or ID) "
320
- "(repeat option to fiter on multiple routers)"
321
- )
302
+ help=_(
303
+ "List only floating IP(s) with the specified router "
304
+ "(name or ID) "
305
+ "(repeat option to fiter on multiple routers)"
322
306
  ),
323
307
  )
324
- _tag.add_tag_filtering_option_to_parser(
325
- parser, _('floating IP'), enhance_help=self.enhance_help_neutron
326
- )
308
+ _tag.add_tag_filtering_option_to_parser(parser, _('floating IP'))
327
309
  parser.add_argument(
328
310
  '--long',
329
311
  action='store_true',
330
312
  default=False,
331
- help=self.enhance_help_neutron(
332
- _("List additional fields in output")
333
- ),
313
+ help=_("List additional fields in output"),
334
314
  )
335
-
315
+ pagination.add_marker_pagination_option_to_parser(parser)
336
316
  return parser
337
317
 
338
- def take_action_network(self, client, parsed_args):
318
+ def take_action(
319
+ self, parsed_args: argparse.Namespace
320
+ ) -> tuple[Sequence[str], Iterable[Any]]:
339
321
  network_client = self.app.client_manager.network
340
322
  identity_client = self.app.client_manager.identity
341
323
 
@@ -418,11 +400,17 @@ class ListFloatingIP(common.NetworkAndComputeLister):
418
400
  ).id
419
401
  router_ids.append(router_id)
420
402
  query['router_id'] = router_ids
403
+ if parsed_args.marker is not None:
404
+ query['marker'] = parsed_args.marker
405
+ if parsed_args.limit is not None:
406
+ query['limit'] = parsed_args.limit
407
+ if parsed_args.max_items is not None:
408
+ query['max_items'] = parsed_args.max_items
421
409
 
422
410
  _tag.get_tag_filtering_args(parsed_args, query)
423
411
 
424
412
  try:
425
- data = list(client.ips(**query))
413
+ data = list(network_client.ips(**query))
426
414
  except sdk_exceptions.NotFoundException:
427
415
  data = []
428
416
 
@@ -438,40 +426,11 @@ class ListFloatingIP(common.NetworkAndComputeLister):
438
426
  ),
439
427
  )
440
428
 
441
- def take_action_compute(self, client, parsed_args):
442
- columns: tuple[str, ...] = (
443
- 'ID',
444
- 'IP',
445
- 'Fixed IP',
446
- 'Instance ID',
447
- 'Pool',
448
- )
449
- headers: tuple[str, ...] = (
450
- 'ID',
451
- 'Floating IP Address',
452
- 'Fixed IP Address',
453
- 'Server',
454
- 'Pool',
455
- )
456
-
457
- objs = compute_v2.list_floating_ips(client)
458
- return (
459
- headers,
460
- (
461
- utils.get_dict_properties(
462
- s,
463
- columns,
464
- formatters={},
465
- )
466
- for s in objs
467
- ),
468
- )
469
-
470
429
 
471
430
  class SetFloatingIP(common.NeutronCommandWithExtraArgs):
472
431
  _description = _("Set floating IP Properties")
473
432
 
474
- def get_parser(self, prog_name):
433
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
475
434
  parser = super().get_parser(prog_name)
476
435
  parser.add_argument(
477
436
  'floating_ip',
@@ -512,13 +471,15 @@ class SetFloatingIP(common.NeutronCommandWithExtraArgs):
512
471
 
513
472
  return parser
514
473
 
515
- def take_action(self, parsed_args):
474
+ def take_action(self, parsed_args: argparse.Namespace) -> None:
516
475
  client = self.app.client_manager.network
517
- attrs = {}
518
476
  obj = client.find_ip(
519
477
  parsed_args.floating_ip,
520
478
  ignore_missing=False,
521
479
  )
480
+
481
+ attrs: dict[str, Any] = {}
482
+
522
483
  if parsed_args.port:
523
484
  port = client.find_port(parsed_args.port, ignore_missing=False)
524
485
  attrs['port_id'] = port.id
@@ -548,10 +509,11 @@ class SetFloatingIP(common.NeutronCommandWithExtraArgs):
548
509
  _tag.update_tags_for_set(client, obj, parsed_args)
549
510
 
550
511
 
551
- class ShowFloatingIP(common.NetworkAndComputeShowOne):
512
+ class ShowFloatingIP(command.ShowOne):
552
513
  _description = _("Display floating IP details")
553
514
 
554
- def update_parser_common(self, parser):
515
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
516
+ parser = super().get_parser(prog_name)
555
517
  parser.add_argument(
556
518
  'floating_ip',
557
519
  metavar="<floating-ip>",
@@ -559,7 +521,10 @@ class ShowFloatingIP(common.NetworkAndComputeShowOne):
559
521
  )
560
522
  return parser
561
523
 
562
- def take_action_network(self, client, parsed_args):
524
+ def take_action(
525
+ self, parsed_args: argparse.Namespace
526
+ ) -> tuple[Sequence[str], Iterable[Any]]:
527
+ client = self.app.client_manager.network
563
528
  obj = client.find_ip(
564
529
  parsed_args.floating_ip,
565
530
  ignore_missing=False,
@@ -568,17 +533,11 @@ class ShowFloatingIP(common.NetworkAndComputeShowOne):
568
533
  data = utils.get_item_properties(obj, columns, formatters=_formatters)
569
534
  return (display_columns, data)
570
535
 
571
- def take_action_compute(self, client, parsed_args):
572
- obj = compute_v2.get_floating_ip(client, parsed_args.floating_ip)
573
- columns = _get_columns(obj)
574
- data = utils.get_dict_properties(obj, columns)
575
- return (columns, data)
576
-
577
536
 
578
537
  class UnsetFloatingIP(common.NeutronCommandWithExtraArgs):
579
538
  _description = _("Unset floating IP Properties")
580
539
 
581
- def get_parser(self, prog_name):
540
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
582
541
  parser = super().get_parser(prog_name)
583
542
  parser.add_argument(
584
543
  'floating_ip',
@@ -601,7 +560,7 @@ class UnsetFloatingIP(common.NeutronCommandWithExtraArgs):
601
560
 
602
561
  return parser
603
562
 
604
- def take_action(self, parsed_args):
563
+ def take_action(self, parsed_args: argparse.Namespace) -> None:
605
564
  client = self.app.client_manager.network
606
565
  obj = client.find_ip(
607
566
  parsed_args.floating_ip,