It prevents any connection to xen when initiallizing the class notably in doc build generation.
@@ -57,6 +57,10 @@ class SystemState(object):
self.log.debug('SystemState()')
self.domdict = {}
+ self.xc = None
+ self.xs = None
+
+ def init(self):
self.xc = xen.lowlevel.xc.xc()
self.xs = xen.lowlevel.xs.xs()
self.BALOON_DELAY = 0.1
@@ -276,6 +276,10 @@ def main():
log.debug('instantiating server')
os.umask(0)
+ # Initialize the connection to Xen and to XenStore
+ system_state.init()
server = socketserver.UnixStreamServer(SOCK_PATH, QMemmanReqHandler)
os.umask(0o077)