python-openstackclient 7.3.1__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 (235) 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 +8 -9
  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 +42 -31
  91. openstackclient/network/v2/router.py +55 -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_credential.py +4 -4
  159. openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
  160. openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
  161. openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
  162. openstackclient/tests/unit/identity/v3/test_user.py +16 -0
  163. openstackclient/tests/unit/image/v1/fakes.py +2 -2
  164. openstackclient/tests/unit/image/v2/test_image.py +39 -1
  165. openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
  166. openstackclient/tests/unit/network/test_common.py +2 -2
  167. openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
  168. openstackclient/tests/unit/network/v2/test_floating_ip_network.py +49 -35
  169. openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
  170. openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
  171. openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
  172. openstackclient/tests/unit/network/v2/test_port.py +33 -5
  173. openstackclient/tests/unit/network/v2/test_router.py +120 -7
  174. openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
  175. openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +14 -14
  176. openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
  177. openstackclient/tests/unit/test_shell.py +16 -13
  178. openstackclient/tests/unit/volume/v2/test_volume.py +1 -1
  179. openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +1 -1
  180. openstackclient/tests/unit/volume/v3/fakes.py +2 -8
  181. openstackclient/tests/unit/volume/v3/test_volume.py +1 -1
  182. openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -3
  183. openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +1 -2
  184. openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +1 -1
  185. openstackclient/volume/client.py +1 -3
  186. openstackclient/volume/v2/consistency_group.py +4 -8
  187. openstackclient/volume/v2/consistency_group_snapshot.py +1 -2
  188. openstackclient/volume/v2/qos_specs.py +1 -2
  189. openstackclient/volume/v2/volume.py +8 -16
  190. openstackclient/volume/v2/volume_backup.py +6 -7
  191. openstackclient/volume/v2/volume_snapshot.py +8 -9
  192. openstackclient/volume/v2/volume_transfer_request.py +0 -3
  193. openstackclient/volume/v2/volume_type.py +10 -21
  194. openstackclient/volume/v3/block_storage_cluster.py +3 -3
  195. openstackclient/volume/v3/block_storage_manage.py +1 -3
  196. openstackclient/volume/v3/volume.py +18 -19
  197. openstackclient/volume/v3/volume_attachment.py +3 -2
  198. openstackclient/volume/v3/volume_backup.py +7 -8
  199. openstackclient/volume/v3/volume_group.py +2 -1
  200. openstackclient/volume/v3/volume_group_snapshot.py +2 -1
  201. openstackclient/volume/v3/volume_snapshot.py +4 -3
  202. openstackclient/volume/v3/volume_type.py +10 -21
  203. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/AUTHORS +4 -0
  204. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/METADATA +7 -13
  205. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/RECORD +210 -233
  206. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/WHEEL +1 -1
  207. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/entry_points.txt +0 -41
  208. python_openstackclient-8.0.0.dist-info/pbr.json +1 -0
  209. openstackclient/tests/functional/volume/v1/__init__.py +0 -0
  210. openstackclient/tests/functional/volume/v1/common.py +0 -35
  211. openstackclient/tests/functional/volume/v1/test_qos.py +0 -100
  212. openstackclient/tests/functional/volume/v1/test_service.py +0 -76
  213. openstackclient/tests/functional/volume/v1/test_snapshot.py +0 -232
  214. openstackclient/tests/functional/volume/v1/test_transfer_request.py +0 -111
  215. openstackclient/tests/functional/volume/v1/test_volume.py +0 -228
  216. openstackclient/tests/functional/volume/v1/test_volume_type.py +0 -213
  217. openstackclient/tests/unit/volume/v1/__init__.py +0 -0
  218. openstackclient/tests/unit/volume/v1/fakes.py +0 -615
  219. openstackclient/tests/unit/volume/v1/test_qos_specs.py +0 -471
  220. openstackclient/tests/unit/volume/v1/test_service.py +0 -295
  221. openstackclient/tests/unit/volume/v1/test_transfer_request.py +0 -380
  222. openstackclient/tests/unit/volume/v1/test_type.py +0 -633
  223. openstackclient/tests/unit/volume/v1/test_volume.py +0 -1447
  224. openstackclient/tests/unit/volume/v1/test_volume_backup.py +0 -435
  225. openstackclient/volume/v1/__init__.py +0 -0
  226. openstackclient/volume/v1/qos_specs.py +0 -377
  227. openstackclient/volume/v1/service.py +0 -136
  228. openstackclient/volume/v1/volume.py +0 -734
  229. openstackclient/volume/v1/volume_backup.py +0 -302
  230. openstackclient/volume/v1/volume_snapshot.py +0 -433
  231. openstackclient/volume/v1/volume_transfer_request.py +0 -200
  232. openstackclient/volume/v1/volume_type.py +0 -520
  233. python_openstackclient-7.3.1.dist-info/pbr.json +0 -1
  234. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/LICENSE +0 -0
  235. {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/top_level.txt +0 -0
@@ -149,7 +149,7 @@ class CreateFlavor(command.ShowOne):
149
149
  return parser
150
150
 
151
151
  def take_action(self, parsed_args):
152
- compute_client = self.app.client_manager.sdk_connection.compute
152
+ compute_client = self.app.client_manager.compute
153
153
  identity_client = self.app.client_manager.identity
154
154
 
155
155
  if parsed_args.project and parsed_args.public:
@@ -190,8 +190,7 @@ class CreateFlavor(command.ShowOne):
190
190
  compute_client.flavor_add_tenant_access(flavor.id, project_id)
191
191
  except Exception as e:
192
192
  msg = _(
193
- "Failed to add project %(project)s access to "
194
- "flavor: %(e)s"
193
+ "Failed to add project %(project)s access to flavor: %(e)s"
195
194
  )
196
195
  LOG.error(msg, {'project': parsed_args.project, 'e': e})
197
196
  if parsed_args.properties:
@@ -224,7 +223,7 @@ class DeleteFlavor(command.Command):
224
223
  return parser
225
224
 
226
225
  def take_action(self, parsed_args):
227
- compute_client = self.app.client_manager.sdk_connection.compute
226
+ compute_client = self.app.client_manager.compute
228
227
  result = 0
229
228
  for f in parsed_args.flavor:
230
229
  try:
@@ -242,7 +241,7 @@ class DeleteFlavor(command.Command):
242
241
 
243
242
  if result > 0:
244
243
  total = len(parsed_args.flavor)
245
- msg = _("%(result)s of %(total)s flavors failed " "to delete.") % {
244
+ msg = _("%(result)s of %(total)s flavors failed to delete.") % {
246
245
  'result': result,
247
246
  'total': total,
248
247
  }
@@ -297,7 +296,7 @@ class ListFlavor(command.Lister):
297
296
  return parser
298
297
 
299
298
  def take_action(self, parsed_args):
300
- compute_client = self.app.client_manager.sdk_connection.compute
299
+ compute_client = self.app.client_manager.compute
301
300
  # is_public is ternary - None means give all flavors,
302
301
  # True is public only and False is private only
303
302
  # By default Nova assumes True and gives admins public flavors
@@ -330,7 +329,7 @@ class ListFlavor(command.Lister):
330
329
  if parsed_args.long and not f.extra_specs:
331
330
  compute_client.fetch_flavor_extra_specs(f)
332
331
 
333
- columns = (
332
+ columns: tuple[str, ...] = (
334
333
  "id",
335
334
  "name",
336
335
  "ram",
@@ -346,7 +345,7 @@ class ListFlavor(command.Lister):
346
345
  "extra_specs",
347
346
  )
348
347
 
349
- column_headers = (
348
+ column_headers: tuple[str, ...] = (
350
349
  "ID",
351
350
  "Name",
352
351
  "RAM",
@@ -404,9 +403,7 @@ class SetFlavor(command.Command):
404
403
  parser.add_argument(
405
404
  '--project',
406
405
  metavar='<project>',
407
- help=_(
408
- 'Set flavor access to project (name or ID) ' '(admin only)'
409
- ),
406
+ help=_('Set flavor access to project (name or ID) (admin only)'),
410
407
  )
411
408
  identity_common.add_project_domain_option_to_parser(parser)
412
409
  parser.add_argument(
@@ -421,7 +418,7 @@ class SetFlavor(command.Command):
421
418
  return parser
422
419
 
423
420
  def take_action(self, parsed_args):
424
- compute_client = self.app.client_manager.sdk_connection.compute
421
+ compute_client = self.app.client_manager.compute
425
422
  identity_client = self.app.client_manager.identity
426
423
 
427
424
  try:
@@ -483,7 +480,7 @@ class SetFlavor(command.Command):
483
480
 
484
481
  if result > 0:
485
482
  raise exceptions.CommandError(
486
- _("Command Failed: One or more of" " the operations failed")
483
+ _("Command Failed: One or more of the operations failed")
487
484
  )
488
485
 
489
486
 
@@ -500,7 +497,7 @@ class ShowFlavor(command.ShowOne):
500
497
  return parser
501
498
 
502
499
  def take_action(self, parsed_args):
503
- compute_client = self.app.client_manager.sdk_connection.compute
500
+ compute_client = self.app.client_manager.compute
504
501
  flavor = compute_client.find_flavor(
505
502
  parsed_args.flavor, get_extra_specs=True, ignore_missing=False
506
503
  )
@@ -560,8 +557,7 @@ class UnsetFlavor(command.Command):
560
557
  '--project',
561
558
  metavar='<project>',
562
559
  help=_(
563
- 'Remove flavor access from project (name or ID) '
564
- '(admin only)'
560
+ 'Remove flavor access from project (name or ID) (admin only)'
565
561
  ),
566
562
  )
567
563
  identity_common.add_project_domain_option_to_parser(parser)
@@ -569,7 +565,7 @@ class UnsetFlavor(command.Command):
569
565
  return parser
570
566
 
571
567
  def take_action(self, parsed_args):
572
- compute_client = self.app.client_manager.sdk_connection.compute
568
+ compute_client = self.app.client_manager.compute
573
569
  identity_client = self.app.client_manager.identity
574
570
 
575
571
  try:
@@ -612,5 +608,5 @@ class UnsetFlavor(command.Command):
612
608
 
613
609
  if result > 0:
614
610
  raise exceptions.CommandError(
615
- _("Command Failed: One or more of" " the operations failed")
611
+ _("Command Failed: One or more of the operations failed")
616
612
  )
@@ -35,7 +35,7 @@ class ListHost(command.Lister):
35
35
  return parser
36
36
 
37
37
  def take_action(self, parsed_args):
38
- compute_client = self.app.client_manager.sdk_connection.compute
38
+ compute_client = self.app.client_manager.compute
39
39
 
40
40
  self.log.warning(
41
41
  "API has been deprecated; "
@@ -83,7 +83,7 @@ class SetHost(command.Command):
83
83
  return parser
84
84
 
85
85
  def take_action(self, parsed_args):
86
- compute_client = self.app.client_manager.sdk_connection.compute
86
+ compute_client = self.app.client_manager.compute
87
87
 
88
88
  self.log.warning(
89
89
  "API has been deprecated; "
@@ -121,7 +121,7 @@ class ShowHost(command.Lister):
121
121
  return parser
122
122
 
123
123
  def take_action(self, parsed_args):
124
- compute_client = self.app.client_manager.sdk_connection.compute
124
+ compute_client = self.app.client_manager.compute
125
125
 
126
126
  self.log.warning(
127
127
  "API has been deprecated; "
@@ -90,7 +90,7 @@ class ListHypervisor(command.Lister):
90
90
  return parser
91
91
 
92
92
  def take_action(self, parsed_args):
93
- compute_client = self.app.client_manager.sdk_connection.compute
93
+ compute_client = self.app.client_manager.compute
94
94
 
95
95
  list_opts = {}
96
96
 
@@ -119,14 +119,20 @@ class ListHypervisor(command.Lister):
119
119
  if parsed_args.matching:
120
120
  list_opts['hypervisor_hostname_pattern'] = parsed_args.matching
121
121
 
122
- column_headers = (
122
+ column_headers: tuple[str, ...] = (
123
123
  "ID",
124
124
  "Hypervisor Hostname",
125
125
  "Hypervisor Type",
126
126
  "Host IP",
127
127
  "State",
128
128
  )
129
- columns = ('id', 'name', 'hypervisor_type', 'host_ip', 'state')
129
+ columns: tuple[str, ...] = (
130
+ 'id',
131
+ 'name',
132
+ 'hypervisor_type',
133
+ 'host_ip',
134
+ 'state',
135
+ )
130
136
 
131
137
  if parsed_args.long:
132
138
  if not sdk_utils.supports_microversion(compute_client, '2.88'):
@@ -164,7 +170,7 @@ class ShowHypervisor(command.ShowOne):
164
170
  return parser
165
171
 
166
172
  def take_action(self, parsed_args):
167
- compute_client = self.app.client_manager.sdk_connection.compute
173
+ compute_client = self.app.client_manager.compute
168
174
 
169
175
  hypervisor_id = compute_client.find_hypervisor(
170
176
  parsed_args.hypervisor, ignore_missing=False, details=False
@@ -42,7 +42,7 @@ class ShowHypervisorStats(command.ShowOne):
42
42
  def take_action(self, parsed_args):
43
43
  # The command is deprecated since it is being dropped in Nova.
44
44
  self.log.warning(_("This command is deprecated."))
45
- compute_client = self.app.client_manager.sdk_connection.compute
45
+ compute_client = self.app.client_manager.compute
46
46
  # We do API request directly cause this deprecated method is not and
47
47
  # will not be supported by OpenStackSDK.
48
48
  response = compute_client.get(
@@ -61,14 +61,13 @@ def _generate_keypair():
61
61
  def _get_keypair_columns(item, hide_pub_key=False, hide_priv_key=False):
62
62
  # To maintain backwards compatibility we need to rename sdk props to
63
63
  # whatever OSC was using before
64
- column_map = {}
65
64
  hidden_columns = ['links', 'location']
66
65
  if hide_pub_key:
67
66
  hidden_columns.append('public_key')
68
67
  if hide_priv_key:
69
68
  hidden_columns.append('private_key')
70
69
  return utils.get_osc_show_columns_for_sdk_resource(
71
- item, column_map, hidden_columns
70
+ item, {}, hidden_columns
72
71
  )
73
72
 
74
73
 
@@ -121,13 +120,12 @@ class CreateKeypair(command.ShowOne):
121
120
  return parser
122
121
 
123
122
  def take_action(self, parsed_args):
124
- compute_client = self.app.client_manager.sdk_connection.compute
123
+ compute_client = self.app.client_manager.compute
125
124
  identity_client = self.app.client_manager.identity
126
125
 
127
126
  kwargs = {'name': parsed_args.name}
128
127
 
129
128
  if parsed_args.public_key:
130
- generated_keypair = None
131
129
  try:
132
130
  with open(os.path.expanduser(parsed_args.public_key)) as p:
133
131
  public_key = p.read()
@@ -230,7 +228,7 @@ class DeleteKeypair(command.Command):
230
228
  return parser
231
229
 
232
230
  def take_action(self, parsed_args):
233
- compute_client = self.app.client_manager.sdk_connection.compute
231
+ compute_client = self.app.client_manager.compute
234
232
  identity_client = self.app.client_manager.identity
235
233
 
236
234
  kwargs = {}
@@ -258,13 +256,13 @@ class DeleteKeypair(command.Command):
258
256
  except Exception as e:
259
257
  result += 1
260
258
  LOG.error(
261
- _("Failed to delete key with name " "'%(name)s': %(e)s"),
259
+ _("Failed to delete key with name '%(name)s': %(e)s"),
262
260
  {'name': n, 'e': e},
263
261
  )
264
262
 
265
263
  if result > 0:
266
264
  total = len(parsed_args.name)
267
- msg = _("%(result)s of %(total)s keys failed " "to delete.") % {
265
+ msg = _("%(result)s of %(total)s keys failed to delete.") % {
268
266
  'result': result,
269
267
  'total': total,
270
268
  }
@@ -300,7 +298,7 @@ class ListKeypair(command.Lister):
300
298
  return parser
301
299
 
302
300
  def take_action(self, parsed_args):
303
- compute_client = self.app.client_manager.sdk_connection.compute
301
+ compute_client = self.app.client_manager.compute
304
302
  identity_client = self.app.client_manager.identity
305
303
 
306
304
  kwargs = {}
@@ -372,7 +370,7 @@ class ListKeypair(command.Lister):
372
370
  else:
373
371
  data = compute_client.keypairs(**kwargs)
374
372
 
375
- columns = ("Name", "Fingerprint")
373
+ columns: tuple[str, ...] = ("Name", "Fingerprint")
376
374
 
377
375
  if sdk_utils.supports_microversion(compute_client, '2.2'):
378
376
  columns += ("Type",)
@@ -411,7 +409,7 @@ class ShowKeypair(command.ShowOne):
411
409
  return parser
412
410
 
413
411
  def take_action(self, parsed_args):
414
- compute_client = self.app.client_manager.sdk_connection.compute
412
+ compute_client = self.app.client_manager.compute
415
413
  identity_client = self.app.client_manager.identity
416
414
 
417
415
  kwargs = {}