Merge "Use skip_checks in ServersTestMultiNic"
diff --git a/.zuul.yaml b/.zuul.yaml
index 42911a3..cdc63a7 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -192,6 +192,48 @@
         c-bak: false
 
 - job:
+    name: tempest-integrated-compute
+    parent: devstack-tempest
+    branches: ^(?!stable/ocata).*$
+    description: |
+      This job runs integration tests for compute. This is
+      subset of 'tempest-full' job and run Nova, Neutron, Cinder (except backup tests)
+      and Glance related tests. This is meant to be run on Nova gate only.
+    vars:
+      tox_envlist: integrated-compute
+      devstack_localrc:
+        USE_PYTHON3: true
+        FORCE_CONFIG_DRIVE: true
+        ENABLE_VOLUME_MULTIATTACH: true
+      devstack_services:
+        s-account: false
+        s-container: false
+        s-object: false
+        s-proxy: false
+        c-bak: false
+
+- job:
+    name: tempest-integrated-placement
+    parent: devstack-tempest
+    branches: ^(?!stable/ocata).*$
+    description: |
+      This job runs integration tests for placement. This is
+      subset of 'tempest-full' job and run Nova and Neutron
+      related tests. This is meant to be run on Placement gate only.
+    vars:
+      tox_envlist: integrated-placement
+      devstack_localrc:
+        USE_PYTHON3: true
+        FORCE_CONFIG_DRIVE: true
+        ENABLE_VOLUME_MULTIATTACH: true
+      devstack_services:
+        s-account: false
+        s-container: false
+        s-object: false
+        s-proxy: false
+        c-bak: false
+
+- job:
     name: tempest-integrated-storage
     parent: devstack-tempest
     branches: ^(?!stable/ocata).*$
@@ -207,6 +249,22 @@
         ENABLE_VOLUME_MULTIATTACH: true
 
 - job:
+    name: tempest-integrated-object-storage
+    parent: devstack-tempest
+    branches: ^(?!stable/ocata).*$
+    description: |
+      This job runs integration tests for object storage. This is
+      subset of 'tempest-full' job and run Swift, Cinder and Glance
+      related tests. This is meant to be run on Swift gate only.
+    vars:
+      tox_envlist: integrated-object-storage
+      devstack_localrc:
+        # NOTE(gmann): swift is not ready on python3 yet and devstack
+        # install it on python2.7 only. But settting the USE_PYTHON3
+        # for future once swift is ready on py3.
+        USE_PYTHON3: true
+
+- job:
     name: tempest-full-py3-ipv6
     parent: devstack-tempest-ipv6
     # This currently works from stable/pike on.
@@ -549,6 +607,38 @@
         - tempest-integrated-networking
 
 - project-template:
+    name: integrated-gate-compute
+    description: |
+      Run the python3 Tempest compute integration tests
+      (Nova, Neutron, Cinder and Glance related) in check and gate
+      for the Nova integrated gate. This is meant to be
+      run on Nova gate only.
+    check:
+      jobs:
+        - grenade-py3
+        - tempest-integrated-compute
+    gate:
+      jobs:
+        - grenade-py3
+        - tempest-integrated-compute
+
+- project-template:
+    name: integrated-gate-placement
+    description: |
+      Run the python3 Tempest placement integration tests
+      (Nova and Neutron related) in check and gate
+      for the Placement integrated gate. This is meant to be
+      run on Placement gate only.
+    check:
+      jobs:
+        - grenade-py3
+        - tempest-integrated-placement
+    gate:
+      jobs:
+        - grenade-py3
+        - tempest-integrated-placement
+
+- project-template:
     name: integrated-gate-storage
     description: |
       Run the python3 Tempest image & block storage integration tests
@@ -564,6 +654,22 @@
         - grenade-py3
         - tempest-integrated-storage
 
+- project-template:
+    name: integrated-gate-object-storage
+    description: |
+      Run the python3 Tempest object storage integration tests
+      (Swift, Cinder and Glance related) in check and gate
+      for the swift integrated gate. This is meant to be
+      run on swift gate only.
+    check:
+      jobs:
+        - grenade-py3
+        - tempest-integrated-object-storage
+    gate:
+      jobs:
+        - grenade-py3
+        - tempest-integrated-object-storage
+
 - project:
     templates:
       - check-requirements
@@ -572,8 +678,7 @@
       - openstack-cover-jobs
       - openstack-python-jobs
       - openstack-python35-jobs
-      - openstack-python36-jobs
-      - openstack-python37-jobs
+      - openstack-python3-train-jobs
       - publish-openstack-docs-pti
       - release-notes-jobs-python3
     check:
