예제 #1
0
파일: __init__.py 프로젝트: tekmans/mmc
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
예제 #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
예제 #3
0
def activate():
    conf = DGConfig()
    conf.init("dyngroup")
    return conf.dyngroup_activate
예제 #4
0
 def getMachineNamesOnBundleStatus(self, bundle_id, state):
     ctx = self.currentContext
     limit = DGConfig().maxElementsForStaticList
     return xmlrpcCleanup(MscDatabase().getMachineNamesOnBundleStatus(
         ctx, bundle_id, state, limit))