1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-10-08 23:22:21 +02:00
Commit Graph

705 Commits

Author SHA1 Message Date
Kelly Brazil
cfa7f267fc update schema 2024-02-06 01:54:31 +00:00
Kelly Brazil
c581e959fa formatting 2024-02-06 01:54:31 +00:00
Kelly Brazil
9eb56543be add verbosity check for printing 2024-02-06 01:54:31 +00:00
Kelly Brazil
0411940f75 add full path to error messages 2024-02-06 01:54:31 +00:00
Kelly Brazil
7d60df67f3 check for missing fixtures 2024-02-06 01:54:31 +00:00
Kelly Brazil
70a971a2f1 formatting 2024-02-06 01:54:31 +00:00
Kelly Brazil
3fbdffd028 efibootmgr updates 2024-02-06 01:54:31 +00:00
yaofei zheng
539fe72d16 add "sudo efibootmgr" (without -v) output test case (#534) 2024-02-06 01:54:31 +00:00
Kelly Brazil
bd6611aaba doc updates 2024-02-06 01:54:31 +00:00
Kelly Brazil
cf77ddc396 cleanup 2024-02-06 01:54:31 +00:00
Kelly Brazil
77bcd616cd add tests for curl-head and http-headers parsers 2024-02-06 01:54:31 +00:00
yaofei zheng
5ee2eda83e add efibootmgr parser (#528)
* More nsd fixes (#523)

* Update nsd_control.py

support catz output

* Update nsd_control.py

fix parsing of catz zones

* add testdata

add corresponding catz testdata

* Revert "More nsd fixes" (#526)

* add efibootmgr parser

* add efibootmgr completions

* Multiple fixes on jc/parsers/efibootmgr.py

1. Update schema in comments.
1. Add an example.
1. Use clean and clear sub string finding sytax.
1. Wrap schema in an object.
1. Make variable scope as small as possible.

* add tests for efibootmgr

* Update jc/parsers/efibootmgr.py

Update example using `--pretty` for output.

Co-authored-by: Muescha <184316+muescha@users.noreply.github.com>

* jc/parsers/efibootmgr multiple changes

1. convert all keys to "snake_case"
2. add "mirrored_percentage_above_4g" and "mirror_memory_below_4gb"
3. move conversion (from string to other types) to "_process"

---------

Co-authored-by: pettai <pettai@sunet.se>
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
Co-authored-by: Muescha <184316+muescha@users.noreply.github.com>
2024-02-06 01:54:31 +00:00
Kelly Brazil
5b849b0275 doc update 2024-02-06 01:54:31 +00:00
Kelly Brazil
3e5d206f0c test utils cleanup 2024-02-06 01:54:31 +00:00
Muescha
962632ac1f Feature: generic fixtures tests (#529)
* add generic test runners

* extract generic test runners

* beautify messages, remove unused return value

* add template and info do CONTRIBUTING

* typo

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-02-06 01:54:31 +00:00
Kelly Brazil
b65f37e075 add normalize_key() function and tests 2024-02-06 01:54:31 +00:00
Kelly Brazil
6434ff61bf add HTTP header datetime format 2024-02-06 01:54:31 +00:00
Muescha
c332c4febf draft for path and path_list (#513)
* draft for path_list

* updaate doc

* add input check

* fix types

* fix schema: add missing properties

* add _process

* fix _process docs

* refactor: extract path.py parser

* swap order of names alphabetically

* documentation and comments

* path parser: add early return for nodata

* path and path-list parser: add test and fixtures

* typo in file name

* add early return for nodata

* add test and fixtures

* typo in file name

* rename fixtures

* rename fixtures

* refactor to pathlib.Path

* failing on windows - use PurePosixPath

* changed the way to strip dot from suffix

* add POSIX to path

* test commit to see results on windows is failing

* test commit to see results on windows is failing

* add windows path detection

* somehow Path not like the newline from input line

* add test with more items

* remove debug print

* wrap test loops into into subTest

* remove print statements

* add path and path-list to CHANGELOG

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-02-06 01:54:31 +00:00
Kelly Brazil
b836ffc583 add tests for convert_size_to_int() 2024-02-06 01:54:31 +00:00
pettai
ec0f2569e5 More nsd fixes (#523)
* Update nsd_control.py

support catz output

* Update nsd_control.py

fix parsing of catz zones

* add testdata

add corresponding catz testdata
2024-02-06 01:54:31 +00:00
Kelly Brazil
afbc46076e add ping tests 2024-02-06 01:54:31 +00:00
Mabuchin
2b9b6550a7 Fix data_bytes is null in ping -I option (#520)
* fixed header parsing when specifying ping interface

* add source_ip parsing test for ping/ping-s

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-02-06 01:54:31 +00:00
Kelly Brazil
cc61b57dd1 add blank line tests to slicer 2024-02-06 01:54:31 +00:00
Kelly Brazil
b5c3a03d56 implement slurp by wrapping in a list, adding "_file" for /proc, and further wrapping in {"result": data} when --meta-out is used. 2024-02-06 01:54:31 +00:00
Kelly Brazil
cae41df1d8 add get_parser tests 2024-02-06 01:54:31 +00:00
Kelly Brazil
8e9ff7fa9f refactor to use get_parser() 2024-02-06 01:54:31 +00:00
Kelly Brazil
3399e8551e add slurpable_parser_mod_list test 2024-02-06 01:54:31 +00:00
Kelly Brazil
b9656c2fae add line_slice tests 2024-02-06 01:54:31 +00:00
Kelly Brazil
e08ccb7942 add slurp test. fix cli_json_out_pretty test 2024-02-06 01:54:31 +00:00
Kelly Brazil
3999276d17 add parent, filename, stem, and extension to schema 2024-02-06 01:54:31 +00:00
Kelly Brazil
d71c2d2b20 add kv_dup tests 2024-02-06 01:54:31 +00:00
Kelly Brazil
50d5d3a3ba add opposite endian ipv6 addresses for s390x and other Big Endian architecture support 2024-02-06 01:54:31 +00:00
Kelly Brazil
140a61702b Revert "More nsd fixes" (#526) 2024-01-26 14:22:13 -08:00
pettai
4d3fc07e3b More nsd fixes (#523)
* Update nsd_control.py

support catz output

* Update nsd_control.py

fix parsing of catz zones

* add testdata

add corresponding catz testdata
2024-01-26 14:20:33 -08:00
Kelly Brazil
0d4823c9de doc update 2023-12-17 09:44:18 -08:00
Kelly Brazil
2a14f56b72 add proc-cmdline tests 2023-12-16 13:18:14 -08:00
Kelly Brazil
a254ee8d88 add test for issue 490 2023-12-16 11:39:40 -08:00
Kelly Brazil
103bb174fc rename pkg-index-alpine to pkg-index-apk 2023-12-10 10:49:05 -08:00
Kelly Brazil
88ffcaee56 update schema. fix no-data output to match other parsers. 2023-12-10 10:29:58 -08:00
Kelly Brazil
2630049ab7 possible fix for infinite loop issue 2023-12-09 16:14:27 -08:00
Kelly Brazil
356857f5d6 rename deb-packages-index to pkg-index-deb 2023-12-09 10:17:48 -08:00
Kelly Brazil
ee12c52291 rename apkindex parser to pkg-index-alpine 2023-12-09 10:03:33 -08:00
Ron Green
0e7ebf4dc1 feat(iftop): add iftop-scanning (#484)
* feat(iftop): add iftop-scanning

this is not even an MVP, but I would like it to exist to allow per client json aggregation

also, a future use is a stream response

* fix typos and test first regex

* add more iftop fun

* Update iftop.py

* add tests and json

Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>

* feat: make work and add tests

Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>

* add completion

* change schema for query looping

* fix: tests

* fix review comments

* feat: add byte parsing

* add no-port to options

* remove completion and format dep

Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>

* Update setup.py

* Update iftop.py

---------

Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2023-12-07 18:22:53 -08:00
Kelly Brazil
f1e0cec9d6 add apkindex parser 2023-12-04 14:01:30 -08:00
Roey Darwish Dror
d96a2a8623 APKINDEX parser (#487) (#491)
* APKINDEX parser (#487)

* Missing space in doc
2023-12-04 13:35:04 -08:00
Kelly Brazil
d5a8b4eed2 remove deprecated iso-datetime parser 2023-12-04 11:35:37 -08:00
Kelly Brazil
8b94c326de add no data test 2023-12-04 09:59:28 -08:00
Roey Darwish Dror
3de6eac1ad swapon parser (#383) (#489)
* swapon parser

* revert lib

* fix lib

* Added tests

* Fix tests

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2023-11-28 11:15:40 -08:00
Kelly Brazil
1cd723b48f add tests 2023-11-23 15:19:14 -08:00
Kelly Brazil
82ee4d7b30 add debconf-show parser 2023-11-23 14:52:06 -08:00