(dn)
This parses the hostname from a dn designator. They look like this:
    topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min
This parses the hostname from a dn designator. They look like this:
    topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min
This parses the hostname from a dn designator . They look like this : topology / pod - 1 / node - 101 / sys / phys - [ eth1 / 6 ] / CDeqptMacsectxpkts5min
def get_hostname_from_dn(dn):
    """
    This parses the hostname from a dn designator. They look like this:
    topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min
    """
    pod = get_pod_from_dn(dn)
    node = get_node_from_dn(dn)
    if pod and node:
        return "pod-{}-node-{}".format(pod, node)
    else:
        return None
def get_hostname_from_dn ( dn ) : pod = get_pod_from_dn ( dn ) node = get_node_from_dn ( dn ) if pod and node : return "pod-{}-node-{}" . format ( pod , node ) else : return None