Add cinder api version detection to verify_tempest_config

This commit adds a check for the cinder api versions that are
supported and checks that with what is set in the config file.

Partially implements bp config-verification

Change-Id: Ifce002a6f42c1565992299965bcc490f20aa5887
diff --git a/tools/verify_tempest_config.py b/tools/verify_tempest_config.py
index 0f7d5d4..1726beb 100755
--- a/tools/verify_tempest_config.py
+++ b/tools/verify_tempest_config.py
@@ -44,6 +44,7 @@
     client_dict = {
         'nova': os.servers_client,
         'keystone': os.identity_client,
+        'cinder': os.volumes_client,
     }
     client_dict[service].skip_path()
     endpoint_parts = urlparse.urlparse(client_dict[service].base_url)
@@ -76,6 +77,17 @@
               not CONF.compute_feature_enabled.api_v3))
 
 
+def verify_cinder_api_versions(os):
+    # Check cinder api versions
+    versions = _get_api_versions(os, 'cinder')
+    if CONF.volume_feature_enabled.api_v1 != ('v1.0' in versions):
+        print('Config option volume api_v2 should be change to: %s' % (
+              not CONF.volume_feature_enabled.api_v1))
+    if CONF.volume_feature_enabled.api_v2 != ('v2.0' in versions):
+        print('Config option volume api_v2 should be change to: %s' % (
+              not CONF.volume_feature_enabled.api_v2))
+
+
 def get_extension_client(os, service):
     extensions_client = {
         'nova': os.extensions_client,
@@ -220,6 +232,7 @@
     verify_keystone_api_versions(os)
     verify_glance_api_versions(os)
     verify_nova_api_versions(os)
+    verify_cinder_api_versions(os)
     display_results(results)