python-openstackclient 8.2.0__py3-none-any.whl → 8.3.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 +4 -2
- openstackclient/common/project_cleanup.py +10 -8
- openstackclient/common/quota.py +23 -6
- 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 +76 -27
- 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 +2 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- openstackclient/identity/v3/mapping.py +1 -1
- openstackclient/identity/v3/policy.py +1 -1
- openstackclient/identity/v3/project.py +10 -3
- openstackclient/identity/v3/region.py +1 -1
- openstackclient/identity/v3/registered_limit.py +16 -11
- 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 +3 -2
- 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 +14 -11
- 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_role_assignment.py +174 -0
- openstackclient/tests/functional/image/v2/test_cache.py +54 -0
- openstackclient/tests/functional/image/v2/test_metadef_resource_type.py +55 -0
- 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 +20 -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 +364 -30
- 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_oauth.py +1 -1
- openstackclient/tests/unit/identity/v3/test_project.py +1 -1
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +2 -2
- 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 +111 -0
- 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_volume_backup.py +3 -1
- openstackclient/tests/unit/volume/v3/test_volume.py +4 -0
- 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 +1 -1
- openstackclient/volume/v2/consistency_group_snapshot.py +1 -1
- openstackclient/volume/v2/qos_specs.py +1 -1
- openstackclient/volume/v2/service.py +1 -1
- openstackclient/volume/v2/volume.py +2 -2
- openstackclient/volume/v2/volume_backend.py +1 -1
- openstackclient/volume/v2/volume_backup.py +5 -3
- openstackclient/volume/v2/volume_host.py +1 -2
- openstackclient/volume/v2/volume_snapshot.py +2 -2
- openstackclient/volume/v2/volume_transfer_request.py +1 -1
- openstackclient/volume/v2/volume_type.py +11 -6
- 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 +2 -2
- openstackclient/volume/v3/volume_attachment.py +6 -5
- openstackclient/volume/v3/volume_backup.py +18 -3
- 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 +2 -2
- openstackclient/volume/v3/volume_transfer_request.py +1 -1
- openstackclient/volume/v3/volume_type.py +15 -9
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-8.3.0.dist-info}/METADATA +15 -13
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-8.3.0.dist-info}/RECORD +224 -213
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-8.3.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-8.3.0.dist-info}/entry_points.txt +15 -0
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-8.3.0.dist-info/licenses}/AUTHORS +10 -0
- python_openstackclient-8.3.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-8.3.0.dist-info/licenses}/LICENSE +0 -0
- {python_openstackclient-8.2.0.dist-info → python_openstackclient-8.3.0.dist-info}/top_level.txt +0 -0
|
@@ -22,10 +22,10 @@ from cliff import columns as cliff_columns
|
|
|
22
22
|
from openstack.block_storage.v2 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
|
|
@@ -34,7 +34,7 @@ from openstackclient.identity import common as identity_common
|
|
|
34
34
|
LOG = logging.getLogger(__name__)
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class VolumeIdColumn(cliff_columns.FormattableColumn):
|
|
37
|
+
class VolumeIdColumn(cliff_columns.FormattableColumn[str]):
|
|
38
38
|
"""Formattable column for volume ID column.
|
|
39
39
|
|
|
40
40
|
Unlike the parent FormattableColumn class, the initializer of the
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
|
|
17
17
|
import functools
|
|
18
18
|
import logging
|
|
19
|
+
import typing as ty
|
|
19
20
|
|
|
20
21
|
from cliff import columns as cliff_columns
|
|
21
22
|
from osc_lib.cli import format_columns
|
|
22
23
|
from osc_lib.cli import parseractions
|
|
23
|
-
from osc_lib.command import command
|
|
24
24
|
from osc_lib import exceptions
|
|
25
25
|
from osc_lib import utils
|
|
26
26
|
|
|
27
|
+
from openstackclient import command
|
|
27
28
|
from openstackclient.i18n import _
|
|
28
29
|
from openstackclient.identity import common as identity_common
|
|
29
30
|
|
|
@@ -31,7 +32,7 @@ from openstackclient.identity import common as identity_common
|
|
|
31
32
|
LOG = logging.getLogger(__name__)
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
class EncryptionInfoColumn(cliff_columns.FormattableColumn):
|
|
35
|
+
class EncryptionInfoColumn(cliff_columns.FormattableColumn[ty.Any]):
|
|
35
36
|
"""Formattable column for encryption info column.
|
|
36
37
|
|
|
37
38
|
Unlike the parent FormattableColumn class, the initializer of the
|
|
@@ -171,7 +172,8 @@ class CreateVolumeType(command.ShowOne):
|
|
|
171
172
|
default=False,
|
|
172
173
|
help=_(
|
|
173
174
|
"Enabled replication for this volume type "
|
|
174
|
-
"(this is an alias for
|
|
175
|
+
"(this is an alias for "
|
|
176
|
+
"'--property replication_enabled=<is> True') "
|
|
175
177
|
"(requires driver support)"
|
|
176
178
|
),
|
|
177
179
|
)
|
|
@@ -181,7 +183,8 @@ class CreateVolumeType(command.ShowOne):
|
|
|
181
183
|
dest='availability_zones',
|
|
182
184
|
help=_(
|
|
183
185
|
"Set an availability zone for this volume type "
|
|
184
|
-
"(this is an alias for
|
|
186
|
+
"(this is an alias for "
|
|
187
|
+
"'--property RESKEY:availability_zones:<az>') "
|
|
185
188
|
"(repeat option to set multiple availability zones)"
|
|
186
189
|
),
|
|
187
190
|
)
|
|
@@ -534,7 +537,8 @@ class SetVolumeType(command.Command):
|
|
|
534
537
|
default=False,
|
|
535
538
|
help=_(
|
|
536
539
|
"Enabled replication for this volume type "
|
|
537
|
-
"(this is an alias for
|
|
540
|
+
"(this is an alias for "
|
|
541
|
+
"'--property replication_enabled=<is> True') "
|
|
538
542
|
"(requires driver support)"
|
|
539
543
|
),
|
|
540
544
|
)
|
|
@@ -544,7 +548,8 @@ class SetVolumeType(command.Command):
|
|
|
544
548
|
dest='availability_zones',
|
|
545
549
|
help=_(
|
|
546
550
|
"Set an availability zone for this volume type "
|
|
547
|
-
"(this is an alias for
|
|
551
|
+
"(this is an alias for "
|
|
552
|
+
"'--property RESKEY:availability_zones:<az>') "
|
|
548
553
|
"(repeat option to set multiple availability zones)"
|
|
549
554
|
),
|
|
550
555
|
)
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
from cinderclient import api_versions
|
|
14
|
-
from osc_lib.command import command
|
|
15
14
|
from osc_lib import exceptions
|
|
16
15
|
from osc_lib import utils
|
|
17
16
|
|
|
17
|
+
from openstackclient import command
|
|
18
18
|
from openstackclient.i18n import _
|
|
19
19
|
|
|
20
20
|
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"""Block Storage Service action implementations"""
|
|
16
16
|
|
|
17
17
|
from openstack import utils as sdk_utils
|
|
18
|
-
from osc_lib.command import command
|
|
19
18
|
from osc_lib import exceptions
|
|
20
19
|
|
|
20
|
+
from openstackclient import command
|
|
21
21
|
from openstackclient.i18n import _
|
|
22
22
|
|
|
23
23
|
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
import argparse
|
|
17
17
|
|
|
18
18
|
from cinderclient import api_versions
|
|
19
|
-
from osc_lib.command import command
|
|
20
19
|
from osc_lib import exceptions
|
|
21
20
|
from osc_lib import utils
|
|
22
21
|
|
|
22
|
+
from openstackclient import command
|
|
23
23
|
from openstackclient.i18n import _
|
|
24
24
|
|
|
25
25
|
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
from openstack import utils as sdk_utils
|
|
16
16
|
from osc_lib.cli import format_columns
|
|
17
|
-
from osc_lib.command import command
|
|
18
17
|
from osc_lib import exceptions
|
|
19
18
|
from osc_lib import utils
|
|
20
19
|
|
|
20
|
+
from openstackclient import command
|
|
21
21
|
from openstackclient.i18n import _
|
|
22
22
|
|
|
23
23
|
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"""Service action implementations"""
|
|
16
16
|
|
|
17
17
|
from openstack import utils as sdk_utils
|
|
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
|
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
|
@@ -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
|
)
|
|
@@ -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
|
)
|
|
@@ -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
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-openstackclient
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.3.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
|