Merge "Remove handling for client status races"
diff --git a/.gitreview b/.gitreview
index 9c33d46..c56730f 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,5 +1,5 @@
 
 [gerrit]
-host=review.openstack.org
+host=review.opendev.org
 port=29418
 project=openstack/heat-tempest-plugin.git
diff --git a/.zuul.yaml b/.zuul.yaml
index f7d9698..88da946 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -13,9 +13,26 @@
     parent: heat-functional-convg-mysql-lbaasv2-py35
     override-checkout: stable/queens
 
+- job:
+    name: heat-functional-convg-rocky
+    parent: heat-functional-convg-mysql-lbaasv2
+    override-checkout: stable/rocky
+
+- job:
+    name: heat-functional-orig-rocky
+    parent: heat-functional-orig-mysql-lbaasv2
+    override-checkout: stable/rocky
+
+- job:
+    name: heat-functional-convg-rocky-py35
+    parent: heat-functional-convg-mysql-lbaasv2-py35
+    override-checkout: stable/rocky
 
 
 - project:
+    templates:
+      - check-requirements
+      - tempest-plugin-jobs
     check:
       jobs:
         - heat-functional-orig-mysql-lbaasv2
@@ -25,7 +42,11 @@
         - heat-functional-convg-queens
         - heat-functional-convg-queens-py35
         - heat-functional-orig-queens
+        - heat-functional-convg-rocky
+        - heat-functional-convg-rocky-py35
+        - heat-functional-orig-rocky
     gate:
+      queue: heat
       jobs:
         - heat-functional-orig-mysql-lbaasv2
         - heat-functional-convg-mysql-lbaasv2
diff --git a/heat_tempest_plugin/common/test.py b/heat_tempest_plugin/common/test.py
index 3be1450..83ccdc2 100644
--- a/heat_tempest_plugin/common/test.py
+++ b/heat_tempest_plugin/common/test.py
@@ -109,19 +109,57 @@
     return decorator
 
 
+def requires_service_type(service_type):
+    '''Decorator for tests requiring a specific service being available.
+
+    The decorated test will be skipped when a service is not available.
+    '''
+    def decorator(test_method):
+        conf = getattr(config.CONF, 'heat_plugin', None)
+        if not conf or conf.auth_url is None:
+            return test_method
+
+        manager = clients.ClientManager(conf)
+        try:
+            manager.identity_client.get_endpoint_url(
+                service_type, conf.region, conf.endpoint_type)
+        except kc_exceptions.EndpointNotFound:
+            skipper = testtools.skip(
+                "%s service not available, skipping test." % service_type)
+            return skipper(test_method)
+        else:
+            return test_method
+    return decorator
+
+
+def _check_require(group, feature, test_method):
+    features_group = getattr(config.CONF, group, None)
+    if not features_group:
+        return test_method
+    feature_enabled = features_group.get(feature, True)
+    skipper = testtools.skipUnless(feature_enabled,
+                                   "%s - Feature not enabled." % feature)
+    return skipper(test_method)
+
+
 def requires_feature(feature):
     '''Decorator for tests requring specific feature.
 
     The decorated test will be skipped when a specific feature is disabled.
     '''
     def decorator(test_method):
-        features_group = getattr(config.CONF, 'heat_features_enabled', None)
-        if not features_group:
-            return test_method
-        feature_enabled = config.CONF.heat_features_enabled.get(feature, False)
-        skipper = testtools.skipUnless(feature_enabled,
-                                       "%s - Feature not enabled." % feature)
-        return skipper(test_method)
+        return _check_require('heat_features_enabled', feature, test_method)
+    return decorator
+
+
+def requires_service_feature(service, feature):
+    '''Decorator for tests requring specific service feature enabled in tempest.
+
+    The decorated test will be skipped when a specific feature is disabled.
+    '''
+    def decorator(test_method):
+        group = service + '_feature_enabled'
+        return _check_require(group, feature, test_method)
     return decorator
 
 
@@ -245,15 +283,6 @@
             return False
         return True
 
-    def is_service_available(self, service_type):
-        try:
-            self.identity_client.get_endpoint_url(
-                service_type, self.conf.region, self.conf.endpoint_type)
-        except kc_exceptions.EndpointNotFound:
-            return False
-        else:
-            return True
-
     @staticmethod
     def _stack_output(stack, output_key, validate_errors=True):
         """Return a stack output value for a given key."""
