'Send POST request to the switch with the payload.
:param data: payload to be sent to switch'

def post_zone_data(self, data):

    status = 'progress'
    parsed_data_txn = ''
    headers = {zone_constant.AUTH_HEADER: self.auth_header}
    LOG.debug('Requesting    the    switch    with    posting    the    zone    string.')
    response = self.connect(zone_constant.POST_METHOD, zone_constant.ZONE_PAGE, data, headers)
    parsed_data = self.get_parsed_data(response, zone_constant.ZONE_TX_BEGIN, zone_constant.ZONE_TX_END)
    transID = self.get_nvp_value(parsed_data, zone_constant.ZONE_TX_ID)
    transURL = zone_constant.ZONE_TRAN_STATUS.format(txnId=transID)
    timeout = 360
    sleep_time = 3
    time_elapsed = 0
    while (status != 'done'):
        txn_response = self.connect(zone_constant.GET_METHOD, transURL, '', headers)
        parsed_data_txn = self.get_parsed_data(txn_response, zone_constant.ZONE_TX_BEGIN, zone_constant.ZONE_TX_END)
        status = self.get_nvp_value(parsed_data_txn, zone_constant.ZONE_TX_STATUS)
        time.sleep(sleep_time)
        time_elapsed += sleep_time
        if (time_elapsed > timeout):
            break
    if (status != 'done'):
        errorCode = (-1)
        errorMessage = 'Timed    out,    waiting    for    zone    transaction    on    the    switch    to    complete'
    else:
        errorCode = self.get_nvp_value(parsed_data_txn, zone_constant.ZONE_ERROR_CODE)
        errorMessage = self.get_nvp_value(parsed_data_txn, zone_constant.ZONE_ERROR_MSG)
    return (errorCode, errorMessage)
