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.
- openstackclient/common/availability_zone.py +3 -6
- openstackclient/common/clientmanager.py +2 -1
- openstackclient/common/envvars.py +57 -0
- openstackclient/common/extension.py +3 -11
- openstackclient/common/limits.py +1 -1
- openstackclient/common/project_cleanup.py +3 -2
- openstackclient/common/quota.py +54 -28
- openstackclient/compute/client.py +2 -5
- openstackclient/compute/v2/agent.py +5 -5
- openstackclient/compute/v2/aggregate.py +17 -15
- openstackclient/compute/v2/console.py +3 -4
- openstackclient/compute/v2/flavor.py +14 -18
- openstackclient/compute/v2/host.py +3 -3
- openstackclient/compute/v2/hypervisor.py +10 -4
- openstackclient/compute/v2/hypervisor_stats.py +1 -1
- openstackclient/compute/v2/keypair.py +8 -10
- openstackclient/compute/v2/server.py +70 -112
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_event.py +7 -16
- openstackclient/compute/v2/server_group.py +6 -6
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +6 -6
- openstackclient/compute/v2/server_volume.py +4 -4
- openstackclient/compute/v2/service.py +9 -13
- openstackclient/compute/v2/usage.py +4 -6
- openstackclient/identity/client.py +2 -4
- openstackclient/identity/common.py +16 -17
- openstackclient/identity/v2_0/ec2creds.py +4 -3
- openstackclient/identity/v2_0/endpoint.py +12 -10
- openstackclient/identity/v2_0/project.py +6 -6
- openstackclient/identity/v2_0/role.py +1 -1
- openstackclient/identity/v2_0/service.py +7 -7
- openstackclient/identity/v2_0/user.py +6 -21
- openstackclient/identity/v3/access_rule.py +2 -5
- openstackclient/identity/v3/consumer.py +4 -3
- openstackclient/identity/v3/credential.py +8 -9
- openstackclient/identity/v3/domain.py +1 -1
- openstackclient/identity/v3/ec2creds.py +4 -3
- openstackclient/identity/v3/endpoint.py +104 -88
- openstackclient/identity/v3/endpoint_group.py +1 -1
- openstackclient/identity/v3/group.py +3 -4
- openstackclient/identity/v3/identity_provider.py +1 -2
- openstackclient/identity/v3/limit.py +4 -9
- openstackclient/identity/v3/mapping.py +4 -3
- openstackclient/identity/v3/policy.py +5 -8
- openstackclient/identity/v3/project.py +6 -6
- openstackclient/identity/v3/region.py +2 -5
- openstackclient/identity/v3/registered_limit.py +4 -8
- openstackclient/identity/v3/role.py +15 -16
- openstackclient/identity/v3/service.py +8 -8
- openstackclient/identity/v3/service_provider.py +3 -6
- openstackclient/identity/v3/tag.py +2 -2
- openstackclient/identity/v3/token.py +1 -2
- openstackclient/identity/v3/trust.py +74 -25
- openstackclient/identity/v3/user.py +9 -6
- openstackclient/image/client.py +2 -5
- openstackclient/image/v1/image.py +11 -15
- openstackclient/image/v2/cache.py +2 -4
- openstackclient/image/v2/image.py +30 -37
- openstackclient/image/v2/metadef_namespaces.py +4 -3
- openstackclient/image/v2/metadef_resource_type_association.py +1 -2
- openstackclient/image/v2/metadef_resource_types.py +1 -2
- openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +9 -1370
- openstackclient/network/client.py +4 -10
- openstackclient/network/common.py +16 -12
- openstackclient/network/utils.py +3 -3
- openstackclient/network/v2/address_group.py +5 -9
- openstackclient/network/v2/address_scope.py +2 -3
- openstackclient/network/v2/default_security_group_rule.py +1 -2
- openstackclient/network/v2/floating_ip.py +14 -21
- openstackclient/network/v2/floating_ip_port_forwarding.py +7 -7
- openstackclient/network/v2/ip_availability.py +1 -2
- openstackclient/network/v2/l3_conntrack_helper.py +8 -12
- openstackclient/network/v2/local_ip.py +24 -26
- openstackclient/network/v2/local_ip_association.py +4 -5
- openstackclient/network/v2/ndp_proxy.py +9 -10
- openstackclient/network/v2/network.py +12 -16
- openstackclient/network/v2/network_agent.py +29 -37
- openstackclient/network/v2/network_auto_allocated_topology.py +4 -5
- openstackclient/network/v2/network_flavor.py +1 -1
- openstackclient/network/v2/network_flavor_profile.py +5 -5
- openstackclient/network/v2/network_meter.py +3 -3
- openstackclient/network/v2/network_meter_rule.py +5 -8
- openstackclient/network/v2/network_qos_policy.py +4 -4
- openstackclient/network/v2/network_qos_rule.py +4 -5
- openstackclient/network/v2/network_rbac.py +4 -4
- openstackclient/network/v2/network_segment.py +6 -7
- openstackclient/network/v2/network_segment_range.py +16 -20
- openstackclient/network/v2/network_trunk.py +24 -16
- openstackclient/network/v2/port.py +42 -31
- openstackclient/network/v2/router.py +55 -41
- openstackclient/network/v2/security_group.py +8 -15
- openstackclient/network/v2/security_group_rule.py +9 -10
- openstackclient/network/v2/subnet.py +31 -30
- openstackclient/network/v2/subnet_pool.py +4 -4
- openstackclient/object/client.py +2 -3
- openstackclient/object/v1/container.py +2 -3
- openstackclient/object/v1/object.py +2 -9
- openstackclient/shell.py +22 -5
- openstackclient/tests/functional/base.py +2 -2
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +12 -6
- openstackclient/tests/functional/compute/v2/test_server.py +2 -3
- openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
- openstackclient/tests/functional/identity/v2/test_user.py +1 -1
- openstackclient/tests/functional/identity/v3/common.py +3 -8
- openstackclient/tests/functional/identity/v3/test_application_credential.py +10 -10
- openstackclient/tests/functional/identity/v3/test_endpoint.py +3 -3
- openstackclient/tests/functional/identity/v3/test_group.py +3 -3
- openstackclient/tests/functional/identity/v3/test_idp.py +3 -7
- openstackclient/tests/functional/identity/v3/test_limit.py +4 -4
- openstackclient/tests/functional/identity/v3/test_project.py +5 -14
- openstackclient/tests/functional/identity/v3/test_region.py +1 -3
- openstackclient/tests/functional/identity/v3/test_registered_limit.py +3 -3
- openstackclient/tests/functional/identity/v3/test_role.py +1 -1
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +13 -31
- openstackclient/tests/functional/identity/v3/test_service_provider.py +3 -7
- openstackclient/tests/functional/identity/v3/test_user.py +8 -8
- openstackclient/tests/functional/network/v2/common.py +7 -3
- openstackclient/tests/functional/network/v2/test_address_group.py +4 -0
- openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +15 -11
- openstackclient/tests/functional/network/v2/test_local_ip.py +4 -0
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +2 -2
- openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +2 -3
- openstackclient/tests/functional/network/v2/test_network_rbac.py +2 -2
- openstackclient/tests/functional/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/functional/network/v2/test_port.py +17 -7
- openstackclient/tests/functional/network/v2/test_router.py +42 -0
- openstackclient/tests/functional/network/v2/test_subnet_pool.py +4 -0
- openstackclient/tests/unit/api/test_compute_v2.py +67 -87
- openstackclient/tests/unit/common/test_availability_zone.py +6 -14
- openstackclient/tests/unit/common/test_command.py +1 -1
- openstackclient/tests/unit/common/test_extension.py +5 -7
- openstackclient/tests/unit/common/test_limits.py +1 -1
- openstackclient/tests/unit/common/test_project_cleanup.py +5 -6
- openstackclient/tests/unit/common/test_quota.py +51 -28
- openstackclient/tests/unit/compute/v2/fakes.py +4 -10
- openstackclient/tests/unit/compute/v2/test_agent.py +16 -16
- openstackclient/tests/unit/compute/v2/test_aggregate.py +56 -60
- openstackclient/tests/unit/compute/v2/test_console.py +16 -16
- openstackclient/tests/unit/compute/v2/test_flavor.py +71 -71
- openstackclient/tests/unit/compute/v2/test_host.py +8 -8
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +22 -30
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +24 -24
- openstackclient/tests/unit/compute/v2/test_server.py +524 -560
- openstackclient/tests/unit/compute/v2/test_server_backup.py +5 -7
- openstackclient/tests/unit/compute/v2/test_server_event.py +16 -18
- openstackclient/tests/unit/compute/v2/test_server_group.py +25 -31
- openstackclient/tests/unit/compute/v2/test_server_image.py +6 -8
- openstackclient/tests/unit/compute/v2/test_server_migration.py +37 -37
- openstackclient/tests/unit/compute/v2/test_server_volume.py +12 -12
- openstackclient/tests/unit/compute/v2/test_service.py +39 -45
- openstackclient/tests/unit/compute/v2/test_usage.py +5 -5
- openstackclient/tests/unit/identity/v2_0/fakes.py +1 -1
- openstackclient/tests/unit/identity/v3/test_access_rule.py +1 -3
- openstackclient/tests/unit/identity/v3/test_application_credential.py +1 -1
- openstackclient/tests/unit/identity/v3/test_credential.py +4 -4
- openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
- openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
- openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
- openstackclient/tests/unit/identity/v3/test_user.py +16 -0
- openstackclient/tests/unit/image/v1/fakes.py +2 -2
- openstackclient/tests/unit/image/v2/test_image.py +39 -1
- openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
- openstackclient/tests/unit/network/test_common.py +2 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +49 -35
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
- openstackclient/tests/unit/network/v2/test_port.py +33 -5
- openstackclient/tests/unit/network/v2/test_router.py +120 -7
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +14 -14
- openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
- openstackclient/tests/unit/test_shell.py +16 -13
- openstackclient/tests/unit/volume/v2/test_volume.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +1 -1
- openstackclient/tests/unit/volume/v3/fakes.py +2 -8
- openstackclient/tests/unit/volume/v3/test_volume.py +1 -1
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +3 -3
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +1 -2
- openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +1 -1
- openstackclient/volume/client.py +1 -3
- openstackclient/volume/v2/consistency_group.py +4 -8
- openstackclient/volume/v2/consistency_group_snapshot.py +1 -2
- openstackclient/volume/v2/qos_specs.py +1 -2
- openstackclient/volume/v2/volume.py +8 -16
- openstackclient/volume/v2/volume_backup.py +6 -7
- openstackclient/volume/v2/volume_snapshot.py +8 -9
- openstackclient/volume/v2/volume_transfer_request.py +0 -3
- openstackclient/volume/v2/volume_type.py +10 -21
- openstackclient/volume/v3/block_storage_cluster.py +3 -3
- openstackclient/volume/v3/block_storage_manage.py +1 -3
- openstackclient/volume/v3/volume.py +18 -19
- openstackclient/volume/v3/volume_attachment.py +3 -2
- openstackclient/volume/v3/volume_backup.py +7 -8
- openstackclient/volume/v3/volume_group.py +2 -1
- openstackclient/volume/v3/volume_group_snapshot.py +2 -1
- openstackclient/volume/v3/volume_snapshot.py +4 -3
- openstackclient/volume/v3/volume_type.py +10 -21
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/AUTHORS +4 -0
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/METADATA +7 -13
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/RECORD +210 -233
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/entry_points.txt +0 -41
- python_openstackclient-8.0.0.dist-info/pbr.json +1 -0
- openstackclient/tests/functional/volume/v1/__init__.py +0 -0
- openstackclient/tests/functional/volume/v1/common.py +0 -35
- openstackclient/tests/functional/volume/v1/test_qos.py +0 -100
- openstackclient/tests/functional/volume/v1/test_service.py +0 -76
- openstackclient/tests/functional/volume/v1/test_snapshot.py +0 -232
- openstackclient/tests/functional/volume/v1/test_transfer_request.py +0 -111
- openstackclient/tests/functional/volume/v1/test_volume.py +0 -228
- openstackclient/tests/functional/volume/v1/test_volume_type.py +0 -213
- openstackclient/tests/unit/volume/v1/__init__.py +0 -0
- openstackclient/tests/unit/volume/v1/fakes.py +0 -615
- openstackclient/tests/unit/volume/v1/test_qos_specs.py +0 -471
- openstackclient/tests/unit/volume/v1/test_service.py +0 -295
- openstackclient/tests/unit/volume/v1/test_transfer_request.py +0 -380
- openstackclient/tests/unit/volume/v1/test_type.py +0 -633
- openstackclient/tests/unit/volume/v1/test_volume.py +0 -1447
- openstackclient/tests/unit/volume/v1/test_volume_backup.py +0 -435
- openstackclient/volume/v1/__init__.py +0 -0
- openstackclient/volume/v1/qos_specs.py +0 -377
- openstackclient/volume/v1/service.py +0 -136
- openstackclient/volume/v1/volume.py +0 -734
- openstackclient/volume/v1/volume_backup.py +0 -302
- openstackclient/volume/v1/volume_snapshot.py +0 -433
- openstackclient/volume/v1/volume_transfer_request.py +0 -200
- openstackclient/volume/v1/volume_type.py +0 -520
- python_openstackclient-7.3.1.dist-info/pbr.json +0 -1
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-7.3.1.dist-info → python_openstackclient-8.0.0.dist-info}/top_level.txt +0 -0
|
@@ -272,8 +272,7 @@ class CreateVolumeType(command.ShowOne):
|
|
|
272
272
|
)
|
|
273
273
|
except Exception as e:
|
|
274
274
|
msg = _(
|
|
275
|
-
"Failed to add project %(project)s access to "
|
|
276
|
-
"type: %(e)s"
|
|
275
|
+
"Failed to add project %(project)s access to type: %(e)s"
|
|
277
276
|
)
|
|
278
277
|
LOG.error(msg % {'project': parsed_args.project, 'e': e})
|
|
279
278
|
|
|
@@ -363,7 +362,7 @@ class DeleteVolumeType(command.Command):
|
|
|
363
362
|
if result > 0:
|
|
364
363
|
total = len(parsed_args.volume_types)
|
|
365
364
|
msg = _(
|
|
366
|
-
"%(result)s of %(total)s volume types failed
|
|
365
|
+
"%(result)s of %(total)s volume types failed to delete."
|
|
367
366
|
) % {'result': result, 'total': total}
|
|
368
367
|
raise exceptions.CommandError(msg)
|
|
369
368
|
|
|
@@ -553,8 +552,7 @@ class SetVolumeType(command.Command):
|
|
|
553
552
|
'--project',
|
|
554
553
|
metavar='<project>',
|
|
555
554
|
help=_(
|
|
556
|
-
'Set volume type access to project (name or ID) '
|
|
557
|
-
'(admin only)'
|
|
555
|
+
'Set volume type access to project (name or ID) (admin only)'
|
|
558
556
|
),
|
|
559
557
|
)
|
|
560
558
|
public_group = parser.add_mutually_exclusive_group()
|
|
@@ -646,17 +644,12 @@ class SetVolumeType(command.Command):
|
|
|
646
644
|
volume_client.volume_types.update(volume_type.id, **kwargs)
|
|
647
645
|
except Exception as e:
|
|
648
646
|
LOG.error(
|
|
649
|
-
_(
|
|
650
|
-
"Failed to update volume type name or"
|
|
651
|
-
" description: %s"
|
|
652
|
-
),
|
|
647
|
+
_("Failed to update volume type name or description: %s"),
|
|
653
648
|
e,
|
|
654
649
|
)
|
|
655
650
|
result += 1
|
|
656
651
|
|
|
657
|
-
properties = {}
|
|
658
|
-
|
|
659
|
-
properties = {}
|
|
652
|
+
properties: dict[str, str] = {}
|
|
660
653
|
if parsed_args.properties:
|
|
661
654
|
properties.update(parsed_args.properties)
|
|
662
655
|
if parsed_args.multiattach:
|
|
@@ -690,7 +683,7 @@ class SetVolumeType(command.Command):
|
|
|
690
683
|
)
|
|
691
684
|
except Exception as e:
|
|
692
685
|
LOG.error(
|
|
693
|
-
_("Failed to set volume type access to
|
|
686
|
+
_("Failed to set volume type access to project: %s"), e
|
|
694
687
|
)
|
|
695
688
|
result += 1
|
|
696
689
|
|
|
@@ -714,7 +707,7 @@ class SetVolumeType(command.Command):
|
|
|
714
707
|
|
|
715
708
|
if result > 0:
|
|
716
709
|
raise exceptions.CommandError(
|
|
717
|
-
_("Command Failed: One or more of
|
|
710
|
+
_("Command Failed: One or more of the operations failed")
|
|
718
711
|
)
|
|
719
712
|
|
|
720
713
|
|
|
@@ -822,8 +815,7 @@ class UnsetVolumeType(command.Command):
|
|
|
822
815
|
"--encryption-type",
|
|
823
816
|
action="store_true",
|
|
824
817
|
help=_(
|
|
825
|
-
"Remove the encryption type for this volume type "
|
|
826
|
-
"(admin only)"
|
|
818
|
+
"Remove the encryption type for this volume type (admin only)"
|
|
827
819
|
),
|
|
828
820
|
)
|
|
829
821
|
return parser
|
|
@@ -859,10 +851,7 @@ class UnsetVolumeType(command.Command):
|
|
|
859
851
|
)
|
|
860
852
|
except Exception as e:
|
|
861
853
|
LOG.error(
|
|
862
|
-
_(
|
|
863
|
-
"Failed to remove volume type access from "
|
|
864
|
-
"project: %s"
|
|
865
|
-
),
|
|
854
|
+
_("Failed to remove volume type access from project: %s"),
|
|
866
855
|
e,
|
|
867
856
|
)
|
|
868
857
|
result += 1
|
|
@@ -881,5 +870,5 @@ class UnsetVolumeType(command.Command):
|
|
|
881
870
|
|
|
882
871
|
if result > 0:
|
|
883
872
|
raise exceptions.CommandError(
|
|
884
|
-
_("Command Failed: One or more of
|
|
873
|
+
_("Command Failed: One or more of the operations failed")
|
|
885
874
|
)
|
|
@@ -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
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
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=
|
|
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=
|
|
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=
|
|
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
|
-
|
|
96
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
955
|
+
_("Command Failed: One or more of the operations failed")
|
|
967
956
|
)
|
|
@@ -107,11 +107,13 @@ 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>
|
|
113
114
|
Dolph Mathews <dolph.mathews@gmail.com>
|
|
114
115
|
Dongcan Ye <hellochosen@gmail.com>
|
|
116
|
+
Doug Goldstein <cardoe@cardoe.com>
|
|
115
117
|
Doug Hellmann <doug.hellmann@dreamhost.com>
|
|
116
118
|
Doug Hellmann <doug@doughellmann.com>
|
|
117
119
|
Doug Wiegley <dwiegley@salesforce.com>
|
|
@@ -176,6 +178,7 @@ Ilya Popov <ilya_p@hotmail.com>
|
|
|
176
178
|
Imtiaz Chowdhury <imtiaz.chowdhury@workday.com>
|
|
177
179
|
Inessa Vasilevskaya <ivasilevskaya@mirantis.com>
|
|
178
180
|
Iswarya_Vakati <v.iswarya@nectechnologies.in>
|
|
181
|
+
Ivan Anfimov <lazekteam@gmail.com>
|
|
179
182
|
Ivan Kolodyazhny <e0ne@e0ne.info>
|
|
180
183
|
JAE YONG LEE <jaeljy135@gmail.com>
|
|
181
184
|
JIHOJU <jihoju96@gmail.com>
|
|
@@ -424,6 +427,7 @@ Violet Kurtz <vi.kurtz@protonmail.com>
|
|
|
424
427
|
Violet Kurtz <vikurtz@osuosl.org>
|
|
425
428
|
Vishakha Agarwal <agarwalvishakha18@gmail.com>
|
|
426
429
|
Vladimir Eremin <yottatsa@yandex-team.ru>
|
|
430
|
+
Vladimir Kozhukalov <kozhukalov@gmail.com>
|
|
427
431
|
Vu Cong Tuan <tuanvc@vn.fujitsu.com>
|
|
428
432
|
Wenran Xiao <xiaowenran@unitedstack.com>
|
|
429
433
|
Wenzhi Yu <wenzhi_yu@163.com>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-openstackclient
|
|
3
|
-
Version:
|
|
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
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
=============
|