예제 #1
0
 def __init__(self):
     # Get CommandLineParser and initialize it
     self.request = CommandLineParser()
     self.request.start()
     self.config = conf.LPMSConfig()
     # Get lpms' ScriptEngine class for running stages
     self.interpreter = interpreter.ScriptEngine()
예제 #2
0
class LPMSCore(Operations):
    def __init__(self):
        # Get CommandLineParser and initialize it
        self.request = CommandLineParser()
        self.request.start()
        self.config = conf.LPMSConfig()
        # Get lpms' ScriptEngine class for running stages
        self.interpreter = interpreter.ScriptEngine()

    def initialize(self):
        # Run command line client to drive lpms
        # Run actions, respectively
        if self.request.operations:
            for operation in self.request.operations:
                # TODO: We should use signals to determine behavior of lpms
                # when the process has finished.
                getattr(self, operation)()
            return

        if self.request.names:
            # Now, we can start building packages.
            self.package_mangler()
        else:
            out.error("nothing given.")
            sys.exit(0)