Merge "Remove redundant cleanups in test_volume_backup"
diff --git a/.zuul.yaml b/.zuul.yaml
index dd66e2c..bed5a46 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,13 +1,14 @@
 - project:
+    templates:
+      - check-requirements
+      - tempest-plugin-jobs
     check:
       jobs:
         - cinder-tempest-plugin-lvm-lio
-    gate:
-      jobs:
-        - cinder-tempest-plugin-lvm-lio
 
 - job:
     name: cinder-tempest-plugin-lvm-lio
+    voting: false
     description: |
       Run Cinder Tempest Plugin tests
     parent: devstack-tempest
@@ -21,13 +22,13 @@
       - openstack/cinder
     vars:
       tempest_test_regex: (tempest\.(api|scenario)|cinder_tempest_plugin)
-      tempest_test_blacklist: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tempest_blacklist.txt"
-      tox_envlist: 'all'
+      tempest_test_blacklist: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tempest_blacklist.txt'
+      tox_envlist: all
       devstack_localrc:
-        CINDER_ISCSI_HELPER: 'lioadm'
-        TEMPEST_PLUGINS: '/opt/stack/cinder-tempest-plugin'
+        CINDER_ISCSI_HELPER: lioadm
+        TEMPEST_PLUGINS: /opt/stack/cinder-tempest-plugin
       devstack_plugins:
-        barbican: 'git://git.openstack.org/openstack/barbican'
+        barbican: git://git.openstack.org/openstack/barbican
       devstack_services:
         barbican: true
     irrelevant-files:
diff --git a/HACKING.rst b/HACKING.rst
index dc34b75..7faf92f 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -2,4 +2,4 @@
 
 ===============================================
 
-Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
+Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
diff --git a/cinder_tempest_plugin/api/volume/admin/__init__.py b/cinder_tempest_plugin/api/volume/admin/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/cinder_tempest_plugin/api/volume/admin/__init__.py
diff --git a/cinder_tempest_plugin/api/volume/test_consistencygroups.py b/cinder_tempest_plugin/api/volume/admin/test_consistencygroups.py
similarity index 99%
rename from cinder_tempest_plugin/api/volume/test_consistencygroups.py
rename to cinder_tempest_plugin/api/volume/admin/test_consistencygroups.py
index d6b8e4a..15d19dc 100644
--- a/cinder_tempest_plugin/api/volume/test_consistencygroups.py
+++ b/cinder_tempest_plugin/api/volume/admin/test_consistencygroups.py
@@ -25,7 +25,7 @@
 CONF = config.CONF
 
 
-class ConsistencyGroupsV2Test(base.BaseVolumeTest):
+class ConsistencyGroupsV2Test(base.BaseVolumeAdminTest):
     @classmethod
     def setup_clients(cls):
         cls._api_version = 2
diff --git a/cinder_tempest_plugin/api/volume/base.py b/cinder_tempest_plugin/api/volume/base.py
index 50ee60a..7d7bf43 100644
--- a/cinder_tempest_plugin/api/volume/base.py
+++ b/cinder_tempest_plugin/api/volume/base.py
@@ -170,3 +170,15 @@
                         self.os_primary.servers_client.delete_server,
                         body['id'])
         return body
+
+
+class BaseVolumeAdminTest(BaseVolumeTest):
+    """Base test case class for all Volume Admin API tests."""
+
+    credentials = ['primary', 'admin']
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseVolumeAdminTest, cls).setup_clients()
+
+        cls.admin_volume_types_client = cls.os_admin.volume_types_client_latest
diff --git a/cinder_tempest_plugin/api/volume/test_create_from_image.py b/cinder_tempest_plugin/api/volume/test_create_from_image.py
index 12e6c8e..02fbd24 100644
--- a/cinder_tempest_plugin/api/volume/test_create_from_image.py
+++ b/cinder_tempest_plugin/api/volume/test_create_from_image.py
@@ -26,6 +26,8 @@
     @classmethod
     def skip_checks(cls):
         super(VolumeFromImageTest, cls).skip_checks()
+        if not CONF.service_available.glance:
+            raise cls.skipException("Glance service is disabled")
 
     @classmethod
     def create_volume_no_wait(cls, **kwargs):
diff --git a/tox.ini b/tox.ini
index 328da2e..6ca7aac 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,9 +13,11 @@
 commands = python setup.py test --slowest --testr-args='{posargs}'
 
 [testenv:pep8]
+basepython = python3
 commands = flake8 {posargs}
 
 [testenv:venv]
+basepython = python3
 commands = {posargs}
 
 [flake8]