diff --git a/releasenotes/notes/intermediate-train-release-0146c624cff9a57f.yaml b/releasenotes/notes/intermediate-train-release-0146c624cff9a57f.yaml
new file mode 100644
index 0000000..6977e12
--- /dev/null
+++ b/releasenotes/notes/intermediate-train-release-0146c624cff9a57f.yaml
@@ -0,0 +1,12 @@
+---
+prelude: >
+    This is an intermediate release during the Train development cycle to
+    mark the end of support for Pike in Tempest.
+    After this release, Tempest will support below OpenStack Releases:
+
+      * Stein
+      * Rocky
+      * Queens
+
+    Current development of Tempest is for OpenStack Train development
+    cycle.
diff --git a/setup.cfg b/setup.cfg
index fcbe956..5c1d24c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -17,6 +17,8 @@
     Programming Language :: Python :: 2.7
     Programming Language :: Python :: 3
     Programming Language :: Python :: 3.5
+    Programming Language :: Python :: 3.6
+    Programming Language :: Python :: 3.7
 
 [files]
 packages =
diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
index b2d401b..5f6dae8 100644
--- a/tempest/scenario/test_network_advanced_server_ops.py
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -257,6 +257,7 @@
         self._wait_server_status_and_check_network_connectivity(
             server, keypair, floating_ip)
 
+    @decorators.skip_because(bug='1836595')
     @decorators.idempotent_id('25b188d7-0183-4b1e-a11d-15840c8e2fd6')
     @testtools.skipUnless(CONF.compute_feature_enabled.cold_migration,
                           'Cold migration is not available.')
diff --git a/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py b/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py
index 87bd379..70a3ee5 100644
--- a/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py
+++ b/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py
@@ -20,17 +20,16 @@
 class TestEncryptionTypesClient(base.BaseServiceTest):
     FAKE_CREATE_ENCRYPTION_TYPE = {
         "encryption": {
-            "id": "cbc36478b0bd8e67e89",
-            "name": "FakeEncryptionType",
-            "type": "fakeType",
+            "volume_type_id": "cbc36478b0bd8e67e89",
+            "control_location": "front-end",
+            "encryption_id": "81e069c6-7394-4856-8df7-3b237ca61f74",
+            "key_size": 128,
             "provider": "LuksEncryptor",
-            "cipher": "aes-xts-plain64",
-            "key_size": "512",
-            "control_location": "front-end"
+            "cipher": "aes-xts-plain64"
         }
     }
 
