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()))
def update(self, instance: Instance): self._database.update(instance.to_dict(), self._instances.name == instance.get_name())