'DVRHA Attach internal subnet followed by attach external'

def test_dvr_ha_router_create_attach_internal_external_detach_delete(self):

    router = self._create_dvrha_router()
    self._check_dvr_ha_interfaces_presence(router, 2)
    int_subnet = self._add_internal_subnet_to_router(router)
    self._check_internal_subnet_interface_presence(router, int_subnet, 1)
    ext_net = self._create_external_network()
    self._set_external_gateway(router, ext_net)
    self._check_dvr_ha_interfaces_presence(router, 2)
    self._check_snat_external_gateway_presence(ext_net, router, 1)
    self._check_internal_subnet_interface_presence(router, int_subnet, 1)
    self._check_snat_internal_gateways_presence(router, int_subnet, 1)
    self._clear_external_gateway(router)
    self._check_dvr_ha_interfaces_presence(router, 2)
    self._check_snat_external_gateway_presence(ext_net, router, 0)
    self._check_internal_subnet_interface_presence(router, int_subnet, 1)
    self._check_snat_internal_gateways_presence(router, int_subnet, 0)
    self._remove_interface_from_router(router, int_subnet)
    self._check_internal_subnet_interface_presence(router, int_subnet, 0)
    self._delete_router(router)
    self._check_dvr_ha_interfaces_presence(router, 0)
