def domain_dn_2_name(dn):
    """Example:
    Input" "dc=vsphere,dc=local"
    Output: "vsphere.local"
    """
    domain_name = dn.replace(" ","").replace("dc=","").replace(",",".")
    return str(domain_name)