diff --git a/.zuul.yaml b/.zuul.yaml
index 1f8c71e..9aa86b9 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -121,7 +121,6 @@
         DEFAULT_INSTANCE_TYPE: ds512M
         DEFAULT_INSTANCE_USER: ubuntu
         BUILD_TIMEOUT: 784
-        LIBVIRT_TYPE: kvm
       devstack_services:
         cinder: true
 
@@ -243,3 +242,4 @@
       - neutron-tempest-plugin-jobs-queens
       - check-requirements
       - tempest-plugin-jobs
+      - release-notes-jobs-python3
diff --git a/README.rst b/README.rst
index b3883b8..3d8a49b 100644
--- a/README.rst
+++ b/README.rst
@@ -10,3 +10,4 @@
 * Documentation: https://docs.openstack.org/neutron/latest/
 * Source: https://git.openstack.org/cgit/openstack/neutron-tempest-plugin
 * Bugs: https://bugs.launchpad.net/neutron
+* Release notes: https://docs.openstack.org/releasenotes/neutron-tempest-plugin/
diff --git a/neutron_tempest_plugin/api/admin/test_tag.py b/neutron_tempest_plugin/api/admin/test_tag.py
index 05db644..c0210a2 100644
--- a/neutron_tempest_plugin/api/admin/test_tag.py
+++ b/neutron_tempest_plugin/api/admin/test_tag.py
@@ -212,13 +212,7 @@
     def _create_resource(cls):
         network = cls.create_network()
         parent_port = cls.create_port(network)
-        trunk = cls.client.create_trunk(parent_port['id'], None)
-        return trunk['trunk']['id']
-
-    @classmethod
-    def resource_cleanup(cls):
-        cls.client.delete_trunk(cls.res_id)
-        super(TagTrunkTestJSON, cls).resource_cleanup()
+        return cls.create_trunk(parent_port)['id']
 
     @decorators.attr(type='smoke')
     @decorators.idempotent_id('4c63708b-c4c3-407c-8101-7a9593882f5f')
@@ -467,14 +461,7 @@
     def _create_resource(cls):
         network = cls.create_network()
         parent_port = cls.create_port(network)
-        trunk = cls.client.create_trunk(parent_port['id'], None)
-        return trunk['trunk']['id']
-
-    @classmethod
-    def resource_cleanup(cls):
-        for res_id in cls.res_ids:
-            cls.client.delete_trunk(res_id)
-        super(TagFilterTrunkTestJSON, cls).resource_cleanup()
+        return cls.create_trunk(parent_port)['id']
 
     def _list_resource(self, filters):
         res = self.client.list_trunks(**filters)
diff --git a/neutron_tempest_plugin/api/test_trunk.py b/neutron_tempest_plugin/api/test_trunk.py
index 1a000fd..823a95d 100644
--- a/neutron_tempest_plugin/api/test_trunk.py
+++ b/neutron_tempest_plugin/api/test_trunk.py
@@ -14,7 +14,6 @@
 
 from tempest.common import utils
 from tempest.lib.common.utils import data_utils
-from tempest.lib.common.utils import test_utils
 from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 
@@ -22,18 +21,7 @@
 from neutron_tempest_plugin import config
 
 
-def trunks_cleanup(client, trunks):
-    for trunk in trunks:
-        # NOTE(armax): deleting a trunk with subports is permitted, however
-        # for testing purposes it is safer to be explicit and clean all the
-        # resources associated with the trunk beforehand.
-        subports = test_utils.call_and_ignore_notfound_exc(
-            client.get_subports, trunk['id'])
-        if subports:
-            client.remove_subports(
-                trunk['id'], subports['sub_ports'])
-        test_utils.call_and_ignore_notfound_exc(
-            client.delete_trunk, trunk['id'])
+CONF = config.CONF
 
 
 class TrunkTestJSONBase(base.BaseAdminNetworkTest):
@@ -41,51 +29,51 @@
     required_extensions = ['trunk']
 
     def setUp(self):
+        base.BaseAdminNetworkTest.setUp(self)
+        # This avoids problems due to user quotas
+        self.resource_setup()
         self.addCleanup(self.resource_cleanup)
-        super(TrunkTestJSONBase, self).setUp()
-
-    @classmethod
-    def resource_setup(cls):
-        super(TrunkTestJSONBase, cls).resource_setup()
-        cls.trunks = []
-
-    @classmethod
-    def resource_cleanup(cls):
-        trunks_cleanup(cls.client, cls.trunks)
-        super(TrunkTestJSONBase, cls).resource_cleanup()
 
     @classmethod
     def is_type_driver_enabled(cls, type_driver):
         return (type_driver in
-                config.CONF.neutron_plugin_options.available_type_drivers)
+                CONF.neutron_plugin_options.available_type_drivers)
 
-    def _create_trunk_with_network_and_parent(
-            self, subports, parent_network_type=None, **kwargs):
+    @classmethod
+    def _create_trunk_with_network_and_parent(cls, subports=None,
+                                              parent_network_type=None,
+                                              **kwargs):
         client = None
         network_kwargs = {}
         if parent_network_type:
-            client = self.admin_client
+            client = cls.admin_client
             network_kwargs = {"provider:network_type": parent_network_type,
-                              "tenant_id": self.client.tenant_id}
-        network = self.create_network(client=client, **network_kwargs)
-        parent_port = self.create_port(network)
-        trunk = self.client.create_trunk(parent_port['id'], subports, **kwargs)
-        self.trunks.append(trunk['trunk'])
-        return trunk
+                              "tenant_id": cls.client.tenant_id}
+        network = cls.create_network(client=client, **network_kwargs)
+        parent_port = cls.create_port(network)
+        return cls.create_trunk(parent_port, subports, **kwargs)
 
