python-openstackclient 7.4.0__py3-none-any.whl → 8.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. openstackclient/common/availability_zone.py +3 -6
  2. openstackclient/common/clientmanager.py +2 -1
  3. openstackclient/common/envvars.py +57 -0
  4. openstackclient/common/extension.py +3 -11
  5. openstackclient/common/limits.py +1 -1
  6. openstackclient/common/project_cleanup.py +3 -2
  7. openstackclient/common/quota.py +54 -28
  8. openstackclient/compute/client.py +2 -5
  9. openstackclient/compute/v2/agent.py +5 -5
  10. openstackclient/compute/v2/aggregate.py +17 -15
  11. openstackclient/compute/v2/console.py +3 -4
  12. openstackclient/compute/v2/flavor.py +14 -18
  13. openstackclient/compute/v2/host.py +3 -3
  14. openstackclient/compute/v2/hypervisor.py +10 -4
  15. openstackclient/compute/v2/hypervisor_stats.py +1 -1
  16. openstackclient/compute/v2/keypair.py +8 -10
  17. openstackclient/compute/v2/server.py +70 -112
  18. openstackclient/compute/v2/server_backup.py +1 -1
  19. openstackclient/compute/v2/server_event.py +7 -16
  20. openstackclient/compute/v2/server_group.py +6 -6
  21. openstackclient/compute/v2/server_image.py +1 -1
  22. openstackclient/compute/v2/server_migration.py +6 -6
  23. openstackclient/compute/v2/server_volume.py +4 -4
  24. openstackclient/compute/v2/service.py +9 -13
  25. openstackclient/compute/v2/usage.py +4 -6
  26. openstackclient/identity/client.py +2 -4
  27. openstackclient/identity/common.py +16 -17
  28. openstackclient/identity/v2_0/ec2creds.py +4 -3
  29. openstackclient/identity/v2_0/endpoint.py +12 -10
  30. openstackclient/identity/v2_0/project.py +6 -6
  31. openstackclient/identity/v2_0/role.py +1 -1
  32. openstackclient/identity/v2_0/service.py +7 -7
  33. openstackclient/identity/v2_0/user.py +6 -21
  34. openstackclient/identity/v3/access_rule.py +2 -5
  35. openstackclient/identity/v3/consumer.py +4 -3
  36. openstackclient/identity/v3/credential.py +6 -7
  37. openstackclient/identity/v3/domain.py +1 -1
  38. openstackclient/identity/v3/ec2creds.py +4 -3
  39. openstackclient/identity/v3/endpoint.py +104 -88
  40. openstackclient/identity/v3/endpoint_group.py +1 -1
  41. openstackclient/identity/v3/group.py +3 -4
  42. openstackclient/identity/v3/identity_provider.py +1 -2
  43. openstackclient/identity/v3/limit.py +4 -9
  44. openstackclient/identity/v3/mapping.py +4 -3
  45. openstackclient/identity/v3/policy.py +5 -8
  46. openstackclient/identity/v3/project.py +6 -6
  47. openstackclient/identity/v3/region.py +2 -5
  48. openstackclient/identity/v3/registered_limit.py +4 -8
  49. openstackclient/identity/v3/role.py +15 -16
  50. openstackclient/identity/v3/service.py +8 -8
  51. openstackclient/identity/v3/service_provider.py +3 -6
  52. openstackclient/identity/v3/tag.py +2 -2
  53. openstackclient/identity/v3/token.py +1 -2
  54. openstackclient/identity/v3/trust.py +74 -25
  55. openstackclient/identity/v3/user.py +9 -6
  56. openstackclient/image/client.py +2 -5
  57. openstackclient/image/v1/image.py +11 -15
  58. openstackclient/image/v2/cache.py +2 -4
  59. openstackclient/image/v2/image.py +30 -37
  60. openstackclient/image/v2/metadef_namespaces.py +4 -3
  61. openstackclient/image/v2/metadef_resource_type_association.py +1 -2
  62. openstackclient/image/v2/metadef_resource_types.py +1 -2
  63. openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +9 -1370
  64. openstackclient/network/client.py +4 -10
  65. openstackclient/network/common.py +16 -12
  66. openstackclient/network/utils.py +3 -3
  67. openstackclient/network/v2/address_group.py +5 -9
  68. openstackclient/network/v2/address_scope.py +2 -3
  69. openstackclient/network/v2/default_security_group_rule.py +1 -2
  70. openstackclient/network/v2/floating_ip.py +14 -21
  71. openstackclient/network/v2/floating_ip_port_forwarding.py +7 -7
  72. openstackclient/network/v2/ip_availability.py +1 -2
  73. openstackclient/network/v2/l3_conntrack_helper.py +8 -12
  74. openstackclient/network/v2/local_ip.py +24 -26
  75. openstackclient/network/v2/local_ip_association.py +4 -5
  76. openstackclient/network/v2/ndp_proxy.py +9 -10
  77. openstackclient/network/v2/network.py +12 -16
  78. openstackclient/network/v2/network_agent.py +29 -37
  79. openstackclient/network/v2/network_auto_allocated_topology.py +4 -5
  80. openstackclient/network/v2/network_flavor.py +1 -1
  81. openstackclient/network/v2/network_flavor_profile.py +5 -5
  82. openstackclient/network/v2/network_meter.py +3 -3
  83. openstackclient/network/v2/network_meter_rule.py +5 -8
  84. openstackclient/network/v2/network_qos_policy.py +4 -4
  85. openstackclient/network/v2/network_qos_rule.py +4 -5
  86. openstackclient/network/v2/network_rbac.py +4 -4
  87. openstackclient/network/v2/network_segment.py +6 -7
  88. openstackclient/network/v2/network_segment_range.py +16 -20
  89. openstackclient/network/v2/network_trunk.py +24 -16
  90. openstackclient/network/v2/port.py +28 -29
  91. openstackclient/network/v2/router.py +52 -41
  92. openstackclient/network/v2/security_group.py +8 -15
  93. openstackclient/network/v2/security_group_rule.py +9 -10
  94. openstackclient/network/v2/subnet.py +31 -30
  95. openstackclient/network/v2/subnet_pool.py +4 -4
  96. openstackclient/object/client.py +2 -3
  97. openstackclient/object/v1/container.py +2 -3
  98. openstackclient/object/v1/object.py +2 -9
  99. openstackclient/shell.py +22 -5
  100. openstackclient/tests/functional/base.py +2 -2
  101. openstackclient/tests/functional/common/test_quota.py +3 -1
  102. openstackclient/tests/functional/compute/v2/common.py +12 -6
  103. openstackclient/tests/functional/compute/v2/test_server.py +2 -3
  104. openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
  105. openstackclient/tests/functional/identity/v2/test_user.py +1 -1
  106. openstackclient/tests/functional/identity/v3/common.py +3 -8
  107. openstackclient/tests/functional/identity/v3/test_application_credential.py +10 -10
  108. openstackclient/tests/functional/identity/v3/test_endpoint.py +3 -3
  109. openstackclient/tests/functional/identity/v3/test_group.py +3 -3
  110. openstackclient/tests/functional/identity/v3/test_idp.py +3 -7
  111. openstackclient/tests/functional/identity/v3/test_limit.py +4 -4
  112. openstackclient/tests/functional/identity/v3/test_project.py +5 -14
  113. openstackclient/tests/functional/identity/v3/test_region.py +1 -3
  114. openstackclient/tests/functional/identity/v3/test_registered_limit.py +3 -3
  115. openstackclient/tests/functional/identity/v3/test_role.py +1 -1
  116. openstackclient/tests/functional/identity/v3/test_role_assignment.py +13 -31
  117. openstackclient/tests/functional/identity/v3/test_service_provider.py +3 -7
  118. openstackclient/tests/functional/identity/v3/test_user.py +8 -8
  119. openstackclient/tests/functional/network/v2/common.py +7 -3
  120. openstackclient/tests/functional/network/v2/test_address_group.py +4 -0
  121. openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +15 -11
  122. openstackclient/tests/functional/network/v2/test_local_ip.py +4 -0
  123. openstackclient/tests/functional/network/v2/test_network_meter_rule.py +2 -2
  124. openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +2 -3
  125. openstackclient/tests/functional/network/v2/test_network_rbac.py +2 -2
  126. openstackclient/tests/functional/network/v2/test_network_trunk.py +1 -1
  127. openstackclient/tests/functional/network/v2/test_port.py +17 -7
  128. openstackclient/tests/functional/network/v2/test_router.py +42 -0
  129. openstackclient/tests/functional/network/v2/test_subnet_pool.py +4 -0
  130. openstackclient/tests/unit/api/test_compute_v2.py +67 -87
  131. openstackclient/tests/unit/common/test_availability_zone.py +6 -14
  132. openstackclient/tests/unit/common/test_command.py +1 -1
  133. openstackclient/tests/unit/common/test_extension.py +5 -7
  134. openstackclient/tests/unit/common/test_limits.py +1 -1
  135. openstackclient/tests/unit/common/test_project_cleanup.py +5 -6
  136. openstackclient/tests/unit/common/test_quota.py +51 -28
  137. openstackclient/tests/unit/compute/v2/fakes.py +4 -10
  138. openstackclient/tests/unit/compute/v2/test_agent.py +16 -16
  139. openstackclient/tests/unit/compute/v2/test_aggregate.py +56 -60
  140. openstackclient/tests/unit/compute/v2/test_console.py +16 -16
  141. openstackclient/tests/unit/compute/v2/test_flavor.py +71 -71
  142. openstackclient/tests/unit/compute/v2/test_host.py +8 -8
  143. openstackclient/tests/unit/compute/v2/test_hypervisor.py +22 -30
  144. openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
  145. openstackclient/tests/unit/compute/v2/test_keypair.py +24 -24
  146. openstackclient/tests/unit/compute/v2/test_server.py +524 -560
  147. openstackclient/tests/unit/compute/v2/test_server_backup.py +5 -7
  148. openstackclient/tests/unit/compute/v2/test_server_event.py +16 -18
  149. openstackclient/tests/unit/compute/v2/test_server_group.py +25 -31
  150. openstackclient/tests/unit/compute/v2/test_server_image.py +6 -8
  151. openstackclient/tests/unit/compute/v2/test_server_migration.py +37 -37
  152. openstackclient/tests/unit/compute/v2/test_server_volume.py +12 -12
  153. openstackclient/tests/unit/compute/v2/test_service.py +39 -45
  154. openstackclient/tests/unit/compute/v2/test_usage.py +5 -5
  155. openstackclient/tests/unit/identity/v2_0/fakes.py +1 -1
  156. openstackclient/tests/unit/identity/v3/test_access_rule.py +1 -3
  157. openstackclient/tests/unit/identity/v3/test_application_credential.py +1 -1
  158. openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
  159. openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
  160. openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
  161. openstackclient/tests/unit/identity/v3/test_user.py +16 -0
  162. openstackclient/tests/unit/image/v1/fakes.py +2 -2
  163. openstackclient/tests/unit/image/v2/test_image.py +39 -1
  164. openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
  165. openstackclient/tests/unit/network/test_common.py +2 -2
  166. openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
  167. openstackclient/tests/unit/network/v2/test_floating_ip_network.py +49 -35
  168. openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
  169. openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
  170. openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
  171. openstackclient/tests/unit/network/v2/test_port.py +4 -5
  172. openstackclient/tests/unit/network/v2/test_router.py +63 -0
  173. openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
  174. openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +14 -14
  175. openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
  176. openstackclient/tests/unit/test_shell.py +16 -13
  177. openstackclient/tests/unit/volume/v2/test_volume.py +1 -1
  178. openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +1 -1
  179. openstackclient/tests/unit/volume/v3/fakes.py +2 -8
  180. openstackclient/tests/unit/volume/v3/test_volume.py +1 -1
  181. openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -3
  182. openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +1 -2
  183. openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +1 -1
  184. openstackclient/volume/client.py +1 -3
  185. openstackclient/volume/v2/consistency_group.py +4 -8
  186. openstackclient/volume/v2/consistency_group_snapshot.py +1 -2
  187. openstackclient/volume/v2/qos_specs.py +1 -2
  188. openstackclient/volume/v2/volume.py +8 -16
  189. openstackclient/volume/v2/volume_backup.py +6 -7
  190. openstackclient/volume/v2/volume_snapshot.py +8 -9
  191. openstackclient/volume/v2/volume_transfer_request.py +0 -3
  192. openstackclient/volume/v2/volume_type.py +10 -21
  193. openstackclient/volume/v3/block_storage_cluster.py +3 -3
  194. openstackclient/volume/v3/block_storage_manage.py +1 -3
  195. openstackclient/volume/v3/volume.py +18 -19
  196. openstackclient/volume/v3/volume_attachment.py +3 -2
  197. openstackclient/volume/v3/volume_backup.py +7 -8
  198. openstackclient/volume/v3/volume_group.py +2 -1
  199. openstackclient/volume/v3/volume_group_snapshot.py +2 -1
  200. openstackclient/volume/v3/volume_snapshot.py +4 -3
  201. openstackclient/volume/v3/volume_type.py +10 -21
  202. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/AUTHORS +3 -0
  203. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/METADATA +7 -13
  204. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/RECORD +209 -232
  205. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/WHEEL +1 -1
  206. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/entry_points.txt +0 -41
  207. python_openstackclient-8.0.0.dist-info/pbr.json +1 -0
  208. openstackclient/tests/functional/volume/v1/__init__.py +0 -0
  209. openstackclient/tests/functional/volume/v1/common.py +0 -35
  210. openstackclient/tests/functional/volume/v1/test_qos.py +0 -100
  211. openstackclient/tests/functional/volume/v1/test_service.py +0 -76
  212. openstackclient/tests/functional/volume/v1/test_snapshot.py +0 -232
  213. openstackclient/tests/functional/volume/v1/test_transfer_request.py +0 -111
  214. openstackclient/tests/functional/volume/v1/test_volume.py +0 -228
  215. openstackclient/tests/functional/volume/v1/test_volume_type.py +0 -213
  216. openstackclient/tests/unit/volume/v1/__init__.py +0 -0
  217. openstackclient/tests/unit/volume/v1/fakes.py +0 -615
  218. openstackclient/tests/unit/volume/v1/test_qos_specs.py +0 -471
  219. openstackclient/tests/unit/volume/v1/test_service.py +0 -295
  220. openstackclient/tests/unit/volume/v1/test_transfer_request.py +0 -380
  221. openstackclient/tests/unit/volume/v1/test_type.py +0 -633
  222. openstackclient/tests/unit/volume/v1/test_volume.py +0 -1447
  223. openstackclient/tests/unit/volume/v1/test_volume_backup.py +0 -435
  224. openstackclient/volume/v1/__init__.py +0 -0
  225. openstackclient/volume/v1/qos_specs.py +0 -377
  226. openstackclient/volume/v1/service.py +0 -136
  227. openstackclient/volume/v1/volume.py +0 -734
  228. openstackclient/volume/v1/volume_backup.py +0 -302
  229. openstackclient/volume/v1/volume_snapshot.py +0 -433
  230. openstackclient/volume/v1/volume_transfer_request.py +0 -200
  231. openstackclient/volume/v1/volume_type.py +0 -520
  232. python_openstackclient-7.4.0.dist-info/pbr.json +0 -1
  233. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/LICENSE +0 -0
  234. {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.0.0.dist-info}/top_level.txt +0 -0
