diff options
| author | Édouard Thuleau <ethuleau@juniper.net> | 2019-12-04 08:21:50 +0100 |
|---|---|---|
| committer | Pavlo Shchelokovskyy <pshchelokovskyy@mirantis.com> | 2020-03-18 10:05:19 +0000 |
| commit | ce825bbd2730cbf1897ca70cd0b5dac8ac107689 (patch) | |
| tree | 3d931df1c8ae4b9040a76a379733edb268ad8220 /openstackclient/network | |
| parent | 2b4b1e00a59fd23f58e0bc0645ad16d8047f923e (diff) | |
| download | python-openstackclient-ce825bbd2730cbf1897ca70cd0b5dac8ac107689.tar.gz | |
Fix router create/show if extraroute not supported
If neutron does not support extraroute l3 extension, the route column
formatter fails.
Change-Id: I7b89c4f818865073947e0850e86c18d0d2415a51
(cherry picked from commit 509ca3ed36b4ef512a47ff8d39c9df751084015a)
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/router.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py index 02da50c3..5d85e485 100644 --- a/openstackclient/network/v2/router.py +++ b/openstackclient/network/v2/router.py @@ -49,7 +49,7 @@ class RouterInfoColumn(cliff_columns.FormattableColumn): class RoutesColumn(cliff_columns.FormattableColumn): def human_readable(self): # Map the route keys to match --route option. - for route in self._value: + for route in self._value or []: if 'nexthop' in route: route['gateway'] = route.pop('nexthop') return utils.format_list_of_dicts(self._value) |