-    def _show_trunk(self, trunk_id):
-        return self.client.show_trunk(trunk_id)
+    @classmethod
+    def _show_trunk(cls, trunk):
+        client = trunk.get('client') or cls.client
+        return client.show_trunk(trunk['id'])['trunk']
 
-    def _list_trunks(self):
-        return self.client.list_trunks()
+    @classmethod
+    def _update_trunk(cls, trunk, **kwargs):
+        client = trunk.get('client') or cls.client
+        return client.update_trunk(trunk['id'], **kwargs)['trunk']
+
+    @classmethod
+    def _list_trunks(cls):
+        return cls.client.list_trunks()['trunks']
 
 
 class TrunkTestJSON(TrunkTestJSONBase):
 
     def _test_create_trunk(self, subports):
         trunk = self._create_trunk_with_network_and_parent(subports)
-        observed_trunk = self._show_trunk(trunk['trunk']['id'])
-        self.assertEqual(trunk, observed_trunk)
+        observed_trunk = self._show_trunk(trunk)
+        self.assertEqual(trunk, dict(observed_trunk, client=trunk['client']))
 
     @decorators.idempotent_id('e1a6355c-4768-41f3-9bf8-0f1d192bd501')
     def test_create_trunk_empty_subports_list(self):
@@ -97,79 +85,69 @@
 
     @decorators.idempotent_id('7de46c22-e2b6-4959-ac5a-0e624632ab32')
     def test_create_show_delete_trunk(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
-        trunk_id = trunk['trunk']['id']
-        parent_port_id = trunk['trunk']['port_id']
-        res = self._show_trunk(trunk_id)
-        self.assertEqual(trunk_id, res['trunk']['id'])
-        self.assertEqual(parent_port_id, res['trunk']['port_id'])
-        self.client.delete_trunk(trunk_id)
-        self.assertRaises(lib_exc.NotFound, self._show_trunk, trunk_id)
+        trunk = self._create_trunk_with_network_and_parent()
+        observed_trunk = self._show_trunk(trunk)
+        self.assertEqual(trunk, dict(observed_trunk, client=trunk['client']))
+        self.delete_trunk(trunk)
+        self.assertRaises(lib_exc.NotFound, self._show_trunk, trunk)
 
     @decorators.idempotent_id('8d83a6ca-662d-45b8-8062-d513077296aa')
     @utils.requires_ext(extension="project-id", service="network")
     def test_show_trunk_has_project_id(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
-        body = self._show_trunk(trunk['trunk']['id'])
-        show_trunk = body['trunk']
-        self.assertIn('project_id', show_trunk)
-        self.assertIn('tenant_id', show_trunk)
-        self.assertEqual(self.client.tenant_id, show_trunk['project_id'])
-        self.assertEqual(self.client.tenant_id, show_trunk['tenant_id'])
+        trunk = self._create_trunk_with_network_and_parent()
+        observed_trunk = self._show_trunk(trunk)
+        for key in ['project_id', 'tenant_id']:
+            self.assertIn(key, observed_trunk)
+            self.assertEqual(self.client.tenant_id, observed_trunk[key])
 
     @decorators.idempotent_id('4ce46c22-a2b6-4659-bc5a-0ef2463cab32')
     def test_create_update_trunk(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
-        rev = trunk['trunk']['revision_number']
-        trunk_id = trunk['trunk']['id']
-        res = self._show_trunk(trunk_id)
-        self.assertTrue(res['trunk']['admin_state_up'])
-        self.assertEqual(rev, res['trunk']['revision_number'])
-        self.assertEqual("", res['trunk']['name'])
-        self.assertEqual("", res['trunk']['description'])
-        res = self.client.update_trunk(
-            trunk_id, name='foo', admin_state_up=False)
-        self.assertFalse(res['trunk']['admin_state_up'])
-        self.assertEqual("foo", res['trunk']['name'])
-        self.assertGreater(res['trunk']['revision_number'], rev)
-        # enable the trunk so that it can be managed
-        self.client.update_trunk(trunk_id, admin_state_up=True)
+        trunk = self._create_trunk_with_network_and_parent()
+        observed_trunk = self._show_trunk(trunk)
+        self.assertTrue(observed_trunk['admin_state_up'])
+        self.assertEqual(trunk['revision_number'],
+                         observed_trunk['revision_number'])
+        self.assertEqual("", observed_trunk['name'])
+        self.assertEqual("", observed_trunk['description'])
+        updated_trunk = self._update_trunk(trunk, name='foo',
+                                           admin_state_up=False)
+        self.assertFalse(updated_trunk['admin_state_up'])
+        self.assertEqual("foo", updated_trunk['name'])
+        self.assertGreater(updated_trunk['revision_number'],
+                           trunk['revision_number'])
 
     @decorators.idempotent_id('5ff46c22-a2b6-5559-bc5a-0ef2463cab32')
     def test_create_update_trunk_with_description(self):
         trunk = self._create_trunk_with_network_and_parent(
-            None, description="foo description")
-        trunk_id = trunk['trunk']['id']
-        self.assertEqual("foo description", trunk['trunk']['description'])
-        trunk = self.client.update_trunk(trunk_id, description='')
-        self.assertEqual('', trunk['trunk']['description'])
+            description="foo description")
+        self.assertEqual("foo description", trunk['description'])
+        updated_trunk = self._update_trunk(trunk, description='')
+        self.assertEqual('', updated_trunk['description'])
 
     @decorators.idempotent_id('73365f73-bed6-42cd-960b-ec04e0c99d85')
     def test_list_trunks(self):
-        trunk1 = self._create_trunk_with_network_and_parent(None)
-        trunk2 = self._create_trunk_with_network_and_parent(None)
-        expected_trunks = {trunk1['trunk']['id']: trunk1['trunk'],
-                           trunk2['trunk']['id']: trunk2['trunk']}
-        trunk_list = self._list_trunks()['trunks']
-        matched_trunks = [x for x in trunk_list if x['id'] in expected_trunks]
-        self.assertEqual(2, len(matched_trunks))
-        for trunk in matched_trunks:
-            self.assertEqual(expected_trunks[trunk['id']], trunk)
+        trunk1 = self._create_trunk_with_network_and_parent()
+        trunk2 = self._create_trunk_with_network_and_parent()
+        expected_trunks = {trunk1['id']: trunk1,
+                           trunk2['id']: trunk2}
+        observed_trunks = {trunk['id']: dict(trunk, client=self.client)
+                           for trunk in self._list_trunks()
+                           if trunk['id'] in expected_trunks}
+        self.assertEqual(expected_trunks, observed_trunks)
 
     @decorators.idempotent_id('bb5fcead-09b5-484a-bbe6-46d1e06d6cc0')
-    def test_add_subport(self):
-        trunk = self._create_trunk_with_network_and_parent([])
+    def test_add_subports(self):
+        trunk = self._create_trunk_with_network_and_parent()
         network = self.create_network()
         port = self.create_port(network)
         subports = [{'port_id': port['id'],
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
-        self.client.add_subports(trunk['trunk']['id'], subports)
-        trunk = self._show_trunk(trunk['trunk']['id'])
-        observed_subports = trunk['trunk']['sub_ports']
-        self.assertEqual(1, len(observed_subports))
-        created_subport = observed_subports[0]
-        self.assertEqual(subports[0], created_subport)
+        added_subports = self.client.add_subports(trunk['id'],
+                                                  subports)['sub_ports']
+        self.assertEqual(subports, added_subports)
+        observed_trunk = self._show_trunk(trunk)
+        self.assertEqual(subports, observed_trunk['sub_ports'])
 
     @decorators.idempotent_id('ee5fcead-1abf-483a-bce6-43d1e06d6aa0')
     def test_delete_trunk_with_subport_is_allowed(self):
@@ -179,38 +157,27 @@
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
         trunk = self._create_trunk_with_network_and_parent(subports)
-        self.client.delete_trunk(trunk['trunk']['id'])
+        self.client.delete_trunk(trunk['id'])
 
     @decorators.idempotent_id('96eea398-a03c-4c3e-a99e-864392c2ca53')
     def test_remove_subport(self):
-        subport_parent1 = self.create_port(self.create_network())
-        subport_parent2 = self.create_port(self.create_network())
-        subports = [{'port_id': subport_parent1['id'],
-                     'segmentation_type': 'vlan',
-                     'segmentation_id': 2},
-                    {'port_id': subport_parent2['id'],
-                     'segmentation_type': 'vlan',
-                     'segmentation_id': 4}]
-        trunk = self._create_trunk_with_network_and_parent(subports)
-        removed_subport = trunk['trunk']['sub_ports'][0]
-        expected_subport = None
-
-        for subport in subports:
-            if subport['port_id'] != removed_subport['port_id']:
-                expected_subport = subport
-                break
+        subport1 = {'port_id': self.create_port(self.create_network())['id'],
+                    'segmentation_type': 'vlan',
+                    'segmentation_id': 2}
+        subport2 = {'port_id': self.create_port(self.create_network())['id'],
+                    'segmentation_type': 'vlan',
+                    'segmentation_id': 4}
+        trunk = self._create_trunk_with_network_and_parent([subport1,
+                                                            subport2])
 
         # Remove the subport and validate PUT response
-        res = self.client.remove_subports(trunk['trunk']['id'],
-                                          [removed_subport])
-        self.assertEqual(1, len(res['sub_ports']))
-        self.assertEqual(expected_subport, res['sub_ports'][0])
+        subports_after_remove = self.client.remove_subports(
+            trunk['id'], [subport2])['sub_ports']
+        self.assertEqual([subport1], subports_after_remove)
 
         # Validate the results of a subport list
-        trunk = self._show_trunk(trunk['trunk']['id'])
-        observed_subports = trunk['trunk']['sub_ports']
-        self.assertEqual(1, len(observed_subports))
-        self.assertEqual(expected_subport, observed_subports[0])
+        observed_trunk = self._show_trunk(trunk)
+        self.assertEqual([subport1], observed_trunk['sub_ports'])
 
     @decorators.idempotent_id('bb5fcaad-09b5-484a-dde6-4cd1ea6d6ff0')
     def test_get_subports(self):
@@ -220,9 +187,8 @@
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
         trunk = self._create_trunk_with_network_and_parent(subports)
-        trunk = self.client.get_subports(trunk['trunk']['id'])
-        observed_subports = trunk['sub_ports']
-        self.assertEqual(1, len(observed_subports))
+        observed_subports = self.client.get_subports(trunk['id'])['sub_ports']
+        self.assertEqual(subports, observed_subports)
 
 
 class TrunkTestInheritJSONBase(TrunkTestJSONBase):
@@ -233,41 +199,43 @@
     def skip_checks(cls):
         super(TrunkTestInheritJSONBase, cls).skip_checks()
         if ("vlan" not in
-                config.CONF.neutron_plugin_options.available_type_drivers):
+                CONF.neutron_plugin_options.available_type_drivers):
             raise cls.skipException("VLAN type_driver is not enabled")
-        if not config.CONF.neutron_plugin_options.provider_vlans:
+        if not CONF.neutron_plugin_options.provider_vlans:
             raise cls.skipException("No provider VLAN networks available")
 
     def create_provider_network(self):
-        foo_net = config.CONF.neutron_plugin_options.provider_vlans[0]
+        foo_net = CONF.neutron_plugin_options.provider_vlans[0]
         return self.create_network(name=data_utils.rand_name('vlan-net'),
                                    provider_network_type='vlan',
                                    provider_physical_network=foo_net)
 
     @decorators.idempotent_id('0f05d98e-41f5-4629-dada-9aee269c9602')
     def test_add_subport(self):
-        trunk_network = self.create_provider_network()
-        trunk_port = self.create_port(trunk_network)
-        subport_networks = [
-            self.create_provider_network(),
-            self.create_provider_network(),
-        ]
-        subport1 = self.create_port(subport_networks[0])
-        subport2 = self.create_port(subport_networks[1])
+        parent_network = self.create_provider_network()
+        parent_port = self.create_port(parent_network)
+        subport_network1 = self.create_provider_network()
+        segmentation_id1 = subport_network1['provider:segmentation_id']
+        subport_network2 = self.create_provider_network()
+        segmentation_id2 = subport_network2['provider:segmentation_id']
+        subport1 = self.create_port(subport_network1)
+        subport2 = self.create_port(subport_network2)
         subports = [{'port_id': subport1['id'],
-                     'segmentation_type': 'inherit',
-                     'segmentation_id': subport1['id']},
+                     'segmentation_type': 'inherit'},
                     {'port_id': subport2['id'],
-                     'segmentation_type': 'inherit',
-                     'segmentation_id': subport2['id']}]
-        trunk = self.client.create_trunk(trunk_port['id'], subports)['trunk']
-        self.trunks.append(trunk)
+                     'segmentation_type': 'inherit'}]
+
+        trunk = self.create_trunk(parent_port, subports)
+
+        expected_subports = [{'port_id': subport1['id'],
+                              'segmentation_type': 'vlan',
+                              'segmentation_id': segmentation_id1},
+                             {'port_id': subport2['id'],
+                              'segmentation_type': 'vlan',
+                              'segmentation_id': segmentation_id2}]
+
         # Validate that subport got segmentation details from the network
