Merge "LBaaS client functions and pool testcases"
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index 3880f4f..d604c69 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -34,6 +34,8 @@
         delete vIP
         update pool
         delete pool
+        show pool
+        list pool
     """
 
     @classmethod
@@ -101,6 +103,23 @@
         self.assertEqual(self.vip['id'], vip['id'])
         self.assertEqual(self.vip['name'], vip['name'])
 
+    @attr(type='smoke')
+    def test_show_pool(self):
+        # Verifies the details of a pool
+        resp, body = self.client.show_pool(self.pool['id'])
+        self.assertEqual('200', resp['status'])
+        pool = body['pool']
+        self.assertEqual(self.pool['id'], pool['id'])
+        self.assertEqual(self.pool['name'], pool['name'])
+
+    @attr(type='smoke')
+    def test_list_pools(self):
+        # Verify the pool exists in the list of all pools
+        resp, body = self.client.list_pools()
+        self.assertEqual('200', resp['status'])
+        pools = body['pools']
+        self.assertIn(self.pool['id'], [p['id'] for p in pools])
+
 
 class LoadBalancerXML(LoadBalancerJSON):
     _interface = 'xml'
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index bc0a6cf..ceb4c62 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -478,3 +478,15 @@
         resp, body = self.put(uri, body=body, headers=self.headers)
         body = json.loads(body)
         return resp, body
+
+    def list_pools(self):
+        uri = '%s/lb/pools' % (self.uri_prefix)
+        resp, body = self.get(uri, self.headers)
+        body = json.loads(body)
+        return resp, body
+
+    def show_pool(self, uuid):
+        uri = '%s/lb/pools/%s' % (self.uri_prefix, uuid)
+        resp, body = self.get(uri, self.headers)
+        body = json.loads(body)
+        return resp, body