Import a pipeline.

    This will completely overwrite the existing pipeline.

    Args:
        url          (str): the host url in the form 'http://host:port/'.
        pipeline_id   (str): the ID of of the exported pipeline.
        auth       (tuple): a tuple of username, and password.
        json_payload (dict): the exported json payload as a dictionary.
        overwrite    (bool): overwrite existing pipeline
        verify_ssl   (bool): whether to verify ssl certificates

    Returns:
        dict: the response json

def import_pipeline(url, pipeline_id, auth, json_payload, verify_ssl, overwrite = False):
    """Import a pipeline.

    This will completely overwrite the existing pipeline.

    Args:
        url          (str): the host url in the form 'http://host:port/'.
        pipeline_id   (str): the ID of of the exported pipeline.
        auth       (tuple): a tuple of username, and password.
        json_payload (dict): the exported json payload as a dictionary.
        overwrite    (bool): overwrite existing pipeline
        verify_ssl   (bool): whether to verify ssl certificates

    Returns:
        dict: the response json

    """
    parameters = { 'overwrite' : overwrite }
    import_result = requests.post(url + '/' + pipeline_id + '/import', params=parameters,
                                  headers=X_REQ_BY, auth=auth, verify=verify_ssl, json=json_payload)

    if import_result.status_code != 200:
        logging.error('Import error response: ' + import_result.text)

    import_result.raise_for_status()
    logging.info('Pipeline import successful.')
    return import_result.json()