python-openstackclient 8.2.0__py3-none-any.whl → 9.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/api/object_store_v1.py +4 -1
- openstackclient/command.py +27 -0
- openstackclient/common/availability_zone.py +1 -1
- openstackclient/common/clientmanager.py +59 -21
- openstackclient/common/configuration.py +1 -1
- openstackclient/common/extension.py +1 -1
- openstackclient/common/limits.py +1 -1
- openstackclient/common/module.py +5 -3
- openstackclient/common/project_cleanup.py +10 -8
- openstackclient/common/quota.py +54 -23
- openstackclient/common/versions.py +1 -2
- openstackclient/compute/v2/agent.py +1 -1
- openstackclient/compute/v2/aggregate.py +6 -5
- openstackclient/compute/v2/console.py +5 -3
- openstackclient/compute/v2/console_connection.py +1 -1
- openstackclient/compute/v2/flavor.py +1 -1
- openstackclient/compute/v2/host.py +1 -1
- openstackclient/compute/v2/hypervisor.py +1 -1
- openstackclient/compute/v2/hypervisor_stats.py +1 -1
- openstackclient/compute/v2/keypair.py +1 -1
- openstackclient/compute/v2/server.py +78 -29
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_event.py +1 -1
- openstackclient/compute/v2/server_group.py +4 -2
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +1 -1
- openstackclient/compute/v2/server_volume.py +1 -1
- openstackclient/compute/v2/service.py +1 -1
- openstackclient/compute/v2/usage.py +6 -4
- openstackclient/identity/common.py +33 -1
- openstackclient/identity/v2_0/catalog.py +3 -2
- openstackclient/identity/v2_0/ec2creds.py +1 -1
- openstackclient/identity/v2_0/endpoint.py +1 -1
- openstackclient/identity/v2_0/project.py +17 -7
- openstackclient/identity/v2_0/role.py +1 -1
- openstackclient/identity/v2_0/role_assignment.py +3 -3
- openstackclient/identity/v2_0/service.py +4 -2
- openstackclient/identity/v2_0/token.py +1 -1
- openstackclient/identity/v2_0/user.py +2 -2
- openstackclient/identity/v3/access_rule.py +16 -4
- openstackclient/identity/v3/application_credential.py +30 -10
- openstackclient/identity/v3/catalog.py +3 -3
- openstackclient/identity/v3/consumer.py +1 -1
- openstackclient/identity/v3/credential.py +1 -1
- openstackclient/identity/v3/domain.py +10 -4
- openstackclient/identity/v3/ec2creds.py +1 -1
- openstackclient/identity/v3/endpoint.py +33 -12
- openstackclient/identity/v3/endpoint_group.py +1 -1
- openstackclient/identity/v3/federation_protocol.py +40 -41
- openstackclient/identity/v3/group.py +11 -5
- openstackclient/identity/v3/identity_provider.py +12 -10
- openstackclient/identity/v3/implied_role.py +1 -1
- openstackclient/identity/v3/limit.py +86 -85
- openstackclient/identity/v3/mapping.py +1 -1
- openstackclient/identity/v3/policy.py +1 -1
- openstackclient/identity/v3/project.py +191 -115
- openstackclient/identity/v3/region.py +1 -1
- openstackclient/identity/v3/registered_limit.py +97 -109
- openstackclient/identity/v3/role.py +20 -39
- openstackclient/identity/v3/role_assignment.py +12 -23
- openstackclient/identity/v3/service.py +1 -1
- openstackclient/identity/v3/service_provider.py +1 -1
- openstackclient/identity/v3/tag.py +1 -11
- openstackclient/identity/v3/token.py +3 -2
- openstackclient/identity/v3/trust.py +4 -2
- openstackclient/identity/v3/unscoped_saml.py +1 -1
- openstackclient/identity/v3/user.py +22 -13
- openstackclient/image/v1/image.py +19 -16
- openstackclient/image/v2/cache.py +1 -1
- openstackclient/image/v2/image.py +16 -12
- openstackclient/image/v2/info.py +1 -1
- openstackclient/image/v2/metadef_namespaces.py +1 -1
- openstackclient/image/v2/metadef_objects.py +1 -1
- openstackclient/image/v2/metadef_properties.py +3 -2
- openstackclient/image/v2/metadef_resource_type_association.py +1 -1
- openstackclient/image/v2/metadef_resource_types.py +1 -1
- openstackclient/image/v2/task.py +1 -1
- openstackclient/network/common.py +10 -9
- openstackclient/network/v2/address_group.py +4 -3
- openstackclient/network/v2/address_scope.py +8 -6
- openstackclient/network/v2/default_security_group_rule.py +9 -8
- openstackclient/network/v2/floating_ip.py +16 -9
- openstackclient/network/v2/floating_ip_port_forwarding.py +9 -6
- openstackclient/network/v2/ip_availability.py +7 -4
- openstackclient/network/v2/l3_conntrack_helper.py +11 -4
- openstackclient/network/v2/local_ip.py +13 -7
- openstackclient/network/v2/local_ip_association.py +7 -4
- openstackclient/network/v2/ndp_proxy.py +13 -6
- openstackclient/network/v2/network.py +33 -16
- openstackclient/network/v2/network_agent.py +5 -5
- openstackclient/network/v2/network_auto_allocated_topology.py +1 -1
- openstackclient/network/v2/network_flavor.py +1 -1
- openstackclient/network/v2/network_flavor_profile.py +1 -1
- openstackclient/network/v2/network_meter.py +1 -1
- openstackclient/network/v2/network_meter_rule.py +1 -1
- openstackclient/network/v2/network_qos_policy.py +7 -5
- openstackclient/network/v2/network_qos_rule.py +1 -1
- openstackclient/network/v2/network_qos_rule_type.py +1 -1
- openstackclient/network/v2/network_rbac.py +8 -5
- openstackclient/network/v2/network_segment.py +2 -2
- openstackclient/network/v2/network_segment_range.py +13 -6
- openstackclient/network/v2/network_service_provider.py +1 -1
- openstackclient/network/v2/network_trunk.py +65 -42
- openstackclient/network/v2/port.py +22 -20
- openstackclient/network/v2/router.py +19 -8
- openstackclient/network/v2/security_group.py +10 -6
- openstackclient/network/v2/security_group_rule.py +11 -5
- openstackclient/network/v2/subnet.py +17 -18
- openstackclient/network/v2/subnet_pool.py +11 -9
- openstackclient/network/v2/taas/__init__.py +0 -0
- openstackclient/network/v2/taas/tap_flow.py +245 -0
- openstackclient/network/v2/taas/tap_mirror.py +237 -0
- openstackclient/network/v2/taas/tap_service.py +211 -0
- openstackclient/object/v1/account.py +1 -1
- openstackclient/object/v1/container.py +1 -1
- openstackclient/object/v1/object.py +1 -1
- openstackclient/shell.py +18 -8
- openstackclient/tests/functional/identity/v3/test_catalog.py +42 -23
- openstackclient/tests/functional/identity/v3/test_limit.py +47 -0
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +174 -0
- openstackclient/tests/functional/image/v2/test_cache.py +54 -0
- openstackclient/tests/functional/image/v2/test_metadef_objects.py +69 -0
- openstackclient/tests/functional/image/v2/test_metadef_resource_type.py +55 -0
- openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +46 -132
- openstackclient/tests/unit/common/test_command.py +1 -1
- openstackclient/tests/unit/common/test_extension.py +2 -3
- openstackclient/tests/unit/common/test_module.py +14 -7
- openstackclient/tests/unit/common/test_quota.py +79 -0
- openstackclient/tests/unit/compute/v2/test_aggregate.py +5 -3
- openstackclient/tests/unit/compute/v2/test_console.py +1 -4
- openstackclient/tests/unit/compute/v2/test_flavor.py +1 -3
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +1 -9
- openstackclient/tests/unit/compute/v2/test_server.py +370 -38
- openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -3
- openstackclient/tests/unit/compute/v2/test_service.py +1 -3
- openstackclient/tests/unit/fakes.py +35 -134
- openstackclient/tests/unit/identity/test_common.py +100 -0
- openstackclient/tests/unit/identity/v2_0/test_project.py +4 -4
- openstackclient/tests/unit/identity/v3/fakes.py +10 -2
- openstackclient/tests/unit/identity/v3/test_application_credential.py +3 -3
- openstackclient/tests/unit/identity/v3/test_domain.py +1 -1
- openstackclient/tests/unit/identity/v3/test_endpoint.py +1 -1
- openstackclient/tests/unit/identity/v3/test_group.py +4 -2
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +10 -10
- openstackclient/tests/unit/identity/v3/test_limit.py +197 -145
- openstackclient/tests/unit/identity/v3/test_oauth.py +1 -1
- openstackclient/tests/unit/identity/v3/test_project.py +832 -513
- openstackclient/tests/unit/identity/v3/test_protocol.py +97 -88
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +356 -221
- openstackclient/tests/unit/identity/v3/test_role.py +1 -82
- openstackclient/tests/unit/identity/v3/test_user.py +7 -51
- openstackclient/tests/unit/image/v2/test_image.py +116 -5
- openstackclient/tests/unit/network/test_common.py +9 -13
- openstackclient/tests/unit/network/v2/taas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/taas/test_osc_tap_flow.py +276 -0
- openstackclient/tests/unit/network/v2/taas/test_osc_tap_mirror.py +288 -0
- openstackclient/tests/unit/network/v2/taas/test_osc_tap_service.py +271 -0
- openstackclient/tests/unit/network/v2/test_address_group.py +19 -22
- openstackclient/tests/unit/network/v2/test_address_scope.py +10 -15
- openstackclient/tests/unit/network/v2/test_default_security_group_rule.py +38 -49
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +21 -27
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +21 -18
- openstackclient/tests/unit/network/v2/test_ip_availability.py +6 -8
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +6 -15
- openstackclient/tests/unit/network/v2/test_local_ip.py +12 -23
- openstackclient/tests/unit/network/v2/test_local_ip_association.py +13 -18
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +11 -21
- openstackclient/tests/unit/network/v2/test_network.py +41 -37
- openstackclient/tests/unit/network/v2/test_network_agent.py +13 -20
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +5 -8
- openstackclient/tests/unit/network/v2/test_network_flavor.py +14 -26
- openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +14 -17
- openstackclient/tests/unit/network/v2/test_network_meter.py +7 -17
- openstackclient/tests/unit/network/v2/test_network_meter_rule.py +10 -20
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +7 -13
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +44 -54
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +2 -7
- openstackclient/tests/unit/network/v2/test_network_rbac.py +21 -36
- openstackclient/tests/unit/network/v2/test_network_segment.py +13 -29
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +20 -19
- openstackclient/tests/unit/network/v2/test_network_service_provider.py +1 -4
- openstackclient/tests/unit/network/v2/test_network_trunk.py +52 -47
- openstackclient/tests/unit/network/v2/test_port.py +75 -86
- openstackclient/tests/unit/network/v2/test_router.py +104 -126
- openstackclient/tests/unit/network/v2/test_security_group_network.py +19 -26
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +17 -18
- openstackclient/tests/unit/network/v2/test_subnet.py +35 -46
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +21 -33
- openstackclient/tests/unit/volume/test_find_resource.py +4 -13
- openstackclient/tests/unit/volume/v2/test_consistency_group.py +8 -2
- openstackclient/tests/unit/volume/v2/test_volume.py +7 -6
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +3 -1
- openstackclient/tests/unit/volume/v3/test_volume.py +38 -12
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +9 -0
- openstackclient/volume/client.py +7 -17
- openstackclient/volume/v2/backup_record.py +1 -1
- openstackclient/volume/v2/consistency_group.py +9 -9
- openstackclient/volume/v2/consistency_group_snapshot.py +3 -3
- openstackclient/volume/v2/qos_specs.py +3 -3
- openstackclient/volume/v2/service.py +1 -1
- openstackclient/volume/v2/volume.py +14 -7
- openstackclient/volume/v2/volume_backend.py +1 -1
- openstackclient/volume/v2/volume_backup.py +7 -5
- openstackclient/volume/v2/volume_host.py +1 -2
- openstackclient/volume/v2/volume_snapshot.py +4 -4
- openstackclient/volume/v2/volume_transfer_request.py +3 -3
- openstackclient/volume/v2/volume_type.py +16 -11
- openstackclient/volume/v3/block_storage_cleanup.py +1 -1
- openstackclient/volume/v3/block_storage_cluster.py +1 -1
- openstackclient/volume/v3/block_storage_log_level.py +1 -1
- openstackclient/volume/v3/block_storage_manage.py +1 -1
- openstackclient/volume/v3/block_storage_resource_filter.py +1 -1
- openstackclient/volume/v3/service.py +1 -1
- openstackclient/volume/v3/volume.py +16 -9
- openstackclient/volume/v3/volume_attachment.py +6 -5
- openstackclient/volume/v3/volume_backup.py +20 -5
- openstackclient/volume/v3/volume_group.py +1 -1
- openstackclient/volume/v3/volume_group_snapshot.py +1 -1
- openstackclient/volume/v3/volume_group_type.py +1 -1
- openstackclient/volume/v3/volume_message.py +1 -1
- openstackclient/volume/v3/volume_snapshot.py +4 -4
- openstackclient/volume/v3/volume_transfer_request.py +3 -3
- openstackclient/volume/v3/volume_type.py +20 -14
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info}/METADATA +15 -13
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info}/RECORD +231 -219
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info}/entry_points.txt +15 -0
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info/licenses}/AUTHORS +15 -0
- python_openstackclient-9.0.0.dist-info/pbr.json +1 -0
- openstackclient/tests/unit/common/test_logs.py +0 -221
- python_openstackclient-8.2.0.dist-info/pbr.json +0 -1
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info/licenses}/LICENSE +0 -0
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-9.0.0.dist-info}/top_level.txt +0 -0
|
@@ -26,11 +26,11 @@ from openstack import exceptions as sdk_exceptions
|
|
|
26
26
|
from openstack import utils as sdk_utils
|
|
27
27
|
from osc_lib.cli import format_columns
|
|
28
28
|
from osc_lib.cli import parseractions
|
|
29
|
-
from osc_lib.command import command
|
|
30
29
|
from osc_lib import exceptions
|
|
31
30
|
from osc_lib import utils
|
|
32
31
|
|
|
33
32
|
from openstackclient.api import volume_v3
|
|
33
|
+
from openstackclient import command
|
|
34
34
|
from openstackclient.common import pagination
|
|
35
35
|
from openstackclient.i18n import _
|
|
36
36
|
from openstackclient.identity import common as identity_common
|
|
@@ -62,7 +62,7 @@ class KeyValueHintAction(argparse.Action):
|
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
class AttachmentsColumn(cliff_columns.FormattableColumn):
|
|
65
|
+
class AttachmentsColumn(cliff_columns.FormattableColumn[list[ty.Any]]):
|
|
66
66
|
"""Formattable column for attachments column.
|
|
67
67
|
|
|
68
68
|
Unlike the parent FormattableColumn class, the initializer of the
|
|
@@ -515,12 +515,19 @@ class DeleteVolume(command.Command):
|
|
|
515
515
|
),
|
|
516
516
|
)
|
|
517
517
|
group.add_argument(
|
|
518
|
-
"--
|
|
518
|
+
"--cascade",
|
|
519
519
|
action="store_true",
|
|
520
520
|
help=_(
|
|
521
521
|
"Remove any snapshots along with volume(s) (defaults to False)"
|
|
522
522
|
),
|
|
523
523
|
)
|
|
524
|
+
group.add_argument(
|
|
525
|
+
# now called "cascade", accept old arg for compatibility
|
|
526
|
+
"--purge",
|
|
527
|
+
action="store_true",
|
|
528
|
+
help=argparse.SUPPRESS,
|
|
529
|
+
dest='cascade',
|
|
530
|
+
)
|
|
524
531
|
parser.add_argument(
|
|
525
532
|
'--remote',
|
|
526
533
|
action='store_true',
|
|
@@ -532,9 +539,9 @@ class DeleteVolume(command.Command):
|
|
|
532
539
|
volume_client = self.app.client_manager.sdk_connection.volume
|
|
533
540
|
result = 0
|
|
534
541
|
|
|
535
|
-
if parsed_args.remote and (parsed_args.force or parsed_args.
|
|
542
|
+
if parsed_args.remote and (parsed_args.force or parsed_args.cascade):
|
|
536
543
|
msg = _(
|
|
537
|
-
"The --force and --
|
|
544
|
+
"The --force and --cascade options are not "
|
|
538
545
|
"supported with the --remote parameter."
|
|
539
546
|
)
|
|
540
547
|
raise exceptions.CommandError(msg)
|
|
@@ -550,7 +557,7 @@ class DeleteVolume(command.Command):
|
|
|
550
557
|
volume_client.delete_volume(
|
|
551
558
|
volume_obj.id,
|
|
552
559
|
force=parsed_args.force,
|
|
553
|
-
cascade=parsed_args.
|
|
560
|
+
cascade=parsed_args.cascade,
|
|
554
561
|
)
|
|
555
562
|
except Exception as e:
|
|
556
563
|
result += 1
|
|
@@ -1071,12 +1078,12 @@ class SetVolume(command.Command):
|
|
|
1071
1078
|
elif policy:
|
|
1072
1079
|
# If the "--migration-policy" is specified without "--type"
|
|
1073
1080
|
LOG.warning(
|
|
1074
|
-
_("'%s' option will not work without '--type' option")
|
|
1075
|
-
|
|
1081
|
+
_("'%s' option will not work without '--type' option"),
|
|
1082
|
+
(
|
|
1076
1083
|
'--migration-policy'
|
|
1077
1084
|
if parsed_args.migration_policy
|
|
1078
1085
|
else '--retype-policy'
|
|
1079
|
-
)
|
|
1086
|
+
),
|
|
1080
1087
|
)
|
|
1081
1088
|
|
|
1082
1089
|
kwargs = {}
|
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import logging
|
|
14
|
+
import typing as ty
|
|
14
15
|
|
|
15
16
|
from openstack import utils as sdk_utils
|
|
16
17
|
from osc_lib.cli import format_columns
|
|
17
|
-
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 import command
|
|
21
22
|
from openstackclient.common import envvars
|
|
22
23
|
from openstackclient.common import pagination
|
|
23
24
|
from openstackclient.i18n import _
|
|
@@ -56,12 +57,12 @@ def _format_attachment(attachment):
|
|
|
56
57
|
# VolumeAttachmentManager.create returns a dict while everything else
|
|
57
58
|
# returns a VolumeAttachment object
|
|
58
59
|
if isinstance(attachment, dict):
|
|
59
|
-
data =
|
|
60
|
+
data: tuple[ty.Any, ...] = ()
|
|
60
61
|
for column in columns:
|
|
61
62
|
if column == 'connection_info':
|
|
62
|
-
data
|
|
63
|
+
data += (format_columns.DictColumn(attachment[column]),)
|
|
63
64
|
continue
|
|
64
|
-
data
|
|
65
|
+
data += (attachment[column],)
|
|
65
66
|
else:
|
|
66
67
|
data = utils.get_item_properties(
|
|
67
68
|
attachment,
|
|
@@ -458,7 +459,7 @@ class ListVolumeAttachment(command.Lister):
|
|
|
458
459
|
}
|
|
459
460
|
# Update search option with `filters`
|
|
460
461
|
# if AppendFilters.filters:
|
|
461
|
-
# search_opts.update(shell_utils.extract_filters(AppendFilters.filters))
|
|
462
|
+
# search_opts.update(shell_utils.extract_filters(AppendFilters.filters)) # noqa: E501
|
|
462
463
|
|
|
463
464
|
# TODO(stephenfin): Implement sorting
|
|
464
465
|
attachments = volume_client.attachments(
|
|
@@ -21,17 +21,17 @@ import logging
|
|
|
21
21
|
from cliff import columns as cliff_columns
|
|
22
22
|
from openstack import utils as sdk_utils
|
|
23
23
|
from osc_lib.cli import parseractions
|
|
24
|
-
from osc_lib.command import command
|
|
25
24
|
from osc_lib import exceptions
|
|
26
25
|
from osc_lib import utils
|
|
27
26
|
|
|
27
|
+
from openstackclient import command
|
|
28
28
|
from openstackclient.common import pagination
|
|
29
29
|
from openstackclient.i18n import _
|
|
30
30
|
|
|
31
31
|
LOG = logging.getLogger(__name__)
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class VolumeIdColumn(cliff_columns.FormattableColumn):
|
|
34
|
+
class VolumeIdColumn(cliff_columns.FormattableColumn[str]):
|
|
35
35
|
"""Formattable column for volume ID column.
|
|
36
36
|
|
|
37
37
|
Unlike the parent FormattableColumn class, the initializer of the
|
|
@@ -218,8 +218,8 @@ class DeleteVolumeBackup(command.Command):
|
|
|
218
218
|
_(
|
|
219
219
|
"Failed to delete backup with "
|
|
220
220
|
"name or ID '%(backup)s': %(e)s"
|
|
221
|
-
)
|
|
222
|
-
|
|
221
|
+
),
|
|
222
|
+
{'backup': backup, 'e': e},
|
|
223
223
|
)
|
|
224
224
|
|
|
225
225
|
if result > 0:
|
|
@@ -236,6 +236,11 @@ class ListVolumeBackup(command.Lister):
|
|
|
236
236
|
|
|
237
237
|
def get_parser(self, prog_name):
|
|
238
238
|
parser = super().get_parser(prog_name)
|
|
239
|
+
parser.add_argument(
|
|
240
|
+
'--project',
|
|
241
|
+
metavar='<project>',
|
|
242
|
+
help=_('Filter results by project (name or ID) (admin only)'),
|
|
243
|
+
)
|
|
239
244
|
parser.add_argument(
|
|
240
245
|
"--long",
|
|
241
246
|
action="store_true",
|
|
@@ -296,6 +301,7 @@ class ListVolumeBackup(command.Lister):
|
|
|
296
301
|
|
|
297
302
|
def take_action(self, parsed_args):
|
|
298
303
|
volume_client = self.app.client_manager.sdk_connection.volume
|
|
304
|
+
identity_client = self.app.client_manager.sdk_connection.identity
|
|
299
305
|
|
|
300
306
|
columns: tuple[str, ...] = (
|
|
301
307
|
'id',
|
|
@@ -332,6 +338,14 @@ class ListVolumeBackup(command.Lister):
|
|
|
332
338
|
VolumeIdColumn, volume_cache=volume_cache
|
|
333
339
|
)
|
|
334
340
|
|
|
341
|
+
all_tenants = parsed_args.all_projects
|
|
342
|
+
project_id = None
|
|
343
|
+
if parsed_args.project:
|
|
344
|
+
all_tenants = True
|
|
345
|
+
project_id = identity_client.find_project(
|
|
346
|
+
parsed_args.project, ignore_missing=False
|
|
347
|
+
).id
|
|
348
|
+
|
|
335
349
|
filter_volume_id = None
|
|
336
350
|
if parsed_args.volume:
|
|
337
351
|
try:
|
|
@@ -360,9 +374,10 @@ class ListVolumeBackup(command.Lister):
|
|
|
360
374
|
name=parsed_args.name,
|
|
361
375
|
status=parsed_args.status,
|
|
362
376
|
volume_id=filter_volume_id,
|
|
363
|
-
all_tenants=
|
|
377
|
+
all_tenants=all_tenants,
|
|
364
378
|
marker=marker_backup_id,
|
|
365
379
|
limit=parsed_args.limit,
|
|
380
|
+
project_id=project_id,
|
|
366
381
|
)
|
|
367
382
|
|
|
368
383
|
return (
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
import argparse
|
|
14
14
|
|
|
15
15
|
from cinderclient import api_versions
|
|
16
|
-
from osc_lib.command import command
|
|
17
16
|
from osc_lib import exceptions
|
|
18
17
|
from osc_lib import utils
|
|
19
18
|
|
|
19
|
+
from openstackclient import command
|
|
20
20
|
from openstackclient.common import envvars
|
|
21
21
|
from openstackclient.i18n import _
|
|
22
22
|
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
import logging
|
|
14
14
|
|
|
15
15
|
from openstack import utils as sdk_utils
|
|
16
|
-
from osc_lib.command import command
|
|
17
16
|
from osc_lib import exceptions
|
|
18
17
|
from osc_lib import utils
|
|
19
18
|
|
|
19
|
+
from openstackclient import command
|
|
20
20
|
from openstackclient.common import envvars
|
|
21
21
|
from openstackclient.i18n import _
|
|
22
22
|
|
|
@@ -15,10 +15,10 @@ import logging
|
|
|
15
15
|
from cinderclient import api_versions
|
|
16
16
|
from osc_lib.cli import format_columns
|
|
17
17
|
from osc_lib.cli import parseractions
|
|
18
|
-
from osc_lib.command import command
|
|
19
18
|
from osc_lib import exceptions
|
|
20
19
|
from osc_lib import utils
|
|
21
20
|
|
|
21
|
+
from openstackclient import command
|
|
22
22
|
from openstackclient.i18n import _
|
|
23
23
|
|
|
24
24
|
LOG = logging.getLogger(__name__)
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
import logging as LOG
|
|
18
18
|
|
|
19
19
|
from cinderclient import api_versions
|
|
20
|
-
from osc_lib.command import command
|
|
21
20
|
from osc_lib import exceptions
|
|
22
21
|
from osc_lib import utils
|
|
23
22
|
|
|
23
|
+
from openstackclient import command
|
|
24
24
|
from openstackclient.common import pagination
|
|
25
25
|
from openstackclient.i18n import _
|
|
26
26
|
from openstackclient.identity import common as identity_common
|
|
@@ -22,10 +22,10 @@ from cliff import columns as cliff_columns
|
|
|
22
22
|
from openstack.block_storage.v3 import snapshot as _snapshot
|
|
23
23
|
from osc_lib.cli import format_columns
|
|
24
24
|
from osc_lib.cli import parseractions
|
|
25
|
-
from osc_lib.command import command
|
|
26
25
|
from osc_lib import exceptions
|
|
27
26
|
from osc_lib import utils
|
|
28
27
|
|
|
28
|
+
from openstackclient import command
|
|
29
29
|
from openstackclient.common import pagination
|
|
30
30
|
from openstackclient.i18n import _
|
|
31
31
|
from openstackclient.identity import common as identity_common
|
|
@@ -33,7 +33,7 @@ from openstackclient.identity import common as identity_common
|
|
|
33
33
|
LOG = logging.getLogger(__name__)
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
class VolumeIdColumn(cliff_columns.FormattableColumn):
|
|
36
|
+
class VolumeIdColumn(cliff_columns.FormattableColumn[str]):
|
|
37
37
|
"""Formattable column for volume ID column.
|
|
38
38
|
|
|
39
39
|
Unlike the parent FormattableColumn class, the initializer of the
|
|
@@ -246,8 +246,8 @@ class DeleteVolumeSnapshot(command.Command):
|
|
|
246
246
|
_(
|
|
247
247
|
"Failed to delete snapshot with "
|
|
248
248
|
"name or ID '%(snapshot)s': %(e)s"
|
|
249
|
-
)
|
|
250
|
-
|
|
249
|
+
),
|
|
250
|
+
{'snapshot': snapshot, 'e': e},
|
|
251
251
|
)
|
|
252
252
|
|
|
253
253
|
if result > 0:
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
import logging
|
|
18
18
|
|
|
19
19
|
from cinderclient import api_versions
|
|
20
|
-
from osc_lib.command import command
|
|
21
20
|
from osc_lib import exceptions
|
|
22
21
|
from osc_lib import utils
|
|
23
22
|
|
|
23
|
+
from openstackclient import command
|
|
24
24
|
from openstackclient.i18n import _
|
|
25
25
|
|
|
26
26
|
|
|
@@ -163,8 +163,8 @@ class DeleteTransferRequest(command.Command):
|
|
|
163
163
|
_(
|
|
164
164
|
"Failed to delete volume transfer request "
|
|
165
165
|
"with name or ID '%(transfer)s': %(e)s"
|
|
166
|
-
)
|
|
167
|
-
|
|
166
|
+
),
|
|
167
|
+
{'transfer': t, 'e': e},
|
|
168
168
|
)
|
|
169
169
|
|
|
170
170
|
if result > 0:
|
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
11
11
|
# License for the specific language governing permissions and limitations
|
|
12
12
|
# under the License.
|
|
13
|
-
#
|
|
14
13
|
|
|
15
14
|
"""Volume v3 Type action implementations"""
|
|
16
15
|
|
|
17
16
|
import functools
|
|
18
17
|
import logging
|
|
18
|
+
import typing as ty
|
|
19
19
|
|
|
20
20
|
from cinderclient import api_versions
|
|
21
21
|
from cliff import columns as cliff_columns
|
|
22
22
|
from osc_lib.cli import format_columns
|
|
23
23
|
from osc_lib.cli import parseractions
|
|
24
|
-
from osc_lib.command import command
|
|
25
24
|
from osc_lib import exceptions
|
|
26
25
|
from osc_lib import utils
|
|
27
26
|
|
|
27
|
+
from openstackclient import command
|
|
28
28
|
from openstackclient.i18n import _
|
|
29
29
|
from openstackclient.identity import common as identity_common
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ from openstackclient.identity import common as identity_common
|
|
|
32
32
|
LOG = logging.getLogger(__name__)
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
class EncryptionInfoColumn(cliff_columns.FormattableColumn):
|
|
35
|
+
class EncryptionInfoColumn(cliff_columns.FormattableColumn[ty.Any]):
|
|
36
36
|
"""Formattable column for encryption info column.
|
|
37
37
|
|
|
38
38
|
Unlike the parent FormattableColumn class, the initializer of the
|
|
@@ -172,7 +172,8 @@ class CreateVolumeType(command.ShowOne):
|
|
|
172
172
|
default=False,
|
|
173
173
|
help=_(
|
|
174
174
|
"Enabled replication for this volume type "
|
|
175
|
-
"(this is an alias for
|
|
175
|
+
"(this is an alias for "
|
|
176
|
+
"'--property replication_enabled=<is> True') "
|
|
176
177
|
"(requires driver support)"
|
|
177
178
|
),
|
|
178
179
|
)
|
|
@@ -182,7 +183,8 @@ class CreateVolumeType(command.ShowOne):
|
|
|
182
183
|
dest='availability_zones',
|
|
183
184
|
help=_(
|
|
184
185
|
"Set an availability zone for this volume type "
|
|
185
|
-
"(this is an alias for
|
|
186
|
+
"(this is an alias for "
|
|
187
|
+
"'--property RESKEY:availability_zones:<az>') "
|
|
186
188
|
"(repeat option to set multiple availability zones)"
|
|
187
189
|
),
|
|
188
190
|
)
|
|
@@ -275,7 +277,7 @@ class CreateVolumeType(command.ShowOne):
|
|
|
275
277
|
msg = _(
|
|
276
278
|
"Failed to add project %(project)s access to type: %(e)s"
|
|
277
279
|
)
|
|
278
|
-
LOG.error(msg
|
|
280
|
+
LOG.error(msg, {'project': parsed_args.project, 'e': e})
|
|
279
281
|
|
|
280
282
|
properties = {}
|
|
281
283
|
if parsed_args.properties:
|
|
@@ -356,8 +358,8 @@ class DeleteVolumeType(command.Command):
|
|
|
356
358
|
_(
|
|
357
359
|
"Failed to delete volume type with "
|
|
358
360
|
"name or ID '%(volume_type)s': %(e)s"
|
|
359
|
-
)
|
|
360
|
-
|
|
361
|
+
),
|
|
362
|
+
{'volume_type': volume_type, 'e': e},
|
|
361
363
|
)
|
|
362
364
|
|
|
363
365
|
if result > 0:
|
|
@@ -447,7 +449,8 @@ class ListVolumeType(command.Lister):
|
|
|
447
449
|
default=False,
|
|
448
450
|
help=_(
|
|
449
451
|
"List only volume types with replication enabled "
|
|
450
|
-
"(this is an alias for
|
|
452
|
+
"(this is an alias for "
|
|
453
|
+
"'--property replication_enabled=<is> True') "
|
|
451
454
|
"(supported by --os-volume-api-version 3.52 or above)"
|
|
452
455
|
),
|
|
453
456
|
)
|
|
@@ -457,7 +460,8 @@ class ListVolumeType(command.Lister):
|
|
|
457
460
|
dest='availability_zones',
|
|
458
461
|
help=_(
|
|
459
462
|
"List only volume types with this availability configured "
|
|
460
|
-
"(this is an alias for
|
|
463
|
+
"(this is an alias for "
|
|
464
|
+
"'--property RESKEY:availability_zones:<az>') "
|
|
461
465
|
"(repeat option to filter on multiple availability zones)"
|
|
462
466
|
),
|
|
463
467
|
)
|
|
@@ -545,7 +549,7 @@ class ListVolumeType(command.Lister):
|
|
|
545
549
|
_EncryptionInfoColumn = functools.partial(
|
|
546
550
|
EncryptionInfoColumn, encryption_data=encryption
|
|
547
551
|
)
|
|
548
|
-
formatters['id'] = _EncryptionInfoColumn
|
|
552
|
+
formatters['id'] = _EncryptionInfoColumn # type: ignore
|
|
549
553
|
|
|
550
554
|
return (
|
|
551
555
|
column_headers,
|
|
@@ -616,7 +620,8 @@ class SetVolumeType(command.Command):
|
|
|
616
620
|
default=False,
|
|
617
621
|
help=_(
|
|
618
622
|
"Enabled replication for this volume type "
|
|
619
|
-
"(this is an alias for
|
|
623
|
+
"(this is an alias for "
|
|
624
|
+
"'--property replication_enabled=<is> True') "
|
|
620
625
|
"(requires driver support)"
|
|
621
626
|
),
|
|
622
627
|
)
|
|
@@ -626,7 +631,8 @@ class SetVolumeType(command.Command):
|
|
|
626
631
|
dest='availability_zones',
|
|
627
632
|
help=_(
|
|
628
633
|
"Set an availability zone for this volume type "
|
|
629
|
-
"(this is an alias for
|
|
634
|
+
"(this is an alias for "
|
|
635
|
+
"'--property RESKEY:availability_zones:<az>') "
|
|
630
636
|
"(repeat option to set multiple availability zones)"
|
|
631
637
|
),
|
|
632
638
|
)
|
|
@@ -840,7 +846,7 @@ class ShowVolumeType(command.ShowOne):
|
|
|
840
846
|
'Failed to get access project list for volume type '
|
|
841
847
|
'%(type)s: %(e)s'
|
|
842
848
|
)
|
|
843
|
-
LOG.error(msg
|
|
849
|
+
LOG.error(msg, {'type': volume_type.id, 'e': e})
|
|
844
850
|
volume_type._info.update({'access_project_ids': access_project_ids})
|
|
845
851
|
if parsed_args.encryption_type:
|
|
846
852
|
# show encryption type information for this volume type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-openstackclient
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.0
|
|
4
4
|
Summary: OpenStack Command-line Client
|
|
5
5
|
Author-email: OpenStack <openstack-discuss@lists.openstack.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -21,17 +21,19 @@ Requires-Python: >=3.10
|
|
|
21
21
|
Description-Content-Type: text/x-rst
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
License-File: AUTHORS
|
|
24
|
-
Requires-Dist: pbr
|
|
25
|
-
Requires-Dist: cryptography
|
|
26
|
-
Requires-Dist: cliff
|
|
27
|
-
Requires-Dist: iso8601
|
|
28
|
-
Requires-Dist: openstacksdk
|
|
29
|
-
Requires-Dist: osc-lib
|
|
30
|
-
Requires-Dist: oslo.i18n
|
|
31
|
-
Requires-Dist: python-keystoneclient
|
|
32
|
-
Requires-Dist: python-cinderclient
|
|
33
|
-
Requires-Dist: requests
|
|
34
|
-
Requires-Dist: stevedore
|
|
24
|
+
Requires-Dist: pbr!=2.1.0,>=2.0.0
|
|
25
|
+
Requires-Dist: cryptography>=2.7
|
|
26
|
+
Requires-Dist: cliff>=4.13.0
|
|
27
|
+
Requires-Dist: iso8601>=0.1.11
|
|
28
|
+
Requires-Dist: openstacksdk>=4.6.0
|
|
29
|
+
Requires-Dist: osc-lib>=2.3.0
|
|
30
|
+
Requires-Dist: oslo.i18n>=3.15.3
|
|
31
|
+
Requires-Dist: python-keystoneclient>=3.22.0
|
|
32
|
+
Requires-Dist: python-cinderclient>=3.3.0
|
|
33
|
+
Requires-Dist: requests>=2.27.0
|
|
34
|
+
Requires-Dist: stevedore>=2.0.1
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
Dynamic: requires-dist
|
|
35
37
|
|
|
36
38
|
===============
|
|
37
39
|
OpenStackClient
|