summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorHuang Cheng <huang.cheng@h3c.com>2018-02-03 10:48:04 +0800
committerAlexey Stupnikov <aleksey.stupnikov@gmail.com>2020-07-22 19:03:48 +0000
commit333e8abef33eec95330721cd5ae54243680d1612 (patch)
tree8689b9acb9eb6e1635c96002e8b9f4ee3a1cabae /openstackclient/network
parentfd85a3cde361a8e3eae7bd9e0760150459afe5c2 (diff)
downloadpython-openstackclient-333e8abef33eec95330721cd5ae54243680d1612.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 (cherry picked from commit 5bb5585aa98e17e22963996c02bd7bd688d7871e)
Diffstat (limited to 'openstackclient/network')
-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 5fd58b5e..b650a7fb 100644
--- a/openstackclient/network/v2/subnet.py
+++ b/openstackclient/network/v2/subnet.py
@@ -581,7 +581,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