Пример #1
0
 def __init__(self, supervisor, instance: Instance = None):
     self._before = {}
     if instance:
         self._before = instance.to_dict()
     self._foreman = supervisor.get_foreman_class()(supervisor)
     self._command = Command(HostObjects(supervisor.get_hosts()))
Пример #2
0
 def update(self, instance: Instance):
     self._database.update(instance.to_dict(), self._instances.name == instance.get_name())