Example #1
0
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
Example #2
0
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
Example #3
0
def activate():
    conf = DGConfig()
    conf.init("dyngroup")
    return conf.dyngroup_activate
Example #4
0
 def getMachineNamesOnBundleStatus(self, bundle_id, state):
     ctx = self.currentContext
     limit = DGConfig().maxElementsForStaticList
     return xmlrpcCleanup(MscDatabase().getMachineNamesOnBundleStatus(
         ctx, bundle_id, state, limit))