-        for i in range(2):
-            self.assertEqual(subport_networks[i]['provider:network_type'],
-                             trunk['sub_ports'][i]['segmentation_type'])
-            self.assertEqual(subport_networks[i]['provider:segmentation_id'],
-                             trunk['sub_ports'][i]['segmentation_id'])
+        self.assertEqual(expected_subports, trunk['sub_ports'])
 
 
 class TrunkTestMtusJSONBase(TrunkTestJSONBase):
@@ -306,19 +274,16 @@
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
 
-        trunk = self.client.create_trunk(self.larger_mtu_port['id'], subports)
-        self.trunks.append(trunk['trunk'])
+        self.create_trunk(self.larger_mtu_port, subports)
 
     @decorators.idempotent_id('2004c5c6-e557-4c43-8100-c820ad4953e8')
-    def test_add_subport_with_mtu_smaller_than_trunk(self):
+    def test_add_subport_with_mtu_greater_than_subport(self):
         subports = [{'port_id': self.smaller_mtu_port['id'],
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
 
-        trunk = self.client.create_trunk(self.larger_mtu_port['id'], None)
-        self.trunks.append(trunk['trunk'])
-
-        self.client.add_subports(trunk['trunk']['id'], subports)
+        trunk = self.create_trunk(self.larger_mtu_port)
+        self.client.add_subports(trunk['id'], subports)
 
     @decorators.idempotent_id('22725101-f4bc-4e00-84ec-4e02cd7e0500')
     def test_create_trunk_with_mtu_equal_to_subport(self):
@@ -326,9 +291,7 @@
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
 
-        trunk = self.client.create_trunk(self.smaller_mtu_port_2['id'],
-                                         subports)
-        self.trunks.append(trunk['trunk'])
+        self.create_trunk(self.smaller_mtu_port_2, subports)
 
     @decorators.idempotent_id('175b05ae-66ad-44c7-857a-a12d16f1058f')
     def test_add_subport_with_mtu_equal_to_trunk(self):
@@ -336,10 +299,8 @@
                      'segmentation_type': 'vlan',
                      'segmentation_id': 2}]
 
