salt-api-cli 1.4.2__tar.gz → 1.4.3__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.
- {salt_api_cli-1.4.2/salt_api_cli.egg-info → salt_api_cli-1.4.3}/PKG-INFO +1 -1
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli/highlevel.py +24 -4
- salt_api_cli-1.4.3/salt_api_cli/version.py +1 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3/salt_api_cli.egg-info}/PKG-INFO +1 -1
- salt_api_cli-1.4.2/salt_api_cli/version.py +0 -1
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/MANIFEST.in +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/README.md +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/pyproject.toml +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli/__init__.py +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli/__main__.py +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli/cli.py +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli/lowlevel.py +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli/py.typed +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli.egg-info/SOURCES.txt +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli.egg-info/dependency_links.txt +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli.egg-info/entry_points.txt +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli.egg-info/requires.txt +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/salt_api_cli.egg-info/top_level.txt +0 -0
- {salt_api_cli-1.4.2 → salt_api_cli-1.4.3}/setup.cfg +0 -0
|
@@ -177,8 +177,23 @@ def _print_state_return(minion: str, states: dict[str, Any]) -> None:
|
|
|
177
177
|
if status == "ok":
|
|
178
178
|
detail: str | Text = ""
|
|
179
179
|
elif status == "change":
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
changes = state.get("changes", {})
|
|
181
|
+
if "stdout" in changes:
|
|
182
|
+
# cmd.run-style changes: show the command's output itself
|
|
183
|
+
# rather than the fixed pid/retcode/stdout/stderr key list.
|
|
184
|
+
out = (
|
|
185
|
+
str(changes.get("stdout") or "").strip()
|
|
186
|
+
or str(changes.get("stderr") or "").strip()
|
|
187
|
+
)
|
|
188
|
+
# Full output, folded across lines, so nothing is cut off.
|
|
189
|
+
detail = (
|
|
190
|
+
Text(out, no_wrap=False, overflow="fold")
|
|
191
|
+
if out
|
|
192
|
+
else "changed: (no output)"
|
|
193
|
+
)
|
|
194
|
+
else:
|
|
195
|
+
changed = ", ".join(changes) or "(changes)"
|
|
196
|
+
detail = f"changed: {_short(changed)}"
|
|
182
197
|
elif status == "fail":
|
|
183
198
|
detail = Text(_short(state.get("comment", ""), 240), style="red")
|
|
184
199
|
else: # diff / skip
|
|
@@ -193,7 +208,12 @@ def _print_state_return(minion: str, states: dict[str, Any]) -> None:
|
|
|
193
208
|
fn_w = max((len(fn) for _, fn, _, _ in rows), default=8)
|
|
194
209
|
ref_w = max((len(ref) for _, _, ref, _ in rows), default=8)
|
|
195
210
|
nat_w = max(
|
|
196
|
-
(
|
|
211
|
+
(
|
|
212
|
+
len(line)
|
|
213
|
+
for _, _, _, d in rows
|
|
214
|
+
for line in (d.plain if isinstance(d, Text) else d).splitlines()
|
|
215
|
+
),
|
|
216
|
+
default=0,
|
|
197
217
|
)
|
|
198
218
|
detail_w = min(nat_w, max(20, console.width - 2 - 1 - fn_w - ref_w - 3 * 2))
|
|
199
219
|
|
|
@@ -242,7 +262,7 @@ def _print_state_result(result: dict[str, Any]) -> None:
|
|
|
242
262
|
if not ret:
|
|
243
263
|
console.print("(no minions responded)")
|
|
244
264
|
return
|
|
245
|
-
for minion in sorted(ret):
|
|
265
|
+
for minion in sorted(ret, key=_natural_key):
|
|
246
266
|
_print_one_minion(minion, ret[minion])
|
|
247
267
|
|
|
248
268
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.4.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.4.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|