module.py 508 B

1234567891011121314151617181920212223242526272829
  1. from setux.core.action import Runner, Actions
  2. class Moduler(Runner):
  3. '''Deploy a Module'''
  4. @property
  5. def label(self):
  6. return self.module
  7. def deploy(self):
  8. return self.target.deploy(self.module)
  9. class Modules(Actions):
  10. '''Deploy Modules'''
  11. @property
  12. def label(self):
  13. return f'Modules {self.name}'
  14. @property
  15. def actions(self):
  16. return [
  17. Moduler(self.target, module=module)
  18. for module in self.modules
  19. ]