-        trunk = self.client.create_trunk(self.smaller_mtu_port_2['id'], None)
-        self.trunks.append(trunk['trunk'])
-
-        self.client.add_subports(trunk['trunk']['id'], subports)
+        trunk = self.create_trunk(self.smaller_mtu_port_2)
+        self.client.add_subports(trunk['id'], subports)
 
 
 class TrunksSearchCriteriaTest(base.BaseSearchCriteriaTest):
@@ -350,17 +311,10 @@
     @classmethod
     def resource_setup(cls):
         super(TrunksSearchCriteriaTest, cls).resource_setup()
-        cls.trunks = []
         net = cls.create_network(network_name='trunk-search-test-net')
         for name in cls.resource_names:
             parent_port = cls.create_port(net)
-            trunk = cls.client.create_trunk(parent_port['id'], [], name=name)
-            cls.trunks.append(trunk['trunk'])
-
-    @classmethod
-    def resource_cleanup(cls):
-        trunks_cleanup(cls.client, cls.trunks)
-        super(TrunksSearchCriteriaTest, cls).resource_cleanup()
+            cls.create_trunk(parent_port, name=name)
 
     @decorators.idempotent_id('fab73df4-960a-4ae3-87d3-60992b8d3e2d')
     def test_list_sorts_asc(self):
diff --git a/neutron_tempest_plugin/api/test_trunk_details.py b/neutron_tempest_plugin/api/test_trunk_details.py
index 972f216..bc8a2ea 100644
--- a/neutron_tempest_plugin/api/test_trunk_details.py
+++ b/neutron_tempest_plugin/api/test_trunk_details.py
@@ -23,14 +23,13 @@
 
     @decorators.idempotent_id('f0bed24f-d36a-498b-b4e7-0d66e3fb7308')
     def test_port_resource_trunk_details_no_subports(self):