diff --git a/heat_tempest_plugin/config.py b/heat_tempest_plugin/config.py
index c77bb51..9e390dc 100644
--- a/heat_tempest_plugin/config.py
+++ b/heat_tempest_plugin/config.py
@@ -12,13 +12,22 @@
 
 from oslo_config import cfg
 
+import os
+
+default_template = os.path.join(
+    os.path.dirname(os.path.realpath(__file__)),
+    'tests/scenario/templates/boot_config_none_env.yaml')
+
 service_available_group = cfg.OptGroup(name="service_available",
                                        title="Available OpenStack Services")
 
 ServiceAvailableGroup = [
-    cfg.BoolOpt("heat_plugin",
+    cfg.BoolOpt("heat",
                 default=True,
-                help="Whether or not heat is expected to be available"),
+                help="Whether or not heat is expected to be available",
+                deprecated_opts=[cfg.DeprecatedOpt(
+                    'heat_plugin',
+                    group='service_available')]),
 ]
 
 heat_group = cfg.OptGroup(name="heat_plugin",
@@ -103,8 +112,7 @@
                default='public',
                help="Visible floating network name "),
     cfg.StrOpt('boot_config_env',
-               default=('heat_tempest_plugin/tests/scenario/templates'
-                        '/boot_config_none_env.yaml'),
+               default=default_template,
                help="Path to environment file which defines the "
                     "resource type Heat::InstallConfigAgent. Needs to "
                     "be appropriate for the image_ref."),
@@ -156,6 +164,9 @@
     cfg.StrOpt('hidden_stack_tag',
                default='data-processing-cluster',
                help="Tag to be considered as hidden for stack tags tests"),
+    cfg.StrOpt('credential_secret_id',
+               help="Barbican secret id which storing cloud credential in "
+               "remote site."),
 ]
 
 heat_features_group = cfg.OptGroup(
@@ -165,7 +176,10 @@
 HeatFeaturesGroup = [
     cfg.BoolOpt('stack_cancel',
                 default=False,
-                help="If false, skip stack cancel tests")
+                help="If false, skip stack cancel tests"),
+    cfg.BoolOpt('multi_cloud',
+                default=False,
+                help="If false, skip multi-cloud tests for remote stack")
 ]
 
 
diff --git a/heat_tempest_plugin/plugin.py b/heat_tempest_plugin/plugin.py
index 6926691..0eeb519 100644
--- a/heat_tempest_plugin/plugin.py
+++ b/heat_tempest_plugin/plugin.py
@@ -22,7 +22,23 @@
 
 
 class HeatTempestPlugin(plugins.TempestPlugin):
+    """A HeatTempestPlugin class
+
+    Provides the basic hooks for an external plugin to provide tempest the
+    necessary information to run the plugin.
+    """
+
     def load_tests(self):
+        """Provide Load tests information
+
+        Method to return the information necessary to load the tests in the
+        plugin.
+
+        :return: a tuple with the first value being the test_dir and the second
+                 being the top_level
+        :return type: tuple
+        """
+
         base_path = os.path.split(os.path.dirname(
             os.path.abspath(__file__)))[0]
         test_dir = "heat_tempest_plugin"
@@ -30,6 +46,15 @@
         return full_test_dir, base_path
 
     def register_opts(self, conf):
+        """Add additional configuration options to tempest.
+
+        This method will be run for the plugin during the register_opts()
+        function in tempest.config
+
+        Parameters:
+        conf (ConfigOpts): The conf object that can be used to register
+        additional options on.
+        """
         config.register_opt_group(conf, heat_config.service_available_group,
                                   heat_config.ServiceAvailableGroup)
         config.register_opt_group(conf, heat_config.heat_group,
@@ -38,6 +63,13 @@
                                   heat_config.HeatFeaturesGroup)
 
     def get_opt_lists(self):
