python-openstackclient 8.1.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/compute_v2.py +2 -2
- openstackclient/api/object_store_v1.py +4 -1
- openstackclient/api/volume_v2.py +60 -0
- openstackclient/api/volume_v3.py +60 -0
- 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 +15 -2
- 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 +77 -30
- 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 +10 -14
- 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 +116 -95
- 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 +15 -10
- 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 +34 -22
- openstackclient/identity/v3/region.py +1 -1
- openstackclient/identity/v3/registered_limit.py +16 -11
- openstackclient/identity/v3/role.py +27 -41
- 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 +35 -17
- openstackclient/image/v2/cache.py +11 -7
- openstackclient/image/v2/image.py +62 -12
- openstackclient/image/v2/info.py +1 -1
- openstackclient/image/v2/metadef_namespaces.py +1 -1
- openstackclient/image/v2/metadef_objects.py +9 -3
- openstackclient/image/v2/metadef_properties.py +11 -3
- 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 +38 -20
- openstackclient/network/v2/router.py +19 -8
- openstackclient/network/v2/security_group.py +52 -7
- openstackclient/network/v2/security_group_rule.py +27 -4
- 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_access_rule.py +1 -1
- openstackclient/tests/functional/identity/v3/test_application_credential.py +7 -7
- 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_image.py +36 -14
- openstackclient/tests/functional/image/v2/test_metadef_resource_type.py +55 -0
- openstackclient/tests/functional/volume/v2/test_volume.py +1 -1
- openstackclient/tests/functional/volume/v3/test_volume.py +2 -2
- openstackclient/tests/unit/api/test_volume_v2.py +124 -0
- openstackclient/tests/unit/api/test_volume_v3.py +124 -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 +160 -177
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +1 -9
- openstackclient/tests/unit/compute/v2/test_server.py +406 -81
- 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 +50 -44
- openstackclient/tests/unit/identity/v3/test_domain.py +3 -3
- 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 +31 -54
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +2 -2
- openstackclient/tests/unit/identity/v3/test_role.py +3 -90
- openstackclient/tests/unit/identity/v3/test_user.py +7 -51
- openstackclient/tests/unit/image/v1/test_image.py +47 -0
- openstackclient/tests/unit/image/v2/test_image.py +190 -9
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +22 -0
- openstackclient/tests/unit/image/v2/test_metadef_properties.py +24 -10
- openstackclient/tests/unit/network/test_common.py +9 -13
- openstackclient/tests/unit/network/v2/fakes.py +1 -0
- 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 +13 -23
- 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 +113 -84
- openstackclient/tests/unit/network/v2/test_router.py +104 -126
- openstackclient/tests/unit/network/v2/test_security_group_network.py +25 -26
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +66 -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.py +358 -305
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +3 -1
- openstackclient/tests/unit/volume/v3/test_volume.py +443 -415
- 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 +2 -2
- openstackclient/volume/v2/volume.py +80 -54
- 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 +2 -2
- openstackclient/volume/v3/volume.py +104 -77
- openstackclient/volume/v3/volume_attachment.py +6 -5
- openstackclient/volume/v3/volume_backup.py +18 -3
- openstackclient/volume/v3/volume_group.py +2 -2
- 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.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/METADATA +19 -17
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/RECORD +239 -224
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/entry_points.txt +15 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info/licenses}/AUTHORS +15 -0
- python_openstackclient-8.3.0.dist-info/pbr.json +1 -0
- openstackclient/tests/unit/common/test_logs.py +0 -221
- python_openstackclient-8.1.0.dist-info/pbr.json +0 -1
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info/licenses}/LICENSE +0 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.3.0.dist-info}/top_level.txt +0 -0
|
@@ -24,12 +24,12 @@ from openstackclient.identity import common as identity_common
|
|
|
24
24
|
from openstackclient.network import common
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class AdminStateColumn(cliff_columns.FormattableColumn):
|
|
27
|
+
class AdminStateColumn(cliff_columns.FormattableColumn[bool]):
|
|
28
28
|
def human_readable(self):
|
|
29
29
|
return 'UP' if self._value else 'DOWN'
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
class RouterExternalColumn(cliff_columns.FormattableColumn):
|
|
32
|
+
class RouterExternalColumn(cliff_columns.FormattableColumn[bool]):
|
|
33
33
|
def human_readable(self):
|
|
34
34
|
return 'External' if self._value else 'Internal'
|
|
35
35
|
|
|
@@ -401,6 +401,16 @@ class CreateNetwork(
|
|
|
401
401
|
)
|
|
402
402
|
raise exceptions.CommandError(msg)
|
|
403
403
|
|
|
404
|
+
if (
|
|
405
|
+
parsed_args.segmentation_id
|
|
406
|
+
and not parsed_args.provider_network_type
|
|
407
|
+
):
|
|
408
|
+
msg = _(
|
|
409
|
+
"--provider-segment requires --provider-network-type "
|
|
410
|
+
"to be specified."
|
|
411
|
+
)
|
|
412
|
+
raise exceptions.CommandError(msg)
|
|
413
|
+
|
|
404
414
|
attrs.update(
|
|
405
415
|
self._parse_extra_properties(parsed_args.extra_properties)
|
|
406
416
|
)
|
|
@@ -459,12 +469,12 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
459
469
|
router_ext_group.add_argument(
|
|
460
470
|
'--external',
|
|
461
471
|
action='store_true',
|
|
462
|
-
help=self.enhance_help_neutron(_("List external networks")),
|
|
472
|
+
help=self.enhance_help_neutron(_("List only external networks")),
|
|
463
473
|
)
|
|
464
474
|
router_ext_group.add_argument(
|
|
465
475
|
'--internal',
|
|
466
476
|
action='store_true',
|
|
467
|
-
help=self.enhance_help_neutron(_("List internal networks")),
|
|
477
|
+
help=self.enhance_help_neutron(_("List only internal networks")),
|
|
468
478
|
)
|
|
469
479
|
parser.add_argument(
|
|
470
480
|
'--long',
|
|
@@ -477,24 +487,26 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
477
487
|
'--name',
|
|
478
488
|
metavar='<name>',
|
|
479
489
|
help=self.enhance_help_neutron(
|
|
480
|
-
_("List networks
|
|
490
|
+
_("List only networks with the specified name")
|
|
481
491
|
),
|
|
482
492
|
)
|
|
483
493
|
admin_state_group = parser.add_mutually_exclusive_group()
|
|
484
494
|
admin_state_group.add_argument(
|
|
485
495
|
'--enable',
|
|
486
496
|
action='store_true',
|
|
487
|
-
help=self.enhance_help_neutron(_("List enabled networks")),
|
|
497
|
+
help=self.enhance_help_neutron(_("List only enabled networks")),
|
|
488
498
|
)
|
|
489
499
|
admin_state_group.add_argument(
|
|
490
500
|
'--disable',
|
|
491
501
|
action='store_true',
|
|
492
|
-
help=self.enhance_help_neutron(_("List disabled networks")),
|
|
502
|
+
help=self.enhance_help_neutron(_("List only disabled networks")),
|
|
493
503
|
)
|
|
494
504
|
parser.add_argument(
|
|
495
505
|
'--project',
|
|
496
506
|
metavar='<project>',
|
|
497
|
-
help=_(
|
|
507
|
+
help=_(
|
|
508
|
+
"List only networks with the specified project (name or ID)"
|
|
509
|
+
),
|
|
498
510
|
)
|
|
499
511
|
identity_common.add_project_domain_option_to_parser(
|
|
500
512
|
parser, enhance_help=self.enhance_help_neutron
|
|
@@ -504,14 +516,14 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
504
516
|
'--share',
|
|
505
517
|
action='store_true',
|
|
506
518
|
help=self.enhance_help_neutron(
|
|
507
|
-
_("List networks shared between projects")
|
|
519
|
+
_("List only networks shared between projects")
|
|
508
520
|
),
|
|
509
521
|
)
|
|
510
522
|
shared_group.add_argument(
|
|
511
523
|
'--no-share',
|
|
512
524
|
action='store_true',
|
|
513
525
|
help=self.enhance_help_neutron(
|
|
514
|
-
_("List networks not shared between projects")
|
|
526
|
+
_("List only networks not shared between projects")
|
|
515
527
|
),
|
|
516
528
|
)
|
|
517
529
|
parser.add_argument(
|
|
@@ -520,7 +532,7 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
520
532
|
choices=['ACTIVE', 'BUILD', 'DOWN', 'ERROR'],
|
|
521
533
|
help=self.enhance_help_neutron(
|
|
522
534
|
_(
|
|
523
|
-
"List networks
|
|
535
|
+
"List only networks with the specified status "
|
|
524
536
|
"('ACTIVE', 'BUILD', 'DOWN', 'ERROR')"
|
|
525
537
|
)
|
|
526
538
|
),
|
|
@@ -531,7 +543,8 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
531
543
|
choices=['flat', 'geneve', 'gre', 'local', 'vlan', 'vxlan'],
|
|
532
544
|
help=self.enhance_help_neutron(
|
|
533
545
|
_(
|
|
534
|
-
"List networks
|
|
546
|
+
"List only networks with the specified physical "
|
|
547
|
+
"mechanisms. "
|
|
535
548
|
"The supported options are: flat, geneve, gre, local, "
|
|
536
549
|
"vlan and vxlan."
|
|
537
550
|
)
|
|
@@ -542,7 +555,10 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
542
555
|
metavar='<provider-physical-network>',
|
|
543
556
|
dest='physical_network',
|
|
544
557
|
help=self.enhance_help_neutron(
|
|
545
|
-
_(
|
|
558
|
+
_(
|
|
559
|
+
"List only networks with the specified physical network "
|
|
560
|
+
"name"
|
|
561
|
+
)
|
|
546
562
|
),
|
|
547
563
|
)
|
|
548
564
|
parser.add_argument(
|
|
@@ -551,8 +567,9 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
551
567
|
dest='segmentation_id',
|
|
552
568
|
help=self.enhance_help_neutron(
|
|
553
569
|
_(
|
|
554
|
-
"List networks
|
|
555
|
-
"
|
|
570
|
+
"List only networks with the specified provider segment "
|
|
571
|
+
"ID (VLAN ID for VLAN networks or "
|
|
572
|
+
"Tunnel ID for GENEVE/GRE/VXLAN networks)"
|
|
556
573
|
)
|
|
557
574
|
),
|
|
558
575
|
)
|
|
@@ -561,7 +578,7 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
561
578
|
metavar='<agent-id>',
|
|
562
579
|
dest='agent_id',
|
|
563
580
|
help=self.enhance_help_neutron(
|
|
564
|
-
_('List networks hosted
|
|
581
|
+
_('List only networks hosted the specified agent (ID only)')
|
|
565
582
|
),
|
|
566
583
|
)
|
|
567
584
|
_tag.add_tag_filtering_option_to_parser(
|
|
@@ -17,21 +17,21 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
from cliff import columns as cliff_columns
|
|
19
19
|
from osc_lib.cli import format_columns
|
|
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
|
LOG = logging.getLogger(__name__)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class AliveColumn(cliff_columns.FormattableColumn):
|
|
29
|
+
class AliveColumn(cliff_columns.FormattableColumn[bool]):
|
|
30
30
|
def human_readable(self):
|
|
31
31
|
return ":-)" if self._value else "XXX"
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class AdminStateColumn(cliff_columns.FormattableColumn):
|
|
34
|
+
class AdminStateColumn(cliff_columns.FormattableColumn[bool]):
|
|
35
35
|
def human_readable(self):
|
|
36
36
|
return 'UP' if self._value else 'DOWN'
|
|
37
37
|
|
|
@@ -205,12 +205,12 @@ class ListNetworkAgent(command.Lister):
|
|
|
205
205
|
agent_type_group.add_argument(
|
|
206
206
|
'--network',
|
|
207
207
|
metavar='<network>',
|
|
208
|
-
help=_('List agents hosting
|
|
208
|
+
help=_('List agents hosting the specified network (name or ID)'),
|
|
209
209
|
)
|
|
210
210
|
agent_type_group.add_argument(
|
|
211
211
|
'--router',
|
|
212
212
|
metavar='<router>',
|
|
213
|
-
help=_('List agents hosting
|
|
213
|
+
help=_('List agents hosting the specified router (name or ID)'),
|
|
214
214
|
)
|
|
215
215
|
parser.add_argument(
|
|
216
216
|
'--long',
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
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
|
from openstackclient.identity import common as identity_common
|
|
24
24
|
from openstackclient.network import common
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
|
|
14
14
|
import logging
|
|
15
15
|
|
|
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.i18n import _
|
|
21
21
|
from openstackclient.network import common
|
|
22
22
|
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
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
|
from openstackclient.identity import common as identity_common
|
|
24
24
|
from openstackclient.network import common
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
import logging
|
|
17
17
|
import typing as ty
|
|
18
18
|
|
|
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
|
from openstackclient.identity import common as identity_common
|
|
25
25
|
from openstackclient.network import common
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
# under the License.
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
|
+
import typing as ty
|
|
17
18
|
|
|
18
19
|
from cliff import columns as cliff_columns
|
|
19
|
-
from osc_lib.command import command
|
|
20
20
|
from osc_lib import exceptions
|
|
21
21
|
from osc_lib import utils
|
|
22
22
|
|
|
23
|
+
from openstackclient import command
|
|
23
24
|
from openstackclient.i18n import _
|
|
24
25
|
from openstackclient.identity import common as identity_common
|
|
25
26
|
from openstackclient.network import common
|
|
@@ -27,7 +28,7 @@ from openstackclient.network import common
|
|
|
27
28
|
LOG = logging.getLogger(__name__)
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
class RulesColumn(cliff_columns.FormattableColumn):
|
|
31
|
+
class RulesColumn(cliff_columns.FormattableColumn[ty.Any]):
|
|
31
32
|
def human_readable(self):
|
|
32
33
|
return '\n'.join(str(v) for v in self._value)
|
|
33
34
|
|
|
@@ -190,7 +191,8 @@ class ListNetworkQosPolicy(command.Lister):
|
|
|
190
191
|
'--project',
|
|
191
192
|
metavar='<project>',
|
|
192
193
|
help=_(
|
|
193
|
-
"List QoS policies
|
|
194
|
+
"List only QoS policies with the specified project "
|
|
195
|
+
"(name or ID)"
|
|
194
196
|
),
|
|
195
197
|
)
|
|
196
198
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -198,12 +200,12 @@ class ListNetworkQosPolicy(command.Lister):
|
|
|
198
200
|
shared_group.add_argument(
|
|
199
201
|
'--share',
|
|
200
202
|
action='store_true',
|
|
201
|
-
help=_("List QoS policies shared between projects"),
|
|
203
|
+
help=_("List only QoS policies shared between projects"),
|
|
202
204
|
)
|
|
203
205
|
shared_group.add_argument(
|
|
204
206
|
'--no-share',
|
|
205
207
|
action='store_true',
|
|
206
|
-
help=_("List QoS policies not shared between projects"),
|
|
208
|
+
help=_("List only QoS policies not shared between projects"),
|
|
207
209
|
)
|
|
208
210
|
return parser
|
|
209
211
|
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import itertools
|
|
17
17
|
|
|
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
|
from openstackclient.network import common
|
|
24
24
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
# License for the specific language governing permissions and limitations
|
|
14
14
|
# under the License.
|
|
15
15
|
|
|
16
|
-
from osc_lib.command import command
|
|
17
16
|
from osc_lib import utils
|
|
18
17
|
|
|
18
|
+
from openstackclient import command
|
|
19
19
|
from openstackclient.i18n import _
|
|
20
20
|
|
|
21
21
|
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
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
|
from openstackclient.identity import common as identity_common
|
|
24
24
|
from openstackclient.network import common
|
|
@@ -234,8 +234,8 @@ class ListNetworkRBAC(command.Lister):
|
|
|
234
234
|
'network',
|
|
235
235
|
],
|
|
236
236
|
help=_(
|
|
237
|
-
'List network RBAC policies
|
|
238
|
-
'
|
|
237
|
+
'List only network RBAC policies with the specified '
|
|
238
|
+
'object type ("address_group", "address_scope", '
|
|
239
239
|
'"security_group", "subnetpool", "qos_policy" or '
|
|
240
240
|
'"network")'
|
|
241
241
|
),
|
|
@@ -245,14 +245,17 @@ class ListNetworkRBAC(command.Lister):
|
|
|
245
245
|
metavar='<action>',
|
|
246
246
|
choices=['access_as_external', 'access_as_shared'],
|
|
247
247
|
help=_(
|
|
248
|
-
'List network RBAC policies
|
|
248
|
+
'List only network RBAC policies with the specified '
|
|
249
249
|
'action ("access_as_external" or "access_as_shared")'
|
|
250
250
|
),
|
|
251
251
|
)
|
|
252
252
|
parser.add_argument(
|
|
253
253
|
'--target-project',
|
|
254
254
|
metavar='<target-project>',
|
|
255
|
-
help=_(
|
|
255
|
+
help=_(
|
|
256
|
+
'List only network RBAC policies with the specified '
|
|
257
|
+
'target project (name or ID)'
|
|
258
|
+
),
|
|
256
259
|
)
|
|
257
260
|
parser.add_argument(
|
|
258
261
|
'--long',
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
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
|
from openstackclient.network import common
|
|
24
24
|
|
|
@@ -160,7 +160,7 @@ class ListNetworkSegment(command.Lister):
|
|
|
160
160
|
'--network',
|
|
161
161
|
metavar='<network>',
|
|
162
162
|
help=_(
|
|
163
|
-
'List network segments
|
|
163
|
+
'List only network segments associated with the specified '
|
|
164
164
|
'network (name or ID)'
|
|
165
165
|
),
|
|
166
166
|
)
|
|
@@ -20,10 +20,10 @@ import itertools
|
|
|
20
20
|
import logging
|
|
21
21
|
import typing as ty
|
|
22
22
|
|
|
23
|
-
from osc_lib.command import command
|
|
24
23
|
from osc_lib import exceptions
|
|
25
24
|
from osc_lib import utils
|
|
26
25
|
|
|
26
|
+
from openstackclient import command
|
|
27
27
|
from openstackclient.i18n import _
|
|
28
28
|
from openstackclient.identity import common as identity_common
|
|
29
29
|
from openstackclient.network import common
|
|
@@ -315,25 +315,32 @@ class ListNetworkSegmentRange(command.Lister):
|
|
|
315
315
|
used_group.add_argument(
|
|
316
316
|
'--used',
|
|
317
317
|
action='store_true',
|
|
318
|
-
help=_(
|
|
318
|
+
help=_(
|
|
319
|
+
'List only network segment ranges that have segments in use'
|
|
320
|
+
),
|
|
319
321
|
)
|
|
320
322
|
used_group.add_argument(
|
|
321
323
|
'--unused',
|
|
322
324
|
action='store_true',
|
|
323
325
|
help=_(
|
|
324
|
-
'List network segment ranges that have segments
|
|
326
|
+
'List only network segment ranges that have segments '
|
|
327
|
+
'not in use'
|
|
325
328
|
),
|
|
326
329
|
)
|
|
327
330
|
available_group = parser.add_mutually_exclusive_group()
|
|
328
331
|
available_group.add_argument(
|
|
329
332
|
'--available',
|
|
330
333
|
action='store_true',
|
|
331
|
-
help=_(
|
|
334
|
+
help=_(
|
|
335
|
+
'List only network segment ranges that have available segments'
|
|
336
|
+
),
|
|
332
337
|
)
|
|
333
338
|
available_group.add_argument(
|
|
334
339
|
'--unavailable',
|
|
335
340
|
action='store_true',
|
|
336
|
-
help=_(
|
|
341
|
+
help=_(
|
|
342
|
+
'List only network segment ranges without available segments'
|
|
343
|
+
),
|
|
337
344
|
)
|
|
338
345
|
return parser
|
|
339
346
|
|
|
@@ -395,7 +402,7 @@ class ListNetworkSegmentRange(command.Lister):
|
|
|
395
402
|
'available',
|
|
396
403
|
)
|
|
397
404
|
|
|
398
|
-
display_props: tuple[
|
|
405
|
+
display_props: tuple[ty.Any, ...] = tuple()
|
|
399
406
|
for s in data:
|
|
400
407
|
props = utils.get_item_properties(s, columns)
|
|
401
408
|
if (
|