summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2
diff options
context:
space:
mode:
authorHuang Cheng <huang.cheng@h3c.com>2018-02-03 10:48:04 +0800
committerJens Harbott (frickler) <j.harbott@x-ion.de>2018-06-14 13:03:46 +0000
commit5bb5585aa98e17e22963996c02bd7bd688d7871e (patch)
treeb17e4d010c58664e87ebec5110b6d8827706d559 /openstackclient/network/v2
parent9766eb23e797935fcafa4990b46cedde83b19fc6 (diff)
downloadpython-openstackclient-5bb5585aa98e17e22963996c02bd7bd688d7871e.tar.gz
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
Diffstat (limited to 'openstackclient/network/v2')
-rw-r--r--openstackclient/network/v2/subnet.py2
1 files changed, 1 insertions, 1 deletions
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