Cleanup API version schema

There is "list API versions" schema for nova, and we will share the
part of it between "get API version" schema. Current schema contains
a lot of indents and it was difficult to make it with a single patch
for sharing. Maybe reviews will be also difficult. As the first step,
this patch separates the part of schema from "list API versions" one.
After that, "get API version" schema will reuse it later.

Change-Id: If711eaeb51ddca885a8df2fd3272ee8ea9ff2eaf
diff --git a/tempest/api_schema/response/compute/v2_1/versions.py b/tempest/api_schema/response/compute/v2_1/versions.py
index a01dd41..f08695c 100644
--- a/tempest/api_schema/response/compute/v2_1/versions.py
+++ b/tempest/api_schema/response/compute/v2_1/versions.py
@@ -12,6 +12,33 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+_version = {
+    'type': 'object',
+    'properties': {
+        'id': {'type': 'string'},
+        'links': {
+            'type': 'array',
+            'items': {
+                'type': 'object',
+                'properties': {
+                    'href': {'type': 'string', 'format': 'uri'},
+                    'rel': {'type': 'string'},
+                },
+                'required': ['href', 'rel'],
+                'additionalProperties': False
+            }
+        },
+        'status': {'type': 'string'},
+        'updated': {'type': 'string', 'format': 'date-time'},
+        'version': {'type': 'string'},
+        'min_version': {'type': 'string'}
+    },
+    # NOTE: version and min_version have been added since Kilo,
+    # so they should not be required.
+    'required': ['id', 'links', 'status', 'updated'],
+    'additionalProperties': False
+}
+
 list_versions = {
     'status_code': [200],
     'response_body': {
@@ -19,33 +46,7 @@
         'properties': {
             'versions': {
                 'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'id': {'type': 'string'},
-                        'links': {
-                            'type': 'array',
-                            'items': {
-                                'type': 'object',
-                                'properties': {
-                                    'href': {'type': 'string',
-                                             'format': 'uri'},
-                                    'rel': {'type': 'string'},
-                                },
-                                'required': ['href', 'rel'],
-                                'additionalProperties': False
-                            }
-                        },
-                        'status': {'type': 'string'},
-                        'updated': {'type': 'string', 'format': 'date-time'},
-                        'version': {'type': 'string'},
-                        'min_version': {'type': 'string'}
-                    },
-                    # NOTE: version and min_version have been added since Kilo,
-                    # so they should not be required.
-                    'required': ['id', 'links', 'status', 'updated'],
-                    'additionalProperties': False
-                }
+                'items': _version
             }
         },
         'required': ['versions'],