Skip to content

Commit 8f7f3b5

Browse files
committed
docs: the verified no syntax for rci_call deletes
The skill says to find the syntax instead of guessing it, then leaves out the one shape that is hardest to guess. `no` sits beside the arguments rather than wrapping them, and the object's name travels in `name`. Confirmed on 5.1.1 by removing a policy, two name servers and a WireGuard interface, and by watching a dangling reference in another policy clean itself up afterwards.
1 parent 39ef564 commit 8f7f3b5

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

  • plugins/keenetic/skills/keenetic-rci

plugins/keenetic/skills/keenetic-rci/SKILL.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@ appears as `host <mac> policy Policy0`, which maps to
3737
`{"ip":{"hotspot":{"host":{"mac":"...","policy":"Policy0"}}}}`. Guessing field
3838
names instead produces silent no-ops, described below.
3939

40+
## Deleting something: `no` goes beside the arguments
41+
42+
The negation is not a wrapper key. The router shows an already-negated line as
43+
`"no": true` sitting next to that line's arguments, and a delete is written the
44+
same way round. The object's own name travels in `name`:
45+
46+
```json
47+
{"ip": {"policy": {"no": true, "name": "Policy1"}}}
48+
{"interface": {"no": true, "name": "Wireguard1"}}
49+
{"ip": {"name-server": {"no": true, "address": "1.1.1.1", "domain": "", "interface": "Wireguard1"}}}
50+
```
51+
52+
A successful delete answers with a `status` block that names what went, for
53+
example `removed policy "Policy1".` or `interface "Wireguard1" removed.`. No
54+
such block means nothing happened, whatever the HTTP code said.
55+
56+
References clean up on their own: removing `Wireguard1` also dropped the
57+
`no permit global Wireguard1` line that `Policy0` still carried.
58+
59+
Confirmed on KeeneticOS 5.1.1.
60+
4061
## Three traps
4162

4263
**A wrong field name looks exactly like success.** Send a field into a branch

0 commit comments

Comments
 (0)