def GetPipelineToolStatus(cls, settingsPath): """ Method for getting the pipeline tools status, aka which tools are enabled, Ex. Draft, shotgun Arguments: settingsPath (str): Path to the file containing pipeline tool settings. """ statusDict = SettingsWriter.GetSettingsDict(settingsPath) tools = [] for tool, val in cls.toolOptions.iteritems(): if RepositoryUtils.GetEventPluginConfig( tool).GetConfigEntryWithDefault("State", "") == "Global Enabled": if any((option in statusDict) for option in val["RequiredOptions"]): tools.append(val["Name"] + " On") else: tools.append(val["Name"] + " Off") return tools
def __init__(self): """Initialize the callbacks""" self.registered = [] config = RepositoryUtils.GetEventPluginConfig("DeadlineSlack") for name in self.CALLBACKS: # Skip registering the events that don't need to emit a message config_key = "Slack{0}Message".format(name) message = config.GetConfigEntryWithDefault(config_key, "") if not message: continue # Connect the callback with the method callback = getattr(self, name + "Callback") callback += getattr(self, name) # Store as registered (connected callbacks) self.registered.append(name)