diff --git a/common/test.py b/common/test.py
index 0eedbe3..d43dece 100644
--- a/common/test.py
+++ b/common/test.py
@@ -529,6 +529,20 @@
         stack_link = [l for l in r.links if l.get('rel') == 'stack'][0]
         return stack_link['href'].split("/")[-1]
 
+    def get_physical_resource_id(self, stack_identifier, resource_name):
+        try:
+            resource = self.client.resources.get(
+                stack_identifier, resource_name)
+            return resource.physical_resource_id
+        except Exception:
+            raise Exception('Resource (%s) not found in stack (%s)!' %
+                            (stack_identifier, resource_name))
+
+    def get_stack_output(self, stack_identifier, output_key,
+                         validate_errors=True):
+        stack = self.client.stacks.get(stack_identifier)
+        return self._stack_output(stack, output_key, validate_errors)
+
     def check_input_values(self, group_resources, key, value):
         # Check inputs for deployment and derived config
         for r in group_resources:
diff --git a/functional/test_create_update_neutron_trunk.py b/functional/test_create_update_neutron_trunk.py
new file mode 100644
index 0000000..b5a108a
--- /dev/null
+++ b/functional/test_create_update_neutron_trunk.py
@@ -0,0 +1,275 @@
+# Copyright (c) 2017 Ericsson.
+#
+#    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 copy
+import yaml
+
+from heat_integrationtests.functional import functional_base
+
+
+test_template = '''
+heat_template_version: pike
+description: Test template to create, update, delete trunk.
+resources:
+  parent_net:
+    type: OS::Neutron::Net
+  trunk_net_one:
+    type: OS::Neutron::Net
+  trunk_net_two:
+    type: OS::Neutron::Net
+  parent_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network: { get_resource: parent_net }
+      cidr: 10.0.0.0/16
+  trunk_subnet_one:
+    type: OS::Neutron::Subnet
+    properties:
+      network: { get_resource: trunk_net_one }
+      cidr: 10.10.0.0/16
+  trunk_subnet_two:
+    type: OS::Neutron::Subnet
+    properties:
+      network: { get_resource: trunk_net_two }
+      cidr: 10.20.0.0/16
+  parent_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: parent_net }
+      name: trunk_parent_port
+  sub_port_one:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: trunk_net_one }
+      name: trunk_sub_port_one
+  sub_port_two:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: trunk_net_two }
+      name: trunk_sub_port_two
+  trunk:
+    type: OS::Neutron::Trunk
+    properties:
+      name: test_trunk
+      port: { get_resource: parent_port }
+      sub_ports:
+outputs:
+  trunk_parent_port:
+    value: { get_attr: [trunk, port_id] }
+'''
+
+
+class UpdateTrunkTest(functional_base.FunctionalTestsBase):
+
+    @staticmethod
+    def _sub_ports_dict_to_set(sub_ports):
+        new_sub_ports = copy.deepcopy(sub_ports)
+
+        # NOTE(lajos katona): In the template we have to give the sub port as
+        # port, but from trunk_details we receive back them with port_id.
+        # As an extra trunk_details contains the mac_address as well which is
+        # useless here.
+        # So here we have to make sure that the dictionary (input from
+        # template or output from trunk_details) have the same keys:
+        if any('mac_address' in d for d in new_sub_ports):
+            for sp in new_sub_ports:
+                sp['port'] = sp['port_id']
+                del sp['port_id']
+                del sp['mac_address']
+
+        # NOTE(lajos katona): We receive lists (trunk_details['sub_ports'] and
+        # the input to the template) and we can't be sure that the order is the
+        # same, so by using sets we can compare them.
+        sub_ports_set = {frozenset(d.items()) for d in new_sub_ports}
+        return sub_ports_set
+
+    def test_add_first_sub_port(self):
+        stack_identifier = self.stack_create(template=test_template)
+
+        parsed_template = yaml.safe_load(test_template)
+        new_sub_port = [{'port': {'get_resource': 'sub_port_one'},
+                         'segmentation_id': 10,
+                         'segmentation_type': 'vlan'}]
+        parsed_template['resources']['trunk']['properties'][
+            'sub_ports'] = new_sub_port
+        updated_template = yaml.safe_dump(parsed_template)
+        self.update_stack(stack_identifier, updated_template)
+
+        # Fix the port_id in the template for assertion
+        new_sub_port[0]['port'] = self.get_physical_resource_id(
+            stack_identifier, 'sub_port_one')
+        parent_id = self.get_stack_output(
+            stack_identifier, 'trunk_parent_port')
+        parent_port = self.network_client.show_port(parent_id)['port']
+        trunk_sub_port = parent_port['trunk_details']['sub_ports']
+
+        self.assertEqual(self._sub_ports_dict_to_set(new_sub_port),
+                         self._sub_ports_dict_to_set(trunk_sub_port))
+
+    def test_add_a_second_sub_port(self):
+        parsed_template = yaml.safe_load(test_template)
+        sub_ports = [{'port': {'get_resource': 'sub_port_one'},
+                      'segmentation_type': 'vlan',
+                      'segmentation_id': 10}, ]
+        parsed_template['resources']['trunk']['properties'][
+            'sub_ports'] = sub_ports
+        template_with_sub_ports = yaml.safe_dump(parsed_template)
+
+        stack_identifier = self.stack_create(template=template_with_sub_ports)
+
+        new_sub_port = {'port': {'get_resource': 'sub_port_two'},
+                        'segmentation_id': 20,
+                        'segmentation_type': 'vlan'}
+        parsed_template['resources']['trunk']['properties'][
+            'sub_ports'].append(new_sub_port)
+
+        updated_template = yaml.safe_dump(parsed_template)
+
+        self.update_stack(stack_identifier, updated_template)
+
+        # Fix the port_ids in the templates for assertion
+        sub_ports[0]['port'] = self.get_physical_resource_id(
+            stack_identifier, 'sub_port_one')
+        new_sub_port['port'] = self.get_physical_resource_id(
+            stack_identifier, 'sub_port_two')
+        expected_sub_ports = [sub_ports[0], new_sub_port]
+
+        parent_id = self.get_stack_output(
+            stack_identifier, 'trunk_parent_port')
+        parent_port = self.network_client.show_port(parent_id)['port']
+        trunk_sub_ports = parent_port['trunk_details']['sub_ports']
+
+        self.assertEqual(self._sub_ports_dict_to_set(expected_sub_ports),
+                         self._sub_ports_dict_to_set(trunk_sub_ports))
+
+    def test_remove_sub_port_from_trunk(self):
+        sub_ports = [{'port': {'get_resource': 'sub_port_one'},
+                      'segmentation_type': 'vlan',
+                      'segmentation_id': 10},
+                     {'port': {'get_resource': 'sub_port_two'},
+                      'segmentation_type': 'vlan',
+                      'segmentation_id': 20}]
+        parsed_template = yaml.safe_load(test_template)
+        parsed_template['resources']['trunk']['properties'][
+            'sub_ports'] = sub_ports
+        template_with_sub_ports = yaml.safe_dump(parsed_template)
+
+        stack_identifier = self.stack_create(template=template_with_sub_ports)
+
+        sub_port_to_be_removed = {'port': {'get_resource': 'sub_port_two'},
+                                  'segmentation_type': 'vlan',
+                                  'segmentation_id': 20}
+        parsed_template['resources']['trunk'][
+            'properties']['sub_ports'].remove(sub_port_to_be_removed)
+        updated_template = yaml.safe_dump(parsed_template)
+
+        self.update_stack(stack_identifier, updated_template)
+
+        # Fix the port_ids in the templates for assertion
+        sub_ports[0]['port'] = self.get_physical_resource_id(
+            stack_identifier, 'sub_port_one')
+        expected_sub_ports = [sub_ports[0]]
+
+        parent_id = self.get_stack_output(
+            stack_identifier, 'trunk_parent_port')
+        parent_port = self.network_client.show_port(parent_id)['port']
+        trunk_sub_ports = parent_port['trunk_details']['sub_ports']
+
+        self.assertEqual(self._sub_ports_dict_to_set(expected_sub_ports),
+                         self._sub_ports_dict_to_set(trunk_sub_ports))
+
+    def test_remove_last_sub_port_from_trunk(self):
+        sub_ports = [{'port': {'get_resource': 'sub_port_one'},
+                      'segmentation_type': 'vlan',
+                      'segmentation_id': 10}]
+        parsed_template = yaml.safe_load(test_template)
+        parsed_template['resources']['trunk']['properties'][
+            'sub_ports'] = sub_ports
+
+        template_with_sub_ports = yaml.safe_dump(parsed_template)
+        stack_identifier = self.stack_create(template=template_with_sub_ports)
+
+        sub_port_to_be_removed = {'port': {'get_resource': 'sub_port_one'},
+                                  'segmentation_type': 'vlan',
+                                  'segmentation_id': 10}
+
+        parsed_template['resources']['trunk'][
+            'properties']['sub_ports'] = []
+        updated_template = yaml.safe_dump(parsed_template)
+
+        self.update_stack(stack_identifier, updated_template)
+
+        sub_port_to_be_removed['port'] = self.get_physical_resource_id(
+            stack_identifier, 'sub_port_one')
+        parent_id = self.get_stack_output(
+            stack_identifier, 'trunk_parent_port')
+        parent_port = self.network_client.show_port(parent_id)['port']
+        trunk_sub_ports = parent_port['trunk_details']['sub_ports']
+
+        self.assertNotEqual(
+            self._sub_ports_dict_to_set([sub_port_to_be_removed]),
+            self._sub_ports_dict_to_set(trunk_sub_ports))
+        self.assertFalse(trunk_sub_ports,
+                         'The returned sub ports (%s) in trunk_details is '
+                         'not empty!' % trunk_sub_ports)
+
+    def test_update_existing_sub_port_on_trunk(self):
+        sub_ports = [{'port': {'get_resource': 'sub_port_one'},
+                      'segmentation_type': 'vlan',
+                      'segmentation_id': 10}]
+        parsed_template = yaml.safe_load(test_template)
+        parsed_template['resources']['trunk']['properties'][
+            'sub_ports'] = sub_ports
+
+        template_with_sub_ports = yaml.safe_dump(parsed_template)
+        stack_identifier = self.stack_create(template=template_with_sub_ports)
+
+        sub_port_id = self.get_physical_resource_id(
+            stack_identifier, 'sub_port_one')
+        parsed_template['resources']['trunk']['properties']['sub_ports'][0][
+            'segmentation_id'] = 99
+        updated_template = yaml.safe_dump(parsed_template)
+
+        self.update_stack(stack_identifier, updated_template)
+        updated_sub_port = {'port': sub_port_id,
+                            'segmentation_type': 'vlan',
+                            'segmentation_id': 99}
+        parent_id = self.get_stack_output(
+            stack_identifier, 'trunk_parent_port')
+        parent_port = self.network_client.show_port(parent_id)['port']
+        trunk_sub_ports = parent_port['trunk_details']['sub_ports']
+
+        self.assertEqual(self._sub_ports_dict_to_set([updated_sub_port]),
+                         self._sub_ports_dict_to_set(trunk_sub_ports))
+
+    def test_update_trunk_name_and_description(self):
+        new_name = 'pineapple'
+        new_description = 'This is a test trunk'
+
+        stack_identifier = self.stack_create(template=test_template)
+        parsed_template = yaml.safe_load(test_template)
+        parsed_template['resources']['trunk']['properties']['name'] = new_name
+        parsed_template['resources']['trunk']['properties'][
+            'description'] = new_description
+        updated_template = yaml.safe_dump(parsed_template)
+        self.update_stack(stack_identifier, template=updated_template)
+
+        parent_id = self.get_stack_output(
+            stack_identifier, 'trunk_parent_port')
+        parent_port = self.network_client.show_port(parent_id)['port']
+        trunk_id = parent_port['trunk_details']['trunk_id']
+
+        trunk = self.network_client.show_trunk(trunk_id)['trunk']
+        self.assertEqual(new_name, trunk['name'])
+        self.assertEqual(new_description, trunk['description'])
diff --git a/functional/test_resources_list.py b/functional/test_resources_list.py
index 257afc5..f57cf67 100644
--- a/functional/test_resources_list.py
+++ b/functional/test_resources_list.py
@@ -41,3 +41,10 @@
                                              filters={'name': 'test2'})
 
         self.assertEqual('CREATE_COMPLETE', test2.resource_status)