-        trunk = self._create_trunk_with_network_and_parent([])
-        port = self.client.show_port(trunk['trunk']['port_id'])
+        trunk = self._create_trunk_with_network_and_parent()
+        parent_port = self.client.show_port(trunk['port_id'])['port']
+        observed_trunk_details = parent_port.get('trunk_details')
         expected_trunk_details = {'sub_ports': [],
-                                  'trunk_id': trunk['trunk']['id']}
-        observed_trunk_details = port['port'].get('trunk_details')
+                                  'trunk_id': trunk['id']}
         self.assertIsNotNone(observed_trunk_details)
-        self.assertEqual(expected_trunk_details,
-                         observed_trunk_details)
+        self.assertEqual(expected_trunk_details, observed_trunk_details)
 
     @decorators.idempotent_id('544bcaf2-86fb-4930-93ab-ece1c3cc33df')
     def test_port_resource_trunk_details_with_subport(self):
@@ -40,19 +39,19 @@
                         'segmentation_type': 'vlan',
                         'segmentation_id': 2}
         trunk = self._create_trunk_with_network_and_parent([subport_data])
-        subport_data['mac_address'] = subport['mac_address']
-        parent_port = self.client.show_port(trunk['trunk']['port_id'])
-        expected_trunk_details = {'sub_ports': [subport_data],
-                                  'trunk_id': trunk['trunk']['id']}
-        observed_trunk_details = parent_port['port'].get('trunk_details')
+        parent_port = self.client.show_port(trunk['port_id'])['port']
+        observed_trunk_details = parent_port.get('trunk_details')
+        expected_subport_data = dict(subport_data,
+                                     mac_address=subport['mac_address'])
+        expected_trunk_details = {'sub_ports': [expected_subport_data],
+                                  'trunk_id': trunk['id']}
         self.assertIsNotNone(observed_trunk_details)
-        self.assertEqual(expected_trunk_details,
-                         observed_trunk_details)
+        self.assertEqual(expected_trunk_details, observed_trunk_details)
 
     @decorators.idempotent_id('fe6d865f-1d5c-432e-b65d-904157172f24')
     def test_port_resource_empty_trunk_details(self):
         network = self.create_network()
         port = self.create_port(network)
-        port = self.client.show_port(port['id'])
-        observed_trunk_details = port['port'].get('trunk_details')
+        observed_port = self.client.show_port(port['id'])['port']
+        observed_trunk_details = observed_port.get('trunk_details')
         self.assertIsNone(observed_trunk_details)
diff --git a/neutron_tempest_plugin/api/test_trunk_negative.py b/neutron_tempest_plugin/api/test_trunk_negative.py
index 4d7ead1..85beb4e 100644
--- a/neutron_tempest_plugin/api/test_trunk_negative.py
+++ b/neutron_tempest_plugin/api/test_trunk_negative.py
@@ -19,6 +19,9 @@
 import testtools
 
 from neutron_tempest_plugin.api import test_trunk
+from neutron_tempest_plugin import config
+
+CONF = config.CONF
 
 
 class TrunkTestJSON(test_trunk.TrunkTestJSONBase):
@@ -43,9 +46,9 @@
     @decorators.attr(type='negative')
     @decorators.idempotent_id('a5c5200a-72a0-43c5-a11a-52f808490344')
     def test_create_subport_nonexistent_port_id(self):
-        trunk = self._create_trunk_with_network_and_parent([])
+        trunk = self._create_trunk_with_network_and_parent()
         self.assertRaises(lib_exc.NotFound, self.client.add_subports,
-                          trunk['trunk']['id'],
+                          trunk['id'],
                           [{'port_id': uuidutils.generate_uuid(),
                             'segmentation_type': 'vlan',
                             'segmentation_id': 2}])
@@ -64,11 +67,11 @@
     @decorators.attr(type='negative')
     @decorators.idempotent_id('7e0f99ab-fe37-408b-a889-9e44ef300084')
     def test_create_subport_missing_segmentation_id(self):
-        trunk = self._create_trunk_with_network_and_parent([])
+        trunk = self._create_trunk_with_network_and_parent()
         subport_network = self.create_network()
         parent_port = self.create_port(subport_network)
         self.assertRaises(lib_exc.BadRequest, self.client.add_subports,
-                          trunk['trunk']['id'],
+                          trunk['id'],
                           [{'port_id': parent_port['id'],
                             'segmentation_type': 'vlan'}])
 
@@ -109,41 +112,43 @@
         if not self.is_type_driver_enabled('vxlan'):
             msg = "Vxlan type driver must be enabled for this test."
             raise self.skipException(msg)
+        if not CONF.neutron_plugin_options.provider_vlans:
+            raise self.skipException("No provider VLAN networks available")
 
         trunk = self._create_trunk_with_network_and_parent(
-            subports=[], parent_network_type='vxlan')
+            parent_network_type='vxlan')
         subport_network = self.create_network()
