module.py 455 B

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