Return complete response from interfaces_client

Currently compute interfaces_client returns Response by
removing top key from Response.
For example-
 return service_client.ResponseBody(resp, body['interfaceAttachment'])

As service clients are in direction to move to Tempest-lib, all
service clients should return Response without any truncation.
One good example is Resource pagination links which are lost with current
way of return value. Resource pagination links are present in parallel
(not inside) to top key of Response.

This patch makes compute interfaces_client to return complete
Response body.

Change-Id: Ibe51958fadb3ae88977ccb2fcbf595e046733ab3
Implements: blueprint method-return-value-and-move-service-clients-to-lib
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 9e27f33..dcdb562 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -48,13 +48,15 @@
 
     def wait_for_interface_status(self, server, port_id, status):
         """Waits for a interface to reach a given status."""
-        body = self.client.show_interface(server, port_id)
+        body = (self.client.show_interface(server, port_id)
+                ['interfaceAttachment'])
         interface_status = body['port_state']
         start = int(time.time())
 
         while(interface_status != status):
             time.sleep(self.build_interval)
-            body = self.client.show_interface(server, port_id)
+            body = (self.client.show_interface(server, port_id)
+                    ['interfaceAttachment'])
             interface_status = body['port_state']
 
             timed_out = int(time.time()) - start >= self.build_timeout
@@ -82,14 +84,16 @@
 
     def _create_server_get_interfaces(self):
         server = self.create_test_server(wait_until='ACTIVE')
-        ifs = self.client.list_interfaces(server['id'])
+        ifs = (self.client.list_interfaces(server['id'])
+               ['interfaceAttachments'])
         body = self.wait_for_interface_status(
             server['id'], ifs[0]['port_id'], 'ACTIVE')
         ifs[0]['port_state'] = body['port_state']
         return server, ifs
 
     def _test_create_interface(self, server):
-        iface = self.client.create_interface(server['id'])
+        iface = (self.client.create_interface(server['id'])
+                 ['interfaceAttachment'])
         iface = self.wait_for_interface_status(
             server['id'], iface['port_id'], 'ACTIVE')
         self._check_interface(iface)
@@ -97,8 +101,8 @@
 
     def _test_create_interface_by_network_id(self, server, ifs):
         network_id = ifs[0]['net_id']
-        iface = self.client.create_interface(server['id'],
-                                             net_id=network_id)
+        iface = self.client.create_interface(
+            server['id'], net_id=network_id)['interfaceAttachment']
         iface = self.wait_for_interface_status(
             server['id'], iface['port_id'], 'ACTIVE')
         self._check_interface(iface, network_id=network_id)
@@ -106,8 +110,8 @@
 
     def _test_show_interface(self, server, ifs):
         iface = ifs[0]
-        _iface = self.client.show_interface(server['id'],
-                                            iface['port_id'])
+        _iface = self.client.show_interface(
+            server['id'], iface['port_id'])['interfaceAttachment']
         self._check_interface(iface, port_id=_iface['port_id'],
                               network_id=_iface['net_id'],
                               fixed_ip=_iface['fixed_ips'][0]['ip_address'],
@@ -117,12 +121,14 @@
         # NOTE(danms): delete not the first or last, but one in the middle
         iface = ifs[1]
         self.client.delete_interface(server['id'], iface['port_id'])
-        _ifs = self.client.list_interfaces(server['id'])
+        _ifs = (self.client.list_interfaces(server['id'])
+                ['interfaceAttachments'])
         start = int(time.time())
 
         while len(ifs) == len(_ifs):
             time.sleep(self.build_interval)
-            _ifs = self.client.list_interfaces(server['id'])
+            _ifs = (self.client.list_interfaces(server['id'])
+                    ['interfaceAttachments'])
             timed_out = int(time.time()) - start >= self.build_timeout
             if len(ifs) == len(_ifs) and timed_out:
                 message = ('Failed to delete interface within '
@@ -161,7 +167,8 @@
         iface = self._test_create_interface_by_network_id(server, ifs)
         ifs.append(iface)
 
-        _ifs = self.client.list_interfaces(server['id'])
+        _ifs = (self.client.list_interfaces(server['id'])
+                ['interfaceAttachments'])
         self._compare_iface_list(ifs, _ifs)
 
         self._test_show_interface(server, ifs)
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index c194103..0662938 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -245,7 +245,7 @@
         old_port = port_list[0]
         interface = self.interface_client.create_interface(
             server_id=server['id'],
-            net_id=self.new_net.id)
+            net_id=self.new_net.id)['interfaceAttachment']
         self.addCleanup(self.network_client.wait_for_resource_deletion,
                         'port',
                         interface['port_id'])
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index c437c08..2e66082 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -26,8 +26,7 @@
         resp, body = self.get('servers/%s/os-interface' % server_id)
         body = json.loads(body)
         self.validate_response(schema.list_interfaces, resp, body)
-        return service_client.ResponseBodyList(resp,
-                                               body['interfaceAttachments'])
+        return service_client.ResponseBody(resp, body)
 
     def create_interface(self, server_id, **kwargs):
         post_body = {'interfaceAttachment': kwargs}
@@ -36,14 +35,14 @@
                                body=post_body)
         body = json.loads(body)
         self.validate_response(schema.get_create_interfaces, resp, body)
-        return service_client.ResponseBody(resp, body['interfaceAttachment'])
+        return service_client.ResponseBody(resp, body)
 
     def show_interface(self, server_id, port_id):
         resp, body = self.get('servers/%s/os-interface/%s' % (server_id,
                                                               port_id))
         body = json.loads(body)
         self.validate_response(schema.get_create_interfaces, resp, body)
-        return service_client.ResponseBody(resp, body['interfaceAttachment'])
+        return service_client.ResponseBody(resp, body)
 
     def delete_interface(self, server_id, port_id):
         resp, body = self.delete('servers/%s/os-interface/%s' % (server_id,