orchestrator-lso 2.4.1__py3-none-any.whl → 2.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lso/__init__.py CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  """LSO, an API for remotely running Ansible playbooks."""
15
15
 
16
- __version__ = "2.4.1"
16
+ __version__ = "2.4.2"
17
17
 
18
18
  import logging
19
19
 
lso/tasks.py CHANGED
@@ -45,16 +45,21 @@ def playbook_event_handler_factory(
45
45
  This is used to send incremental progress updates to the external system that called for this playbook to be run.
46
46
 
47
47
  :param str progress: The progress URL where the external system expects to receive updates.
48
- :param bool progress_is_incremental: Whether progress updates are sent incrementally, or only contain the latest
49
- event data.
48
+ :param bool progress_is_incremental: Whether progress updates are sent incrementally, or contain the whole history
49
+ of event data.
50
50
  """
51
51
  events_stdout = []
52
52
 
53
53
  def _playbook_event_handler(event: dict) -> bool:
54
+ event_data = event["stdout"].strip()
55
+ if not event_data:
56
+ return False
57
+
58
+ event_data_lines = event_data.split("\r\n")
54
59
  if progress_is_incremental:
55
- emit_body = event["stdout"].strip()
60
+ emit_body = event_data_lines
56
61
  else:
57
- events_stdout.append(event["stdout"].strip())
62
+ events_stdout.extend(event_data_lines)
58
63
  emit_body = events_stdout
59
64
 
60
65
  requests.post(str(progress), json={"progress": emit_body}, timeout=settings.REQUEST_TIMEOUT_SEC)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orchestrator-lso
3
- Version: 2.4.1
3
+ Version: 2.4.2
4
4
  Summary: LSO, an API for remotely running Ansible playbooks.
5
5
  Author: GÉANT Orchestration and Automation Team
6
6
  Author-email: GÉANT Orchestration and Automation Team <goat@geant.org>
@@ -1,4 +1,4 @@
1
- lso/__init__.py,sha256=y2yQiYbKm6ci12HfmjgmqADL4nTqGz_VwpG3kZyu28I,1589
1
+ lso/__init__.py,sha256=-1xhYhBAtzdi8TaFrK-xyzqp29irj-3lhitkNlZefyU,1589
2
2
  lso/app.py,sha256=PCdL4hY5i1fho_pMSiNAHuaIKWPgfQNyePsZ-LdasCg,775
3
3
  lso/config.py,sha256=tyxjq67EJLEMLmpIlkxrtwJ3arm8ZUBNGkj9NTsBJxw,1639
4
4
  lso/environment.py,sha256=4k8a8cSLwgLjBIU-XUa7Y6Clns2VjmsBkiKvkzK2Pp4,1771
@@ -9,9 +9,9 @@ lso/routes/default.py,sha256=ScSrDFjbGqjcjeOodMTKZUMzZqXZ0zC6L-I9hrP0dqk,1438
9
9
  lso/routes/execute.py,sha256=nDmilV2THCnPzAIHGUjYBuETrL0QeOQSUC7z5M3EaMA,2713
10
10
  lso/routes/playbook.py,sha256=9ughP7zqnqRpBV31KQbTMoJdfgzF0qyjxiXw1l3TlUE,5270
11
11
  lso/schema.py,sha256=Xp4D7FRc21Mhh-1xlp0EbjTvdu5kGEHRpQvQp6ic6ro,1518
12
- lso/tasks.py,sha256=FF2vjezuA9gr_Wf3GCAkeQ5VdhphfrRg1zmSG4Xm9fI,6236
12
+ lso/tasks.py,sha256=F-Wbis-ylL7Vwy6qMu2fS-S9WRzIUvkkIcD8LFCDMUw,6377
13
13
  lso/utils.py,sha256=eVKyYRtdu_yPkbUQqDJlCKlCPAgc0dFxG1E1kY2Qsao,1043
14
14
  lso/worker.py,sha256=ZAXii3EctILrpnHInvVMTyjOs_40gqR_VybVLBzGRw4,1727
15
- orchestrator_lso-2.4.1.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
16
- orchestrator_lso-2.4.1.dist-info/METADATA,sha256=NlFp7KaglO6y1fUmgsyeQQacJ0aKTsp8KURlqGd_4BI,5621
17
- orchestrator_lso-2.4.1.dist-info/RECORD,,
15
+ orchestrator_lso-2.4.2.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
16
+ orchestrator_lso-2.4.2.dist-info/METADATA,sha256=uQS0-YaAJ6xo-8_PtrT65XdKjlZtdmsl-ZCvw0sLtFk,5621
17
+ orchestrator_lso-2.4.2.dist-info/RECORD,,