-        parent_port = self.create_port(subport_network)
+        subport = self.create_port(subport_network)
         self.assertRaises(lib_exc.BadRequest, self.client.add_subports,
-                          trunk['trunk']['id'],
-                          [{'port_id': parent_port['id'],
+                          trunk['id'],
+                          [{'port_id': subport['id'],
                             'segmentation_type': 'inherit',
                             'segmentation_id': -1}])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('40aed9be-e976-47d0-a555-bde2c7e74e57')
     def test_create_trunk_duplicate_subport_segmentation_ids(self):
-        trunk = self._create_trunk_with_network_and_parent([])
+        trunk = self._create_trunk_with_network_and_parent()
         subport_network1 = self.create_network()
         subport_network2 = self.create_network()
-        parent_port1 = self.create_port(subport_network1)
-        parent_port2 = self.create_port(subport_network2)
+        subport1 = self.create_port(subport_network1)
+        subport2 = self.create_port(subport_network2)
         self.assertRaises(lib_exc.BadRequest, self.client.create_trunk,
-                          trunk['trunk']['id'],
-                          [{'port_id': parent_port1['id'],
+                          trunk['id'],
+                          [{'port_id': subport1['id'],
                             'segmentation_id': 2,
                             'segmentation_type': 'vlan'},
-                           {'port_id': parent_port2['id'],
+                           {'port_id': subport2['id'],
                             'segmentation_id': 2,
                             'segmentation_type': 'vlan'}])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('6f132ccc-1380-42d8-9c44-50411612bd01')
-    def test_add_subport_port_id_uses_trunk_port_id(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
+    def test_add_subport_port_id_uses_parent_port_id(self):
+        trunk = self._create_trunk_with_network_and_parent()
         self.assertRaises(lib_exc.Conflict, self.client.add_subports,
-                          trunk['trunk']['id'],
-                          [{'port_id': trunk['trunk']['port_id'],
+                          trunk['id'],
+                          [{'port_id': trunk['port_id'],
                             'segmentation_type': 'vlan',
                             'segmentation_id': 2}])
 
@@ -151,67 +156,54 @@
     @decorators.idempotent_id('7f132ccc-1380-42d8-9c44-50411612bd01')
     def test_add_subport_port_id_disabled_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(
-            None, admin_state_up=False)
-        self.assertRaises(lib_exc.Conflict,
-            self.client.add_subports,
-            trunk['trunk']['id'],
-            [{'port_id': trunk['trunk']['port_id'],
-              'segmentation_type': 'vlan',
-              'segmentation_id': 2}])
-        self.client.update_trunk(
-            trunk['trunk']['id'], admin_state_up=True)
+            admin_state_up=False)
+        self.assertRaises(lib_exc.Conflict, self.client.add_subports,
+                          trunk['id'], [{'port_id': trunk['port_id'],
+                                         'segmentation_type': 'vlan',
+                                         'segmentation_id': 2}])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('8f132ccc-1380-42d8-9c44-50411612bd01')
     def test_remove_subport_port_id_disabled_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(
-            None, admin_state_up=False)
-        self.assertRaises(lib_exc.Conflict,
-            self.client.remove_subports,
-            trunk['trunk']['id'],
-            [{'port_id': trunk['trunk']['port_id'],
-              'segmentation_type': 'vlan',
-              'segmentation_id': 2}])
-        self.client.update_trunk(
-            trunk['trunk']['id'], admin_state_up=True)
+            admin_state_up=False)
+        self.assertRaises(lib_exc.Conflict, self.client.remove_subports,
+                          trunk['id'], [{'port_id': trunk['port_id'],
+                                         'segmentation_type': 'vlan',
+                                         'segmentation_id': 2}])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('9f132ccc-1380-42d8-9c44-50411612bd01')
     def test_delete_trunk_disabled_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(
-            None, admin_state_up=False)
-        self.assertRaises(lib_exc.Conflict,
-            self.client.delete_trunk,
-            trunk['trunk']['id'])
-        self.client.update_trunk(
-            trunk['trunk']['id'], admin_state_up=True)
+            admin_state_up=False)
+        self.assertRaises(lib_exc.Conflict, self.client.delete_trunk,
+                          trunk['id'])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('00cb40bb-1593-44c8-808c-72b47e64252f')
     def test_add_subport_duplicate_segmentation_details(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
+        trunk = self._create_trunk_with_network_and_parent()
         network = self.create_network()
-        parent_port1 = self.create_port(network)
-        parent_port2 = self.create_port(network)
-        self.client.add_subports(trunk['trunk']['id'],
-                                 [{'port_id': parent_port1['id'],
+        subport1 = self.create_port(network)
+        subport2 = self.create_port(network)
+        self.client.add_subports(trunk['id'],
+                                 [{'port_id': subport1['id'],
                                    'segmentation_type': 'vlan',
                                    'segmentation_id': 2}])
         self.assertRaises(lib_exc.Conflict, self.client.add_subports,
-                          trunk['trunk']['id'],
-                          [{'port_id': parent_port2['id'],
-                            'segmentation_type': 'vlan',
-                            'segmentation_id': 2}])
+                          trunk['id'], [{'port_id': subport2['id'],
+                                         'segmentation_type': 'vlan',
+                                         'segmentation_id': 2}])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('4eac8c25-83ee-4051-9620-34774f565730')
     def test_add_subport_passing_dict(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
+        trunk = self._create_trunk_with_network_and_parent()
         self.assertRaises(lib_exc.BadRequest, self.client.add_subports,
-                          trunk['trunk']['id'],
-                          {'port_id': trunk['trunk']['port_id'],
-                           'segmentation_type': 'vlan',
-                           'segmentation_id': 2})
+                          trunk['id'], {'port_id': trunk['port_id'],
+                                        'segmentation_type': 'vlan',
+                                        'segmentation_id': 2})
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('17ca7dd7-96a8-445a-941e-53c0c86c2fe2')
@@ -223,7 +215,7 @@
                         'segmentation_id': 2}
         trunk = self._create_trunk_with_network_and_parent([subport_data])
         self.assertRaises(lib_exc.BadRequest, self.client.remove_subports,
-                          trunk['trunk']['id'], subport_data)
+                          trunk['id'], subport_data)
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('aaca7dd7-96b8-445a-931e-63f0d86d2fe2')
@@ -233,16 +225,16 @@
         subport_data = {'port_id': parent_port['id'],
                         'segmentation_type': 'vlan',
                         'segmentation_id': 2}
-        trunk = self._create_trunk_with_network_and_parent([])
+        trunk = self._create_trunk_with_network_and_parent()
         self.assertRaises(lib_exc.NotFound, self.client.remove_subports,
-                          trunk['trunk']['id'], [subport_data])
+                          trunk['id'], [subport_data])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('6c9c5126-4f61-11e6-8248-40a8f063c891')
     def test_delete_port_in_use_by_trunk(self):
-        trunk = self._create_trunk_with_network_and_parent(None)
+        trunk = self._create_trunk_with_network_and_parent()
         self.assertRaises(lib_exc.Conflict, self.client.delete_port,
-                          trunk['trunk']['port_id'])
+                          trunk['port_id'])
 
     @decorators.attr(type='negative')
     @decorators.idempotent_id('343a03d0-4f7c-11e6-97fa-40a8f063c891')
diff --git a/neutron_tempest_plugin/scenario/test_trunk.py b/neutron_tempest_plugin/scenario/test_trunk.py
index 2ff7e5d..9a92b38 100644
--- a/neutron_tempest_plugin/scenario/test_trunk.py
+++ b/neutron_tempest_plugin/scenario/test_trunk.py
@@ -29,13 +29,11 @@
 CONF = config.CONF
 
 CONFIGURE_VLAN_INTERFACE_COMMANDS = (
-    'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e" |'
-    'cut -d \: -f 2) && '
-    'sudo su -c '
-    '"ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
-    'ip l s up dev $IFACE.%(tag)d && '
-    '{ ps -ef | grep -q "dhclient .*$IFACE.%(tag)d" || '
-    'dhclient $IFACE.%(tag)d"; }')
+    'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e"|cut -d \: -f 2) &&'
+    'sudo ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
+    'sudo ip l s up dev $IFACE.%(tag)d && '
+    'ps -ef | grep -q "[d]hclient .*$IFACE.%(tag)d" || '
+    'sudo dhclient $IFACE.%(tag)d;')
 
 
 class TrunkTest(base.BaseTempestTestCase):
@@ -61,9 +59,8 @@
     def _create_server_with_trunk_port(self):
         port = self.create_port(self.network, security_groups=[
             self.secgroup['security_group']['id']])
-        trunk = self.client.create_trunk(port['id'], subports=[])['trunk']
+        trunk = self.create_trunk(port)
         server, fip = self._create_server_with_fip(port['id'])
-        self.addCleanup(self._detach_and_delete_trunk, server, trunk)
         return {'port': port, 'trunk': trunk, 'fip': fip,
                 'server': server}
 
@@ -80,18 +77,6 @@
                 **server_kwargs)['server'],
             fip)
 
-    def _detach_and_delete_trunk(self, server, trunk):
-        # we have to detach the interface from the server before
-        # the trunk can be deleted.
-        self.os_primary.compute.InterfacesClient().delete_interface(
-            server['id'], trunk['port_id'])
-
-        def is_port_detached():
-            p = self.client.show_port(trunk['port_id'])['port']
-            return p['device_id'] == ''
-        utils.wait_until_true(is_port_detached)
-        self.client.delete_trunk(trunk['id'])
-
     def _is_port_down(self, port_id):
         p = self.client.show_port(port_id)['port']
         return p['status'] == 'DOWN'
@@ -115,11 +100,9 @@
             'port_id': port_for_subport['id'],
             'segmentation_type': 'vlan',
             'segmentation_id': vlan_tag}
