summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Theis <rtheis@us.ibm.com>2016-04-12 12:42:13 -0500
committerRichard Theis <rtheis@us.ibm.com>2016-04-12 12:42:13 -0500
commit3a4d53a93bb62f5bd2e21db1727ef74f771075d8 (patch)
treea83e4db500867a23e36b42b3b9b53b108b29320d
parent3be49a8abe9fc77cd2ab257ecf180d527c06cbce (diff)
downloadpython-openstackclient-3a4d53a93bb62f5bd2e21db1727ef74f771075d8.tar.gz
Fix prefixes output for subnet pool list
Fixed "os subnet pool list" command to properly disply the list of subnet pool prefixes in the "Prefixes" column. This fix is consistent with the "os subnet pool create" and "os subnet pool show" command output. Change-Id: I431d85c3b7f5bf8a327500decf3a15063fc5b120 Closes-Bug: #1569480
-rw-r--r--openstackclient/network/v2/subnet_pool.py2
-rw-r--r--openstackclient/tests/network/v2/test_subnet_pool.py4
-rw-r--r--releasenotes/notes/bug-1569480-c52e330548bfbd78.yaml7
3 files changed, 10 insertions, 3 deletions
diff --git a/openstackclient/network/v2/subnet_pool.py b/openstackclient/network/v2/subnet_pool.py
index 6b6fc090..f1fd9a61 100644
--- a/openstackclient/network/v2/subnet_pool.py
+++ b/openstackclient/network/v2/subnet_pool.py
@@ -184,7 +184,7 @@ class ListSubnetPool(command.Lister):
return (headers,
(utils.get_item_properties(
s, columns,
- formatters={},
+ formatters=_formatters,
) for s in data))
diff --git a/openstackclient/tests/network/v2/test_subnet_pool.py b/openstackclient/tests/network/v2/test_subnet_pool.py
index 093e26c6..df4d27eb 100644
--- a/openstackclient/tests/network/v2/test_subnet_pool.py
+++ b/openstackclient/tests/network/v2/test_subnet_pool.py
@@ -246,7 +246,7 @@ class TestListSubnetPool(TestSubnetPool):
data.append((
pool.id,
pool.name,
- pool.prefixes,
+ utils.format_list(pool.prefixes),
))
data_long = []
@@ -254,7 +254,7 @@ class TestListSubnetPool(TestSubnetPool):
data_long.append((
pool.id,
pool.name,
- pool.prefixes,
+ utils.format_list(pool.prefixes),
pool.default_prefixlen,
pool.address_scope_id,
))
diff --git a/releasenotes/notes/bug-1569480-c52e330548bfbd78.yaml b/releasenotes/notes/bug-1569480-c52e330548bfbd78.yaml
new file mode 100644
index 00000000..ccec658b
--- /dev/null
+++ b/releasenotes/notes/bug-1569480-c52e330548bfbd78.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+ - Fixed ``subnet pool list`` command to properly disply the
+ list of subnet pool prefixes in the ``Prefixes`` column.
+ This fix is consistent with the ``subnet pool create`` and
+ ``subnet pool show`` command output.
+ [Bug `1569480 <https://bugs.launchpad.net/bugs/1569480>`_]