A distributed command execution framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

30 lines
703 B

from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
class Manager(object):
name = "manager"
@classmethod
def from_config(cls, config):
settings = {}
if config.has_section(cls.name):
settings = dict(config.items(cls.name))
return cls(**settings)
def setup_instances(self):
raise NotImplementedError()
__enter__ = setup_instances
def cleanup_instances(self):
raise NotImplementedError()
def __exit__(self, type, value, traceback):
self.cleanup_instances()
def setup(self, script):
raise NotImplementedError()
def run(self, command):
raise NotImplementedError()