@@ -19,13 +19,13 @@ from openstackclient.i18n import _
19
19
 
20
20
 
21
21
  def _format_cluster(cluster, detailed=False):
22
- columns = (
22
+ columns: tuple[str, ...] = (
23
23
  'name',
24
24
  'binary',
25
25
  'state',
26
26
  'status',
27
27
  )
28
- column_headers = (
28
+ column_headers: tuple[str, ...] = (
29
29
  'Name',
30
30
  'Binary',
31
31
  'State',
@@ -147,7 +147,7 @@ class ListBlockStorageCluster(command.Lister):
147
147
  )
148
148
  raise exceptions.CommandError(msg)
149
149
 
150
- columns = ('Name', 'Binary', 'State', 'Status')
150
+ columns: tuple[str, ...] = ('Name', 'Binary', 'State', 'Status')
151
151
  if parsed_args.long:
152
152
  columns += (
153
153
  'Num Hosts',
@@ -317,9 +317,7 @@ class BlockStorageManageSnapshots(command.Lister):
317
317
  # if the user requested e.g. '--detailed false' then they
318
318
  # should simply stop requesting this since the default has
319
319
  # changed
320
- msg = _(
321
- "The --detailed option has been deprecated. " "Unset it."
322
- )
320
+ msg = _("The --detailed option has been deprecated. Unset it.")
323
321
  self.log.warning(msg)
324
322
 
325
323
  columns = [
@@ -309,8 +309,7 @@ class CreateVolume(volume_v2.CreateVolume):
309
309
  )
310
310
  else:
311
311
  msg = _(
312
- "Volume status is not available for setting boot "
313
- "state"
312
+ "Volume status is not available for setting boot state"
314
313
  )
315
314
  raise exceptions.CommandError(msg)
316
315
  except Exception as e:
@@ -335,10 +334,7 @@ class CreateVolume(volume_v2.CreateVolume):
335
334
  raise exceptions.CommandError(msg)
336
335
  except Exception as e:
337
336
  LOG.error(
338
- _(
339
- "Failed to set volume read-only access "
340
- "mode flag: %s"
341
- ),
337
+ _("Failed to set volume read-only access mode flag: %s"),
342
338
  e,
343
339
  )
344
340
 
@@ -402,7 +398,7 @@ class DeleteVolume(volume_v2.DeleteVolume):
402
398
 
403
399
  if result > 0:
404
400
  total = len(parsed_args.volumes)
405
- msg = _("%(result)s of %(total)s volumes failed " "to delete.") % {
401
+ msg = _("%(result)s of %(total)s volumes failed to delete.") % {
406
402
  'result': result,
407
403
  'total': total,
408
404
  }
@@ -523,7 +519,7 @@ class ListVolume(command.Lister):
523
519
  server_cache = {}
524
520
  if do_server_list:
525
521
  try:
526
- compute_client = self.app.client_manager.sdk_connection.compute
522
+ compute_client = self.app.client_manager.compute
527
523
  for s in compute_client.servers():
528
524
  server_cache[s.id] = s
529
525
  except sdk_exceptions.SDKException: # noqa: S110
@@ -768,18 +764,24 @@ class SetVolume(command.Command):
768
764
  _("New size must be greater than %s GB") % volume.size
769
765
  )
770
766
  raise exceptions.CommandError(msg)
771
- if (
772
- volume.status != 'available'
773
- and not volume_client.api_version.matches('3.42')
774
- ):
767
+ if volume.status not in ('available', 'in-use'):
775
768
  msg = (
776
769
  _(
777
770
  "Volume is in %s state, it must be available "
778
- "before size can be extended"
771
+ "or in-use before size can be extended."
779
772
  )
780
773
  % volume.status
781
774
  )
782
775
  raise exceptions.CommandError(msg)
776
+ if (
777
+ volume.status == 'in-use'
778
+ and not volume_client.api_version.matches('3.42')
779
+ ):
780
+ msg = _(
781
+ "--os-volume-api-version 3.42 or greater is "
782
+ "required to extend in-use volumes."
783
+ )
784
+ raise exceptions.CommandError(msg)
783
785
  volume_client.volumes.extend(volume.id, parsed_args.size)
784
786
  except Exception as e:
785
787
  LOG.error(_("Failed to set volume size: %s"), e)
@@ -847,10 +849,7 @@ class SetVolume(command.Command):
847
849
  )
848
850
  except Exception as e:
849
851
  LOG.error(
850
- _(
851
- "Failed to set volume read-only access "
852
- "mode flag: %s"
853
- ),
852
+ _("Failed to set volume read-only access mode flag: %s"),
854
853
  e,
855
854
  )
856
855
  result += 1
@@ -903,7 +902,7 @@ class SetVolume(command.Command):
903
902
 
904
903
  if result > 0:
905
904
  raise exceptions.CommandError(
906
- _("One or more of the " "set operations failed")
905
+ _("One or more of the set operations failed")
907
906
  )
908
907
 
909
908
 
@@ -995,7 +994,7 @@ class UnsetVolume(command.Command):
995
994
 
996
995
  if result > 0:
997
996
  raise exceptions.CommandError(
998
- _("One or more of the " "unset operations failed")
997
+ _("One or more of the unset operations failed")
999
998
  )
1000
999
 
1001
1000
 
@@ -18,6 +18,7 @@ from osc_lib.command import command
18
18
  from osc_lib import exceptions
19
19
  from osc_lib import utils
20
20
 
21
+ from openstackclient.common import envvars
21
22
  from openstackclient.common import pagination
22
23
  from openstackclient.i18n import _
23
24
  from openstackclient.identity import common as identity_common
@@ -171,7 +172,7 @@ class CreateVolumeAttachment(command.ShowOne):
171
172
 
172
173
  def take_action(self, parsed_args):
173
174
  volume_client = self.app.client_manager.sdk_connection.volume
174
- compute_client = self.app.client_manager.sdk_connection.compute
175
+ compute_client = self.app.client_manager.compute
175
176
 
176
177
  if not sdk_utils.supports_microversion(volume_client, '3.27'):
177
178
  msg = _(
@@ -399,7 +400,7 @@ class ListVolumeAttachment(command.Lister):
399
400
  '--all-projects',
400
401
  dest='all_projects',
401
402
  action='store_true',
402
- default=utils.env('ALL_PROJECTS', default=False),
403
+ default=envvars.boolenv('ALL_PROJECTS'),
403
404
  help=_('Shows details for all projects (admin only).'),
404
405
  )
405
406
  parser.add_argument(
@@ -162,7 +162,7 @@ class CreateVolumeBackup(command.ShowOne):
162
162
 
163
163
  kwargs['availability_zone'] = parsed_args.availability_zone
164
164
 
165
- columns = (
165
+ columns: tuple[str, ...] = (
166
166
  "id",
167
167
  "name",
168
168
  "volume_id",
@@ -298,7 +298,7 @@ class ListVolumeBackup(command.Lister):
298
298
  def take_action(self, parsed_args):
299
299
  volume_client = self.app.client_manager.sdk_connection.volume
300
300
 
301
- columns = (
301
+ columns: tuple[str, ...] = (
302
302
  'id',
303
303
  'name',
304
304
  'description',
@@ -307,7 +307,7 @@ class ListVolumeBackup(command.Lister):
307
307
  'is_incremental',
308
308
  'created_at',
309
309
  )
310
- column_headers = (
310
+ column_headers: tuple[str, ...] = (
311
311
  'ID',
312
312
  'Name',
313
313
  'Description',
@@ -403,8 +403,7 @@ class RestoreVolumeBackup(command.ShowOne):
403
403
  "--force",
404
404
  action="store_true",
405
405
  help=_(
406
- "Restore the backup to an existing volume "
407
- "(default to False)"
406
+ "Restore the backup to an existing volume (default to False)"
408
407
  ),
409
408
  )
410
409
  return parser
@@ -412,7 +411,7 @@ class RestoreVolumeBackup(command.ShowOne):
412
411
  def take_action(self, parsed_args):
413
412
  volume_client = self.app.client_manager.sdk_connection.volume
414
413
 
415
- columns = (
414
+ columns: tuple[str, ...] = (
416
415
  'id',
417
416
  'volume_id',
418
417
  'volume_name',
@@ -466,7 +465,7 @@ class SetVolumeBackup(command.Command):
466
465
  '--name',
467
466
  metavar='<name>',
468
467
  help=_(
469
- 'New backup name'
468
+ 'New backup name '
470
469
  '(supported by --os-volume-api-version 3.9 or above)'
471
470
  ),
472
471
  )
@@ -655,7 +654,7 @@ class ShowVolumeBackup(command.ShowOne):
655
654
  def take_action(self, parsed_args):
656
655
  volume_client = self.app.client_manager.sdk_connection.volume
657
656
  backup = volume_client.find_backup(parsed_args.backup)
658
- columns = (
657
+ columns: tuple[str, ...] = (
659
658
  "availability_zone",
660
659
  "container",
661
660
  "created_at",
@@ -17,6 +17,7 @@ from osc_lib.command import command
17
17
  from osc_lib import exceptions
18
18
  from osc_lib import utils
19
19
 
20
+ from openstackclient.common import envvars
20
21
  from openstackclient.i18n import _
21
22
 
22
23
 
@@ -410,7 +411,7 @@ class ListVolumeGroup(command.Lister):
410
411
  '--all-projects',
411
412
  dest='all_projects',
412
413
  action='store_true',
413
- default=utils.env('ALL_PROJECTS', default=False),
414
+ default=envvars.boolenv('ALL_PROJECTS'),
414
415
  help=_('Shows details for all projects (admin only).'),
415
416
  )
416
417
  # TODO(stephenfin): Add once we have an equivalent command for
@@ -17,6 +17,7 @@ from osc_lib.command import command
17
17
  from osc_lib import exceptions
18
18
  from osc_lib import utils
19
19
 
20
+ from openstackclient.common import envvars
20
21
  from openstackclient.i18n import _
21
22
 
22
23
  LOG = logging.getLogger(__name__)
@@ -145,7 +146,7 @@ class ListVolumeGroupSnapshot(command.Lister):
145
146
  '--all-projects',
146
147
  dest='all_projects',
147
148
  action='store_true',
148
- default=utils.env('ALL_PROJECTS', default=False),
149
+ default=envvars.boolenv('ALL_PROJECTS'),
149
150
  help=_('Shows details for all projects (admin only).'),
150
151
  )
151
152
  # TODO(stephenfin): Add once we have an equivalent command for
@@ -91,7 +91,8 @@ class DeleteVolumeSnapshot(command.Command):
91
91
 
92
92
  if result > 0:
93
93
  total = len(parsed_args.snapshots)
94
- msg = _(
95
- "%(result)s of %(total)s snapshots failed " "to delete."
96
- ) % {'result': result, 'total': total}
94
+ msg = _("%(result)s of %(total)s snapshots failed to delete.") % {
95
+ 'result': result,
96
+ 'total': total,
97
+ }
97
98
  raise exceptions.CommandError(msg)
@@ -273,8 +273,7 @@ class CreateVolumeType(command.ShowOne):
273
273
  )
274
274
  except Exception as e:
275
275
  msg = _(
276
- "Failed to add project %(project)s access to "
277
- "type: %(e)s"
276
+ "Failed to add project %(project)s access to type: %(e)s"
278
277
  )
279
278
  LOG.error(msg % {'project': parsed_args.project, 'e': e})
280
279
 
@@ -364,7 +363,7 @@ class DeleteVolumeType(command.Command):
364
363
  if result > 0:
365
364
  total = len(parsed_args.volume_types)
366
365
  msg = _(
367
- "%(result)s of %(total)s volume types failed " "to delete."
366
+ "%(result)s of %(total)s volume types failed to delete."
368
367
  ) % {'result': result, 'total': total}
369
368
  raise exceptions.CommandError(msg)
370
369
 
@@ -635,8 +634,7 @@ class SetVolumeType(command.Command):
635
634
  '--project',
636
635
  metavar='<project>',
637
636
  help=_(
638
- 'Set volume type access to project (name or ID) '
639
- '(admin only)'
637
+ 'Set volume type access to project (name or ID) (admin only)'
640
638
  ),
641
639
  )
642
640
  public_group = parser.add_mutually_exclusive_group()
@@ -728,17 +726,12 @@ class SetVolumeType(command.Command):
728
726
  volume_client.volume_types.update(volume_type.id, **kwargs)
729
727
  except Exception as e:
730
728
  LOG.error(
731
- _(
732
- "Failed to update volume type name or"
733
- " description: %s"
734
- ),
729
+ _("Failed to update volume type name or description: %s"),
735
730
  e,
736
731
  )
737
732
  result += 1
738
733
 
739
- properties = {}
740
-
741
- properties = {}
734
+ properties: dict[str, str] = {}
742
735
  if parsed_args.properties:
743
736
  properties.update(parsed_args.properties)
744
737
  if parsed_args.multiattach:
@@ -772,7 +765,7 @@ class SetVolumeType(command.Command):
772
765
  )
773
766
  except Exception as e:
774
767
  LOG.error(
775
- _("Failed to set volume type access to " "project: %s"), e
768
+ _("Failed to set volume type access to project: %s"), e
776
769
  )
777
770
  result += 1
778
771
 
@@ -796,7 +789,7 @@ class SetVolumeType(command.Command):
796
789
 
797
790
  if result > 0:
798
791
  raise exceptions.CommandError(
799
- _("Command Failed: One or more of" " the operations failed")
792
+ _("Command Failed: One or more of the operations failed")
800
793
  )
801
794
 
802
795
 
@@ -904,8 +897,7 @@ class UnsetVolumeType(command.Command):
904
897
  "--encryption-type",
905
898
  action="store_true",
906
899
  help=_(
907
- "Remove the encryption type for this volume type "
908
- "(admin only)"
900
+ "Remove the encryption type for this volume type (admin only)"
909
901
  ),
910
902
  )
911
903
  return parser
@@ -941,10 +933,7 @@ class UnsetVolumeType(command.Command):
941
933
  )
942
934
  except Exception as e:
943
935
  LOG.error(
944
- _(
945
- "Failed to remove volume type access from "
946
- "project: %s"
947
- ),
936
+ _("Failed to remove volume type access from project: %s"),
948
937
  e,
949
938
  )
950
939
  result += 1
@@ -963,5 +952,5 @@ class UnsetVolumeType(command.Command):
963
952
 
964
953
  if result > 0:
965
954
  raise exceptions.CommandError(
966
- _("Command Failed: One or more of" " the operations failed")
955
+ _("Command Failed: One or more of the operations failed")
967
956
  )
@@ -107,6 +107,7 @@ Dina Belova <dbelova@mirantis.com>
107
107
  Dirk Mueller <dirk@dmllr.de>
108
108
  Diwei Zhu <zhu.diw@northeastern.edu>
109
109
  Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
110
+ Dmitriy Chubinidze <dcu995@gmail.com>
110
111
  Dmitriy Rabotyagov <drabotyagov@vexxhost.com>
111
112
  Dmitriy Rabotyagov <noonedeadpunk@ya.ru>
112
113
  Dmitry Tantsur <dtantsur@protonmail.com>
@@ -177,6 +178,7 @@ Ilya Popov <ilya_p@hotmail.com>
177
178
  Imtiaz Chowdhury <imtiaz.chowdhury@workday.com>
178
179
  Inessa Vasilevskaya <ivasilevskaya@mirantis.com>
179
180
  Iswarya_Vakati <v.iswarya@nectechnologies.in>
181
+ Ivan Anfimov <lazekteam@gmail.com>
180
182
  Ivan Kolodyazhny <e0ne@e0ne.info>
181
183
  JAE YONG LEE <jaeljy135@gmail.com>
182
184
  JIHOJU <jihoju96@gmail.com>
@@ -425,6 +427,7 @@ Violet Kurtz <vi.kurtz@protonmail.com>
425
427
  Violet Kurtz <vikurtz@osuosl.org>
426
428
  Vishakha Agarwal <agarwalvishakha18@gmail.com>
427
429
  Vladimir Eremin <yottatsa@yandex-team.ru>
430
+ Vladimir Kozhukalov <kozhukalov@gmail.com>
428
431
  Vu Cong Tuan <tuanvc@vn.fujitsu.com>
429
432
  Wenran Xiao <xiaowenran@unitedstack.com>
430
433
  Wenzhi Yu <wenzhi_yu@163.com>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-openstackclient
3
- Version: 7.4.0
3
+ Version: 8.0.0
4
4
  Summary: OpenStack Command-line Client
5
5
  Home-page: https://docs.openstack.org/python-openstackclient/latest/
6
6
  Author: OpenStack
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Requires-Python: >=3.9
20
+ Description-Content-Type: text/x-rst
20
21
  License-File: LICENSE
21
22
  License-File: AUTHORS
22
23
  Requires-Dist: pbr !=2.1.0,>=2.0.0
@@ -35,11 +36,6 @@ Requires-Dist: stevedore >=2.0.1
35
36
  Team and repository tags
36
37
  ========================
37
38
 
38
- .. image:: https://governance.openstack.org/tc/badges/python-openstackclient.svg
39
- :target: https://governance.openstack.org/tc/reference/tags/index.html
40
-
41
- .. Change things from this point on
42
-
43
39
  ===============
44
40
  OpenStackClient
45
41
  ===============
@@ -81,12 +77,12 @@ Getting Started
81
77
 
82
78
  OpenStack Client can be installed from PyPI using pip::
83
79
 
84
- pip install python-openstackclient
80
+ python3 -m pip install python-openstackclient
85
81
 
86
82
  There are a few variants on getting help. A list of global options and supported
87
83
  commands is shown with ``--help``::
88
84
 
89
- openstack --help
85
+ openstack --help
90
86
 
91
87
  There is also a ``help`` command that can be used to get help text for a specific
92
88
  command::
@@ -97,11 +93,9 @@ command::
97
93
  If you want to make changes to the OpenStackClient for testing and contribution,
98
94
  make any changes and then run::
99
95
 
100
- python setup.py develop
101
-
102
- or::
103
-
104
- pip install -e .
96
+ git clone https://opendev.org/openstack/python-openstackclient
97
+ cd python-openstackclient
98
+ python3 -m pip install -e .
105
99
 
106
100
  Configuration
107
101
  =============