def isconfigured(): """ Check if libvirt is already configured for vdsm """ ret = MAYBE for path in (confutils.get_persisted_files(FILES)): if not confutils.open_config(path, CONF_VERSION).hasConf(): ret = NO if not _is_hugetlbfs_1g_mounted(): ret = NO if _libvirt_uses_socket_activation(): cfg = _read_libvirt_connection_config() if cfg.listen_tcp != 0 and not _unit_enabled(_LIBVIRT_TCP_SOCKET_UNIT): sys.stdout.write( "{} unit is disabled\n".format(_LIBVIRT_TCP_SOCKET_UNIT)) ret = NO if cfg.listen_tls != 0 and not _unit_enabled(_LIBVIRT_TLS_SOCKET_UNIT): sys.stdout.write( "{} unit is disabled\n".format(_LIBVIRT_TLS_SOCKET_UNIT)) ret = NO if ret == MAYBE: sys.stdout.write("libvirt is already configured for vdsm\n") else: sys.stdout.write("libvirt is not configured for vdsm yet\n") return ret
def isconfigured(): """ Check if abrt is already configured for vdsm """ ret = MAYBE for path in (confutils.get_persisted_files(FILES)): if not confutils.open_config(path, CONF_VERSION).hasConf(): ret = NO if ret == MAYBE: sys.stdout.write("abrt is already configured for vdsm\n") else: sys.stdout.write("abrt is not configured for vdsm\n") return ret
def isconfigured(): """ Check if libvirt is already configured for vdsm """ ret = MAYBE for path in (confutils.get_persisted_files(FILES)): if not confutils.open_config(path, CONF_VERSION).hasConf(): ret = NO if not _is_hugetlbfs_1g_mounted(): ret = NO if not _socket_unit() in _unit_requirements(_LIBVIRT_SERVICE_UNIT): ret = NO if ret == MAYBE: sys.stdout.write("libvirt is already configured for vdsm\n") else: sys.stdout.write("libvirt is not configured for vdsm yet\n") return ret