def activate(): logger = logging.getLogger() global config config = DGConfig() config.init("dyngroup") if config.disable: logger.warning("Plugin dyngroup: disabled by configuration.") return False DyngroupDatabase().activate(config) if not DyngroupDatabase().db_check(): return False ComputerGroupManager().register("dyngroup", DyngroupGroup) ComputerProfileManager().register("dyngroup", DyngroupProfile) ComputerManager().register("dyngroup", DyngroupComputers) return True
def activate(): logger = logging.getLogger() global config config = DGConfig() config.init("dyngroup") if config.disable: logger.warning("Plugin dyngroup: disabled by configuration.") return False DyngroupDatabase().activate(config) if not DyngroupDatabase().db_check(): return False ComputerGroupManager().register("dyngroup", DyngroupGroup) ComputerProfileManager().register("dyngroup", DyngroupProfile) ComputerManager().register("dyngroup", DyngroupComputers) if config.check_db_enable: scheduleCheckStatus(config.check_db_interval) return True
def activate(): conf = DGConfig() conf.init("dyngroup") return conf.dyngroup_activate
def getMachineNamesOnBundleStatus(self, bundle_id, state): ctx = self.currentContext limit = DGConfig().maxElementsForStaticList return xmlrpcCleanup(MscDatabase().getMachineNamesOnBundleStatus( ctx, bundle_id, state, limit))