'Returns the hostname of the hypervisor.'

def get_hostname(self):

    hostname = self.get_connection().getHostname()
    if (self._hostname is None):
        self._hostname = hostname
    elif (hostname != self._hostname):
        LOG.error('Hostname    has    changed    from    %(old)s    to    %(new)s.    A    restart    is    required    to    take    effect.', {'old': self._hostname, 'new': hostname})
    return self._hostname
