Script-friendly CLI output, and keep record list rows on one line
-o id and -o field=NAME,... print just the IDs or chosen fields; -q on show and list prints the IDs. jarl record list shortens data too long for the terminal (--wide shows it in full). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
113a6913a2
commit
f716fb8dd1
7 files changed
+224
-11
No files matched your search
@@ -170,6 +170,12 @@ contains "\[disabled\]"
|
||||
run "disabling twice says so (exit 5)" 5 $J record disable adbraun.test web A
|
||||
contains "already disabled"
|
||||
run "record enable with PTR" 0 $J record enable adbraun.test web A --ptr
|
||||
run "record list -o id" 0 $J record list adbraun.test --name web -t A -o id
|
||||
if echo "$OUT" | grep -qx '[0-9][0-9]*'; then ok "-o id is just the ID"; else bad "-o id gave '$OUT'"; fi
|
||||
run "disable by the listed ID" 0 $J record disable --id "$OUT"
|
||||
run "zone show -o field" 0 $J zone show adbraun.test -o field=name,record_count,disabled_count
|
||||
contains "^adbraun.test. [0-9]* 1$"
|
||||
run "enable by ID" 0 $J record enable --id "$($J record list adbraun.test --name web -t A -o id)"
|
||||
expect_dig "enabled web A back" "192.168.1.30" web.adbraun.test A
|
||||
expect_dig "enabled PTR 30 back" "web.adbraun.test." 30.1.168.192.in-addr.arpa PTR
|
||||
run "CNAME conflict rejected (exit 6)" 6 $J record add adbraun.test www A 192.168.1.99
|
||||
|
||||
Reference in new issue
Block a user