python-openstackclient 7.4.0__py3-none-any.whl → 8.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/common/availability_zone.py +3 -6
- openstackclient/common/clientmanager.py +2 -1
- openstackclient/common/envvars.py +57 -0
- openstackclient/common/extension.py +3 -11
- openstackclient/common/limits.py +1 -1
- openstackclient/common/project_cleanup.py +3 -2
- openstackclient/common/quota.py +54 -28
- openstackclient/compute/client.py +7 -5
- openstackclient/compute/v2/agent.py +5 -5
- openstackclient/compute/v2/aggregate.py +17 -15
- openstackclient/compute/v2/console.py +10 -4
- openstackclient/compute/v2/console_connection.py +48 -0
- openstackclient/compute/v2/flavor.py +14 -18
- openstackclient/compute/v2/host.py +3 -3
- openstackclient/compute/v2/hypervisor.py +10 -4
- openstackclient/compute/v2/hypervisor_stats.py +1 -1
- openstackclient/compute/v2/keypair.py +18 -13
- openstackclient/compute/v2/server.py +144 -121
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_event.py +8 -17
- openstackclient/compute/v2/server_group.py +6 -6
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +6 -6
- openstackclient/compute/v2/server_volume.py +4 -4
- openstackclient/compute/v2/service.py +9 -13
- openstackclient/compute/v2/usage.py +4 -6
- openstackclient/identity/client.py +2 -4
- openstackclient/identity/common.py +95 -17
- openstackclient/identity/v2_0/ec2creds.py +4 -3
- openstackclient/identity/v2_0/endpoint.py +12 -10
- openstackclient/identity/v2_0/project.py +6 -6
- openstackclient/identity/v2_0/role.py +1 -1
- openstackclient/identity/v2_0/service.py +7 -7
- openstackclient/identity/v2_0/user.py +6 -21
- openstackclient/identity/v3/access_rule.py +2 -5
- openstackclient/identity/v3/application_credential.py +2 -2
- openstackclient/identity/v3/consumer.py +4 -3
- openstackclient/identity/v3/credential.py +6 -7
- openstackclient/identity/v3/domain.py +63 -44
- openstackclient/identity/v3/ec2creds.py +4 -3
- openstackclient/identity/v3/endpoint.py +104 -88
- openstackclient/identity/v3/endpoint_group.py +1 -1
- openstackclient/identity/v3/group.py +116 -72
- openstackclient/identity/v3/identity_provider.py +1 -2
- openstackclient/identity/v3/limit.py +4 -9
- openstackclient/identity/v3/mapping.py +4 -3
- openstackclient/identity/v3/policy.py +5 -8
- openstackclient/identity/v3/project.py +23 -6
- openstackclient/identity/v3/region.py +2 -5
- openstackclient/identity/v3/registered_limit.py +4 -8
- openstackclient/identity/v3/role.py +15 -16
- openstackclient/identity/v3/service.py +8 -8
- openstackclient/identity/v3/service_provider.py +3 -6
- openstackclient/identity/v3/tag.py +2 -2
- openstackclient/identity/v3/token.py +1 -2
- openstackclient/identity/v3/trust.py +74 -25
- openstackclient/identity/v3/user.py +47 -11
- openstackclient/image/client.py +7 -5
- openstackclient/image/v1/image.py +11 -15
- openstackclient/image/v2/cache.py +2 -4
- openstackclient/image/v2/image.py +41 -48
- openstackclient/image/v2/metadef_namespaces.py +4 -3
- openstackclient/image/v2/metadef_resource_type_association.py +1 -2
- openstackclient/image/v2/metadef_resource_types.py +1 -2
- openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +9 -1370
- openstackclient/network/client.py +4 -16
- openstackclient/network/common.py +16 -12
- openstackclient/network/utils.py +3 -3
- openstackclient/network/v2/address_group.py +5 -9
- openstackclient/network/v2/address_scope.py +2 -3
- openstackclient/network/v2/default_security_group_rule.py +1 -2
- openstackclient/network/v2/floating_ip.py +69 -47
- openstackclient/network/v2/floating_ip_port_forwarding.py +7 -7
- openstackclient/network/v2/ip_availability.py +1 -2
- openstackclient/network/v2/l3_conntrack_helper.py +8 -12
- openstackclient/network/v2/local_ip.py +24 -26
- openstackclient/network/v2/local_ip_association.py +4 -5
- openstackclient/network/v2/ndp_proxy.py +9 -10
- openstackclient/network/v2/network.py +12 -16
- openstackclient/network/v2/network_agent.py +29 -37
- openstackclient/network/v2/network_auto_allocated_topology.py +4 -5
- openstackclient/network/v2/network_flavor.py +1 -1
- openstackclient/network/v2/network_flavor_profile.py +5 -5
- openstackclient/network/v2/network_meter.py +3 -3
- openstackclient/network/v2/network_meter_rule.py +5 -8
- openstackclient/network/v2/network_qos_policy.py +4 -4
- openstackclient/network/v2/network_qos_rule.py +7 -16
- openstackclient/network/v2/network_rbac.py +4 -4
- openstackclient/network/v2/network_segment.py +6 -7
- openstackclient/network/v2/network_segment_range.py +16 -20
- openstackclient/network/v2/network_trunk.py +24 -16
- openstackclient/network/v2/port.py +28 -29
- openstackclient/network/v2/router.py +53 -42
- openstackclient/network/v2/security_group.py +13 -19
- openstackclient/network/v2/security_group_rule.py +10 -11
- openstackclient/network/v2/subnet.py +31 -30
- openstackclient/network/v2/subnet_pool.py +4 -4
- openstackclient/object/client.py +2 -3
- openstackclient/object/v1/container.py +2 -3
- openstackclient/object/v1/object.py +2 -9
- openstackclient/shell.py +22 -5
- openstackclient/tests/functional/base.py +7 -3
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +12 -6
- openstackclient/tests/functional/compute/v2/test_keypair.py +41 -5
- openstackclient/tests/functional/compute/v2/test_server.py +2 -3
- openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
- openstackclient/tests/functional/identity/v2/test_user.py +1 -1
- openstackclient/tests/functional/identity/v3/common.py +3 -8
- openstackclient/tests/functional/identity/v3/test_application_credential.py +10 -10
- openstackclient/tests/functional/identity/v3/test_endpoint.py +3 -3
- openstackclient/tests/functional/identity/v3/test_group.py +3 -3
- openstackclient/tests/functional/identity/v3/test_idp.py +3 -7
- openstackclient/tests/functional/identity/v3/test_limit.py +4 -4
- openstackclient/tests/functional/identity/v3/test_project.py +5 -14
- openstackclient/tests/functional/identity/v3/test_region.py +1 -3
- openstackclient/tests/functional/identity/v3/test_registered_limit.py +3 -3
- openstackclient/tests/functional/identity/v3/test_role.py +1 -1
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +13 -31
- openstackclient/tests/functional/identity/v3/test_service_provider.py +3 -7
- openstackclient/tests/functional/identity/v3/test_user.py +8 -8
- openstackclient/tests/functional/network/v2/common.py +7 -3
- openstackclient/tests/functional/network/v2/test_address_group.py +4 -0
- openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +15 -11
- openstackclient/tests/functional/network/v2/test_local_ip.py +4 -0
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +2 -2
- openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +2 -3
- openstackclient/tests/functional/network/v2/test_network_rbac.py +2 -2
- openstackclient/tests/functional/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/functional/network/v2/test_port.py +17 -7
- openstackclient/tests/functional/network/v2/test_router.py +42 -0
- openstackclient/tests/functional/network/v2/test_subnet_pool.py +4 -0
- openstackclient/tests/unit/api/test_compute_v2.py +67 -87
- openstackclient/tests/unit/common/test_availability_zone.py +6 -14
- openstackclient/tests/unit/common/test_command.py +1 -1
- openstackclient/tests/unit/common/test_extension.py +5 -7
- openstackclient/tests/unit/common/test_limits.py +1 -1
- openstackclient/tests/unit/common/test_project_cleanup.py +5 -6
- openstackclient/tests/unit/common/test_quota.py +51 -28
- openstackclient/tests/unit/compute/v2/fakes.py +85 -315
- openstackclient/tests/unit/compute/v2/test_agent.py +16 -16
- openstackclient/tests/unit/compute/v2/test_aggregate.py +56 -60
- openstackclient/tests/unit/compute/v2/test_console.py +34 -17
- openstackclient/tests/unit/compute/v2/test_console_connection.py +72 -0
- openstackclient/tests/unit/compute/v2/test_flavor.py +72 -72
- openstackclient/tests/unit/compute/v2/test_host.py +8 -8
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +22 -30
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +36 -29
- openstackclient/tests/unit/compute/v2/test_server.py +693 -606
- openstackclient/tests/unit/compute/v2/test_server_backup.py +36 -77
- openstackclient/tests/unit/compute/v2/test_server_event.py +18 -20
- openstackclient/tests/unit/compute/v2/test_server_group.py +25 -31
- openstackclient/tests/unit/compute/v2/test_server_image.py +37 -78
- openstackclient/tests/unit/compute/v2/test_server_migration.py +41 -41
- openstackclient/tests/unit/compute/v2/test_server_volume.py +12 -12
- openstackclient/tests/unit/compute/v2/test_service.py +39 -45
- openstackclient/tests/unit/compute/v2/test_usage.py +5 -5
- openstackclient/tests/unit/identity/v2_0/fakes.py +1 -1
- openstackclient/tests/unit/identity/v3/test_access_rule.py +1 -3
- openstackclient/tests/unit/identity/v3/test_application_credential.py +48 -26
- openstackclient/tests/unit/identity/v3/test_domain.py +115 -105
- openstackclient/tests/unit/identity/v3/test_endpoint.py +167 -172
- openstackclient/tests/unit/identity/v3/test_group.py +353 -202
- openstackclient/tests/unit/identity/v3/test_mappings.py +2 -2
- openstackclient/tests/unit/identity/v3/test_project.py +16 -0
- openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
- openstackclient/tests/unit/identity/v3/test_user.py +102 -6
- openstackclient/tests/unit/image/v1/fakes.py +2 -2
- openstackclient/tests/unit/image/v1/test_image.py +8 -9
- openstackclient/tests/unit/image/v2/test_image.py +84 -46
- openstackclient/tests/unit/integ/cli/test_shell.py +1 -2
- openstackclient/tests/unit/network/test_common.py +2 -2
- openstackclient/tests/unit/network/v2/fakes.py +405 -485
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +8 -14
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +62 -54
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -1
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +2 -2
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +1 -3
- openstackclient/tests/unit/network/v2/test_network.py +4 -4
- openstackclient/tests/unit/network/v2/test_network_agent.py +15 -29
- openstackclient/tests/unit/network/v2/test_network_compute.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +16 -19
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +79 -152
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +4 -6
- openstackclient/tests/unit/network/v2/test_network_rbac.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_trunk.py +2 -2
- openstackclient/tests/unit/network/v2/test_port.py +21 -22
- openstackclient/tests/unit/network/v2/test_router.py +130 -51
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +11 -19
- openstackclient/tests/unit/network/v2/test_security_group_network.py +25 -27
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +15 -17
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +33 -39
- openstackclient/tests/unit/object/v1/test_object_all.py +4 -3
- openstackclient/tests/unit/test_shell.py +16 -13
- openstackclient/tests/unit/volume/v2/fakes.py +1 -2
- openstackclient/tests/unit/volume/v2/test_service.py +57 -91
- openstackclient/tests/unit/volume/v2/test_volume.py +109 -106
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +141 -148
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +293 -283
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +1 -1
- openstackclient/tests/unit/volume/v3/fakes.py +2 -8
- openstackclient/tests/unit/volume/v3/test_block_storage_log_level.py +61 -71
- openstackclient/tests/unit/volume/v3/test_service.py +221 -141
- openstackclient/tests/unit/volume/v3/test_volume.py +131 -120
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +4 -4
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +198 -203
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +683 -49
- openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +1 -1
- openstackclient/volume/client.py +1 -3
- openstackclient/volume/v2/consistency_group.py +4 -8
- openstackclient/volume/v2/consistency_group_snapshot.py +1 -2
- openstackclient/volume/v2/qos_specs.py +1 -2
- openstackclient/volume/v2/service.py +41 -38
- openstackclient/volume/v2/volume.py +71 -53
- openstackclient/volume/v2/volume_backup.py +15 -10
- openstackclient/volume/v2/volume_snapshot.py +129 -93
- openstackclient/volume/v2/volume_transfer_request.py +0 -3
- openstackclient/volume/v2/volume_type.py +10 -21
- openstackclient/volume/v3/block_storage_cluster.py +3 -3
- openstackclient/volume/v3/block_storage_log_level.py +22 -28
- openstackclient/volume/v3/block_storage_manage.py +1 -3
- openstackclient/volume/v3/service.py +105 -14
- openstackclient/volume/v3/volume.py +218 -58
- openstackclient/volume/v3/volume_attachment.py +3 -2
- openstackclient/volume/v3/volume_backup.py +31 -27
- openstackclient/volume/v3/volume_group.py +2 -1
- openstackclient/volume/v3/volume_group_snapshot.py +2 -1
- openstackclient/volume/v3/volume_snapshot.py +489 -13
- openstackclient/volume/v3/volume_type.py +10 -21
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/AUTHORS +11 -0
- python_openstackclient-8.1.0.dist-info/METADATA +264 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/RECORD +238 -259
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/entry_points.txt +7 -47
- python_openstackclient-8.1.0.dist-info/pbr.json +1 -0
- openstackclient/tests/functional/volume/v1/__init__.py +0 -0
- openstackclient/tests/functional/volume/v1/common.py +0 -35
- openstackclient/tests/functional/volume/v1/test_qos.py +0 -100
- openstackclient/tests/functional/volume/v1/test_service.py +0 -76
- openstackclient/tests/functional/volume/v1/test_snapshot.py +0 -232
- openstackclient/tests/functional/volume/v1/test_transfer_request.py +0 -111
- openstackclient/tests/functional/volume/v1/test_volume.py +0 -228
- openstackclient/tests/functional/volume/v1/test_volume_type.py +0 -213
- openstackclient/tests/unit/volume/v1/__init__.py +0 -0
- openstackclient/tests/unit/volume/v1/fakes.py +0 -615
- openstackclient/tests/unit/volume/v1/test_qos_specs.py +0 -471
- openstackclient/tests/unit/volume/v1/test_service.py +0 -295
- openstackclient/tests/unit/volume/v1/test_transfer_request.py +0 -380
- openstackclient/tests/unit/volume/v1/test_type.py +0 -633
- openstackclient/tests/unit/volume/v1/test_volume.py +0 -1447
- openstackclient/tests/unit/volume/v1/test_volume_backup.py +0 -435
- openstackclient/volume/v1/__init__.py +0 -0
- openstackclient/volume/v1/qos_specs.py +0 -377
- openstackclient/volume/v1/service.py +0 -136
- openstackclient/volume/v1/volume.py +0 -734
- openstackclient/volume/v1/volume_backup.py +0 -302
- openstackclient/volume/v1/volume_snapshot.py +0 -433
- openstackclient/volume/v1/volume_transfer_request.py +0 -200
- openstackclient/volume/v1/volume_type.py +0 -520
- python_openstackclient-7.4.0.dist-info/METADATA +0 -172
- python_openstackclient-7.4.0.dist-info/pbr.json +0 -1
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-8.1.0.dist-info}/top_level.txt +0 -0
|
@@ -28,10 +28,9 @@ LOG = logging.getLogger(__name__)
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def _get_columns(item):
|
|
31
|
-
column_map = {}
|
|
32
31
|
hidden_columns = ['location', 'tenant_id']
|
|
33
32
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
34
|
-
item,
|
|
33
|
+
item, {}, hidden_columns
|
|
35
34
|
)
|
|
36
35
|
|
|
37
36
|
|
|
@@ -74,30 +73,32 @@ class CreateLocalIP(command.ShowOne):
|
|
|
74
73
|
def get_parser(self, prog_name):
|
|
75
74
|
parser = super().get_parser(prog_name)
|
|
76
75
|
parser.add_argument(
|
|
77
|
-
'--name', metavar="<name>", help=_("New
|
|
76
|
+
'--name', metavar="<name>", help=_("New Local IP name")
|
|
78
77
|
)
|
|
79
78
|
parser.add_argument(
|
|
80
79
|
'--description',
|
|
81
80
|
metavar="<description>",
|
|
82
|
-
help=_("
|
|
81
|
+
help=_("Description for Local IP"),
|
|
83
82
|
)
|
|
84
83
|
parser.add_argument(
|
|
85
84
|
'--network',
|
|
86
85
|
metavar='<network>',
|
|
87
|
-
help=_("Network to allocate Local IP (name or ID)"),
|
|
86
|
+
help=_("Network to allocate Local IP from (name or ID)"),
|
|
88
87
|
)
|
|
89
88
|
parser.add_argument(
|
|
90
89
|
'--local-port',
|
|
91
90
|
metavar='<local-port>',
|
|
92
|
-
help=_("Port to allocate Local IP (name or ID)"),
|
|
91
|
+
help=_("Port to allocate Local IP from (name or ID)"),
|
|
93
92
|
)
|
|
94
93
|
parser.add_argument(
|
|
95
94
|
"--local-ip-address",
|
|
96
95
|
metavar="<local-ip-address>",
|
|
97
|
-
help=_("IP address or CIDR "),
|
|
96
|
+
help=_("IP address or CIDR for Local IP"),
|
|
98
97
|
)
|
|
99
98
|
parser.add_argument(
|
|
100
|
-
'--ip-mode',
|
|
99
|
+
'--ip-mode',
|
|
100
|
+
metavar='<ip-mode>',
|
|
101
|
+
help=_("IP mode to use for Local IP"),
|
|
101
102
|
)
|
|
102
103
|
|
|
103
104
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -116,7 +117,7 @@ class CreateLocalIP(command.ShowOne):
|
|
|
116
117
|
|
|
117
118
|
|
|
118
119
|
class DeleteLocalIP(command.Command):
|
|
119
|
-
_description = _("Delete
|
|
120
|
+
_description = _("Delete Local IP(s)")
|
|
120
121
|
|
|
121
122
|
def get_parser(self, prog_name):
|
|
122
123
|
parser = super().get_parser(prog_name)
|
|
@@ -149,14 +150,15 @@ class DeleteLocalIP(command.Command):
|
|
|
149
150
|
|
|
150
151
|
if result > 0:
|
|
151
152
|
total = len(parsed_args.local_ip)
|
|
152
|
-
msg = _(
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
msg = _("%(result)s of %(total)s local IPs failed to delete.") % {
|
|
154
|
+
'result': result,
|
|
155
|
+
'total': total,
|
|
156
|
+
}
|
|
155
157
|
raise exceptions.CommandError(msg)
|
|
156
158
|
|
|
157
159
|
|
|
158
160
|
class SetLocalIP(command.Command):
|
|
159
|
-
_description = _("Set
|
|
161
|
+
_description = _("Set Local IP properties")
|
|
160
162
|
|
|
161
163
|
def get_parser(self, prog_name):
|
|
162
164
|
parser = super().get_parser(prog_name)
|
|
@@ -171,7 +173,7 @@ class SetLocalIP(command.Command):
|
|
|
171
173
|
parser.add_argument(
|
|
172
174
|
'--description',
|
|
173
175
|
metavar="<description>",
|
|
174
|
-
help=_('Set
|
|
176
|
+
help=_('Set Local IP description'),
|
|
175
177
|
)
|
|
176
178
|
return parser
|
|
177
179
|
|
|
@@ -188,7 +190,7 @@ class SetLocalIP(command.Command):
|
|
|
188
190
|
|
|
189
191
|
|
|
190
192
|
class ListLocalIP(command.Lister):
|
|
191
|
-
_description = _("List
|
|
193
|
+
_description = _("List Local IPs")
|
|
192
194
|
|
|
193
195
|
def get_parser(self, prog_name):
|
|
194
196
|
parser = super().get_parser(prog_name)
|
|
@@ -196,36 +198,32 @@ class ListLocalIP(command.Lister):
|
|
|
196
198
|
parser.add_argument(
|
|
197
199
|
'--name',
|
|
198
200
|
metavar='<name>',
|
|
199
|
-
help=_("List only
|
|
201
|
+
help=_("List only Local IPs of given name in output"),
|
|
200
202
|
)
|
|
201
203
|
parser.add_argument(
|
|
202
204
|
'--project',
|
|
203
205
|
metavar="<project>",
|
|
204
|
-
help=_(
|
|
205
|
-
"List Local IPs according to their project " "(name or ID)"
|
|
206
|
-
),
|
|
206
|
+
help=_("List Local IPs according to their project (name or ID)"),
|
|
207
207
|
)
|
|
208
208
|
parser.add_argument(
|
|
209
209
|
'--network',
|
|
210
210
|
metavar='<network>',
|
|
211
|
-
help=_(
|
|
212
|
-
"List Local IP(s) according to " "given network (name or ID)"
|
|
213
|
-
),
|
|
211
|
+
help=_("List Local IP(s) according to given network (name or ID)"),
|
|
214
212
|
)
|
|
215
213
|
parser.add_argument(
|
|
216
214
|
'--local-port',
|
|
217
215
|
metavar='<local-port>',
|
|
218
|
-
help=_("List Local IP(s) according to
|
|
216
|
+
help=_("List Local IP(s) according to given port (name or ID)"),
|
|
219
217
|
)
|
|
220
218
|
parser.add_argument(
|
|
221
219
|
'--local-ip-address',
|
|
222
220
|
metavar='<local-ip-address>',
|
|
223
|
-
help=_("List Local IP(s) according to
|
|
221
|
+
help=_("List Local IP(s) according to given Local IP Address"),
|
|
224
222
|
)
|
|
225
223
|
parser.add_argument(
|
|
226
224
|
'--ip-mode',
|
|
227
225
|
metavar='<ip_mode>',
|
|
228
|
-
help=_("List Local IP(s) according to
|
|
226
|
+
help=_("List Local IP(s) according to given IP mode"),
|
|
229
227
|
)
|
|
230
228
|
|
|
231
229
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -295,7 +293,7 @@ class ListLocalIP(command.Lister):
|
|
|
295
293
|
|
|
296
294
|
|
|
297
295
|
class ShowLocalIP(command.ShowOne):
|
|
298
|
-
_description = _("Display
|
|
296
|
+
_description = _("Display Local IP details")
|
|
299
297
|
|
|
300
298
|
def get_parser(self, prog_name):
|
|
301
299
|
parser = super().get_parser(prog_name)
|
|
@@ -28,10 +28,9 @@ LOG = logging.getLogger(__name__)
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def _get_columns(item):
|
|
31
|
-
column_map = {}
|
|
32
31
|
hidden_columns = ['location', 'name', 'id', 'tenant_id']
|
|
33
32
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
34
|
-
item,
|
|
33
|
+
item, {}, hidden_columns
|
|
35
34
|
)
|
|
36
35
|
|
|
37
36
|
|
|
@@ -44,7 +43,7 @@ class CreateLocalIPAssociation(command.ShowOne):
|
|
|
44
43
|
'local_ip',
|
|
45
44
|
metavar='<local-ip>',
|
|
46
45
|
help=_(
|
|
47
|
-
"Local IP that the port association belongs to
|
|
46
|
+
"Local IP that the port association belongs to (Name or ID)"
|
|
48
47
|
),
|
|
49
48
|
)
|
|
50
49
|
parser.add_argument(
|
|
@@ -90,7 +89,7 @@ class DeleteLocalIPAssociation(command.Command):
|
|
|
90
89
|
'local_ip',
|
|
91
90
|
metavar="<local-ip>",
|
|
92
91
|
help=_(
|
|
93
|
-
"Local IP that the port association belongs to
|
|
92
|
+
"Local IP that the port association belongs to (Name or ID)"
|
|
94
93
|
),
|
|
95
94
|
)
|
|
96
95
|
parser.add_argument(
|
|
@@ -151,7 +150,7 @@ class ListLocalIPAssociation(command.Lister):
|
|
|
151
150
|
'--fixed-port',
|
|
152
151
|
metavar='<fixed-port>',
|
|
153
152
|
help=_(
|
|
154
|
-
"Filter the list result by the ID or name of
|
|
153
|
+
"Filter the list result by the ID or name of the fixed port"
|
|
155
154
|
),
|
|
156
155
|
)
|
|
157
156
|
parser.add_argument(
|
|
@@ -29,10 +29,9 @@ LOG = logging.getLogger(__name__)
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def _get_columns(item):
|
|
32
|
-
column_map = {}
|
|
33
32
|
hidden_columns = ['location']
|
|
34
33
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
35
|
-
item,
|
|
34
|
+
item, {}, hidden_columns
|
|
36
35
|
)
|
|
37
36
|
|
|
38
37
|
|
|
@@ -69,7 +68,7 @@ class CreateNDPProxy(command.ShowOne):
|
|
|
69
68
|
'--description',
|
|
70
69
|
metavar='<description>',
|
|
71
70
|
help=_(
|
|
72
|
-
"
|
|
71
|
+
"Text to describe/contextualize the use of the "
|
|
73
72
|
"NDP proxy configuration"
|
|
74
73
|
),
|
|
75
74
|
)
|
|
@@ -124,13 +123,13 @@ class DeleteNDPProxy(command.Command):
|
|
|
124
123
|
except Exception as e:
|
|
125
124
|
result += 1
|
|
126
125
|
LOG.error(
|
|
127
|
-
_("Failed to delete NDP proxy
|
|
126
|
+
_("Failed to delete NDP proxy '%(ndp_proxy)s': %(e)s"),
|
|
128
127
|
{'ndp_proxy': ndp_proxy, 'e': e},
|
|
129
128
|
)
|
|
130
129
|
if result > 0:
|
|
131
130
|
total = len(parsed_args.ndp_proxy)
|
|
132
131
|
msg = _(
|
|
133
|
-
"%(result)s of %(total)s NDP proxies failed
|
|
132
|
+
"%(result)s of %(total)s NDP proxies failed to delete."
|
|
134
133
|
) % {'result': result, 'total': total}
|
|
135
134
|
raise exceptions.CommandError(msg)
|
|
136
135
|
|
|
@@ -156,18 +155,18 @@ class ListNDPProxy(command.Lister):
|
|
|
156
155
|
)
|
|
157
156
|
parser.add_argument(
|
|
158
157
|
'--ip-address',
|
|
159
|
-
metavar='ip-address',
|
|
160
|
-
help=_("List only NDP proxies
|
|
158
|
+
metavar='<ip-address>',
|
|
159
|
+
help=_("List only NDP proxies associated to this IPv6 address"),
|
|
161
160
|
)
|
|
162
161
|
parser.add_argument(
|
|
163
162
|
'--project',
|
|
164
163
|
metavar='<project>',
|
|
165
|
-
help=_("List NDP proxies
|
|
164
|
+
help=_("List only NDP proxies of given project (name or ID)"),
|
|
166
165
|
)
|
|
167
166
|
parser.add_argument(
|
|
168
167
|
'--name',
|
|
169
168
|
metavar='<name>',
|
|
170
|
-
help=_("List NDP proxies
|
|
169
|
+
help=_("List only NDP proxies of given name"),
|
|
171
170
|
)
|
|
172
171
|
|
|
173
172
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -247,7 +246,7 @@ class SetNDPProxy(command.Command):
|
|
|
247
246
|
'--description',
|
|
248
247
|
metavar='<description>',
|
|
249
248
|
help=_(
|
|
250
|
-
"
|
|
249
|
+
"Text to describe/contextualize the use of "
|
|
251
250
|
"the NDP proxy configuration"
|
|
252
251
|
),
|
|
253
252
|
)
|
|
@@ -68,8 +68,7 @@ def _get_columns_network(item):
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
def _get_columns_compute(item):
|
|
71
|
-
|
|
72
|
-
return utils.get_osc_show_columns_for_sdk_resource(item, column_map)
|
|
71
|
+
return utils.get_osc_show_columns_for_sdk_resource(item, {})
|
|
73
72
|
|
|
74
73
|
|
|
75
74
|
def _get_attrs_network(client_manager, parsed_args):
|
|
@@ -166,7 +165,7 @@ def _add_additional_network_options(parser):
|
|
|
166
165
|
help=_(
|
|
167
166
|
"The physical mechanism by which the virtual network "
|
|
168
167
|
"is implemented. For example: "
|
|
169
|
-
"flat, geneve, gre, local, vlan
|
|
168
|
+
"flat, geneve, gre, local, vlan or vxlan."
|
|
170
169
|
),
|
|
171
170
|
)
|
|
172
171
|
parser.add_argument(
|
|
@@ -292,8 +291,8 @@ class CreateNetwork(
|
|
|
292
291
|
action='store_true',
|
|
293
292
|
help=self.enhance_help_neutron(
|
|
294
293
|
_(
|
|
295
|
-
"The network has an external routing facility that
|
|
296
|
-
"managed by Neutron and can be used
|
|
294
|
+
"The network has an external routing facility that is not "
|
|
295
|
+
"managed by Neutron and can be used. For example: "
|
|
297
296
|
"openstack router set --external-gateway NETWORK "
|
|
298
297
|
"(external-net extension required)"
|
|
299
298
|
)
|
|
@@ -355,17 +354,14 @@ class CreateNetwork(
|
|
|
355
354
|
'--qinq-vlan',
|
|
356
355
|
action='store_true',
|
|
357
356
|
help=self.enhance_help_neutron(
|
|
358
|
-
_("Enable VLAN QinQ (S-Tag ethtype 0x8a88)
|
|
357
|
+
_("Enable VLAN QinQ (S-Tag ethtype 0x8a88) for the network")
|
|
359
358
|
),
|
|
360
359
|
)
|
|
361
360
|
vlan_qinq_grp.add_argument(
|
|
362
361
|
'--no-qinq-vlan',
|
|
363
362
|
action='store_true',
|
|
364
363
|
help=self.enhance_help_neutron(
|
|
365
|
-
_(
|
|
366
|
-
"Disable VLAN QinQ (S-Tag ethtype 0x8a88) "
|
|
367
|
-
"for the network"
|
|
368
|
-
)
|
|
364
|
+
_("Disable VLAN QinQ (S-Tag ethtype 0x8a88) for the network")
|
|
369
365
|
),
|
|
370
366
|
)
|
|
371
367
|
|
|
@@ -537,7 +533,7 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
537
533
|
_(
|
|
538
534
|
"List networks according to their physical mechanisms. "
|
|
539
535
|
"The supported options are: flat, geneve, gre, local, "
|
|
540
|
-
"vlan
|
|
536
|
+
"vlan and vxlan."
|
|
541
537
|
)
|
|
542
538
|
),
|
|
543
539
|
)
|
|
@@ -576,7 +572,7 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
576
572
|
def take_action_network(self, client, parsed_args):
|
|
577
573
|
identity_client = self.app.client_manager.identity
|
|
578
574
|
if parsed_args.long:
|
|
579
|
-
columns = (
|
|
575
|
+
columns: tuple[str, ...] = (
|
|
580
576
|
'id',
|
|
581
577
|
'name',
|
|
582
578
|
'status',
|
|
@@ -589,7 +585,7 @@ class ListNetwork(common.NetworkAndComputeLister):
|
|
|
589
585
|
'availability_zones',
|
|
590
586
|
'tags',
|
|
591
587
|
)
|
|
592
|
-
column_headers = (
|
|
588
|
+
column_headers: tuple[str, ...] = (
|
|
593
589
|
'ID',
|
|
594
590
|
'Name',
|
|
595
591
|
'Status',
|
|
@@ -789,10 +785,10 @@ class SetNetwork(common.NeutronCommandWithExtraArgs):
|
|
|
789
785
|
'--external',
|
|
790
786
|
action='store_true',
|
|
791
787
|
help=_(
|
|
792
|
-
"The network has an external routing facility that
|
|
793
|
-
"managed by Neutron and can be used
|
|
788
|
+
"The network has an external routing facility that is not "
|
|
789
|
+
"managed by Neutron and can be used. For example: "
|
|
794
790
|
"openstack router set --external-gateway NETWORK "
|
|
795
|
-
"(external-net extension required)"
|
|
791
|
+
"(external-net extension required)."
|
|
796
792
|
),
|
|
797
793
|
)
|
|
798
794
|
external_router_grp.add_argument(
|
|
@@ -155,7 +155,7 @@ class DeleteNetworkAgent(command.Command):
|
|
|
155
155
|
if result > 0:
|
|
156
156
|
total = len(parsed_args.network_agent)
|
|
157
157
|
msg = _(
|
|
158
|
-
"%(result)s of %(total)s network agents failed
|
|
158
|
+
"%(result)s of %(total)s network agents failed to delete."
|
|
159
159
|
) % {'result': result, 'total': total}
|
|
160
160
|
raise exceptions.CommandError(msg)
|
|
161
161
|
|
|
@@ -164,32 +164,37 @@ class DeleteNetworkAgent(command.Command):
|
|
|
164
164
|
# OSC minimum requirements include SDK 1.0.
|
|
165
165
|
class ListNetworkAgent(command.Lister):
|
|
166
166
|
_description = _("List network agents")
|
|
167
|
+
_supported_agents = {
|
|
168
|
+
'bgp': 'BGP dynamic routing agent',
|
|
169
|
+
'dhcp': 'DHCP agent',
|
|
170
|
+
'open-vswitch': 'Open vSwitch agent',
|
|
171
|
+
'linux-bridge': 'Linux bridge agent',
|
|
172
|
+
'ofa': 'OFA driver agent',
|
|
173
|
+
'l3': 'L3 agent',
|
|
174
|
+
'loadbalancer': 'Loadbalancer agent',
|
|
175
|
+
'metering': 'Metering agent',
|
|
176
|
+
'metadata': 'Metadata agent',
|
|
177
|
+
'macvtap': 'Macvtap agent',
|
|
178
|
+
'nic': 'NIC Switch agent',
|
|
179
|
+
'baremetal': 'Baremetal Node',
|
|
180
|
+
'ovn-controller': 'OVN Controller agent',
|
|
181
|
+
'ovn-controller-gateway': 'OVN Controller Gateway agent',
|
|
182
|
+
'ovn-metadata': 'OVN Metadata agent',
|
|
183
|
+
'ovn-agent': 'OVN Neutron agent',
|
|
184
|
+
}
|
|
167
185
|
|
|
168
186
|
def get_parser(self, prog_name):
|
|
169
187
|
parser = super().get_parser(prog_name)
|
|
188
|
+
supported_agents = ','.join(self._supported_agents.keys())
|
|
170
189
|
parser.add_argument(
|
|
171
190
|
'--agent-type',
|
|
172
191
|
metavar='<agent-type>',
|
|
173
|
-
choices=
|
|
174
|
-
"bgp",
|
|
175
|
-
"dhcp",
|
|
176
|
-
"open-vswitch",
|
|
177
|
-
"linux-bridge",
|
|
178
|
-
"ofa",
|
|
179
|
-
"l3",
|
|
180
|
-
"loadbalancer",
|
|
181
|
-
"metering",
|
|
182
|
-
"metadata",
|
|
183
|
-
"macvtap",
|
|
184
|
-
"nic",
|
|
185
|
-
"baremetal",
|
|
186
|
-
],
|
|
192
|
+
choices=list(self._supported_agents.keys()),
|
|
187
193
|
help=_(
|
|
188
194
|
"List only agents with the specified agent type. "
|
|
189
|
-
"The supported agent types are:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
),
|
|
195
|
+
"The supported agent types are: %(supported_agents)s."
|
|
196
|
+
)
|
|
197
|
+
% {'supported_agents': supported_agents},
|
|
193
198
|
)
|
|
194
199
|
parser.add_argument(
|
|
195
200
|
'--host',
|
|
@@ -218,7 +223,7 @@ class ListNetworkAgent(command.Lister):
|
|
|
218
223
|
|
|
219
224
|
def take_action(self, parsed_args):
|
|
220
225
|
client = self.app.client_manager.network
|
|
221
|
-
columns = (
|
|
226
|
+
columns: tuple[str, ...] = (
|
|
222
227
|
'id',
|
|
223
228
|
'agent_type',
|
|
224
229
|
'host',
|
|
@@ -227,7 +232,7 @@ class ListNetworkAgent(command.Lister):
|
|
|
227
232
|
'is_admin_state_up',
|
|
228
233
|
'binary',
|
|
229
234
|
)
|
|
230
|
-
column_headers = (
|
|
235
|
+
column_headers: tuple[str, ...] = (
|
|
231
236
|
'ID',
|
|
232
237
|
'Agent Type',
|
|
233
238
|
'Host',
|
|
@@ -237,21 +242,6 @@ class ListNetworkAgent(command.Lister):
|
|
|
237
242
|
'Binary',
|
|
238
243
|
)
|
|
239
244
|
|
|
240
|
-
key_value = {
|
|
241
|
-
'bgp': 'BGP dynamic routing agent',
|
|
242
|
-
'dhcp': 'DHCP agent',
|
|
243
|
-
'open-vswitch': 'Open vSwitch agent',
|
|
244
|
-
'linux-bridge': 'Linux bridge agent',
|
|
245
|
-
'ofa': 'OFA driver agent',
|
|
246
|
-
'l3': 'L3 agent',
|
|
247
|
-
'loadbalancer': 'Loadbalancer agent',
|
|
248
|
-
'metering': 'Metering agent',
|
|
249
|
-
'metadata': 'Metadata agent',
|
|
250
|
-
'macvtap': 'Macvtap agent',
|
|
251
|
-
'nic': 'NIC Switch agent',
|
|
252
|
-
'baremetal': 'Baremetal Node',
|
|
253
|
-
}
|
|
254
|
-
|
|
255
245
|
filters = {}
|
|
256
246
|
|
|
257
247
|
if parsed_args.network is not None:
|
|
@@ -269,7 +259,9 @@ class ListNetworkAgent(command.Lister):
|
|
|
269
259
|
data = client.routers_hosting_l3_agents(router)
|
|
270
260
|
else:
|
|
271
261
|
if parsed_args.agent_type is not None:
|
|
272
|
-
filters['agent_type'] =
|
|
262
|
+
filters['agent_type'] = self._supported_agents[
|
|
263
|
+
parsed_args.agent_type
|
|
264
|
+
]
|
|
273
265
|
if parsed_args.host is not None:
|
|
274
266
|
filters['host'] = parsed_args.host
|
|
275
267
|
|
|
@@ -25,10 +25,9 @@ LOG = logging.getLogger(__name__)
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def _get_columns(item):
|
|
28
|
-
column_map = {}
|
|
29
28
|
hidden_columns = ['name', 'location', 'tenant_id']
|
|
30
29
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
31
|
-
item,
|
|
30
|
+
item, {}, hidden_columns
|
|
32
31
|
)
|
|
33
32
|
|
|
34
33
|
|
|
@@ -71,7 +70,7 @@ class CreateAutoAllocatedTopology(command.ShowOne):
|
|
|
71
70
|
metavar='<project>',
|
|
72
71
|
help=_(
|
|
73
72
|
"Return the auto allocated topology for a given project. "
|
|
74
|
-
"Default is current project"
|
|
73
|
+
"Default is current project."
|
|
75
74
|
),
|
|
76
75
|
)
|
|
77
76
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -89,7 +88,7 @@ class CreateAutoAllocatedTopology(command.ShowOne):
|
|
|
89
88
|
default=True,
|
|
90
89
|
help=_(
|
|
91
90
|
"If topology exists returns the topology's "
|
|
92
|
-
"information (
|
|
91
|
+
"information (default)"
|
|
93
92
|
),
|
|
94
93
|
)
|
|
95
94
|
|
|
@@ -132,7 +131,7 @@ class DeleteAutoAllocatedTopology(command.Command):
|
|
|
132
131
|
metavar='<project>',
|
|
133
132
|
help=_(
|
|
134
133
|
'Delete auto allocated topology for a given project. '
|
|
135
|
-
'Default is the current project'
|
|
134
|
+
'Default is the current project.'
|
|
136
135
|
),
|
|
137
136
|
)
|
|
138
137
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -102,7 +102,7 @@ class CreateNetworkFlavor(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
102
102
|
metavar="<service-type>",
|
|
103
103
|
required=True,
|
|
104
104
|
help=_(
|
|
105
|
-
'Service type to which the flavor applies
|
|
105
|
+
'Service type to which the flavor applies. For example: VPN '
|
|
106
106
|
'(See openstack network service provider list for loaded '
|
|
107
107
|
'examples.)'
|
|
108
108
|
),
|
|
@@ -79,14 +79,14 @@ class CreateNetworkFlavorProfile(
|
|
|
79
79
|
'--driver',
|
|
80
80
|
help=_(
|
|
81
81
|
"Python module path to driver. This becomes "
|
|
82
|
-
"required if --metainfo is missing and vice
|
|
82
|
+
"required if --metainfo is missing and vice-versa."
|
|
83
83
|
),
|
|
84
84
|
)
|
|
85
85
|
parser.add_argument(
|
|
86
86
|
'--metainfo',
|
|
87
87
|
help=_(
|
|
88
88
|
"Metainfo for the flavor profile. This becomes "
|
|
89
|
-
"required if --driver is missing and vice
|
|
89
|
+
"required if --driver is missing and vice-versa."
|
|
90
90
|
),
|
|
91
91
|
)
|
|
92
92
|
|
|
@@ -146,7 +146,7 @@ class DeleteNetworkFlavorProfile(command.Command):
|
|
|
146
146
|
if result > 0:
|
|
147
147
|
total = len(parsed_args.flavor_profile)
|
|
148
148
|
msg = _(
|
|
149
|
-
"%(result)s of %(total)s flavor_profiles failed
|
|
149
|
+
"%(result)s of %(total)s flavor_profiles failed to delete."
|
|
150
150
|
) % {"result": result, "total": total}
|
|
151
151
|
raise exceptions.CommandError(msg)
|
|
152
152
|
|
|
@@ -217,14 +217,14 @@ class SetNetworkFlavorProfile(common.NeutronCommandWithExtraArgs):
|
|
|
217
217
|
'--driver',
|
|
218
218
|
help=_(
|
|
219
219
|
"Python module path to driver. This becomes "
|
|
220
|
-
"required if --metainfo is missing and vice
|
|
220
|
+
"required if --metainfo is missing and vice-versa."
|
|
221
221
|
),
|
|
222
222
|
)
|
|
223
223
|
parser.add_argument(
|
|
224
224
|
'--metainfo',
|
|
225
225
|
help=_(
|
|
226
226
|
"Metainfo for the flavor profile. This becomes "
|
|
227
|
-
"required if --driver is missing and vice
|
|
227
|
+
"required if --driver is missing and vice-versa."
|
|
228
228
|
),
|
|
229
229
|
)
|
|
230
230
|
|
|
@@ -70,7 +70,7 @@ class CreateMeter(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
70
70
|
parser.add_argument(
|
|
71
71
|
'--description',
|
|
72
72
|
metavar='<description>',
|
|
73
|
-
help=_("
|
|
73
|
+
help=_("Description for meter"),
|
|
74
74
|
)
|
|
75
75
|
parser.add_argument(
|
|
76
76
|
'--project',
|
|
@@ -139,12 +139,12 @@ class DeleteMeter(command.Command):
|
|
|
139
139
|
except Exception as e:
|
|
140
140
|
result += 1
|
|
141
141
|
LOG.error(
|
|
142
|
-
_("Failed to delete meter with
|
|
142
|
+
_("Failed to delete meter with ID '%(meter)s': %(e)s"),
|
|
143
143
|
{"meter": meter, "e": e},
|
|
144
144
|
)
|
|
145
145
|
if result > 0:
|
|
146
146
|
total = len(parsed_args.meter)
|
|
147
|
-
msg = _("%(result)s of %(total)s meters failed
|
|
147
|
+
msg = _("%(result)s of %(total)s meters failed to delete.") % {
|
|
148
148
|
"result": result,
|
|
149
149
|
"total": total,
|
|
150
150
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"""Meter Rule Implementations"""
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
|
+
import typing as ty
|
|
17
18
|
|
|
18
19
|
from osc_lib.command import command
|
|
19
20
|
from osc_lib import exceptions
|
|
@@ -27,15 +28,14 @@ LOG = logging.getLogger(__name__)
|
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
def _get_columns(item):
|
|
30
|
-
column_map = {}
|
|
31
31
|
hidden_columns = ['location', 'tenant_id']
|
|
32
32
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
33
|
-
item,
|
|
33
|
+
item, {}, hidden_columns
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
def _get_attrs(client_manager, parsed_args):
|
|
38
|
-
attrs = {}
|
|
38
|
+
attrs: dict[str, ty.Any] = {}
|
|
39
39
|
|
|
40
40
|
if parsed_args.exclude:
|
|
41
41
|
attrs['excluded'] = True
|
|
@@ -168,17 +168,14 @@ class DeleteMeterRule(command.Command):
|
|
|
168
168
|
except Exception as e:
|
|
169
169
|
result += 1
|
|
170
170
|
LOG.error(
|
|
171
|
-
_(
|
|
172
|
-
"Failed to delete meter rule with "
|
|
173
|
-
"ID '%(id)s': %(e)s"
|
|
174
|
-
),
|
|
171
|
+
_("Failed to delete meter rule with ID '%(id)s': %(e)s"),
|
|
175
172
|
{"id": id, "e": e},
|
|
176
173
|
)
|
|
177
174
|
|
|
178
175
|
if result > 0:
|
|
179
176
|
total = len(parsed_args.meter_rule_id)
|
|
180
177
|
msg = _(
|
|
181
|
-
"%(result)s of %(total)s meter rules failed
|
|
178
|
+
"%(result)s of %(total)s meter rules failed to delete."
|
|
182
179
|
) % {"result": result, "total": total}
|
|
183
180
|
raise exceptions.CommandError(msg)
|
|
184
181
|
|
|
@@ -174,7 +174,7 @@ class DeleteNetworkQosPolicy(command.Command):
|
|
|
174
174
|
if result > 0:
|
|
175
175
|
total = len(parsed_args.policy)
|
|
176
176
|
msg = _(
|
|
177
|
-
"%(result)s of %(total)s QoS policies failed
|
|
177
|
+
"%(result)s of %(total)s QoS policies failed to delete."
|
|
178
178
|
) % {'result': result, 'total': total}
|
|
179
179
|
raise exceptions.CommandError(msg)
|
|
180
180
|
|
|
@@ -190,7 +190,7 @@ class ListNetworkQosPolicy(command.Lister):
|
|
|
190
190
|
'--project',
|
|
191
191
|
metavar='<project>',
|
|
192
192
|
help=_(
|
|
193
|
-
"List
|
|
193
|
+
"List QoS policies according to their project (name or ID)"
|
|
194
194
|
),
|
|
195
195
|
)
|
|
196
196
|
identity_common.add_project_domain_option_to_parser(parser)
|
|
@@ -198,12 +198,12 @@ class ListNetworkQosPolicy(command.Lister):
|
|
|
198
198
|
shared_group.add_argument(
|
|
199
199
|
'--share',
|
|
200
200
|
action='store_true',
|
|
201
|
-
help=_("List
|
|
201
|
+
help=_("List QoS policies shared between projects"),
|
|
202
202
|
)
|
|
203
203
|
shared_group.add_argument(
|
|
204
204
|
'--no-share',
|
|
205
205
|
action='store_true',
|
|
206
|
-
help=_("List
|
|
206
|
+
help=_("List QoS policies not shared between projects"),
|
|
207
207
|
)
|
|
208
208
|
return parser
|
|
209
209
|
|