'Adds default gateway for fip based on the tbl_index passed.'

def _add_default_gateway_for_fip(self, gw_ip, ip_device, tbl_index):

    if (tbl_index is None):
        ip_version = common_utils.get_ip_version(gw_ip)
        tbl_index_list = self.get_fip_table_indexes(ip_version)
        for tbl_index in tbl_index_list:
            ip_device.route.add_gateway(gw_ip, table=tbl_index)
    else:
        ip_device.route.add_gateway(gw_ip, table=tbl_index)
