'Test to validate the floatingip create on port migrate.
This test validates the condition where floatingip host
mismatches with the agent, but the \'dest_host\' variable
matches with the agent host, due to port pre-migrate
phase.'

def test_dvr_router_fip_create_for_migrating_port(self):

    self.agent.conf.agent_mode = 'dvr'
    router_info = self.generate_dvr_router_info()
    floating_ip = router_info['_floatingips'][0]
    floating_ip['host'] = 'my_new_host'
    floating_ip['dest_host'] = self.agent.host
    router1 = self.manage_router(self.agent, router_info)
    fip_ns = router1.fip_ns.get_name()
    self.assertTrue(self._namespace_exists(router1.ns_name))
    self.assertTrue(self._namespace_exists(fip_ns))
