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.
Files changed (284) 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 +58 -42
  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 +14 -6
  14. openstackclient/common/pagination.py +8 -2
  15. openstackclient/common/progressbar.py +7 -6
  16. openstackclient/common/project_cleanup.py +13 -7
  17. openstackclient/common/quota.py +97 -99
  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 +39 -21
  25. openstackclient/compute/v2/host.py +14 -6
  26. openstackclient/compute/v2/hypervisor.py +14 -5
  27. openstackclient/compute/v2/hypervisor_stats.py +10 -2
  28. openstackclient/compute/v2/keypair.py +29 -14
  29. openstackclient/compute/v2/server.py +249 -169
  30. openstackclient/compute/v2/server_backup.py +10 -4
  31. openstackclient/compute/v2/server_event.py +21 -12
  32. openstackclient/compute/v2/server_group.py +21 -11
  33. openstackclient/compute/v2/server_image.py +19 -10
  34. openstackclient/compute/v2/server_migration.py +24 -10
  35. openstackclient/compute/v2/server_share.py +274 -0
  36. openstackclient/compute/v2/server_volume.py +10 -4
  37. openstackclient/compute/v2/service.py +14 -7
  38. openstackclient/compute/v2/usage.py +26 -21
  39. openstackclient/identity/client.py +8 -3
  40. openstackclient/identity/common.py +78 -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 +26 -12
  51. openstackclient/identity/v3/application_credential.py +59 -24
  52. openstackclient/identity/v3/catalog.py +14 -7
  53. openstackclient/identity/v3/consumer.py +22 -11
  54. openstackclient/identity/v3/credential.py +36 -16
  55. openstackclient/identity/v3/domain.py +37 -18
  56. openstackclient/identity/v3/ec2creds.py +25 -12
  57. openstackclient/identity/v3/endpoint.py +42 -20
  58. openstackclient/identity/v3/endpoint_group.py +28 -17
  59. openstackclient/identity/v3/federation_protocol.py +38 -16
  60. openstackclient/identity/v3/group.py +55 -32
  61. openstackclient/identity/v3/identity_provider.py +92 -57
  62. openstackclient/identity/v3/implied_role.py +21 -9
  63. openstackclient/identity/v3/limit.py +38 -16
  64. openstackclient/identity/v3/mapping.py +26 -13
  65. openstackclient/identity/v3/policy.py +23 -12
  66. openstackclient/identity/v3/project.py +43 -23
  67. openstackclient/identity/v3/region.py +36 -16
  68. openstackclient/identity/v3/registered_limit.py +40 -16
  69. openstackclient/identity/v3/role.py +61 -31
  70. openstackclient/identity/v3/role_assignment.py +23 -6
  71. openstackclient/identity/v3/service.py +36 -16
  72. openstackclient/identity/v3/service_provider.py +37 -15
  73. openstackclient/identity/v3/tag.py +23 -6
  74. openstackclient/identity/v3/token.py +30 -14
  75. openstackclient/identity/v3/trust.py +32 -14
  76. openstackclient/identity/v3/unscoped_saml.py +10 -2
  77. openstackclient/identity/v3/user.py +49 -26
  78. openstackclient/image/client.py +7 -3
  79. openstackclient/image/v1/image.py +33 -26
  80. openstackclient/image/v2/cache.py +14 -9
  81. openstackclient/image/v2/image.py +74 -48
  82. openstackclient/image/v2/info.py +7 -1
  83. openstackclient/image/v2/metadef_namespaces.py +109 -13
  84. openstackclient/image/v2/metadef_objects.py +28 -15
  85. openstackclient/image/v2/metadef_properties.py +24 -13
  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 +15 -6
  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 +36 -22
  93. openstackclient/network/v2/address_group.py +27 -16
  94. openstackclient/network/v2/address_scope.py +24 -13
  95. openstackclient/network/v2/bgpvpn/bgpvpn.py +463 -0
  96. openstackclient/network/v2/bgpvpn/constants.py +30 -0
  97. openstackclient/network/v2/bgpvpn/network_association.py +214 -0
  98. openstackclient/network/v2/bgpvpn/port_association.py +490 -0
  99. openstackclient/network/v2/bgpvpn/router_association.py +288 -0
  100. openstackclient/network/v2/default_security_group_rule.py +19 -10
  101. openstackclient/network/v2/floating_ip.py +110 -159
  102. openstackclient/network/v2/floating_ip_port_forwarding.py +30 -18
  103. openstackclient/network/v2/fwaas/__init__.py +0 -0
  104. openstackclient/network/v2/fwaas/group.py +466 -0
  105. openstackclient/network/v2/fwaas/policy.py +518 -0
  106. openstackclient/network/v2/fwaas/rule.py +574 -0
  107. openstackclient/network/v2/ip_availability.py +13 -5
  108. openstackclient/network/v2/l3_conntrack_helper.py +22 -13
  109. openstackclient/network/v2/local_ip.py +24 -13
  110. openstackclient/network/v2/local_ip_association.py +14 -7
  111. openstackclient/network/v2/ndp_proxy.py +20 -11
  112. openstackclient/network/v2/network.py +129 -196
  113. openstackclient/network/v2/network_agent.py +46 -25
  114. openstackclient/network/v2/network_auto_allocated_topology.py +22 -11
  115. openstackclient/network/v2/network_flavor.py +27 -16
  116. openstackclient/network/v2/network_flavor_profile.py +23 -12
  117. openstackclient/network/v2/network_meter.py +21 -10
  118. openstackclient/network/v2/network_meter_rule.py +21 -11
  119. openstackclient/network/v2/network_qos_policy.py +25 -15
  120. openstackclient/network/v2/network_qos_rule.py +32 -17
  121. openstackclient/network/v2/network_qos_rule_type.py +13 -5
  122. openstackclient/network/v2/network_rbac.py +23 -12
  123. openstackclient/network/v2/network_segment.py +20 -11
  124. openstackclient/network/v2/network_segment_range.py +56 -29
  125. openstackclient/network/v2/network_service_provider.py +7 -1
  126. openstackclient/network/v2/network_trunk.py +38 -22
  127. openstackclient/network/v2/port.py +54 -29
  128. openstackclient/network/v2/router.py +75 -52
  129. openstackclient/network/v2/security_group.py +87 -157
  130. openstackclient/network/v2/security_group_rule.py +100 -280
  131. openstackclient/network/v2/subnet.py +49 -28
  132. openstackclient/network/v2/subnet_pool.py +30 -17
  133. openstackclient/network/v2/taas/tap_flow.py +22 -11
  134. openstackclient/network/v2/taas/tap_mirror.py +22 -11
  135. openstackclient/network/v2/taas/tap_service.py +23 -12
  136. openstackclient/object/client.py +7 -2
  137. openstackclient/object/v1/account.py +13 -6
  138. openstackclient/object/v1/container.py +25 -15
  139. openstackclient/object/v1/object.py +25 -15
  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 +25 -19
  151. openstackclient/tests/functional/identity/v3/test_group.py +20 -20
  152. openstackclient/tests/functional/identity/v3/test_idp.py +3 -1
  153. openstackclient/tests/functional/identity/v3/test_project.py +10 -10
  154. openstackclient/tests/functional/identity/v3/test_role.py +18 -18
  155. openstackclient/tests/functional/identity/v3/test_role_assignment.py +12 -12
  156. openstackclient/tests/functional/identity/v3/test_user.py +8 -8
  157. openstackclient/tests/functional/image/base.py +1 -6
  158. openstackclient/tests/functional/network/v2/common.py +5 -2
  159. openstackclient/tests/functional/network/v2/test_floating_ip.py +10 -4
  160. openstackclient/tests/functional/network/v2/test_ip_availability.py +4 -0
  161. openstackclient/tests/functional/network/v2/test_network_meter_rule.py +3 -2
  162. openstackclient/tests/functional/network/v2/test_network_segment.py +5 -0
  163. openstackclient/tests/functional/network/v2/test_subnet.py +13 -9
  164. openstackclient/tests/functional/object/v1/common.py +4 -0
  165. openstackclient/tests/functional/volume/v2/common.py +4 -0
  166. openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +27 -11
  167. openstackclient/tests/functional/volume/v2/test_volume_type.py +2 -2
  168. openstackclient/tests/functional/volume/v3/common.py +4 -0
  169. openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +11 -7
  170. openstackclient/tests/functional/volume/v3/test_volume_type.py +2 -2
  171. openstackclient/tests/unit/common/test_availability_zone.py +35 -49
  172. openstackclient/tests/unit/common/test_extension.py +2 -2
  173. openstackclient/tests/unit/common/test_module.py +12 -7
  174. openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
  175. openstackclient/tests/unit/common/test_quota.py +6 -26
  176. openstackclient/tests/unit/compute/v2/fakes.py +25 -0
  177. openstackclient/tests/unit/compute/v2/test_flavor.py +28 -2
  178. openstackclient/tests/unit/compute/v2/test_keypair.py +6 -6
  179. openstackclient/tests/unit/compute/v2/test_server.py +11 -96
  180. openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
  181. openstackclient/tests/unit/identity/v3/fakes.py +3 -0
  182. openstackclient/tests/unit/identity/v3/test_group.py +4 -14
  183. openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
  184. openstackclient/tests/unit/identity/v3/test_user.py +4 -4
  185. openstackclient/tests/unit/image/v2/test_image.py +11 -11
  186. openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +105 -6
  187. openstackclient/tests/unit/network/test_common.py +0 -155
  188. openstackclient/tests/unit/network/v2/bgpvpn/__init__.py +0 -0
  189. openstackclient/tests/unit/network/v2/bgpvpn/fakes.py +179 -0
  190. openstackclient/tests/unit/network/v2/bgpvpn/test_bgpvpn.py +584 -0
  191. openstackclient/tests/unit/network/v2/bgpvpn/test_network_association.py +285 -0
  192. openstackclient/tests/unit/network/v2/bgpvpn/test_port_association.py +384 -0
  193. openstackclient/tests/unit/network/v2/bgpvpn/test_router_association.py +297 -0
  194. openstackclient/tests/unit/network/v2/fwaas/__init__.py +0 -0
  195. openstackclient/tests/unit/network/v2/fwaas/test_group.py +897 -0
  196. openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
  197. openstackclient/tests/unit/network/v2/fwaas/test_rule.py +980 -0
  198. openstackclient/tests/unit/network/v2/taas/{test_osc_tap_flow.py → test_tap_flow.py} +18 -25
  199. openstackclient/tests/unit/network/v2/taas/{test_osc_tap_mirror.py → test_tap_mirror.py} +19 -29
  200. openstackclient/tests/unit/network/v2/taas/{test_osc_tap_service.py → test_tap_service.py} +19 -29
  201. openstackclient/tests/unit/network/v2/test_address_group.py +2 -2
  202. openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +3 -2
  203. openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +13 -13
  204. openstackclient/tests/unit/network/v2/test_network_agent.py +8 -4
  205. openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
  206. openstackclient/tests/unit/network/v2/test_network_flavor.py +2 -2
  207. openstackclient/tests/unit/network/v2/test_network_qos_policy.py +1 -1
  208. openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
  209. openstackclient/tests/unit/network/v2/test_network_rbac.py +1 -1
  210. openstackclient/tests/unit/network/v2/test_network_segment.py +1 -1
  211. openstackclient/tests/unit/network/v2/test_network_segment_range.py +7 -10
  212. openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
  213. openstackclient/tests/unit/network/v2/test_router.py +8 -9
  214. openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +1 -20
  215. openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +7 -41
  216. openstackclient/tests/unit/network/v2/test_subnet.py +2 -1
  217. openstackclient/tests/unit/network/v2/test_subnet_pool.py +2 -1
  218. openstackclient/tests/unit/object/v1/fakes.py +8 -7
  219. openstackclient/tests/unit/object/v1/test_container.py +65 -101
  220. openstackclient/tests/unit/object/v1/test_container_all.py +8 -1
  221. openstackclient/tests/unit/object/v1/test_object.py +44 -84
  222. openstackclient/tests/unit/object/v1/test_object_all.py +8 -1
  223. openstackclient/tests/unit/test_hacking.py +108 -0
  224. openstackclient/tests/unit/volume/v2/fakes.py +1 -0
  225. openstackclient/tests/unit/volume/v2/test_volume_backup.py +1 -5
  226. openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +2 -1
  227. openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
  228. openstackclient/tests/unit/volume/v3/fakes.py +1 -0
  229. openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
  230. openstackclient/tests/unit/volume/v3/test_volume_attachment.py +1 -1
  231. openstackclient/tests/unit/volume/v3/test_volume_backup.py +1 -5
  232. openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +55 -1
  233. openstackclient/tests/unit/volume/v3/test_volume_type.py +2 -4
  234. openstackclient/volume/client.py +7 -3
  235. openstackclient/volume/v2/backup_record.py +15 -6
  236. openstackclient/volume/v2/consistency_group.py +29 -17
  237. openstackclient/volume/v2/consistency_group_snapshot.py +25 -10
  238. openstackclient/volume/v2/qos_specs.py +28 -17
  239. openstackclient/volume/v2/service.py +17 -6
  240. openstackclient/volume/v2/volume.py +57 -29
  241. openstackclient/volume/v2/volume_backend.py +19 -6
  242. openstackclient/volume/v2/volume_backup.py +46 -20
  243. openstackclient/volume/v2/volume_host.py +6 -4
  244. openstackclient/volume/v2/volume_snapshot.py +50 -24
  245. openstackclient/volume/v2/volume_transfer_request.py +31 -13
  246. openstackclient/volume/v2/volume_type.py +43 -24
  247. openstackclient/volume/v3/block_storage_cleanup.py +11 -3
  248. openstackclient/volume/v3/block_storage_cluster.py +19 -7
  249. openstackclient/volume/v3/block_storage_log_level.py +15 -6
  250. openstackclient/volume/v3/block_storage_manage.py +10 -4
  251. openstackclient/volume/v3/block_storage_resource_filter.py +17 -5
  252. openstackclient/volume/v3/service.py +16 -6
  253. openstackclient/volume/v3/volume.py +89 -39
  254. openstackclient/volume/v3/volume_attachment.py +43 -21
  255. openstackclient/volume/v3/volume_backup.py +53 -24
  256. openstackclient/volume/v3/volume_group.py +23 -13
  257. openstackclient/volume/v3/volume_group_snapshot.py +32 -13
  258. openstackclient/volume/v3/volume_group_type.py +26 -13
  259. openstackclient/volume/v3/volume_message.py +15 -7
  260. openstackclient/volume/v3/volume_snapshot.py +69 -32
  261. openstackclient/volume/v3/volume_transfer_request.py +31 -13
  262. openstackclient/volume/v3/volume_type.py +42 -24
  263. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/METADATA +6 -6
  264. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/RECORD +271 -260
  265. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/WHEEL +1 -1
  266. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/entry_points.txt +53 -1
  267. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/AUTHORS +4 -0
  268. python_openstackclient-10.0.0.dist-info/pbr.json +1 -0
  269. openstackclient/api/image_v1.py +0 -69
  270. openstackclient/api/image_v2.py +0 -79
  271. openstackclient/network/v2/floating_ip_pool.py +0 -38
  272. openstackclient/tests/functional/image/v1/test_image.py +0 -97
  273. openstackclient/tests/unit/api/test_image_v1.py +0 -96
  274. openstackclient/tests/unit/api/test_image_v2.py +0 -96
  275. openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +0 -248
  276. openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +0 -49
  277. openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +0 -39
  278. openstackclient/tests/unit/network/v2/test_network_compute.py +0 -404
  279. openstackclient/tests/unit/network/v2/test_security_group_compute.py +0 -392
  280. openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +0 -555
  281. python_openstackclient-9.0.0.dist-info/pbr.json +0 -1
  282. /openstackclient/{tests/functional/image/v1 → network/v2/bgpvpn}/__init__.py +0 -0
  283. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/LICENSE +0 -0
  284. {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@ msgid ""
3
3
  msgstr ""
4
4
  "Project-Id-Version: python-openstackclient VERSION\n"
5
5
  "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
6
- "POT-Creation-Date: 2025-04-01 18:07+0000\n"
6
+ "POT-Creation-Date: 2026-04-15 02:22+0000\n"
7
7
  "MIME-Version: 1.0\n"
8
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
9
  "Content-Transfer-Encoding: 8bit\n"
@@ -1005,9 +1005,6 @@ msgstr "Politika(ları/yı) sil"
1005
1005
  msgid "Delete port(s)"
1006
1006
  msgstr "Bağlantı noktalarını sil"
1007
1007
 
1008
- msgid "Delete project(s)"
1009
- msgstr "Proje(yi/leri) sil"
1010
-
1011
1008
  msgid "Delete public or private key(s)"
1012
1009
  msgstr "Genel veya özel anahtarları sil"
1013
1010
 
@@ -2019,10 +2016,6 @@ msgstr "Bu disk bölümü türü için şifreleme bilgisini ayarlama başarısı
2019
2016
  msgid "Failed to set flavor access to project: %s"
2020
2017
  msgstr "Projeye flavor erişiminin ayarlanması başarısız: %s"
2021
2018
 
2022
- #, python-format
2023
- msgid "Failed to set image property: %s"
2024
- msgstr "İmaj özelliği ayarlarken hata oluştu: %s"
2025
-
2026
2019
  #, python-format
2027
2020
  msgid "Failed to set snapshot property: %s"
2028
2021
  msgstr "Anlık görüntü özelliğini ayarlama başarısız: %s"
@@ -2035,10 +2028,6 @@ msgstr "Anlık görüntü durumunu ayarlama başarısız: %s"
2035
2028
  msgid "Failed to set volume bootable property: %s"
2036
2029
  msgstr "Disk bölümü ön yükleme özelliği ayarlanırken hata oluştu: %s"
2037
2030
 
2038
- #, python-format
2039
- msgid "Failed to set volume property: %s"
2040
- msgstr "Disk özelliklerini ayarlama işlemi başarısız: %s"
2041
-
2042
2031
  #, python-format
2043
2032
  msgid "Failed to set volume read-only access mode flag: %s"
2044
2033
  msgstr "Disk bölümü salt okunur erişim kipi bayrağı ayarlanamadı: %s"
@@ -2083,14 +2072,6 @@ msgstr ""
2083
2072
  msgid "Failed to unset flavor property: %s"
2084
2073
  msgstr "Flavor özelliğini kaldırma işlemi başarısız: %s"
2085
2074
 
2086
- #, python-format
2087
- msgid "Failed to unset image property: %s"
2088
- msgstr "İmaj özelliği ayarını kaldırma başarısız: %s"
2089
-
2090
- #, python-format
2091
- msgid "Failed to unset volume property: %s"
2092
- msgstr "Disk bölümü özelliği ayarlarını kaldırma başarısız: %s"
2093
-
2094
2075
  #, python-format
2095
2076
  msgid "Failed to update snapshot name or description: %s"
2096
2077
  msgstr "Anlık görüntü adı veya açıklaması güncellenemedi: %s"
@@ -2548,14 +2529,6 @@ msgstr "EC2 kimlik bilgilerini listele"
2548
2529
  msgid "List IP availability for network"
2549
2530
  msgstr "Ağ için IP kullanılabilirliğini listele"
2550
2531
 
2551
- msgid "List IP availability of given IP version networks (default is 4)"
2552
- msgstr ""
2553
- "Verilen IP sürüm ağlarının IP kullanılabilirliğini listele (varsayılan sürüm "
2554
- "4)"
2555
-
2556
- msgid "List IP availability of given project (name or ID)"
2557
- msgstr "Verilen projenin IP kullanılabilirliğini listeleyin (isim veya ID)"
2558
-
2559
2532
  msgid "List Network QoS rules"
2560
2533
  msgstr "Ağ QoS kurallarını listele"
2561
2534
 
@@ -2583,24 +2556,6 @@ msgstr "Çıktıdaki ek alanları listele"
2583
2556
  msgid "List address scopes"
2584
2557
  msgstr "Adres kapsamlarını listele"
2585
2558
 
2586
- msgid "List address scopes according to their project (name or ID)"
2587
- msgstr "Adres kapsamlarını projelerine göre listele (ad veya kimlik)"
2588
-
2589
- msgid "List address scopes not shared between projects"
2590
- msgstr "Projeler arasında paylaşılmayan adres kapsamlarını listele"
2591
-
2592
- msgid "List address scopes of given IP version networks (4 or 6)"
2593
- msgstr "Verilen IP sürüm ağlarının adres kapsamlarını listele (4 veya 6)"
2594
-
2595
- msgid "List address scopes shared between projects"
2596
- msgstr "Projeler arasında paylaşılan adres kapsamlarını listele"
2597
-
2598
- msgid "List agents hosting a network (name or ID)"
2599
- msgstr "Bir ağa ev sahipliği yapan ajanları listele (isim veya ID)"
2600
-
2601
- msgid "List agents hosting this router (name or ID)"
2602
- msgstr "Bu yönlendiriciyi barındıran ajanları listele (isim veya ID)"
2603
-
2604
2559
  msgid "List all aggregates"
2605
2560
  msgstr "Tüm kümeleri listele"
2606
2561
 
@@ -2646,18 +2601,12 @@ msgstr "Kapları listele"
2646
2601
  msgid "List credentials"
2647
2602
  msgstr "Kimlik bilgilerini listele"
2648
2603
 
2649
- msgid "List disabled networks"
2650
- msgstr "Devre dışı bırakılan ağları listele"
2651
-
2652
2604
  msgid "List disabled routers"
2653
2605
  msgstr "Devre dışı bırakılmış yönlendiricileri listele"
2654
2606
 
2655
2607
  msgid "List domains"
2656
2608
  msgstr "Alanları listele"
2657
2609
 
2658
- msgid "List enabled networks"
2659
- msgstr "Aktif ağları listele"
2660
-
2661
2610
  msgid "List enabled routers"
2662
2611
  msgstr "Etkinleştirilmiş yönlendiricileri listele"
2663
2612
 
@@ -2676,9 +2625,6 @@ msgstr "Kimlik API için uzantıları listele"
2676
2625
  msgid "List extensions for the Network API"
2677
2626
  msgstr "Ağ API için uzantıları listele"
2678
2627
 
2679
- msgid "List external networks"
2680
- msgstr "Harici ağları listele"
2681
-
2682
2628
  msgid "List federation protocols"
2683
2629
  msgstr "Federasyon protokollerinin listele"
2684
2630
 
@@ -2688,24 +2634,6 @@ msgstr "Flavorları listele"
2688
2634
  msgid "List floating IP(s)"
2689
2635
  msgstr "Yüzen IP(ler) listesi"
2690
2636
 
2691
- msgid "List floating IP(s) according to given fixed IP address"
2692
- msgstr "Verilen sabit IP adresine göre yüzen IP(ler) listesi"
2693
-
2694
- msgid "List floating IP(s) according to given network (name or ID)"
2695
- msgstr "Verilen ağdaki yüzen IP(ler) listesi (isim veya ID)"
2696
-
2697
- msgid "List floating IP(s) according to given port (name or ID)"
2698
- msgstr "Verilen bağlantı noktasına göre yüzen IP(ler) listesi (isim veya ID)"
2699
-
2700
- msgid "List floating IP(s) according to given project (name or ID)"
2701
- msgstr "Verilen projeye göre yüzen IP(ler)i listele (isim veya ID)"
2702
-
2703
- msgid "List floating IP(s) according to given router (name or ID)"
2704
- msgstr "Verilen yönlendiriciye göre yüzen IP(ler)i listele (isim veya ID)"
2705
-
2706
- msgid "List floating IP(s) according to given status ('ACTIVE', 'DOWN')"
2707
- msgstr "Verilen duruma göre yüzen IP(ler) listesi ('AKTİF', 'KAPALI')"
2708
-
2709
2637
  msgid "List groups"
2710
2638
  msgstr "Grupları listele"
2711
2639
 
@@ -2715,9 +2643,6 @@ msgstr "Yönetici arakatman listesi"
2715
2643
  msgid "List identity providers"
2716
2644
  msgstr "Kimlik sağlayıcılarını listele"
2717
2645
 
2718
- msgid "List internal networks"
2719
- msgstr "Dahili ağları listele"
2720
-
2721
2646
  msgid "List key fingerprints"
2722
2647
  msgstr "Anahtar parmak izlerini listele"
2723
2648
 
@@ -2733,13 +2658,6 @@ msgstr "Modül sürümlerini listele"
2733
2658
  msgid "List network RBAC policies"
2734
2659
  msgstr "Ağ RBAC politikalarının listesi"
2735
2660
 
2736
- msgid ""
2737
- "List network RBAC policies according to given action (\"access_as_external\" "
2738
- "or \"access_as_shared\")"
2739
- msgstr ""
2740
- "Verilen eyleme göre ağ RBAC ilkelerini listele (\"access_as_external\" veya "
2741
- "\"access_as_shared\")"
2742
-
2743
2661
  msgid "List network agents"
2744
2662
  msgstr "Ağ ajanlarını listele"
2745
2663
 
@@ -2761,48 +2679,12 @@ msgstr "Ağ kotasını listele"
2761
2679
  msgid "List network segments"
2762
2680
  msgstr "Ağ bölümlerini listele"
2763
2681
 
2764
- msgid "List network segments that belong to this network (name or ID)"
2765
- msgstr "Bu ağa ait ağ kesimlerini listeleyin (ad veya kimlik)"
2766
-
2767
2682
  msgid "List networks"
2768
2683
  msgstr "Ağları listele"
2769
2684
 
2770
- msgid ""
2771
- "List networks according to VLAN ID for VLAN networks or Tunnel ID for GENEVE/"
2772
- "GRE/VXLAN networks"
2773
- msgstr ""
2774
- "VLAN ağları için VLAN ID'ye veya GENEVA/GRE/VXLAN ağları için Tünel ID'ye "
2775
- "göre ağları listele"
2776
-
2777
- msgid "List networks according to name of the physical network"
2778
- msgstr "Ağları fiziksel ağın adına göre listeleme"
2779
-
2780
- msgid "List networks according to their name"
2781
- msgstr "Ağları isimlerine göre listele"
2782
-
2783
- msgid "List networks according to their project (name or ID)"
2784
- msgstr "Projelerine göre ağları listele (isim veya ID)"
2785
-
2786
- msgid ""
2787
- "List networks according to their status ('ACTIVE', 'BUILD', 'DOWN', 'ERROR')"
2788
- msgstr ""
2789
- "Ağları durumlarına göre listeleyin ('AKTİF', 'KURMA', 'KAPALI', 'HATA')"
2790
-
2791
- msgid "List networks hosted by agent (ID only)"
2792
- msgstr "Aracı tarafından barındırılan ağları listele (yalnızca ID)"
2793
-
2794
- msgid "List networks not shared between projects"
2795
- msgstr "Projeler arasında paylaşılmayan ağları listele"
2796
-
2797
- msgid "List networks shared between projects"
2798
- msgstr "Projeler arasında paylaşılan ağları listele"
2799
-
2800
2685
  msgid "List objects"
2801
2686
  msgstr "Nesneleri listele"
2802
2687
 
2803
- msgid "List only address scopes of given name in output"
2804
- msgstr "Çıktıda verilen adın sadece adres kapsamlarını listeleyin"
2805
-
2806
2688
  msgid "List only agents running on the specified host"
2807
2689
  msgstr "Yalnızca belirtilen ana bilgisayarda çalışan ajanları listele"
2808
2690
 
@@ -2825,9 +2707,6 @@ msgstr ""
2825
2707
  "Yalnızca belirtilen aygıt sahibi olan bağlantı noktalarını listeleyin. Bu, "
2826
2708
  "bağlantı noktasını kullanan varlıktır (örneğin, ağ: dhcp)."
2827
2709
 
2828
- msgid "List only ports with this MAC address"
2829
- msgstr "Sadece bu MAC adresine sahip bağlantı noktalarını listele"
2830
-
2831
2710
  msgid "List only private flavors"
2832
2711
  msgstr "Sadece gizli flavorları listele"
2833
2712
 
@@ -2849,29 +2728,6 @@ msgstr "Sadece genele açık türleri listele"
2849
2728
  msgid "List only specified service (name only)"
2850
2729
  msgstr "Sadece belirtilen servisleri listele (sadece isim)"
2851
2730
 
2852
- msgid "List only subnet pools of given address scope in output (name or ID)"
2853
- msgstr ""
2854
- "Verilen adres kapsamındaki sadece altağ havuzlarını çıktıda listele (isim "
2855
- "veya ID)"
2856
-
2857
- msgid "List only subnet pools of given name in output"
2858
- msgstr "Verilen isimdeki sadece altağ havuzlarını çıktıda listele"
2859
-
2860
- msgid "List only subnets of given gateway IP in output"
2861
- msgstr "Verilen geçit IP'sinin sadece alt ağlarını çıktıda listele"
2862
-
2863
- msgid "List only subnets of given name in output"
2864
- msgstr "Verilen isimdeki sadece altağları çıktıda listele"
2865
-
2866
- msgid ""
2867
- "List only subnets which belong to a given network in output (name or ID)"
2868
- msgstr "Verilen bir ağa ait sadece altağları çıktıda listele (isim veya ID)"
2869
-
2870
- msgid ""
2871
- "List only subnets which belong to a given project in output (name or ID)"
2872
- msgstr ""
2873
- "Verilen bir projeye ait sadece altağları çıktıda listele (isim veya ID)"
2874
-
2875
2731
  msgid "List policies"
2876
2732
  msgstr "Politikaları listele"
2877
2733
 
@@ -2881,9 +2737,6 @@ msgstr "Yüzer IP adresleri havuzlarını listele"
2881
2737
  msgid "List ports"
2882
2738
  msgstr "Bağlantı noktalarını listele"
2883
2739
 
2884
- msgid "List ports according to their project (name or ID)"
2885
- msgstr "Projeye bağlı olarak bağlantı noktalarını listele (isim veya ID)"
2886
-
2887
2740
  msgid "List projects"
2888
2741
  msgstr "Projeleri listele"
2889
2742
 
@@ -2913,27 +2766,12 @@ msgstr "Yönlendiricilerin listesi"
2913
2766
  msgid "List routers according to their name"
2914
2767
  msgstr "Yönlendiricileri isimlerine göre listele"
2915
2768
 
2916
- msgid "List routers according to their project (name or ID)"
2917
- msgstr "Yönlendiricileri projelerine göre listele (isim veya ID)"
2918
-
2919
- msgid "List routers hosted by an agent (ID only)"
2920
- msgstr "Bir ajan tarafından sunulan yönlendiricileri listele (sadece ID)"
2921
-
2922
- msgid "List rules applied to incoming network traffic"
2923
- msgstr "Gelen ağ trafiğine uygulanan kurallar listesi"
2924
-
2925
- msgid "List rules applied to outgoing network traffic"
2926
- msgstr "Giden ağ trafiğine uygulanan kuralları listele"
2927
-
2928
2769
  msgid "List security group rules"
2929
2770
  msgstr "Güvenlik grubu kurallarını listele"
2930
2771
 
2931
2772
  msgid "List security groups"
2932
2773
  msgstr "Güvenlik gruplarını listele"
2933
2774
 
2934
- msgid "List security groups according to the project (name or ID)"
2935
- msgstr "Projeye göre güvenlik grubunu listele (isim veya ID)"
2936
-
2937
2775
  msgid "List servers"
2938
2776
  msgstr "Sunucuları listele"
2939
2777
 
@@ -2955,32 +2793,9 @@ msgstr "Belirtilen sunucu üzerindeki servisleri listele (sadece isim)"
2955
2793
  msgid "List subnet pools"
2956
2794
  msgstr "Altağ havuzlarını listele"
2957
2795
 
2958
- msgid "List subnet pools according to their project (name or ID)"
2959
- msgstr "Alt ağ havuzlarını projelerine göre listele (isim veya ID)"
2960
-
2961
- msgid "List subnet pools not shared between projects"
2962
- msgstr "Projeler arasında paylaşılmayan altağ havularını listele"
2963
-
2964
- msgid "List subnet pools not used as the default external subnet pool"
2965
- msgstr ""
2966
- "Varsayılan harici altağ havuzu olarak kullanılmayan altağ havuzlarını listele"
2967
-
2968
- msgid "List subnet pools shared between projects"
2969
- msgstr "Projeler arasında paylaşılan altağ havuzlarını listele"
2970
-
2971
- msgid "List subnet pools used as the default external subnet pool"
2972
- msgstr ""
2973
- "Varsayılan harici altağ havuzu olarak kullanılan altağ havuzlarını listele"
2974
-
2975
2796
  msgid "List subnets"
2976
2797
  msgstr "Alt ağları listele"
2977
2798
 
2978
- msgid "List subnets which have DHCP disabled"
2979
- msgstr "DHCP'nin devre dışı olduğu altağları listele"
2980
-
2981
- msgid "List subnets which have DHCP enabled"
2982
- msgstr "DHCP'nin etkin olduğu altağları listele"
2983
-
2984
2799
  msgid "List the default volume type"
2985
2800
  msgstr "Varsayılan disk bölümü türünü listele"
2986
2801
 
@@ -4643,8 +4458,8 @@ msgstr "Ağı varsayılan dış ağ olarak ayarlayın"
4643
4458
 
4644
4459
  msgid ""
4645
4460
  "Set the notional service where the encryption is performed (\"front-end\" or "
4646
- "\"back-end\") (admin only) (The default value for this option is \"front-end"
4647
- "\" when setting encryption type of a volume for the first time. Consider "
4461
+ "\"back-end\") (admin only) (The default value for this option is \"front-"
4462
+ "end\" when setting encryption type of a volume for the first time. Consider "
4648
4463
  "using other encryption options such as: \"--encryption-cipher\", \"--"
4649
4464
  "encryption-key-size\" and \"--encryption-provider\")"
4650
4465
  msgstr ""
@@ -4656,10 +4471,10 @@ msgstr ""
4656
4471
 
4657
4472
  msgid ""
4658
4473
  "Set the notional service where the encryption is performed (\"front-end\" or "
4659
- "\"back-end\") (admin only) (The default value for this option is \"front-end"
4660
- "\" when setting encryption type of a volume. Consider using other encryption "
4661
- "options such as: \"--encryption-cipher\", \"--encryption-key-size\" and \"--"
4662
- "encryption-provider\")"
4474
+ "\"back-end\") (admin only) (The default value for this option is \"front-"
4475
+ "end\" when setting encryption type of a volume. Consider using other "
4476
+ "encryption options such as: \"--encryption-cipher\", \"--encryption-key-"
4477
+ "size\" and \"--encryption-provider\")"
4663
4478
  msgstr ""
4664
4479
  "Şifrelemenin gerçekleştirildiği kavramsal servisi ayarla (\"front-end\" veya "
4665
4480
  "\"back-end\") (sadece yönetici) (Bir disk bölümünün şifreleme türü "
@@ -10,7 +10,9 @@
10
10
  # License for the specific language governing permissions and limitations
11
11
  # under the License.
12
12
 
13
+ import argparse
13
14
  import logging
15
+ from typing import Any
14
16
 
15
17
  from osc_lib import utils
16
18
 
@@ -23,9 +25,10 @@ DEFAULT_API_VERSION = '2.0'
23
25
  API_VERSION_OPTION = 'os_network_api_version'
24
26
  API_NAME = 'network'
25
27
  API_VERSIONS = ('2.0', '2')
28
+ API_EXTENSIONS = ('bgpvpn', 'fwaas', 'taas')
26
29
 
27
30
 
28
- def make_client(instance):
31
+ def make_client(instance: Any) -> Any:
29
32
  """Returns a network proxy"""
30
33
  LOG.debug(
31
34
  'Network client initialized using OpenStack SDK: %s',
@@ -34,7 +37,9 @@ def make_client(instance):
34
37
  return instance.sdk_connection.network
35
38
 
36
39
 
37
- def build_option_parser(parser):
40
+ def build_option_parser(
41
+ parser: argparse.ArgumentParser,
42
+ ) -> argparse.ArgumentParser:
38
43
  """Hook to add global options"""
39
44
  parser.add_argument(
40
45
  '--os-network-api-version',
@@ -11,12 +11,12 @@
11
11
  # under the License.
12
12
  #
13
13
 
14
- import abc
14
+ import argparse
15
+ from collections.abc import Generator
15
16
  import contextlib
16
17
  import logging
17
- import typing as ty
18
+ from typing import Any
18
19
 
19
- from cliff import _argparse
20
20
  import openstack.exceptions
21
21
  from osc_lib.cli import parseractions
22
22
  from osc_lib import exceptions
@@ -37,13 +37,11 @@ _required_opt_extensions_map = {
37
37
  'security_groups': 'security-groups',
38
38
  }
39
39
 
40
- _NET_TYPE_NEUTRON = 'neutron'
41
- _NET_TYPE_COMPUTE = 'nova-network'
42
- _QUALIFIER_FMT = "%s\n\n*%s*"
43
-
44
40
 
45
41
  @contextlib.contextmanager
46
- def check_missing_extension_if_error(client_manager, attrs):
42
+ def check_missing_extension_if_error(
43
+ client_manager: Any, attrs: dict[str, Any]
44
+ ) -> Generator[None, None, None]:
47
45
  # If specified option requires extension, then try to
48
46
  # find out if it exists. If it does not exist,
49
47
  # then an exception with the appropriate message
@@ -57,233 +55,6 @@ def check_missing_extension_if_error(client_manager, attrs):
57
55
  raise
58
56
 
59
57
 
60
- class NetDetectionMixin(metaclass=abc.ABCMeta):
61
- """Convenience methods for nova-network vs. neutron decisions.
62
-
63
- A live environment detects which network type it is running and creates its
64
- parser with only the options relevant to that network type.
65
-
66
- But the command classes are used for docs builds as well, and docs must
67
- present the options for both network types, often qualified accordingly.
68
- """
69
-
70
- @property
71
- def _network_type(self):
72
- """Discover whether the running cloud is using neutron or nova-network.
73
-
74
- :return:
75
- * ``NET_TYPE_NEUTRON`` if neutron is detected
76
- * ``NET_TYPE_COMPUTE`` if running in a cloud but neutron is not
77
- detected.
78
- * ``None`` if not running in a cloud, which hopefully means we're
79
- building docs.
80
- """
81
- # Have we set it up yet for this command?
82
- if not hasattr(self, '_net_type'):
83
- try:
84
- if self.app.client_manager.is_network_endpoint_enabled(): # type: ignore
85
- net_type = _NET_TYPE_NEUTRON
86
- else:
87
- net_type = _NET_TYPE_COMPUTE
88
- except AttributeError:
89
- LOG.warning(
90
- "%s: Could not detect a network type. Assuming we are "
91
- "building docs.",
92
- self.__class__.__name__,
93
- )
94
- net_type = None
95
- self._net_type = net_type
96
- return self._net_type
97
-
98
- @property
99
- def is_neutron(self):
100
- return self._network_type is _NET_TYPE_NEUTRON
101
-
102
- @property
103
- def is_nova_network(self):
104
- return self._network_type is _NET_TYPE_COMPUTE
105
-
106
- @property
107
- def is_docs_build(self):
108
- return self._network_type is None
109
-
110
- def enhance_help_neutron(self, _help):
111
- if self.is_docs_build:
112
- # Why can't we say 'neutron'?
113
- return _QUALIFIER_FMT % (_help, _("Network version 2 only"))
114
- return _help
115
-
116
- def enhance_help_nova_network(self, _help):
117
- if self.is_docs_build:
118
- # Why can't we say 'nova-network'?
119
- return _QUALIFIER_FMT % (_help, _("Compute version 2 only"))
120
- return _help
121
-
122
- @staticmethod
123
- def split_help(network_help, compute_help):
124
- return (
125
- "*{network_qualifier}:*\n {network_help}\n\n"
126
- "*{compute_qualifier}:*\n {compute_help}".format(
127
- **dict(
128
- network_qualifier=_("Network version 2"),
129
- network_help=network_help,
130
- compute_qualifier=_("Compute version 2"),
131
- compute_help=compute_help,
132
- )
133
- )
134
- )
135
-
136
- def get_parser(self, prog_name: str) -> _argparse.ArgumentParser:
137
- LOG.debug('get_parser(%s)', prog_name)
138
- parser = super().get_parser(prog_name) # type: ignore
139
- parser = self.update_parser_common(parser)
140
- LOG.debug('common parser: %s', parser)
141
- if self.is_neutron or self.is_docs_build:
142
- parser = self.update_parser_network(parser)
143
- if self.is_nova_network or self.is_docs_build:
144
- # Add nova-net options if running nova-network or building docs
145
- parser = self.update_parser_compute(parser)
146
- return parser
147
-
148
- def update_parser_common(self, parser):
149
- """Default is no updates to parser."""
150
- return parser
151
-
152
- def update_parser_network(self, parser):
153
- """Default is no updates to parser."""
154
- return parser
155
-
156
- def update_parser_compute(self, parser):
157
- """Default is no updates to parser."""
158
- return parser
159
-
160
- def take_action(self, parsed_args):
161
- if self.is_neutron:
162
- return self.take_action_network(
163
- self.app.client_manager.network, # type: ignore
164
- parsed_args,
165
- )
166
- elif self.is_nova_network:
167
- return self.take_action_compute(
168
- self.app.client_manager.compute, # type: ignore
169
- parsed_args,
170
- )
171
-
172
- def take_action_network(self, client, parsed_args):
173
- """Override to do something useful."""
174
- pass
175
-
176
- def take_action_compute(self, client, parsed_args):
177
- """Override to do something useful."""
178
- pass
179
-
180
-
181
- class NetworkAndComputeCommand(
182
- NetDetectionMixin, command.Command, metaclass=abc.ABCMeta
183
- ):
184
- """Network and Compute Command
185
-
186
- Command class for commands that support implementation via
187
- the network or compute endpoint. Such commands have different
188
- implementations for take_action() and may even have different
189
- arguments.
190
- """
191
-
192
- pass
193
-
194
-
195
- class NetworkAndComputeDelete(NetworkAndComputeCommand, metaclass=abc.ABCMeta):
196
- """Network and Compute Delete
197
-
198
- Delete class for commands that support implementation via
199
- the network or compute endpoint. Such commands have different
200
- implementations for take_action() and may even have different
201
- arguments. This class supports bulk deletion, and error handling
202
- following the rules in doc/source/command-errors.rst.
203
- """
204
-
205
- resource: str
206
-
207
- def take_action(self, parsed_args):
208
- ret = 0
209
- resources = getattr(parsed_args, self.resource, [])
210
-
211
- for r in resources:
212
- self.r = r
213
- try:
214
- if self.app.client_manager.is_network_endpoint_enabled():
215
- self.take_action_network(
216
- self.app.client_manager.network, parsed_args
217
- )
218
- else:
219
- self.take_action_compute(
220
- self.app.client_manager.compute,
221
- parsed_args,
222
- )
223
- except Exception as e:
224
- msg = _(
225
- "Failed to delete %(resource)s with name or ID "
226
- "'%(name_or_id)s': %(e)s"
227
- ) % {
228
- "resource": self.resource,
229
- "name_or_id": r,
230
- "e": e,
231
- }
232
- LOG.error(msg)
233
- ret += 1
234
-
235
- if ret:
236
- total = len(resources)
237
- msg = _("%(num)s of %(total)s %(resource)ss failed to delete.") % {
238
- "num": ret,
239
- "total": total,
240
- "resource": self.resource,
241
- }
242
- raise exceptions.CommandError(msg)
243
-
244
-
245
- class NetworkAndComputeLister(
246
- NetDetectionMixin, command.Lister, metaclass=abc.ABCMeta
247
- ):
248
- """Network and Compute Lister
249
-
250
- Lister class for commands that support implementation via
251
- the network or compute endpoint. Such commands have different
252
- implementations for take_action() and may even have different
253
- arguments.
254
- """
255
-
256
- pass
257
-
258
-
259
- class NetworkAndComputeShowOne(
260
- NetDetectionMixin, command.ShowOne, metaclass=abc.ABCMeta
261
- ):
262
- """Network and Compute ShowOne
263
-
264
- ShowOne class for commands that support implementation via
265
- the network or compute endpoint. Such commands have different
266
- implementations for take_action() and may even have different
267
- arguments.
268
- """
269
-
270
- def take_action(self, parsed_args):
271
- try:
272
- if self.app.client_manager.is_network_endpoint_enabled():
273
- return self.take_action_network(
274
- self.app.client_manager.network, parsed_args
275
- )
276
- else:
277
- return self.take_action_compute(
278
- self.app.client_manager.compute, parsed_args
279
- )
280
- except openstack.exceptions.HttpException as exc:
281
- msg = _("Error while executing command: %s") % exc.message
282
- if exc.details:
283
- msg += ", " + str(exc.details)
284
- raise exceptions.CommandError(msg)
285
-
286
-
287
58
  class NeutronCommandWithExtraArgs(command.Command):
288
59
  """Create and Update commands with additional extra properties.
289
60
 
@@ -300,7 +71,7 @@ class NeutronCommandWithExtraArgs(command.Command):
300
71
  'str': str,
301
72
  }
302
73
 
303
- def _get_property_converter(self, _property):
74
+ def _get_property_converter(self, _property: dict[str, Any]) -> Any:
304
75
  if 'type' in _property:
305
76
  converter = self._allowed_types_dict.get(_property['type'])
306
77
  else:
@@ -316,15 +87,17 @@ class NeutronCommandWithExtraArgs(command.Command):
316
87
  )
317
88
  return converter
318
89
 
319
- def _parse_extra_properties(self, extra_properties):
320
- result: dict[str, ty.Any] = {}
90
+ def _parse_extra_properties(
91
+ self, extra_properties: list[dict[str, Any]] | None
92
+ ) -> dict[str, Any]:
93
+ result: dict[str, Any] = {}
321
94
  if extra_properties:
322
95
  for _property in extra_properties:
323
96
  converter = self._get_property_converter(_property)
324
97
  result[_property['name']] = converter(_property['value'])
325
98
  return result
326
99
 
327
- def get_parser(self, prog_name):
100
+ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
328
101
  parser = super().get_parser(prog_name)
329
102
  parser.add_argument(
330
103
  '--extra-property',
@@ -349,8 +122,10 @@ class NeutronCommandWithExtraArgs(command.Command):
349
122
 
350
123
 
351
124
  class NeutronUnsetCommandWithExtraArgs(NeutronCommandWithExtraArgs):
352
- def _parse_extra_properties(self, extra_properties):
353
- result: dict[str, ty.Any] = {}
125
+ def _parse_extra_properties(
126
+ self, extra_properties: list[dict[str, Any]] | None
127
+ ) -> dict[str, Any]:
128
+ result: dict[str, Any] = {}
354
129
  if extra_properties:
355
130
  for _property in extra_properties:
356
131
  result[_property['name']] = None