-        trunk = self.client.create_trunk(
-            parent_port['id'], subports=[subport])['trunk']
+        self.create_trunk(parent_port, [subport])
 
         server, fip = self._create_server_with_fip(parent_port['id'])
-        self.addCleanup(self._detach_and_delete_trunk, server, trunk)
 
         server_ssh_client = ssh.Client(
             fip['floating_ip_address'],
@@ -141,7 +124,6 @@
                                 CONF.validation.image_ssh_user,
                                 self.keypair['private_key'])
 
-    @utils.unstable_test("bug 1766701")
     @decorators.idempotent_id('bb13fe28-f152-4000-8131-37890a40c79e')
     def test_trunk_subport_lifecycle(self):
         """Test trunk creation and subport transition to ACTIVE status.
@@ -222,7 +204,6 @@
                                 CONF.validation.image_ssh_user,
                                 self.keypair['private_key'])
 
-    @utils.unstable_test('bug 1766701')
     @testtools.skipUnless(
           CONF.neutron_plugin_options.image_is_advanced,
           "Advanced image is required to run this test.")
diff --git a/neutron_tempest_plugin/services/network/json/network_client.py b/neutron_tempest_plugin/services/network/json/network_client.py
index b316ce4..a28d668 100644
--- a/neutron_tempest_plugin/services/network/json/network_client.py
+++ b/neutron_tempest_plugin/services/network/json/network_client.py
@@ -461,6 +461,12 @@
         body = jsonutils.loads(body)
         return service_client.ResponseBody(resp, body)
 
+    def delete_agent(self, agent_id):
+        uri = '%s/agents/%s' % (self.uri_prefix, agent_id)
+        resp, body = self.delete(uri)
+        self.expected_success(204, resp.status)
+        return service_client.ResponseBody(resp, body)
+
     def list_routers_on_l3_agent(self, agent_id):
         uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
         resp, body = self.get(uri)
diff --git a/releasenotes/notes/agents-client-delete-method-de1a7fb3f845999c.yaml b/releasenotes/notes/agents-client-delete-method-de1a7fb3f845999c.yaml
new file mode 100644
index 0000000..01c94f4
--- /dev/null
+++ b/releasenotes/notes/agents-client-delete-method-de1a7fb3f845999c.yaml
@@ -0,0 +1,7 @@
+---
+features:
+  - |
+    Added a new method ``delete_agent`` to the AgentsClient class that
+    implements agent deletion according to the neutron API.
+    https://developer.openstack.org/api-ref/network/v2/index.html#delete-agent
+
diff --git a/releasenotes/source/README.rst b/releasenotes/source/README.rst
new file mode 100644
index 0000000..a6677ca
--- /dev/null
+++ b/releasenotes/source/README.rst
@@ -0,0 +1,34 @@
+==========================================
+Neutron Tempest Plugin Release Notes Howto
+==========================================
+
+Release notes are a new feature for documenting new features in
+OpenStack projects. Background on the process, tooling, and
+methodology is documented in a `mailing list post by Doug Hellmann <http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html>`_.
+
+Writing release notes
+---------------------
+
+For information on how to create release notes, please consult the
+`reno documentation <https://docs.openstack.org/reno/latest/user/usage.html>`__.
+
+Please keep the following in your mind when you write release notes.
+
+* **Avoid using "prelude" section** for individual release notes.
+  "prelude" section is for general comments about the release.
+* **Use one entry per section** (like "feature" or "upgrade").
+  All entries which belong to a same release will be merged and rendered,
+  so there is less meaning to use multiple entries by a single topic.
+
+Maintaining release notes
+-------------------------
+
+.. warning::
+
+   Avoid modifying an existing release note file even though it is related
+   to your change. If you modify a release note file of a past release,
+   the whole content will be shown in a latest release. The only allowed
+   case is to update a release note in a same release.
+
+   If you need to update a release note of a past release,
+   edit a corresponding release note file in a stable branch directly.
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index d95fd58..66d6a9e 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -52,12 +52,12 @@
 master_doc = 'index'
 
 # General information about the project.
-project = u'neutron_tempest_plugin Release Notes'
-copyright = u'2017, OpenStack Developers'
+project = u'Neutron Tempest Plugin Release Notes'
+copyright = u'2017, Neutron Tempest Plugin Developers'
 
 # openstackdocstheme options
-repository_name = 'openstack/openstack'
-bug_project = 'neutron_tempest_plugin'
+repository_name = 'openstack/neutron-tempest-plugin'
+bug_project = 'neutron'
 bug_tag = ''
 
 # The version info for the project you're documenting, acts as replacement for
@@ -191,7 +191,7 @@
 # html_file_suffix = None
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'neutron_tempest_pluginReleaseNotesdoc'
+htmlhelp_basename = 'NeutronTempestPluginReleaseNotesdoc'
 
 
 # -- Options for LaTeX output ---------------------------------------------
@@ -211,9 +211,9 @@
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-    ('index', 'neutron_tempest_pluginReleaseNotes.tex',
-     u'neutron_tempest_plugin  Release Notes Documentation',
-     u'OpenStack Foundation', 'manual'),
+    ('index', 'NeutronTempestPluginReleaseNotes.tex',
+     u'Neutron Tempest Plugin Release Notes Documentation',
+     u'Neutron Tempest Plugin Developers', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -242,9 +242,9 @@
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    ('index', 'neutron_tempest_pluginrereleasenotes',
-     u'neutron_tempest_plugin  Release Notes Documentation',
-     [u'OpenStack Foundation'], 1)
+    ('index', 'NeutronTempestPluginrereleasenotes',
+     u'Neutron Tempest Plugin Release Notes Documentation',
+     [u'Neutron Tempest Plugin Developers'], 1)
 ]
 
 # If true, show URL addresses after external links.
@@ -257,9 +257,10 @@
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-    ('index', 'neutron_tempest_plugin ReleaseNotes',
-     u'neutron_tempest_plugin Release Notes Documentation',
-     u'OpenStack Foundation', 'neutron_tempest_pluginReleaseNotes',
+    ('index', 'Neutron Tempest Plugin ReleaseNotes',
+     u'Neutron Tempest Plugin Release Notes Documentation',
+     u'Neutron Tempest Plugin Developers',
+     'NeutronTempestPluginReleaseNotes',
      'One line description of project.',
      'Miscellaneous'),
 ]
diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst
index 2aa8030..5648f19 100644
--- a/releasenotes/source/index.rst
+++ b/releasenotes/source/index.rst
@@ -1,8 +1,13 @@
-============================================
- neutron_tempest_plugin Release Notes
-============================================
+======================================
+ Neutron Tempest Plugin Release Notes
+======================================
 
 .. toctree::
    :maxdepth: 1
 
    unreleased
+
+.. toctree::
+   :maxdepth: 1
+
+   README.rst
diff --git a/setup.cfg b/setup.cfg
index a54cc6c..c6a1fad 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [metadata]
-name = neutron_tempest_plugin
+name = neutron-tempest-plugin
 summary = Tempest plugin for Neutron Project
 description-file =
     README.rst
@@ -16,8 +16,7 @@
     Programming Language :: Python :: 2
     Programming Language :: Python :: 2.7
     Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.3
-    Programming Language :: Python :: 3.4
+    Programming Language :: Python :: 3.5
 
 [files]
 packages =
@@ -33,11 +32,11 @@
 upload-dir = doc/build/html
 
 [compile_catalog]
-directory = neutron/locale
-domain = neutron
+directory = neutron_tempest_plugin/locale
+domain = neutron-tempest-plugin
 
 [update_catalog]
-domain = neutron_tempest_plugin
+domain = neutron-tempest-plugin
 output_dir = neutron_tempest_plugin/locale
 input_file = neutron_tempest_plugin/locale/neutron_tempest_plugin.pot
 
