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
|
@@ -18,6 +18,7 @@ import collections
|
|
|
18
18
|
import copy
|
|
19
19
|
import json
|
|
20
20
|
import logging
|
|
21
|
+
import typing as ty
|
|
21
22
|
|
|
22
23
|
from cliff import columns as cliff_columns
|
|
23
24
|
from osc_lib.cli import format_columns
|
|
@@ -75,7 +76,7 @@ def _get_columns(item):
|
|
|
75
76
|
}
|
|
76
77
|
if hasattr(item, 'interfaces_info'):
|
|
77
78
|
column_map['interfaces_info'] = 'interfaces_info'
|
|
78
|
-
invisible_columns = ['location']
|
|
79
|
+
invisible_columns = ['location', 'tenant_id']
|
|
79
80
|
if item.is_ha is None:
|
|
80
81
|
invisible_columns.append('is_ha')
|
|
81
82
|
column_map.pop('is_ha')
|
|
@@ -104,21 +105,21 @@ def _passed_multiple_gateways(extension_supported, external_gateways):
|
|
|
104
105
|
|
|
105
106
|
|
|
106
107
|
def _get_external_gateway_attrs(client_manager, parsed_args):
|
|
107
|
-
attrs = {}
|
|
108
|
+
attrs: dict[str, ty.Any] = {}
|
|
108
109
|
|
|
109
110
|
if parsed_args.external_gateways:
|
|
110
111
|
external_gateways: collections.defaultdict[str, list[dict]] = (
|
|
111
112
|
collections.defaultdict(list)
|
|
112
113
|
)
|
|
113
114
|
n_client = client_manager.network
|
|
114
|
-
first_network_id =
|
|
115
|
+
first_network_id = ''
|
|
115
116
|
|
|
116
117
|
for gw_net_name_or_id in parsed_args.external_gateways:
|
|
117
118
|
gateway_info = {}
|
|
118
119
|
gw_net = n_client.find_network(
|
|
119
120
|
gw_net_name_or_id, ignore_missing=False
|
|
120
121
|
)
|
|
121
|
-
if first_network_id
|
|
122
|
+
if not first_network_id:
|
|
122
123
|
first_network_id = gw_net.id
|
|
123
124
|
gateway_info['network_id'] = gw_net.id
|
|
124
125
|
if 'disable_snat' in parsed_args and parsed_args.disable_snat:
|
|
@@ -146,7 +147,7 @@ def _get_external_gateway_attrs(client_manager, parsed_args):
|
|
|
146
147
|
for ip_spec in parsed_args.fixed_ips:
|
|
147
148
|
# If there is only one gateway, this value will represent the
|
|
148
149
|
# network ID for it, otherwise it will be overridden.
|
|
149
|
-
ip_net_id = first_network_id
|
|
150
|
+
ip_net_id: str = first_network_id
|
|
150
151
|
|
|
151
152
|
if ip_spec.get('subnet', False):
|
|
152
153
|
subnet_name_id = ip_spec.pop('subnet')
|
|
@@ -258,7 +259,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
|
|
|
258
259
|
action='store_true',
|
|
259
260
|
help=_(
|
|
260
261
|
"Enable BFD sessions for default routes inferred from "
|
|
261
|
-
"the external gateway port subnets for this router
|
|
262
|
+
"the external gateway port subnets for this router"
|
|
262
263
|
),
|
|
263
264
|
)
|
|
264
265
|
parser.add_argument(
|
|
@@ -268,7 +269,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
|
|
|
268
269
|
action='store_false',
|
|
269
270
|
help=_(
|
|
270
271
|
"Disable BFD sessions for default routes inferred from "
|
|
271
|
-
"the external gateway port subnets for this router
|
|
272
|
+
"the external gateway port subnets for this router"
|
|
272
273
|
),
|
|
273
274
|
)
|
|
274
275
|
parser.add_argument(
|
|
@@ -278,7 +279,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
|
|
|
278
279
|
action='store_true',
|
|
279
280
|
help=_(
|
|
280
281
|
"Add ECMP default routes if multiple are available via "
|
|
281
|
-
"different gateway ports
|
|
282
|
+
"different gateway ports"
|
|
282
283
|
),
|
|
283
284
|
)
|
|
284
285
|
parser.add_argument(
|
|
@@ -286,7 +287,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
|
|
|
286
287
|
dest='enable_default_route_ecmp',
|
|
287
288
|
default=None,
|
|
288
289
|
action='store_false',
|
|
289
|
-
help=_("Add default route only for first gateway port
|
|
290
|
+
help=_("Add default route only for first gateway port"),
|
|
290
291
|
)
|
|
291
292
|
|
|
292
293
|
|
|
@@ -367,7 +368,7 @@ class AddExtraRoutesToRouter(command.ShowOne):
|
|
|
367
368
|
metavar='<router>',
|
|
368
369
|
help=_(
|
|
369
370
|
"Router to which extra static routes "
|
|
370
|
-
"will be added (name or ID)
|
|
371
|
+
"will be added (name or ID)"
|
|
371
372
|
),
|
|
372
373
|
)
|
|
373
374
|
parser.add_argument(
|
|
@@ -382,7 +383,7 @@ class AddExtraRoutesToRouter(command.ShowOne):
|
|
|
382
383
|
"destination: destination subnet (in CIDR notation), "
|
|
383
384
|
"gateway: nexthop IP address. "
|
|
384
385
|
"Repeat option to add multiple routes. "
|
|
385
|
-
"Trying to add a route that
|
|
386
|
+
"Trying to add a route that is already present "
|
|
386
387
|
"(exactly, including destination and nexthop) "
|
|
387
388
|
"in the routing table is allowed and is considered "
|
|
388
389
|
"a successful operation."
|
|
@@ -418,7 +419,7 @@ class RemoveExtraRoutesFromRouter(command.ShowOne):
|
|
|
418
419
|
metavar='<router>',
|
|
419
420
|
help=_(
|
|
420
421
|
"Router from which extra static routes "
|
|
421
|
-
"will be removed (name or ID)
|
|
422
|
+
"will be removed (name or ID)"
|
|
422
423
|
),
|
|
423
424
|
)
|
|
424
425
|
parser.add_argument(
|
|
@@ -433,7 +434,7 @@ class RemoveExtraRoutesFromRouter(command.ShowOne):
|
|
|
433
434
|
"destination: destination subnet (in CIDR notation), "
|
|
434
435
|
"gateway: nexthop IP address. "
|
|
435
436
|
"Repeat option to remove multiple routes. "
|
|
436
|
-
"Trying to remove a route that
|
|
437
|
+
"Trying to remove a route that is already missing "
|
|
437
438
|
"(fully, including destination and nexthop) "
|
|
438
439
|
"from the routing table is allowed and is considered "
|
|
439
440
|
"a successful operation."
|
|
@@ -525,9 +526,9 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
525
526
|
metavar="<network>",
|
|
526
527
|
action='append',
|
|
527
528
|
help=_(
|
|
528
|
-
"External Network used as router's gateway (name or ID)
|
|
529
|
+
"External Network used as router's gateway (name or ID) "
|
|
529
530
|
"(repeat option to set multiple gateways per router "
|
|
530
|
-
"if the L3 service plugin in use supports it)
|
|
531
|
+
"if the L3 service plugin in use supports it)"
|
|
531
532
|
),
|
|
532
533
|
dest='external_gateways',
|
|
533
534
|
)
|
|
@@ -541,7 +542,7 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
541
542
|
"Desired IP and/or subnet (name or ID) "
|
|
542
543
|
"on external gateway: "
|
|
543
544
|
"subnet=<subnet>,ip-address=<ip-address> "
|
|
544
|
-
"(repeat option to set multiple fixed IP addresses)
|
|
545
|
+
"(repeat option to set multiple fixed IP addresses)"
|
|
545
546
|
),
|
|
546
547
|
)
|
|
547
548
|
snat_group = parser.add_mutually_exclusive_group()
|
|
@@ -581,6 +582,11 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
581
582
|
help=argparse.SUPPRESS,
|
|
582
583
|
)
|
|
583
584
|
_parser_add_bfd_ecmp_arguments(parser)
|
|
585
|
+
parser.add_argument(
|
|
586
|
+
'--qos-policy',
|
|
587
|
+
metavar='<qos-policy>',
|
|
588
|
+
help=_('Attach QoS policy to router gateway IPs'),
|
|
589
|
+
)
|
|
584
590
|
|
|
585
591
|
return parser
|
|
586
592
|
|
|
@@ -603,6 +609,13 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
603
609
|
)
|
|
604
610
|
raise exceptions.CommandError(msg)
|
|
605
611
|
|
|
612
|
+
if parsed_args.qos_policy and not parsed_args.external_gateways:
|
|
613
|
+
msg = _(
|
|
614
|
+
"You must specify '--external-gateway' in order "
|
|
615
|
+
"to define a QoS policy"
|
|
616
|
+
)
|
|
617
|
+
raise exceptions.CommandError(msg)
|
|
618
|
+
|
|
606
619
|
if parsed_args.enable_ndp_proxy is not None:
|
|
607
620
|
attrs['enable_ndp_proxy'] = parsed_args.enable_ndp_proxy
|
|
608
621
|
|
|
@@ -671,7 +684,7 @@ class DeleteRouter(command.Command):
|
|
|
671
684
|
|
|
672
685
|
if result > 0:
|
|
673
686
|
total = len(parsed_args.router)
|
|
674
|
-
msg = _("%(result)s of %(total)s routers failed
|
|
687
|
+
msg = _("%(result)s of %(total)s routers failed to delete.") % {
|
|
675
688
|
'result': result,
|
|
676
689
|
'total': total,
|
|
677
690
|
}
|
|
@@ -722,14 +735,14 @@ class ListRouter(command.Lister):
|
|
|
722
735
|
identity_client = self.app.client_manager.identity
|
|
723
736
|
client = self.app.client_manager.network
|
|
724
737
|
|
|
725
|
-
columns = (
|
|
738
|
+
columns: tuple[str, ...] = (
|
|
726
739
|
'id',
|
|
727
740
|
'name',
|
|
728
741
|
'status',
|
|
729
742
|
'is_admin_state_up',
|
|
730
743
|
'project_id',
|
|
731
744
|
)
|
|
732
|
-
column_headers = (
|
|
745
|
+
column_headers: tuple[str, ...] = (
|
|
733
746
|
'ID',
|
|
734
747
|
'Name',
|
|
735
748
|
'Status',
|
|
@@ -775,27 +788,27 @@ class ListRouter(command.Lister):
|
|
|
775
788
|
d.is_distributed is not None
|
|
776
789
|
and 'is_distributed' not in columns
|
|
777
790
|
):
|
|
778
|
-
columns
|
|
779
|
-
column_headers
|
|
791
|
+
columns += ('is_distributed',)
|
|
792
|
+
column_headers += ('Distributed',)
|
|
780
793
|
if d.is_ha is not None and 'is_ha' not in columns:
|
|
781
|
-
columns
|
|
782
|
-
column_headers
|
|
794
|
+
columns += ('is_ha',)
|
|
795
|
+
column_headers += ('HA',)
|
|
783
796
|
if parsed_args.long:
|
|
784
|
-
columns
|
|
797
|
+
columns += (
|
|
785
798
|
'routes',
|
|
786
799
|
'external_gateway_info',
|
|
787
800
|
)
|
|
788
|
-
column_headers
|
|
801
|
+
column_headers += (
|
|
789
802
|
'Routes',
|
|
790
803
|
'External gateway info',
|
|
791
804
|
)
|
|
792
805
|
# availability zone will be available only when
|
|
793
806
|
# router_availability_zone extension is enabled
|
|
794
807
|
if client.find_extension("router_availability_zone"):
|
|
795
|
-
columns
|
|
796
|
-
column_headers
|
|
797
|
-
columns
|
|
798
|
-
column_headers
|
|
808
|
+
columns += ('availability_zones',)
|
|
809
|
+
column_headers += ('Availability zones',)
|
|
810
|
+
columns += ('tags',)
|
|
811
|
+
column_headers += ('Tags',)
|
|
799
812
|
|
|
800
813
|
return (
|
|
801
814
|
column_headers,
|
|
@@ -927,7 +940,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
|
|
|
927
940
|
default=None,
|
|
928
941
|
required_keys=['destination', 'gateway'],
|
|
929
942
|
help=_(
|
|
930
|
-
"Add routes to the router "
|
|
943
|
+
"Add routes to the router. "
|
|
931
944
|
"destination: destination subnet (in CIDR notation) "
|
|
932
945
|
"gateway: nexthop IP address "
|
|
933
946
|
"(repeat option to add multiple routes). "
|
|
@@ -951,7 +964,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
|
|
|
951
964
|
'--ha',
|
|
952
965
|
action='store_true',
|
|
953
966
|
help=_(
|
|
954
|
-
"Set the router as highly available
|
|
967
|
+
"Set the router as highly available (disabled router only)"
|
|
955
968
|
),
|
|
956
969
|
)
|
|
957
970
|
routes_ha.add_argument(
|
|
@@ -967,7 +980,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
|
|
|
967
980
|
metavar="<network>",
|
|
968
981
|
action='append',
|
|
969
982
|
help=_(
|
|
970
|
-
"External Network used as router's gateway (name or ID)
|
|
983
|
+
"External Network used as router's gateway (name or ID) "
|
|
971
984
|
"(repeat option to set multiple gateways per router "
|
|
972
985
|
"if the L3 service plugin in use supports it)."
|
|
973
986
|
),
|
|
@@ -983,7 +996,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
|
|
|
983
996
|
"Desired IP and/or subnet (name or ID) "
|
|
984
997
|
"on external gateway: "
|
|
985
998
|
"subnet=<subnet>,ip-address=<ip-address> "
|
|
986
|
-
"(repeat option to set multiple fixed IP addresses)
|
|
999
|
+
"(repeat option to set multiple fixed IP addresses)"
|
|
987
1000
|
),
|
|
988
1001
|
)
|
|
989
1002
|
snat_group = parser.add_mutually_exclusive_group()
|
|
@@ -1163,7 +1176,7 @@ class UnsetRouter(common.NeutronUnsetCommandWithExtraArgs):
|
|
|
1163
1176
|
default=None,
|
|
1164
1177
|
required_keys=['destination', 'gateway'],
|
|
1165
1178
|
help=_(
|
|
1166
|
-
"Routes to be removed from the router "
|
|
1179
|
+
"Routes to be removed from the router. "
|
|
1167
1180
|
"destination: destination subnet (in CIDR notation) "
|
|
1168
1181
|
"gateway: nexthop IP address "
|
|
1169
1182
|
"(repeat option to unset multiple routes)"
|
|
@@ -1216,7 +1229,7 @@ class UnsetRouter(common.NeutronUnsetCommandWithExtraArgs):
|
|
|
1216
1229
|
):
|
|
1217
1230
|
pass
|
|
1218
1231
|
except (KeyError, TypeError):
|
|
1219
|
-
msg = _("Router does not have external network or
|
|
1232
|
+
msg = _("Router does not have external network or QoS policy")
|
|
1220
1233
|
raise exceptions.CommandError(msg)
|
|
1221
1234
|
else:
|
|
1222
1235
|
attrs['external_gateway_info'] = {
|
|
@@ -1253,13 +1266,12 @@ class AddGatewayToRouter(command.ShowOne):
|
|
|
1253
1266
|
parser.add_argument(
|
|
1254
1267
|
'router',
|
|
1255
1268
|
metavar="<router>",
|
|
1256
|
-
help=_("Router to modify (name or ID)
|
|
1269
|
+
help=_("Router to modify (name or ID)"),
|
|
1257
1270
|
)
|
|
1258
1271
|
parser.add_argument(
|
|
1259
1272
|
metavar="<network>",
|
|
1260
1273
|
help=_(
|
|
1261
|
-
"External Network to a attach a router gateway to (name or "
|
|
1262
|
-
"ID)."
|
|
1274
|
+
"External Network to a attach a router gateway to (name or ID)"
|
|
1263
1275
|
),
|
|
1264
1276
|
dest='external_gateways',
|
|
1265
1277
|
# The argument is stored in a list in order to reuse the
|
|
@@ -1276,7 +1288,7 @@ class AddGatewayToRouter(command.ShowOne):
|
|
|
1276
1288
|
"Desired IP and/or subnet (name or ID) "
|
|
1277
1289
|
"on external gateway: "
|
|
1278
1290
|
"subnet=<subnet>,ip-address=<ip-address> "
|
|
1279
|
-
"(repeat option to set multiple fixed IP addresses)
|
|
1291
|
+
"(repeat option to set multiple fixed IP addresses)"
|
|
1280
1292
|
),
|
|
1281
1293
|
)
|
|
1282
1294
|
return parser
|
|
@@ -1326,8 +1338,7 @@ class RemoveGatewayFromRouter(command.ShowOne):
|
|
|
1326
1338
|
parser.add_argument(
|
|
1327
1339
|
metavar="<network>",
|
|
1328
1340
|
help=_(
|
|
1329
|
-
"External Network to remove a router gateway from (name or "
|
|
1330
|
-
"ID)."
|
|
1341
|
+
"External Network to remove a router gateway from (name or ID)"
|
|
1331
1342
|
),
|
|
1332
1343
|
dest='external_gateways',
|
|
1333
1344
|
# The argument is stored in a list in order to reuse the
|
|
@@ -1344,7 +1355,7 @@ class RemoveGatewayFromRouter(command.ShowOne):
|
|
|
1344
1355
|
"IP and/or subnet (name or ID) on the external gateway "
|
|
1345
1356
|
"which is used to identify a particular gateway if multiple "
|
|
1346
1357
|
"are attached to the same network: subnet=<subnet>,"
|
|
1347
|
-
"ip-address=<ip-address
|
|
1358
|
+
"ip-address=<ip-address>"
|
|
1348
1359
|
),
|
|
1349
1360
|
)
|
|
1350
1361
|
return parser
|
|
@@ -89,9 +89,8 @@ def _get_columns(item):
|
|
|
89
89
|
# We still support Nova managed security groups, where we have tenant_id.
|
|
90
90
|
column_map = {
|
|
91
91
|
'security_group_rules': 'rules',
|
|
92
|
-
'tenant_id': 'project_id',
|
|
93
92
|
}
|
|
94
|
-
hidden_columns = ['location']
|
|
93
|
+
hidden_columns = ['location', 'tenant_id']
|
|
95
94
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
96
95
|
item, column_map, hidden_columns
|
|
97
96
|
)
|
|
@@ -126,7 +125,7 @@ class CreateSecurityGroup(
|
|
|
126
125
|
"--stateful",
|
|
127
126
|
action='store_true',
|
|
128
127
|
default=None,
|
|
129
|
-
help=_("Security group is stateful (
|
|
128
|
+
help=_("Security group is stateful (default)"),
|
|
130
129
|
)
|
|
131
130
|
stateful_group.add_argument(
|
|
132
131
|
"--stateless",
|
|
@@ -186,7 +185,8 @@ class CreateSecurityGroup(
|
|
|
186
185
|
parsed_args.name,
|
|
187
186
|
description,
|
|
188
187
|
)
|
|
189
|
-
display_columns,
|
|
188
|
+
display_columns = ('description', 'id', 'name', 'project_id', 'rules')
|
|
189
|
+
property_columns = ('description', 'id', 'name', 'tenant_id', 'rules')
|
|
190
190
|
data = utils.get_dict_properties(
|
|
191
191
|
obj, property_columns, formatters=_formatters_compute
|
|
192
192
|
)
|
|
@@ -239,10 +239,7 @@ class ListSecurityGroup(common.NetworkAndComputeLister):
|
|
|
239
239
|
'--project',
|
|
240
240
|
metavar='<project>',
|
|
241
241
|
help=self.enhance_help_neutron(
|
|
242
|
-
_(
|
|
243
|
-
"List security groups according to the project (name or "
|
|
244
|
-
"ID)"
|
|
245
|
-
)
|
|
242
|
+
_("List security groups according to the project (name or ID)")
|
|
246
243
|
),
|
|
247
244
|
)
|
|
248
245
|
identity_common.add_project_domain_option_to_parser(
|
|
@@ -280,7 +277,7 @@ class ListSecurityGroup(common.NetworkAndComputeLister):
|
|
|
280
277
|
fields=self.FIELDS_TO_RETRIEVE, **filters
|
|
281
278
|
)
|
|
282
279
|
|
|
283
|
-
columns = ("
|
|
280
|
+
columns = ("id", "name", "description", "project_id", "tags")
|
|
284
281
|
column_headers = ("ID", "Name", "Description", "Project", "Tags")
|
|
285
282
|
return (
|
|
286
283
|
column_headers,
|
|
@@ -300,15 +297,11 @@ class ListSecurityGroup(common.NetworkAndComputeLister):
|
|
|
300
297
|
all_projects=parsed_args.all_projects,
|
|
301
298
|
)
|
|
302
299
|
|
|
303
|
-
columns = (
|
|
304
|
-
|
|
305
|
-
"Name",
|
|
306
|
-
"Description",
|
|
307
|
-
)
|
|
308
|
-
column_headers = columns
|
|
300
|
+
columns: tuple[str, ...] = ("id", "name", "description")
|
|
301
|
+
column_headers: tuple[str, ...] = ("ID", "Name", "Description")
|
|
309
302
|
if parsed_args.all_projects:
|
|
310
|
-
columns
|
|
311
|
-
column_headers
|
|
303
|
+
columns += ('tenant_id',)
|
|
304
|
+
column_headers += ('Project',)
|
|
312
305
|
return (
|
|
313
306
|
column_headers,
|
|
314
307
|
(
|
|
@@ -345,7 +338,7 @@ class SetSecurityGroup(
|
|
|
345
338
|
"--stateful",
|
|
346
339
|
action='store_true',
|
|
347
340
|
default=None,
|
|
348
|
-
help=_("Security group is stateful (
|
|
341
|
+
help=_("Security group is stateful (default)"),
|
|
349
342
|
)
|
|
350
343
|
stateful_group.add_argument(
|
|
351
344
|
"--stateless",
|
|
@@ -427,7 +420,8 @@ class ShowSecurityGroup(common.NetworkAndComputeShowOne):
|
|
|
427
420
|
|
|
428
421
|
def take_action_compute(self, client, parsed_args):
|
|
429
422
|
obj = compute_v2.find_security_group(client, parsed_args.group)
|
|
430
|
-
display_columns,
|
|
423
|
+
display_columns = ('description', 'id', 'name', 'project_id', 'rules')
|
|
424
|
+
property_columns = ('description', 'id', 'name', 'tenant_id', 'rules')
|
|
431
425
|
data = utils.get_dict_properties(
|
|
432
426
|
obj, property_columns, formatters=_formatters_compute
|
|
433
427
|
)
|
|
@@ -30,10 +30,9 @@ LOG = logging.getLogger(__name__)
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def _get_columns(item):
|
|
33
|
-
|
|
34
|
-
hidden_columns = ['location', 'tenant_id']
|
|
33
|
+
hidden_columns = ['location', 'name', 'tenant_id', 'tags']
|
|
35
34
|
return utils.get_osc_show_columns_for_sdk_resource(
|
|
36
|
-
item,
|
|
35
|
+
item, {}, hidden_columns
|
|
37
36
|
)
|
|
38
37
|
|
|
39
38
|
|
|
@@ -451,7 +450,7 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
451
450
|
return parser
|
|
452
451
|
|
|
453
452
|
def _get_column_headers(self, parsed_args):
|
|
454
|
-
column_headers = (
|
|
453
|
+
column_headers: tuple[str, ...] = (
|
|
455
454
|
'ID',
|
|
456
455
|
'IP Protocol',
|
|
457
456
|
'Ethertype',
|
|
@@ -461,9 +460,9 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
461
460
|
'Remote Security Group',
|
|
462
461
|
)
|
|
463
462
|
if self.is_neutron:
|
|
464
|
-
column_headers
|
|
463
|
+
column_headers += ('Remote Address Group',)
|
|
465
464
|
if parsed_args.group is None:
|
|
466
|
-
column_headers
|
|
465
|
+
column_headers += ('Security Group',)
|
|
467
466
|
return column_headers
|
|
468
467
|
|
|
469
468
|
def take_action_network(self, client, parsed_args):
|
|
@@ -474,7 +473,7 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
474
473
|
self.log.warning(msg)
|
|
475
474
|
|
|
476
475
|
column_headers = self._get_column_headers(parsed_args)
|
|
477
|
-
columns = (
|
|
476
|
+
columns: tuple[str, ...] = (
|
|
478
477
|
'id',
|
|
479
478
|
'protocol',
|
|
480
479
|
'ether_type',
|
|
@@ -496,7 +495,7 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
496
495
|
).id
|
|
497
496
|
query = {'security_group_id': security_group_id}
|
|
498
497
|
else:
|
|
499
|
-
columns
|
|
498
|
+
columns += ('security_group_id',)
|
|
500
499
|
|
|
501
500
|
if parsed_args.ingress:
|
|
502
501
|
query['direction'] = 'ingress'
|
|
@@ -523,7 +522,7 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
523
522
|
|
|
524
523
|
def take_action_compute(self, client, parsed_args):
|
|
525
524
|
column_headers = self._get_column_headers(parsed_args)
|
|
526
|
-
columns = (
|
|
525
|
+
columns: tuple[str, ...] = (
|
|
527
526
|
"ID",
|
|
528
527
|
"IP Protocol",
|
|
529
528
|
"Ethertype",
|
|
@@ -539,7 +538,7 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
539
538
|
)
|
|
540
539
|
rules_to_list = security_group['rules']
|
|
541
540
|
else:
|
|
542
|
-
columns
|
|
541
|
+
columns += ('parent_group_id',)
|
|
543
542
|
for security_group in compute_v2.list_security_groups(
|
|
544
543
|
client, all_projects=parsed_args.all_projects
|
|
545
544
|
):
|
|
@@ -608,7 +607,7 @@ class ShowSecurityGroupRule(common.NetworkAndComputeShowOne):
|
|
|
608
607
|
|
|
609
608
|
if obj is None:
|
|
610
609
|
msg = (
|
|
611
|
-
_("Could not find security group rule
|
|
610
|
+
_("Could not find security group rule with ID '%s'")
|
|
612
611
|
% parsed_args.rule
|
|
613
612
|
)
|
|
614
613
|
raise exceptions.CommandError(msg)
|