Mike Reeves
81c0f2b464
so-yaml.py: tolerate missing ancestors in removeKey
...
replace calls removeKey before addKey, so running `so-yaml.py replace`
on a new dotted key whose parent doesn't exist — e.g., postgres.auth
fanning postgres.telegraf.user into a minion pillar file that has
never carried any postgres.* keys — crashed with
KeyError: 'postgres'
from removeKey recursing into a missing parent dict.
Make removeKey a no-op when an intermediate key is absent so that:
- `remove` has the natural "remove if exists" semantics, and
- `replace` works for brand-new nested keys.
2026-04-21 14:43:10 -04:00
Mike Reeves
4a89f7f26b
Add -r flag to so-yaml get for raw output without YAML formatting
...
Preserve default get behavior with yaml.safe_dump output for backwards
compatibility. Add -r flag for clean scalar output used by soup pcap
migration.
2026-03-13 16:24:41 -04:00
Mike Reeves
12dec366e0
Fix so-yaml get to output booleans in YAML format and add bool test
2026-03-13 15:58:47 -04:00
Mike Reeves
7f4adb70bd
Fix so-yaml get to print scalar values without YAML document end marker
2026-03-13 15:34:04 -04:00
Mike Reeves
e2483e4be0
Fix so-yaml addKey crash when intermediate key has None value
2026-03-13 15:22:29 -04:00
Josh Patterson
2375061cfa
so-yaml.py tell which key not found
2026-02-23 13:19:03 -05:00
Matthew Wright
90eee49ab6
whitespace issue pt2
2026-02-19 16:35:35 -05:00
Matthew Wright
f025886b31
whitespace issue
2026-02-19 16:33:40 -05:00
Matthew Wright
7fa01f5fd5
added new funcs to so-yaml.py to support gemini tests
2026-02-19 16:20:44 -05:00
Josh Patterson
ef092e2893
rename to removelistitem
2025-12-02 15:01:32 -05:00
Josh Patterson
89eb95c077
add removefromlist
2025-12-02 14:46:24 -05:00
Jason Ertel
0545e1d33b
add support to so-yaml for using yaml file content for values
2025-11-11 16:55:00 -05:00
Jason Ertel
f96b82b112
gracefully handle missing parent key
2024-06-08 07:44:46 -04:00
Jason Ertel
5600fed9c4
add ability to retrieve yaml values via so-yaml.py; improve so-minion id matching
2024-06-06 11:56:07 -04:00
Jason Ertel
3aea2dec85
analytics
2024-04-01 09:50:18 -04:00
m0duspwnens
24fd3ef8cc
uopdate error message
2024-02-06 16:22:13 -05:00
m0duspwnens
b3f6153667
update so-yaml tests
2024-02-06 16:15:54 -05:00
m0duspwnens
9d62ade32e
update so-yaml tests
2024-02-06 11:14:27 -05:00
m0duspwnens
2643ae08a7
add append to list
2024-02-05 17:54:30 -05:00
Wes
01a37df7fc
Add extra line
2023-12-05 20:02:12 +00:00
Jason Ertel
6356a0bf95
add support for nested keys
2023-11-20 16:18:30 -05:00
Jason Ertel
bc044fa2d5
more coverage
2023-11-08 18:42:06 -05:00
Jason Ertel
33a8ef1568
add yaml helper script; refactor python testing
2023-11-08 18:24:23 -05:00