diff options
| author | Jens Rosenboom <j.rosenboom@x-ion.de> | 2017-02-27 15:37:50 +0100 |
|---|---|---|
| committer | Jens Rosenboom <j.rosenboom@x-ion.de> | 2017-03-09 08:21:13 +0100 |
| commit | 3e6356a4d87351c84a29e3a44f60f0544e2947b6 (patch) | |
| tree | 012333a3aec482a8eb65c573adf92af82b50a24d /openstackclient/network/v2 | |
| parent | c6059bed4ae5fe6d6816c6ab1d56a763366b3cc9 (diff) | |
| download | python-openstackclient-3e6356a4d87351c84a29e3a44f60f0544e2947b6.tar.gz | |
Fix handling the use_default_subnet_pool attribute
The attribute formerly wasn't working because it is lacking support in
the SDK. The patch to add it[1] introduced a modified spelling, so we
should be matching this here.
Also make sure that the attribute is not shown when displaying subnet
objects, as it is meant to be invisible[2].
[1] I72c0be77d96f3891748cdd69c382211dc20dbf5e
[2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/extensions/default_subnetpools.py#n23
Change-Id: Ic125b818a6082d76a1114fe89e0b1fcf4c7356b0
Partial-Bug: 1668223
Diffstat (limited to 'openstackclient/network/v2')
| -rw-r--r-- | openstackclient/network/v2/subnet.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openstackclient/network/v2/subnet.py b/openstackclient/network/v2/subnet.py index 2771858b..403b4cd2 100644 --- a/openstackclient/network/v2/subnet.py +++ b/openstackclient/network/v2/subnet.py @@ -132,7 +132,13 @@ def _get_columns(item): 'subnet_pool_id': 'subnetpool_id', 'tenant_id': 'project_id', } - return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) + # Do not show this column when displaying a subnet + invisible_columns = ['use_default_subnetpool'] + return sdk_utils.get_osc_show_columns_for_sdk_resource( + item, + column_map, + invisible_columns=invisible_columns + ) def convert_entries_to_nexthop(entries): @@ -179,7 +185,7 @@ def _get_attrs(client_manager, parsed_args, is_create=True): ignore_missing=False) attrs['subnetpool_id'] = subnet_pool.id if parsed_args.use_default_subnet_pool: - attrs['use_default_subnetpool'] = True + attrs['use_default_subnet_pool'] = True if parsed_args.prefix_length is not None: attrs['prefixlen'] = parsed_args.prefix_length if parsed_args.subnet_range is not None: |
