summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/api/test_compute_v2.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2017-04-17 15:03:14 -0500
committerDean Troyer <dtroyer@gmail.com>2017-04-18 08:57:34 -0500
commit107cad200a15a3131525436b483dbef5e88b9508 (patch)
tree98d70d245837e533fd407ce84634485a25a5f50a /openstackclient/tests/unit/api/test_compute_v2.py
parent7e1350815e09e0aa669c0ad9d5d3c041ca505b89 (diff)
downloadpython-openstackclient-107cad200a15a3131525436b483dbef5e88b9508.tar.gz
Low-level Compute v2 API: floating ip pool
api.compute.APIv2 floating ip pool function. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Also includes a handful of cleanups that the previous security group and floating IP reviews missed. Change-Id: I20116ec4fc1113857d8d917bfb30fa3170d05b9f
Diffstat (limited to 'openstackclient/tests/unit/api/test_compute_v2.py')
-rw-r--r--openstackclient/tests/unit/api/test_compute_v2.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/api/test_compute_v2.py b/openstackclient/tests/unit/api/test_compute_v2.py
index 7a30223c..22ee4899 100644
--- a/openstackclient/tests/unit/api/test_compute_v2.py
+++ b/openstackclient/tests/unit/api/test_compute_v2.py
@@ -145,6 +145,24 @@ class TestFloatingIP(TestComputeAPIv2):
self.assertEqual(self.LIST_FLOATING_IP_RESP, ret)
+class TestFloatingIPPool(TestComputeAPIv2):
+
+ LIST_FLOATING_IP_POOL_RESP = [
+ {"name": "tide"},
+ {"name": "press"},
+ ]
+
+ def test_floating_ip_pool_list(self):
+ self.requests_mock.register_uri(
+ 'GET',
+ FAKE_URL + '/os-floating-ip-pools',
+ json={'floating_ip_pools': self.LIST_FLOATING_IP_POOL_RESP},
+ status_code=200,
+ )
+ ret = self.api.floating_ip_pool_list()
+ self.assertEqual(self.LIST_FLOATING_IP_POOL_RESP, ret)
+
+
class TestNetwork(TestComputeAPIv2):
FAKE_NETWORK_RESP = {