+        """Get a list of options for sample config generation
+
+        Return option_list: A list of tuples with the group name
+                            and options in that group.
+        Return type: list
+        """
+
         return [(heat_config.heat_group.name,
                  heat_config.HeatGroup),
                 (heat_config.heat_features_group.name,
diff --git a/heat_tempest_plugin/tests/api/gabbits/softwareconfig.yaml b/heat_tempest_plugin/tests/api/gabbits/softwareconfig.yaml
index 0d0453d..018b29c 100644
--- a/heat_tempest_plugin/tests/api/gabbits/softwareconfig.yaml
+++ b/heat_tempest_plugin/tests/api/gabbits/softwareconfig.yaml
@@ -12,6 +12,7 @@
   request_headers:
     content-type: application/json
   data:
+    name: $ENVIRON['PREFIX']-config
     group: script
     config: '#!/bin/sh -x\necho hello'
   status: 200
diff --git a/heat_tempest_plugin/tests/functional/test_create_update_neutron_port.py b/heat_tempest_plugin/tests/functional/test_create_update_neutron_port.py
index eeeabf3..cf51bbd 100644
--- a/heat_tempest_plugin/tests/functional/test_create_update_neutron_port.py
+++ b/heat_tempest_plugin/tests/functional/test_create_update_neutron_port.py
@@ -100,6 +100,5 @@
         new_id, new_ip, new_mac = self.get_port_id_and_outputs(
             stack_identifier)
         # mac_address should be different
-        self.assertEqual(_id, new_id)
         self.assertEqual(_ip, new_ip)
         self.assertNotEqual(_mac, new_mac)
diff --git a/heat_tempest_plugin/tests/functional/test_event_sinks.py b/heat_tempest_plugin/tests/functional/test_event_sinks.py
index 7cb1d7b..dd1accc 100644
--- a/heat_tempest_plugin/tests/functional/test_event_sinks.py
+++ b/heat_tempest_plugin/tests/functional/test_event_sinks.py
@@ -19,6 +19,7 @@
 from heat_tempest_plugin.tests.functional import functional_base
 
 
+@test.requires_service_type('messaging')
 class ZaqarEventSinkTest(functional_base.FunctionalTestsBase):
     template = '''
 heat_template_version: "2013-05-23"
diff --git a/heat_tempest_plugin/tests/functional/test_external_ref.py b/heat_tempest_plugin/tests/functional/test_external_ref.py
index d6a73ac..1667908 100644
--- a/heat_tempest_plugin/tests/functional/test_external_ref.py
+++ b/heat_tempest_plugin/tests/functional/test_external_ref.py
@@ -34,25 +34,26 @@
     value: {get_resource: test1}
 '''
 
-    @decorators.idempotent_id('45449bad-18ba-4148-82e6-a6bc1e9a9b04')
-    def test_create_with_external_ref(self):
-        stack_name = self._stack_rand_name()
-        stack_identifier = self.stack_create(
-            stack_name=stack_name,
-            template=self.TEMPLATE_WITH_EX_REF,
+    def _stack_create(self, template):
+        self.stack_name = self._stack_rand_name()
+        self.stack_identifier = self.stack_create(
+            stack_name=self.stack_name,
+            template=template,
             files={},
             disable_rollback=True,
             parameters={},
-            environment={}
+            environment={},
+            expected_status='CREATE_COMPLETE'
         )
 
-        stack = self.client.stacks.get(stack_identifier)
-
-        self._wait_for_stack_status(stack_identifier, 'CREATE_COMPLETE')
         expected_resources = {'test1': 'OS::Heat::TestResource'}
         self.assertEqual(expected_resources,
-                         self.list_resources(stack_identifier))
-        stack = self.client.stacks.get(stack_identifier)
+                         self.list_resources(self.stack_identifier))
+
+    @decorators.idempotent_id('45449bad-18ba-4148-82e6-a6bc1e9a9b04')
+    def test_create_with_external_ref(self):
+        self._stack_create(self.TEMPLATE_WITH_EX_REF)
+        stack = self.client.stacks.get(self.stack_identifier)
         self.assertEqual(
             [{'description': 'No description given',
               'output_key': 'str',
@@ -60,28 +61,41 @@
 
     @decorators.idempotent_id('fb16477c-e981-4ef9-a83b-c0acc162343a')
     def test_update_with_external_ref(self):
-        stack_name = self._stack_rand_name()
-        stack_identifier = self.stack_create(
-            stack_name=stack_name,
-            template=self.TEMPLATE,
-            files={},
-            disable_rollback=True,
-            parameters={},
-            environment={}
-        )
-        stack = self.client.stacks.get(stack_identifier)
+        self._stack_create(self.TEMPLATE)
 
-        self._wait_for_stack_status(stack_identifier, 'CREATE_COMPLETE')
-        expected_resources = {'test1': 'OS::Heat::TestResource'}
-        self.assertEqual(expected_resources,
-                         self.list_resources(stack_identifier))
-        stack = self.client.stacks.get(stack_identifier)
+        stack = self.client.stacks.get(self.stack_identifier)
         self.assertEqual([], stack.outputs)
 
-        stack_name = stack_identifier.split('/')[0]
-        kwargs = {'stack_id': stack_identifier, 'stack_name': stack_name,
+        stack_name = self.stack_identifier.split('/')[0]
+        kwargs = {'stack_id': self.stack_identifier, 'stack_name': stack_name,
                   'template': self.TEMPLATE_WITH_EX_REF, 'files': {},
                   'disable_rollback': True, 'parameters': {}, 'environment': {}
                   }
         self.client.stacks.update(**kwargs)
-        self._wait_for_stack_status(stack_identifier, 'UPDATE_FAILED')
+        self._wait_for_stack_status(self.stack_identifier, 'UPDATE_FAILED')
+
+    @decorators.idempotent_id('0ac301c2-b377-49b8-82e2-2458634bc8cf')
+    def test_update_stack_contain_external_ref(self):
+        self._stack_create(self.TEMPLATE_WITH_EX_REF)
+
+        stack = self.client.stacks.get(self.stack_identifier)
+        self.assertEqual(
+            [{'description': 'No description given',
+              'output_key': 'str',
+              'output_value': 'foobar'}], stack.outputs)
+
+        # Update Stack without change external_id
+
+        new_stack_name = self._stack_rand_name()
+        kwargs = {'stack_id': self.stack_identifier,
+                  'stack_name': new_stack_name,
+                  'template': self.TEMPLATE_WITH_EX_REF, 'files': {},
+                  'disable_rollback': True, 'parameters': {}, 'environment': {}
+                  }
+        self.client.stacks.update(**kwargs)
+
+        self._wait_for_stack_status(self.stack_identifier, 'UPDATE_COMPLETE')
+
+        expected_resources = {'test1': 'OS::Heat::TestResource'}
+        self.assertEqual(expected_resources,
+                         self.list_resources(self.stack_identifier))
diff --git a/heat_tempest_plugin/tests/functional/test_os_wait_condition.py b/heat_tempest_plugin/tests/functional/test_os_wait_condition.py
index 603b5e5..bb8513a 100644
--- a/heat_tempest_plugin/tests/functional/test_os_wait_condition.py
+++ b/heat_tempest_plugin/tests/functional/test_os_wait_condition.py
@@ -106,5 +106,5 @@
         params = {'flavor': self.conf.minimal_instance_type,
                   'image': self.conf.minimal_image_ref,
                   'network': self.conf.fixed_network_name,
-                  'timeout': 120}
+                  'timeout': 180}
         self.stack_create(template=self.template, parameters=params)
diff --git a/heat_tempest_plugin/tests/functional/test_remote_stack.py b/heat_tempest_plugin/tests/functional/test_remote_stack.py
index 1a467f4..6c5268c 100644
--- a/heat_tempest_plugin/tests/functional/test_remote_stack.py
+++ b/heat_tempest_plugin/tests/functional/test_remote_stack.py
@@ -15,6 +15,7 @@
 import six
 from tempest.lib import decorators
 
+from heat_tempest_plugin.common import test
 from heat_tempest_plugin.tests.functional import functional_base
 
 
@@ -26,6 +27,7 @@
     type: OS::Heat::Stack
     properties:
       context:
+$MULTI_CLOUD_PROPERTIES
         region_name: RegionOne
       template:
         get_file: remote_stack.yaml
@@ -46,6 +48,7 @@
 
     def setUp(self):
         super(RemoteStackTest, self).setUp()
+        self.template = self.template.replace('$MULTI_CLOUD_PROPERTIES', '')
         # replacing the template region with the one from the config
         self.template = self.template.replace('RegionOne',
                                               self.conf.region)
@@ -83,6 +86,52 @@
         remote_resources = {'random1': 'OS::Heat::RandomString'}
         self.assertEqual(remote_resources, self.list_resources(remote_id))
 
+    def _create_with_cloud_credential(self):
+        cred_sec_id = self.conf.credential_secret_id
+        if not cred_sec_id:
+            raise self.skipException(
+                "No credential_secret_id configured to test")
+        props = """
+        credential_secret_id: %(credential_secret_id)s""" % {
+            'credential_secret_id': cred_sec_id
+        }
+
+        self.template = self.template.replace('$MULTI_CLOUD_PROPERTIES', props)
+        files = {'remote_stack.yaml': self.remote_template}
+        stack_id = self.stack_create(files=files)
+
+        expected_resources = {'my_stack': 'OS::Heat::Stack'}
+        self.assertEqual(expected_resources, self.list_resources(stack_id))
+
+        return stack_id
+
+    @test.requires_feature('multi_cloud')
+    @decorators.idempotent_id('6b61d8e3-79df-4e84-bdcf-f734da39d52b')
+    def test_stack_create_with_cloud_credential(self):
+        """Test on create multi (OpenStack) cloud with credential
+
+        This test will use same region to simulate cross OpenStack scenario.
+        Provide credential_secret_id as input property.
+        """
+        stack_id = self._create_with_cloud_credential()
+        stack = self.client.stacks.get(stack_id)
+        output = self._stack_output(stack, 'key')
+        parent_output_value = output['remote_key']
+        self.assertEqual(32, len(parent_output_value))
+
+        rsrc = self.client.resources.get(stack_id, 'my_stack')
+        remote_id = rsrc.physical_resource_id
+        # For now we use same OpenStack environment as a simulation of remote
+        # OpenStack site.
+        rstack = self.client.stacks.get(remote_id)
+        self.assertEqual(remote_id, rstack.id)
+        remote_output_value = self._stack_output(rstack, 'remote_key')
+        self.assertEqual(32, len(remote_output_value))
+        self.assertEqual(parent_output_value, remote_output_value)
+
+        remote_resources = {'random1': 'OS::Heat::RandomString'}
+        self.assertEqual(remote_resources, self.list_resources(remote_id))
+
     @decorators.idempotent_id('830bfeae-6d8a-4cb2-823d-d8b6c3a740ad')
     def test_stack_create_bad_region(self):
         tmpl_bad_region = self.template.replace(self.conf.region, 'DARKHOLE')
diff --git a/heat_tempest_plugin/tests/functional/test_software_config.py b/heat_tempest_plugin/tests/functional/test_software_config.py
index f034096..ada67f2 100644
--- a/heat_tempest_plugin/tests/functional/test_software_config.py
+++ b/heat_tempest_plugin/tests/functional/test_software_config.py
@@ -183,6 +183,7 @@
                           verify=self.verify_cert)
 
 
+@test.requires_service_type('messaging')
 class ZaqarSignalTransportTest(functional_base.FunctionalTestsBase):
     server_template = '''
 heat_template_version: "2013-05-23"
diff --git a/heat_tempest_plugin/tests/functional/test_waitcondition.py b/heat_tempest_plugin/tests/functional/test_waitcondition.py
index c21b33b..3bffd76 100644
--- a/heat_tempest_plugin/tests/functional/test_waitcondition.py
+++ b/heat_tempest_plugin/tests/functional/test_waitcondition.py
@@ -16,9 +16,11 @@
 from tempest.lib import decorators
 from zaqarclient.queues.v2 import client as zaqarclient
 
+from heat_tempest_plugin.common import test
 from heat_tempest_plugin.tests.functional import functional_base
 
 
+@test.requires_service_type('messaging')
 class ZaqarWaitConditionTest(functional_base.FunctionalTestsBase):
     template = '''
 heat_template_version: "2013-05-23"
diff --git a/heat_tempest_plugin/tests/scenario/templates/remote_nested_base.yaml b/heat_tempest_plugin/tests/scenario/templates/remote_nested_base.yaml
new file mode 100644
index 0000000..fc1441f
--- /dev/null
+++ b/heat_tempest_plugin/tests/scenario/templates/remote_nested_base.yaml
@@ -0,0 +1,29 @@
+heat_template_version: 2015-10-15
+description: |
+  The base stack (containing an actual resource) for the remote deeply-nested
+  stack test.
+
+parameters:
+  name:
+    type: string
+    description: Name of the router
+    constraints:
+      - allowed_pattern: "[a-z][a-z0-9-]{1,}"
+  network_name:
+    type: string
+    description: The network to connect to
+    constraints:
+      - custom_constraint: neutron.network
+
+resources:
+  router:
+    type: OS::Neutron::Router
+    properties:
+      name:
+        list_join: ['-', [{ get_param: name }, 'router']]
+      external_gateway_info:
+        network: {get_param: network_name}
+
+outputs:
+  router:
+    value: {get_resource: router}
diff --git a/heat_tempest_plugin/tests/scenario/templates/remote_nested_intermediate.yaml b/heat_tempest_plugin/tests/scenario/templates/remote_nested_intermediate.yaml
new file mode 100644
index 0000000..6fc7082
--- /dev/null
+++ b/heat_tempest_plugin/tests/scenario/templates/remote_nested_intermediate.yaml
@@ -0,0 +1,27 @@
+heat_template_version: 2015-10-15
+description: |
+  The intermediate stack (containing a local nested stack) to be instantiated
+  remotely in the remote deeply-nested stack test.
+
+parameters:
+  name:
+    type: string
+    description: Name of the router
+    constraints:
+      - allowed_pattern: "[a-z][a-z0-9-]{1,}"
+  network_name:
+    type: string
+    description: The public network to connect to
+    constraints:
+      - custom_constraint: neutron.network
+
+resources:
+  network_stack_as_custom_type:
+    type: remote_nested_base.yaml
+    properties:
+      name: {get_param: name}
+      network_name: {get_param: network_name}
+
+outputs:
+  router:
+    value: {get_attr: [network_stack_as_custom_type, router]}
diff --git a/heat_tempest_plugin/tests/scenario/templates/remote_nested_root.yaml b/heat_tempest_plugin/tests/scenario/templates/remote_nested_root.yaml
new file mode 100644
index 0000000..39bb8cb
--- /dev/null
+++ b/heat_tempest_plugin/tests/scenario/templates/remote_nested_root.yaml
@@ -0,0 +1,35 @@
+heat_template_version: 2015-10-15
+description: |
+  The root stack (containing a remote stack) for the deeply-nested remote
+  stack test.
+
+parameters:
+  name:
+    type: string
+    description: Name of the router
+    constraints:
+      - allowed_pattern: "[a-z][a-z0-9-]{1,}"
+  network_name:
+    type: string
+    description: The public network to connect to
+    constraints:
+      - custom_constraint: neutron.network
+  region:
+    type: string
+    description: The region in which to create the remote stack
+    default: RegionOne
+
+resources:
+  network_stack:
+    type: OS::Heat::Stack
+    properties:
+      template: {get_file: remote_nested_intermediate.yaml}
+      context:
+        region_name: {get_param: region}
+      parameters:
+        name: {get_param: name}
+        network_name: {get_param: network_name}
+
+outputs:
+  router:
+    value: {get_attr: [network_stack, outputs, router]}
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml b/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml
index 9f94717..ccd9bd1 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml
@@ -71,8 +71,8 @@
         - WaitHandle: {Ref: WaitHandle}
         - |
           #!/bin/bash -v
-          /opt/aws/bin/cfn-init
-          /opt/aws/bin/cfn-signal -e 0 --data "`cat /tmp/smoke-status`" \
+          /usr/bin/cfn-init
+          /usr/bin/cfn-signal -e 0 --data "`cat /tmp/smoke-status`" \
               --id smoke_status "WaitHandle"
   WaitHandle:
     Type: AWS::CloudFormation::WaitConditionHandle
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_server_software_config.yaml b/heat_tempest_plugin/tests/scenario/templates/test_server_software_config.yaml
index bf8fa9b..9df6532 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_server_software_config.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_server_software_config.yaml
@@ -52,7 +52,7 @@
       - name: bar
       outputs:
       - name: result
-      config: {get_file: cfg1.sh}
+      config: {get_file: /cfg1.sh}
 
   cfg2a:
     type: OS::Heat::StructuredConfig
@@ -87,7 +87,7 @@
       - name: bar
       outputs:
       - name: result
-      config: {get_file: cfg3.pp}
+      config: {get_file: /cfg3.pp}
 
   dep1:
     type: OS::Heat::SoftwareDeployment
diff --git a/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py b/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py
index 4e25158..dafca12 100644
--- a/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py
+++ b/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py
@@ -51,9 +51,9 @@
         stack_identifier = self.stack_create(template=self.template,
                                              parameters=parameters)
 
-        measures = [{'timestamp': test.isotime(datetime.datetime.now()),
+        measures = [{'timestamp': test.isotime(datetime.datetime.utcnow()),
                      'value': 100}, {'timestamp': test.isotime(
-                         datetime.datetime.now() + datetime.timedelta(
+                         datetime.datetime.utcnow() + datetime.timedelta(
                              minutes=1)), 'value': 100}]
         # send measures(should cause the alarm to fire)
         self.metric_client.metric.add_measures(metric['id'], measures)
diff --git a/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py b/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py
index 67afadc..ce07262 100644
--- a/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py
+++ b/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py
@@ -45,10 +45,11 @@
 
     @decorators.idempotent_id('5d2c4452-4433-4438-899c-7711c01d3c50')
     def test_create_update_loadbalancer(self):
+        statuses = ['PENDING_UPDATE', 'ACTIVE']
         stack_identifier = self._create_stack()
         stack = self.client.stacks.get(stack_identifier)
         output = self._stack_output(stack, 'loadbalancer')
-        self.assertEqual('ONLINE', output['operating_status'])
+        self.assertIn(output['provisioning_status'], statuses)
         self.parameters['lb_algorithm'] = 'SOURCE_IP'
 
         self.update_stack(stack_identifier,
@@ -57,16 +58,17 @@
         stack = self.client.stacks.get(stack_identifier)
 
         output = self._stack_output(stack, 'loadbalancer')
-        self.assertEqual('ONLINE', output['operating_status'])
+        self.assertIn(output['provisioning_status'], statuses)
         output = self._stack_output(stack, 'pool')
         self.assertEqual('SOURCE_IP', output['lb_algorithm'])
 
     @decorators.idempotent_id('970e91af-1be8-4990-837b-66f9b5aff2b9')
     def test_add_delete_poolmember(self):
+        statuses = ['PENDING_UPDATE', 'ACTIVE']
         stack_identifier = self._create_stack()
         stack = self.client.stacks.get(stack_identifier)
         output = self._stack_output(stack, 'loadbalancer')
-        self.assertEqual('ONLINE', output['operating_status'])
+        self.assertIn(output['provisioning_status'], statuses)
         output = self._stack_output(stack, 'pool')
         self.assertEqual(1, len(output['members']))
         # add pool member
@@ -77,7 +79,7 @@
         stack = self.client.stacks.get(stack_identifier)
 
         output = self._stack_output(stack, 'loadbalancer')
-        self.assertEqual('ONLINE', output['operating_status'])
+        self.assertIn(output['provisioning_status'], statuses)
         output = self._stack_output(stack, 'pool')
         self.assertEqual(2, len(output['members']))
         # delete pool member
@@ -88,6 +90,6 @@
         stack = self.client.stacks.get(stack_identifier)
 
         output = self._stack_output(stack, 'loadbalancer')
-        self.assertEqual('ONLINE', output['operating_status'])
+        self.assertIn(output['provisioning_status'], statuses)
         output = self._stack_output(stack, 'pool')
         self.assertEqual(1, len(output['members']))
diff --git a/heat_tempest_plugin/tests/scenario/test_remote_deeply_nested.py b/heat_tempest_plugin/tests/scenario/test_remote_deeply_nested.py
new file mode 100644
index 0000000..ef05285
--- /dev/null
+++ b/heat_tempest_plugin/tests/scenario/test_remote_deeply_nested.py
@@ -0,0 +1,39 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import six
+import uuid
+
+from heat_tempest_plugin.tests.scenario import scenario_base
+from tempest.lib import decorators
+
+
+class RemoteDeeplyNestedStackTest(scenario_base.ScenarioTestsBase):
+    @decorators.idempotent_id('2ed94cae-da14-4060-a6b3-526e7a8cbbe4')
+    def test_remote_nested(self):
+        parameters = {
+            'name': 'remote-nested',
+            'network_name': self.conf.floating_network_name,
+        }
+
+        stack_id = self.launch_stack(
+            template_name='remote_nested_root.yaml',
+            parameters={'region': self.conf.region},
+            environment={'parameters': parameters}
+        )
+
+        stack = self.client.stacks.get(stack_id)
+        router_id = self._stack_output(stack, 'router')
+        self.assertIsInstance(router_id, six.string_types)
+        uuid.UUID(router_id)
+
+        self._stack_delete(stack_id)
diff --git a/heat_tempest_plugin/tests/scenario/test_server_software_config.py b/heat_tempest_plugin/tests/scenario/test_server_software_config.py
index 4d2f7dc..7da2853 100644
--- a/heat_tempest_plugin/tests/scenario/test_server_software_config.py
+++ b/heat_tempest_plugin/tests/scenario/test_server_software_config.py
@@ -27,14 +27,14 @@
 
 CFG3_PP = '''file {'barfile':
   ensure  => file,
-  mode    => 0644,
+  mode    => '0644',
   path    => "/tmp/$::bar",
   content => "$::foo",
 }
 file {'output_result':
   ensure  => file,
   path    => "$::heat_outputs_path.result",
-  mode    => 0644,
+  mode    => '0644',
   content => "The file /tmp/$::bar contains $::foo for server \
 $::deploy_server_id during $::deploy_action",
 }
@@ -153,8 +153,8 @@
         }
 
         files = {
-            'cfg1.sh': CFG1_SH,
-            'cfg3.pp': CFG3_PP
+            'file:///cfg1.sh': CFG1_SH,
+            'file:///cfg3.pp': CFG3_PP
         }
 
         env_files, env = template_utils.process_environment_and_files(
diff --git a/heat_tempest_plugin/tests/scenario/test_volumes.py b/heat_tempest_plugin/tests/scenario/test_volumes.py
index 57d0936..7dfa8bf 100644
--- a/heat_tempest_plugin/tests/scenario/test_volumes.py
+++ b/heat_tempest_plugin/tests/scenario/test_volumes.py
@@ -17,11 +17,13 @@
 from tempest.lib import decorators
 
 from heat_tempest_plugin.common import exceptions
+from heat_tempest_plugin.common import test
 from heat_tempest_plugin.tests.scenario import scenario_base
 
 LOG = logging.getLogger(__name__)
 
 
+@test.requires_service_feature('volume', 'backup')
 class VolumeBackupRestoreIntegrationTest(scenario_base.ScenarioTestsBase):
     """Class is responsible for testing of volume backup."""
 
diff --git a/setup.cfg b/setup.cfg
index d08460b..3bdd080 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,7 +4,7 @@
 description-file =
     README.rst
 author = OpenStack
-author-email = openstack-dev@lists.openstack.org
+author-email = openstack-discuss@lists.openstack.org
 home-page = http://docs.openstack.org/developer/heat-tempest-plugin
 classifier =
     Environment :: OpenStack
@@ -34,11 +34,6 @@
 setup-hooks =
     pbr.hooks.setup_hook
 
-[build_sphinx]
-all_files = 1
-build-dir = doc/build
-source-dir = doc/source
-
 [egg_info]
 tag_build =
 tag_date = 0
diff --git a/test-requirements.txt b/test-requirements.txt
index f6c0a00..c699d8c 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -4,5 +4,4 @@
 
 # Hacking already pins down pep8, pyflakes and flake8
 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
-openstackdocstheme>=1.18.1 # Apache-2.0
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+
diff --git a/tox.ini b/tox.ini
index 7b8aeec..45e17be 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,6 +12,7 @@
            testr run {posargs}
 
 [testenv:pep8]
+basepython = python3
 setenv =
     PYTHONPATH = .
 commands =
@@ -24,13 +25,8 @@
 commands =
     check-uuid --fix --package heat_tempest_plugin
 
-[testenv:docs]
-deps = -r{toxinidir}/requirements.txt
-       -r{toxinidir}/test-requirements.txt
-       sphinxcontrib-httpdomain
-commands = python setup.py build_sphinx
-
 [testenv:venv]
+basepython = python3
 commands = {posargs}
 
 [flake8]