Example #1
0
class Command(object):
    TYPE_BUILDER = 'builder'
    TYPE_TESTER = 'tester'

    def __init__(self, command, command_type):
        self._command = command
        self._type = command_type

        # Initialize dependency handler
        self.dependency_handler = DependencyHandler()

        LOGGER.debug("Checking CEKit core dependencies...")
        self.dependency_handler.handle_core_dependencies()

    def execute(self):
        self.prepare()
        self.run()

    def prepare(self):
        pass

    def run(self):
        raise CekitError(
            "Command.run() method is not implemented for '{}' command and '{}' type. Please report it!"
            .format(self._command, self._type))
Example #2
0
    def __init__(self, command, command_type):
        self._command = command
        self._type = command_type

        # Initialize dependency handler
        self.dependency_handler = DependencyHandler()

        LOGGER.debug("Checking CEKit core dependencies...")
        self.dependency_handler.handle_core_dependencies()