def get_sp_wwpn(handle, sp_name, parent_dn="org-root"):
    """
    This function will return the fibre channel wwpn addresses of a service profile
    Args:
        handle (UcsHandle)
        sp_name (string): Service Profile  name.
        parent_dn (string): Org.
    Returns:
        dict with 'A' and 'B' keys, each containing:
        adaptor name
        wwpn address
    Raises:
        ValueError: If LsServer is not present
    Example:
        sp_wwpn(handle, sp_name="sample_sp", parent_dn="org-root")
        sp_wwpn(handle, sp_name="sample_sp", parent_dn="org-root/sub-org")
    """

    vHBADict = {}
    vHBADict['A'] = {}
    vHBADict['B'] = {}

    dn = parent_dn + "/ls-" + sp_name
    mo = handle.query_dn(dn)
    if not mo:
        raise ValueError("sp '%s' does not exist" % dn)

    query_data = handle.query_children(in_mo=mo, class_id='VnicFc')

    for item in query_data:
        vHBADict[item.switch_id][item.name] = item.addr

    return vHBADict