Check create-Floating-IP-Bulk Nova API attributes

This patch adds the JSON schema for Nova V2 create-Floating-IP-Bulk
API response and validate the response with added JSON schema
to block the backward incompatibility change in the future.

This patch also correct the test case by checking the list API's
response body length instead of create API.

The response body of create-Floating-IP-Bulk V2 API is below:

{
    "floating_ips_bulk_create": {
        "interface": "eth0",
        "ip_range": "192.168.1.0/24",
        "pool": "nova"
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I0003e34f22729d39202573164c25bf4af721b982
diff --git a/tempest/api/compute/admin/test_floating_ips_bulk.py b/tempest/api/compute/admin/test_floating_ips_bulk.py
index 8f875d2..208b032 100644
--- a/tempest/api/compute/admin/test_floating_ips_bulk.py
+++ b/tempest/api/compute/admin/test_floating_ips_bulk.py
@@ -74,7 +74,7 @@
         self.assertEqual(self.ip_range, body['ip_range'])
         resp, ips_list = self.client.list_floating_ips_bulk()
         self.assertEqual(200, resp.status)
-        self.assertNotEqual(0, len(body))
+        self.assertNotEqual(0, len(ips_list))
         for ip in netaddr.IPNetwork(self.ip_range).iter_hosts():
             self.assertIn(str(ip), map(lambda x: x['address'], ips_list))
         resp, body = self.client.delete_floating_ips_bulk(self.ip_range)
diff --git a/tempest/api_schema/compute/v2/floating_ips.py b/tempest/api_schema/compute/v2/floating_ips.py
index 3ea6320..03e6aef 100644
--- a/tempest/api_schema/compute/v2/floating_ips.py
+++ b/tempest/api_schema/compute/v2/floating_ips.py
@@ -98,3 +98,22 @@
 add_remove_floating_ip = {
     'status_code': [202]
 }
+
+create_floating_ips_bulk = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'floating_ips_bulk_create': {
+                'type': 'object',
+                'properties': {
+                    'interface': {'type': ['string', 'null']},
+                    'ip_range': {'type': 'string'},
+                    'pool': {'type': ['string', 'null']},
+                },
+                'required': ['interface', 'ip_range', 'pool']
+            }
+        },
+        'required': ['floating_ips_bulk_create']
+    }
+}
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 6fc2bc2..92b4ddf 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -123,6 +123,7 @@
         post_body = json.dumps({'floating_ips_bulk_create': post_body})
         resp, body = self.post('os-floating-ips-bulk', post_body)
         body = json.loads(body)
+        self.validate_response(schema.create_floating_ips_bulk, resp, body)
         return resp, body['floating_ips_bulk_create']
 
     def list_floating_ips_bulk(self):