'Test to validate snat redirect rules not cleared with snat move.'

def test_dvr_gateway_move_does_not_remove_redirect_rules(self):

    self.agent.conf.agent_mode = 'dvr_snat'
    router_info = self.generate_dvr_router_info(enable_snat=True)
    router1 = self.manage_router(self.agent, router_info)
    router1.router['gw_port_host'] = ''
    self.agent._process_updated_router(router1.router)
    router_updated = self.agent.router_info[router1.router['id']]
    self.assertTrue(self._namespace_exists(router_updated.ns_name))
    ns_ipr = ip_lib.IPRule(namespace=router1.ns_name)
    ip4_rules_list = ns_ipr.rule.list_rules(lib_constants.IP_VERSION_4)
    self.assertEqual(6, len(ip4_rules_list))
    default_rules_list_count = 0
    interface_rules_list_count = 0
    for ip_rule in ip4_rules_list:
        tbl_index = ip_rule['table']
        if (tbl_index in ['local', 'default', 'main', str(dvr_fip_ns.FIP_RT_TBL)]):
            default_rules_list_count = (default_rules_list_count + 1)
        else:
            interface_rules_list_count = (interface_rules_list_count + 1)
    self.assertEqual(4, default_rules_list_count)
    self.assertEqual(2, interface_rules_list_count)