-    UPDATE_ENCRYPTION_TYPE = {
+    FAKE_UPDATE_ENCRYPTION_TYPE = {
         "encryption": {
             "key_size": 64,
             "provider": "LuksEncryptor",
@@ -40,16 +39,16 @@
     }
 
     FAKE_INFO_ENCRYPTION_TYPE = {
-        "encryption": {
-            "name": "FakeEncryptionType",
-            "type": "fakeType",
-            "description": "test_description",
-            "volume_type": "fakeType",
-            "provider": "LuksEncryptor",
-            "cipher": "aes-xts-plain64",
-            "key_size": "512",
-            "control_location": "front-end"
-        }
+        "volume_type_id": "cbc36478b0bd8e67e89",
+        "control_location": "front-end",
+        "deleted": False,
+        "created_at": "2015-08-27T09:49:58-05:00",
+        "updated_at": "2015-08-29T09:49:58-05:00",
+        "encryption_id": "81e069c6-7394-4856-8df7-3b237ca61f74",
+        "key_size": 128,
+        "provider": "LuksEncryptor",
+        "deleted_at": "2015-08-30T09:49:58-05:00",
+        "cipher": "aes-xts-plain64"
     }
 
     FAKE_ENCRYPTION_SPECS_ITEM = {
@@ -119,5 +118,5 @@
         self.check_service_client_function(
             self.client.update_encryption_type,
             'tempest.lib.common.rest_client.RestClient.put',
-            self.UPDATE_ENCRYPTION_TYPE,
+            self.FAKE_UPDATE_ENCRYPTION_TYPE,
             bytes_body, volume_type_id="cbc36478b0bd8e67e89")
diff --git a/tools/generate-tempest-plugins-list.py b/tools/generate-tempest-plugins-list.py
index c18f109..f1003a0 100644
--- a/tools/generate-tempest-plugins-list.py
+++ b/tools/generate-tempest-plugins-list.py
@@ -56,6 +56,7 @@
     # https://review.opendev.org/#/c/637718/
     'openstack/neutron-vpnaas',  # https://review.opendev.org/#/c/637719/
     'x/valet',  # https://review.opendev.org/#/c/638339/
+    'x/ranger-tempest-plugin',  # It looks this doesn't work correctly yet.
 ]
 
 url = 'https://review.opendev.org/projects/'
diff --git a/tools/tempest-integrated-gate-compute-blacklist.txt b/tools/tempest-integrated-gate-compute-blacklist.txt
new file mode 100644
index 0000000..8805262
--- /dev/null
+++ b/tools/tempest-integrated-gate-compute-blacklist.txt
@@ -0,0 +1,13 @@
+# This file includes the backlist of tests which need to be
+# skipped for Integrated-gate-compute template. Integrated-gate-compute template
+# needs to run only Nova, Neutron, Cinder and Glance related tests and rest all
+# tests will be skipped by below list.
+
+# Skip keystone and Swift API tests.
+tempest.api.identity
+tempest.api.object_storage
+
+# Skip Swift only scenario tests.
+tempest.scenario.test_object_storage_basic_ops.TestObjectStorageBasicOps.test_swift_basic_ops
+tempest.scenario.test_object_storage_basic_ops.TestObjectStorageBasicOps.test_swift_acl_anonymous_download
+tempest.scenario.test_volume_backup_restore.TestVolumeBackupRestore.test_volume_backup_restore
diff --git a/tools/tempest-integrated-gate-object-storage-blacklist.txt b/tools/tempest-integrated-gate-object-storage-blacklist.txt
new file mode 100644
index 0000000..064cf46
--- /dev/null
+++ b/tools/tempest-integrated-gate-object-storage-blacklist.txt
@@ -0,0 +1,17 @@
+# This file includes the backlist of tests which need to be
+# skipped for Integrated-gate-object-storage template. Integrated-gate-object-storage template
+# needs to run only Swift, Cinder and Glance related tests and rest all
+# tests will be skipped by below list.
+
+# Skip network, compute, keystone API tests.
+tempest.api.network
+tempest.api.compute
+tempest.api.identity
+
+# Skip network, compute, keystone only scenario tests
+tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_network_advanced_server_ops
+tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
+tempest.scenario.test_network_v6.TestGettingAddress.test_security_groups_basic_ops
+tempest.scenario.test_server_advanced_ops.TestServerAdvancedOps.test_server_sequence_suspend_resume
+tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
+tempest.scenario.test_server_multinode.TestServerMultinode.test_schedule_to_all_nodes
diff --git a/tools/tempest-integrated-gate-placement-blacklist.txt b/tools/tempest-integrated-gate-placement-blacklist.txt
new file mode 100644
index 0000000..efba796
--- /dev/null
+++ b/tools/tempest-integrated-gate-placement-blacklist.txt
@@ -0,0 +1,19 @@
+# This file includes the backlist of tests which need to be
+# skipped for Integrated-gate-placement template. Integrated-gate-placement template
+# needs to run only Nova and Neutron related tests and rest all
+# tests will be skipped by below list.
+
+# Skip Cinder, Glance, keystone and Swift API tests.
+tempest.api.volume
+tempest.api.image
+tempest.api.identity
+tempest.api.object_storage
+
+# Skip Cinder, Glance and Swift only scenario tests.
+tempest.scenario.test_encrypted_cinder_volumes.TestEncryptedCinderVolumes.test_encrypted_cinder_volumes_luks
+tempest.scenario.test_encrypted_cinder_volumes.TestEncryptedCinderVolumes.test_encrypted_cinder_volumes_cryptsetup
+tempest.scenario.test_object_storage_basic_ops.TestObjectStorageBasicOps.test_swift_basic_ops
+tempest.scenario.test_object_storage_basic_ops.TestObjectStorageBasicOps.test_swift_acl_anonymous_download
+tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_boot_server_from_encrypted_volume_luks
+tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_image_defined_boot_from_volume
+tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_create_server_from_volume_snapshot
diff --git a/tox.ini b/tox.ini
index 087a298..8a7a509 100644
--- a/tox.ini
+++ b/tox.ini
@@ -130,6 +130,30 @@
     tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-networking-blacklist.txt {posargs}
     tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-networking-blacklist.txt {posargs}
 
+[testenv:integrated-compute]
+envdir = .tox/tempest
+sitepackages = {[tempestenv]sitepackages}
+setenv = {[tempestenv]setenv}
+deps = {[tempestenv]deps}
+# The regex below is used to select which tests to run and exclude the slow tag and
+# tests listed in blacklist file:
+commands =
+    find . -type f -name "*.pyc" -delete
+    tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-compute-blacklist.txt {posargs}
+    tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-compute-blacklist.txt {posargs}
+
+[testenv:integrated-placement]
+envdir = .tox/tempest
+sitepackages = {[tempestenv]sitepackages}
+setenv = {[tempestenv]setenv}
+deps = {[tempestenv]deps}
+# The regex below is used to select which tests to run and exclude the slow tag and
+# tests listed in blacklist file:
+commands =
+    find . -type f -name "*.pyc" -delete
+    tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-placement-blacklist.txt {posargs}
+    tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-placement-blacklist.txt {posargs}
+
 [testenv:integrated-storage]
 envdir = .tox/tempest
 sitepackages = {[tempestenv]sitepackages}
@@ -142,6 +166,18 @@
     tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-storage-blacklist.txt {posargs}
     tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-storage-blacklist.txt {posargs}
 
+[testenv:integrated-object-storage]
+envdir = .tox/tempest
+sitepackages = {[tempestenv]sitepackages}
+setenv = {[tempestenv]setenv}
+deps = {[tempestenv]deps}
+# The regex below is used to select which tests to run and exclude the slow tag and
+# tests listed in blacklist file:
+commands =
+    find . -type f -name "*.pyc" -delete
+    tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-object-storage-blacklist.txt {posargs}
+    tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-object-storage-blacklist.txt {posargs}
+
 [testenv:full-serial]
 envdir = .tox/tempest
 sitepackages = {[tempestenv]sitepackages}