From 5bb5585aa98e17e22963996c02bd7bd688d7871e Mon Sep 17 00:00:00 2001 From: Huang Cheng Date: Sat, 3 Feb 2018 10:48:04 +0800 Subject: Fix subnet host_routes error When updating subnet with "no-host-route" option, set host_routes to an empty list as neutron_lib.api.validators expected. Change-Id: I6fe039793d813758429c7a104fd40172b4f8122b Closes-Bug: #1747101 --- openstackclient/network/v2/subnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstackclient/network/v2') diff --git a/openstackclient/network/v2/subnet.py b/openstackclient/network/v2/subnet.py index b5a8b35a..9c56186f 100644 --- a/openstackclient/network/v2/subnet.py +++ b/openstackclient/network/v2/subnet.py @@ -589,7 +589,7 @@ class SetSubnet(command.Command): if not parsed_args.no_host_route: attrs['host_routes'] += obj.host_routes elif parsed_args.no_host_route: - attrs['host_routes'] = '' + attrs['host_routes'] = [] if 'allocation_pools' in attrs: if not parsed_args.no_allocation_pool: attrs['allocation_pools'] += obj.allocation_pools -- cgit v1.2.1