def SvcDoRun(self): # Write a 'started' event to the event log... self.ReportEvent(servicemanager.PYS_SERVICE_STARTED) logging.info("Starting OVirt Guest Agent service") config = ConfigParser.ConfigParser() config.read(AGENT_CONFIG) self.vdsAgent = WinVdsAgent(config) self.vdsAgent.run() # and write a 'stopped' event to the event log (skip this step if the # computer is shutting down, because the event log might be down). if not self._shutting_down: self.ReportEvent(servicemanager.PYS_SERVICE_STOPPED) logging.info("Stopping OVirt Guest Agent service")