gnetcli-adapter 2.1.0__tar.gz → 2.2.1__tar.gz
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.
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/PKG-INFO +1 -1
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/src/gnetcli_adapter/gnetcli_adapter.py +5 -3
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/src/gnetcli_adapter/progress_tracker.py +23 -1
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/LICENSE +0 -0
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/README.md +0 -0
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/pyproject.toml +0 -0
- {gnetcli_adapter-2.1.0 → gnetcli_adapter-2.2.1}/src/gnetcli_adapter/__init__.py +0 -0
|
@@ -162,7 +162,7 @@ def run_gnetcli_server(server_path: str, config: str = DEFAULT_GNETCLI_SERVER_CO
|
|
|
162
162
|
try:
|
|
163
163
|
proc = subprocess.Popen(
|
|
164
164
|
[gnetcli_abs_path, "--conf-file", "-"],
|
|
165
|
-
stdout=subprocess.
|
|
165
|
+
stdout=subprocess.DEVNULL, # we do not read stdout
|
|
166
166
|
stderr=subprocess.PIPE,
|
|
167
167
|
stdin=subprocess.PIPE,
|
|
168
168
|
bufsize=1,
|
|
@@ -188,6 +188,8 @@ def run_gnetcli_server(server_path: str, config: str = DEFAULT_GNETCLI_SERVER_CO
|
|
|
188
188
|
else:
|
|
189
189
|
if data.get("msg") == "init tcp socket":
|
|
190
190
|
_local_gnetcli_url = data.get("address")
|
|
191
|
+
if data.get("msg") == "init unix socket":
|
|
192
|
+
_local_gnetcli_url = "unix:" + data.get("path")
|
|
191
193
|
if data.get("level") == "panic":
|
|
192
194
|
_logger.error("gnetcli error %s", data)
|
|
193
195
|
_logger.debug("set gnetcli server exit code %s", proc.returncode)
|
|
@@ -499,10 +501,10 @@ class GnetcliDeployer(DeployDriver, AdapterWithConfig, AdapterWithName):
|
|
|
499
501
|
# we can't execute subsequent commands
|
|
500
502
|
if cmd.suppress_eof:
|
|
501
503
|
# some commands left
|
|
502
|
-
if group_number + 1 != len(command_groups) or cmd_number + 1 != len(
|
|
504
|
+
if group_number + 1 != len(command_groups) or cmd_number + 1 != len(cmdlist):
|
|
503
505
|
tracker.command_done_error("EOF detected before all commands executed.")
|
|
504
506
|
seen_exc.append(Exception("EOF detected before all commands executed."))
|
|
505
|
-
tracker.
|
|
507
|
+
tracker.command_done_error_suppressed("Suppressed EOF")
|
|
506
508
|
return seen_exc, results
|
|
507
509
|
seen_exc.append(e)
|
|
508
510
|
tracker.command_done_error("Unexpected EOFError")
|
|
@@ -44,6 +44,9 @@ class ProgressTracker:
|
|
|
44
44
|
def command_done_error(self, error: str) -> None:
|
|
45
45
|
pass
|
|
46
46
|
|
|
47
|
+
def command_done_error_suppressed(self, error: str) -> None:
|
|
48
|
+
pass
|
|
49
|
+
|
|
47
50
|
def finish_ok(self, notification: str) -> None:
|
|
48
51
|
pass
|
|
49
52
|
|
|
@@ -126,7 +129,6 @@ class ProgressBarTracker(ProgressTracker):
|
|
|
126
129
|
)
|
|
127
130
|
|
|
128
131
|
def command_done_error(self, error: str) -> None:
|
|
129
|
-
logger.error(error)
|
|
130
132
|
self.done_steps += 1
|
|
131
133
|
self.progress_bar.add_content(self.tile, error)
|
|
132
134
|
self.progress_bar.set_progress(
|
|
@@ -136,6 +138,16 @@ class ProgressBarTracker(ProgressTracker):
|
|
|
136
138
|
"Error: " + self.last_cmd,
|
|
137
139
|
)
|
|
138
140
|
|
|
141
|
+
def command_done_error_suppressed(self, error: str) -> None:
|
|
142
|
+
self.done_steps += 1
|
|
143
|
+
self.progress_bar.add_content(self.tile, error)
|
|
144
|
+
self.progress_bar.set_progress(
|
|
145
|
+
self.tile,
|
|
146
|
+
self.done_steps,
|
|
147
|
+
self.total_steps,
|
|
148
|
+
"Error (suppressed): " + self.last_cmd,
|
|
149
|
+
)
|
|
150
|
+
|
|
139
151
|
def finish_ok(self, notification: str) -> None:
|
|
140
152
|
self.done_steps = self.total_steps
|
|
141
153
|
self.progress_bar.set_progress(self.tile,self.done_steps, self.total_steps, suffix=notification)
|
|
@@ -199,6 +211,9 @@ class FileProgressTracker(ProgressTracker):
|
|
|
199
211
|
def command_done_error(self, error: str) -> None:
|
|
200
212
|
self._log(f"Error: {error}")
|
|
201
213
|
|
|
214
|
+
def command_done_error_suppressed(self, error: str) -> None:
|
|
215
|
+
self._log(f"Error (suppressed): {error}")
|
|
216
|
+
|
|
202
217
|
def finish_ok(self, notification: str) -> None:
|
|
203
218
|
self._log("Finished with success: " + notification)
|
|
204
219
|
|
|
@@ -231,6 +246,9 @@ class LogProgressTracker(ProgressTracker):
|
|
|
231
246
|
def command_done_error(self, error: str) -> None:
|
|
232
247
|
logger.error(f"{self.fqdn} - {error}")
|
|
233
248
|
|
|
249
|
+
def command_done_error_suppressed(self, error: str) -> None:
|
|
250
|
+
logger.info(f"{self.fqdn} - {error}")
|
|
251
|
+
|
|
234
252
|
def finish_ok(self, notification: str) -> None:
|
|
235
253
|
logger.info(f"{self.fqdn} - finished with success - {notification}")
|
|
236
254
|
|
|
@@ -287,6 +305,10 @@ class CompositeTracker(ProgressTracker):
|
|
|
287
305
|
for tracker in self.trackers:
|
|
288
306
|
tracker.command_done_error(error)
|
|
289
307
|
|
|
308
|
+
def command_done_error_suppressed(self, error: str) -> None:
|
|
309
|
+
for tracker in self.trackers:
|
|
310
|
+
tracker.command_done_error_suppressed(error)
|
|
311
|
+
|
|
290
312
|
def finish_ok(self, notification: str) -> None:
|
|
291
313
|
for tracker in self.trackers:
|
|
292
314
|
tracker.finish_ok(notification)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|