def get_hostname_from_fqdn(fqdn):
    """ Returns hostname from a fully-qualified domain name
        (returns left-most period-delimited value)

    """
    if "." in fqdn:
        split = fqdn.split(".")
        split.reverse()
        return split.pop()
    else:
        return fqdn