+
+    def test_required_by(self):
+        stack_identifier = self.stack_create(template=test_template_depend)
+        [test1] = self.client.resources.list(stack_identifier,
+                                             filters={'name': 'test1'})
+
+        self.assertEqual(['test2'], test1.required_by)
diff --git a/functional/test_stack_outputs.py b/functional/test_stack_outputs.py
index 536e589..161e0b3 100644
--- a/functional/test_stack_outputs.py
+++ b/functional/test_stack_outputs.py
@@ -61,3 +61,41 @@
             stack_identifier, 'resource_output_b')['output']
         self.assertEqual(expected_output_a, actual_output_a)
         self.assertEqual(expected_output_b, actual_output_b)
+
+    before_template = '''
+heat_template_version: 2015-10-15
+resources:
+  test_resource_a:
+    type: OS::Heat::TestResource
+    properties:
+      value: 'foo'
+outputs:
+'''
+
+    after_template = '''
+heat_template_version: 2015-10-15
+resources:
+  test_resource_a:
+    type: OS::Heat::TestResource
+    properties:
+      value: 'foo'
+  test_resource_b:
+    type: OS::Heat::TestResource
+    properties:
+      value: {get_attr: [test_resource_a, output]}
+outputs:
+  output_value:
+    description: 'Output of resource b'
+    value: {get_attr: [test_resource_b, output]}
+'''
+
+    def test_outputs_update_new_resource(self):
+        stack_identifier = self.stack_create(template=self.before_template)
+        self.update_stack(stack_identifier, template=self.after_template)
+
+        expected_output_value = {
+            u'output_value': u'foo', u'output_key': u'output_value',
+            u'description': u'Output of resource b'}
+        actual_output_value = self.client.stacks.output_show(
+            stack_identifier, 'output_value')['output']
+        self.assertEqual(expected_output_value, actual_output_value)
diff --git a/scenario/templates/test_base_resources.yaml b/scenario/templates/test_base_resources.yaml
new file mode 100644
index 0000000..bff6185
--- /dev/null
+++ b/scenario/templates/test_base_resources.yaml
@@ -0,0 +1,110 @@
+heat_template_version: 2014-10-16
+
+description: >
+  This HOT template that just defines a single server.
+  Contains just base features to verify base heat support.
+
+parameters:
+  key_name:
+    type: string
+    default: key-01
+    description: Name of an existing key pair to use for the server
+  flavor:
+    type: string
+    description: Flavor for the server to be created
+    default: m1.small
+    constraints:
+      - custom_constraint: nova.flavor
+  image:
+    type: string
+    description: Image ID or image name to use for the server
+    constraints:
+      - custom_constraint: glance.image
+  vol_size:
+    type: number
+    description: The size of the Cinder volume
+    default: 1
+  private_net_name:
+    type: string
+    default: private-net-01
+    description: Name of private network to be created
+  private_net_cidr:
+    type: string
+    default: 192.168.101.0/24
+    description: Private network address (CIDR notation)
+  private_net_gateway:
+    type: string
+    default: 192.168.101.1
+    description: Private network gateway address
+  private_net_pool_start:
+    type: string
+    default: 192.168.101.2
+    description: Start of private network IP address allocation pool
+  private_net_pool_end:
+    type: string
+    default: 192.168.101.127
+    description: End of private network IP address allocation pool
+  echo_foo:
+    default: fooooo
+    type: string
+
+resources:
+  private_net:
+    type: OS::Neutron::Net
+    properties:
+      name: { get_param: private_net_name }
+
+  private_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: private_net }
+      cidr: { get_param: private_net_cidr }
+      gateway_ip: { get_param: private_net_gateway }
+      allocation_pools:
+        - start: { get_param: private_net_pool_start }
+          end: { get_param: private_net_pool_end }
+
+  server_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: private_net }
+      fixed_ips:
+        - subnet_id: { get_resource: private_subnet }
+
+  key:
+    type: OS::Nova::KeyPair
+    properties:
+      name: { get_param: key_name }
+
+  server:
+    type: OS::Nova::Server
+    properties:
+      key_name: { get_resource: key }
+      image: { get_param: image }
+      flavor: { get_param: flavor }
+      networks:
+        - port: { get_resource: server_port }
+      user_data:
+        str_replace:
+          template: |
+            #!/bin/bash
+            echo echo_foo
+          params:
+            echo_foo: { get_param: echo_foo }
+
+  vol:
+    type: OS::Cinder::Volume
+    properties:
+      size: { get_param: vol_size }
+
+  vol_att:
+    type: OS::Cinder::VolumeAttachment
+    properties:
+      instance_uuid: { get_resource: server }
+      volume_id: { get_resource: vol }
+      mountpoint: /dev/vdb
+
+outputs:
+  server_networks:
+    description: The networks of the deployed server
+    value: { get_attr: [server, networks] }
diff --git a/scenario/test_base_resources.py b/scenario/test_base_resources.py
new file mode 100644
index 0000000..80194a0
--- /dev/null
+++ b/scenario/test_base_resources.py
@@ -0,0 +1,73 @@
+#    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.
+
+from heat_integrationtests.common import test
+from heat_integrationtests.scenario import scenario_base
+from heatclient.common import template_utils
+
+
+class BasicResourcesTest(scenario_base.ScenarioTestsBase):
+
+    def setUp(self):
+        super(BasicResourcesTest, self).setUp()
+        if not self.conf.image_ref:
+            raise self.skipException("No image configured to test")
+        if not self.conf.instance_type:
+            raise self.skipException("No flavor configured to test")
+
+    def check_stack(self):
+        sid = self.stack_identifier
+        # Check that stack were created
+        self._wait_for_stack_status(sid, 'CREATE_COMPLETE')
+        server_resource = self.client.resources.get(sid, 'server')
+        server_id = server_resource.physical_resource_id
+        server = self.compute_client.servers.get(server_id)
+        self.assertEqual(server.id, server_id)
+
+        stack = self.client.stacks.get(sid)
+
+        server_networks = self._stack_output(stack, 'server_networks')
+        self.assertIn(self.private_net_name, server_networks)
+
+    def test_base_resources_integration(self):
+        """Define test for base resources interation from core porjects
+
+        The alternative scenario is the following:
+            1. Create a stack with basic resources from core projects.
+            2. Check that all stack resources are created successfully.
+            3. Wait for deployment.
+            4. Check that stack was created.
+            5. Check stack outputs.
+        """
+
+        self.private_net_name = test.rand_name('heat-net')
+        parameters = {
+            'key_name': test.rand_name('heat-key'),
+            'flavor': self.conf.instance_type,
+            'image': self.conf.image_ref,
+            'vol_size': self.conf.volume_size,
+            'private_net_name': self.private_net_name
+        }
+
+        env_files, env = template_utils.process_environment_and_files(
+            self.conf.boot_config_env)
+
+        # Launch stack
+        self.stack_identifier = self.launch_stack(
+            template_name='test_base_resources.yaml',
+            parameters=parameters,
+            expected_status=None,
+            environment=env
+        )
+
+        # Check stack
+        self.check_stack()
