Merge "Replace the usage of 'admin_manager' with 'os_admin'"
diff --git a/neutron/tests/tempest/api/admin/test_routers_dvr.py b/neutron/tests/tempest/api/admin/test_routers_dvr.py
index 5fa22cc..8f03cc6 100644
--- a/neutron/tests/tempest/api/admin/test_routers_dvr.py
+++ b/neutron/tests/tempest/api/admin/test_routers_dvr.py
@@ -90,10 +90,12 @@
         name = data_utils.rand_name('router')
         # router needs to be in admin state down in order to be upgraded to DVR
         router = self.admin_client.create_router(name, distributed=False,
+                                                 ha=False,
                                                  admin_state_up=False)
         self.addCleanup(self.admin_client.delete_router,
                         router['router']['id'])
         self.assertFalse(router['router']['distributed'])
+        self.assertFalse(router['router']['ha'])
         router = self.admin_client.update_router(router['router']['id'],
                                                  distributed=True)
         self.assertTrue(router['router']['distributed'])
diff --git a/neutron/tests/tempest/api/admin/test_routers_flavors.py b/neutron/tests/tempest/api/admin/test_routers_flavors.py
index d0c2f28..4153c2d 100644
--- a/neutron/tests/tempest/api/admin/test_routers_flavors.py
+++ b/neutron/tests/tempest/api/admin/test_routers_flavors.py
@@ -11,7 +11,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from neutron_lib import constants
+from neutron_lib.plugins import constants
 from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 import testtools
diff --git a/neutron/tests/tempest/api/test_routers.py b/neutron/tests/tempest/api/test_routers.py
index 4275729..8572196 100644
--- a/neutron/tests/tempest/api/test_routers.py
+++ b/neutron/tests/tempest/api/test_routers.py
@@ -242,8 +242,15 @@
 
     @decorators.idempotent_id('644d7a4a-01a1-4b68-bb8d-0c0042cb1729')
     def test_convert_centralized_router(self):
-        router = self._create_router(data_utils.rand_name('router'))
-        self.assertNotIn('distributed', router)
+        router_args = {'tenant_id': self.client.tenant_id,
+                       'distributed': False, 'ha': False}
+        router = self.admin_client.create_router(
+            data_utils.rand_name('router'), admin_state_up=False,
+            **router_args)['router']
+        self.addCleanup(self.admin_client.delete_router,
+                        router['id'])
+        self.assertFalse(router['distributed'])
+        self.assertFalse(router['ha'])
         update_body = self.admin_client.update_router(router['id'],
                                                       distributed=True)
         self.assertTrue(update_body['router']['distributed'])
@@ -251,6 +258,7 @@
         self.assertTrue(show_body['router']['distributed'])
         show_body = self.client.show_router(router['id'])
         self.assertNotIn('distributed', show_body['router'])
+        self.assertNotIn('ha', show_body['router'])
 
 
 class HaRoutersTest(base_routers.BaseRouterTest):
diff --git a/neutron/tests/tempest/scenario/test_floatingip.py b/neutron/tests/tempest/scenario/test_floatingip.py
index 7998690..fe6ce3e 100644
--- a/neutron/tests/tempest/scenario/test_floatingip.py
+++ b/neutron/tests/tempest/scenario/test_floatingip.py
@@ -19,6 +19,7 @@
 from tempest.lib import decorators
 from tempest import test
 import testscenarios
+from testscenarios.scenarios import multiply_scenarios
 
 from neutron.tests.tempest.common import ssh
 from neutron.tests.tempest import config
@@ -83,12 +84,28 @@
         return {'port': port, 'fip': fip, 'server': server}
 
     def _test_east_west(self):
+        # The proxy VM is used to control the source VM when it doesn't
+        # have a floating-ip.
+        if self.src_has_fip:
+            proxy = None
+            proxy_client = None
+        else:
+            proxy = self._create_server()
+            proxy_client = ssh.Client(proxy['fip']['floating_ip_address'],
+                                      CONF.validation.image_ssh_user,
+                                      pkey=self.keypair['private_key'])
+
         # Source VM
-        server1 = self._create_server()
-        server1_ip = server1['fip']['floating_ip_address']
-        ssh_client = ssh.Client(server1_ip,
+        if self.src_has_fip:
+            src_server = self._create_server()
+            src_server_ip = src_server['fip']['floating_ip_address']
+        else:
+            src_server = self._create_server(create_floating_ip=False)
+            src_server_ip = src_server['port']['fixed_ips'][0]['ip_address']
+        ssh_client = ssh.Client(src_server_ip,
                                 CONF.validation.image_ssh_user,
-                                pkey=self.keypair['private_key'])
+                                pkey=self.keypair['private_key'],
+                                proxy_client=proxy_client)
 
         # Destination VM
         if self.dest_has_fip:
@@ -107,11 +124,13 @@
 
 class FloatingIpSameNetwork(FloatingIpTestCasesMixin,
                             base.BaseTempestTestCase):
-    # REVISIT(yamamoto): 'SRC without FIP' case is possible?
-    scenarios = [
+    scenarios = multiply_scenarios([
+        ('SRC with FIP', dict(src_has_fip=True)),
+        ('SRC without FIP', dict(src_has_fip=False)),
+    ], [
         ('DEST with FIP', dict(dest_has_fip=True)),
         ('DEST without FIP', dict(dest_has_fip=False)),
-    ]
+    ])
 
     same_network = True
 
@@ -122,11 +141,13 @@
 
 class FloatingIpSeparateNetwork(FloatingIpTestCasesMixin,
                                 base.BaseTempestTestCase):
-    # REVISIT(yamamoto): 'SRC without FIP' case is possible?
-    scenarios = [
+    scenarios = multiply_scenarios([
+        ('SRC with FIP', dict(src_has_fip=True)),
+        ('SRC without FIP', dict(src_has_fip=False)),
+    ], [
         ('DEST with FIP', dict(dest_has_fip=True)),
         ('DEST without FIP', dict(dest_has_fip=False)),
-    ]
+    ])
 
     same_network = False