libknot 3.3.12.dev0__tar.gz → 3.3.14.dev0__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.
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/PKG-INFO +62 -55
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/README.md +61 -54
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot.egg-info/PKG-INFO +62 -55
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/pyproject.toml +1 -1
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/setup.py +1 -1
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot/__init__.py +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot/control.py +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot/dname.py +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot/probe.py +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot.egg-info/SOURCES.txt +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot.egg-info/dependency_links.txt +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/libknot.egg-info/top_level.txt +0 -0
- {libknot-3.3.12.dev0 → libknot-3.3.14.dev0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: libknot
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.14.dev0
|
|
4
4
|
Summary: Python bindings for libknot
|
|
5
5
|
Home-page: https://gitlab.nic.cz/knot/knot-dns/-/tree/master/python/libknot
|
|
6
6
|
Author: CZ.NIC, z.s.p.o.
|
|
@@ -28,10 +28,10 @@ A Python interface for managing the Knot DNS daemon.
|
|
|
28
28
|
|
|
29
29
|
* [Introduction](#introduction)
|
|
30
30
|
* [Control module](#control-module)
|
|
31
|
-
+ [
|
|
32
|
-
+ [
|
|
33
|
-
+ [
|
|
34
|
-
+ [
|
|
31
|
+
+ [Usage](#control-usage)
|
|
32
|
+
+ [Protocol reference](#kctl-proto)
|
|
33
|
+
+ [Commands reference](#kctl-cmds)
|
|
34
|
+
+ [Examples](#control-examples)
|
|
35
35
|
* [Probe module](#probe-module)
|
|
36
36
|
+ [Probe usage](#probe-usage)
|
|
37
37
|
+ [Probe examples](#probe-examples)
|
|
@@ -68,7 +68,7 @@ The module usage consists of several steps:
|
|
|
68
68
|
afterwards.
|
|
69
69
|
* Closing the connection and deinitialization.
|
|
70
70
|
|
|
71
|
-
###
|
|
71
|
+
### Protocol overview<a id="kctl-proto"></a>
|
|
72
72
|
|
|
73
73
|
Connections are supposed to be short-lived, because maintaining a passive
|
|
74
74
|
connection is costly for the server. Therefore the expected usage of the ctl
|
|
@@ -107,22 +107,21 @@ The data section identifiers are defined in `libknot.control.KnotCtlDataIdx`:
|
|
|
107
107
|
| `DATA` | Configuration item/zone record data. |
|
|
108
108
|
| `FILTERS` | Command options or filters for output data processing. |
|
|
109
109
|
|
|
110
|
-
###
|
|
110
|
+
### Commands reference<a id="kctl-cmds"></a>
|
|
111
111
|
|
|
112
112
|
The following is a reference for the low-level CTL API. In case you're unsure
|
|
113
113
|
of the commands' semantics, please consult the
|
|
114
|
-
<a href="https://
|
|
114
|
+
<a href="https://www.knot-dns.cz/docs/latest/singlehtml/index.html#actions">knotc documentation</a>.
|
|
115
115
|
|
|
116
116
|
A concise notation is used for command synopsis:
|
|
117
117
|
|
|
118
118
|
<pre>
|
|
119
|
-
cmd-name(SECTION_NAME
|
|
120
|
-
[OPTIONAL_SECTION
|
|
121
|
-
[OPT_SECTION1, OPT_SECTION2],
|
|
122
|
-
[OPT_MASTER, [OPT_SLAVE]],
|
|
123
|
-
SECTION_NAME2
|
|
124
|
-
SECTION_NAME3={
|
|
125
|
-
SECTION_NAME4=<b>"a"</b><i>:flag's purpouse</i>,<b>"s"</b>,<b>"d"</b>,<b>"f"</b> <i># any subset of characters</i>
|
|
119
|
+
cmd-name(SECTION_NAME,
|
|
120
|
+
[OPTIONAL_SECTION="literal value"],
|
|
121
|
+
[OPT_SECTION1, OPT_SECTION2], # Sections must be present together or not at all
|
|
122
|
+
[OPT_MASTER, [OPT_SLAVE]], # OPT_SLAVE may only appear if OPT_MASTER is present
|
|
123
|
+
SECTION_NAME2="option1"|"option2", # Either one or the other literal may be used
|
|
124
|
+
SECTION_NAME3={"asdf"}, # any subset of characters
|
|
126
125
|
)
|
|
127
126
|
</pre>
|
|
128
127
|
|
|
@@ -130,52 +129,60 @@ The **`"B"`** flag always represents an option to execute in blocking mode.
|
|
|
130
129
|
|
|
131
130
|
#### Server
|
|
132
131
|
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
132
|
+
* `status([TYPE="cert-key"|"configure"|"version"|"workers"])`
|
|
133
|
+
* `stop()`
|
|
134
|
+
* `reload()`
|
|
135
|
+
* `stats([SECTION], [ITEM], [FLAGS="F"])`
|
|
136
|
+
+ `SECTION` stores the module, `ITEM` stores the counter
|
|
137
|
+
+ the `F` flag specifies to include 0 counters in server's response
|
|
137
138
|
|
|
138
139
|
#### Zone events
|
|
139
140
|
|
|
140
141
|
`ZONE`: if none applies to all zones
|
|
141
142
|
|
|
142
|
-
*
|
|
143
|
+
* `zone-status([ZONE], [FILTERS={"rstefc"}])`
|
|
143
144
|
+ `FILTERS`: role `(r)`, serial `(s)`, transaction `(t)`, events `(e)`, freeze `(f)`, catalog `(c)`
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
145
|
+
* `zone-reload([ZONE], [FLAGS={"BF"}])`
|
|
146
|
+
+ `FLAGS`: `F` reload modules
|
|
147
|
+
* `zone-refresh([ZONE], [FLAGS="B"])`
|
|
148
|
+
* `zone-retransfer([ZONE], [FLAGS="B"])`
|
|
149
|
+
* `zone-notify([ZONE], [FLAGS="B"])`
|
|
150
|
+
* `zone-flush([ZONE], [FILTERS="d", DATA], [FLAGS="B"])`
|
|
151
|
+
+ the outputdir `(d)` filter commands that zone(s) be flushed to path stored in the `DATA` section
|
|
152
|
+
* `zone-backup([ZONE], [FILTERS={"dzjtkocqZJTKOCQ"}, [DATA]], [FLAGS="B"])`
|
|
150
153
|
+ `FILTERS`
|
|
154
|
+
- for description of the outputdir `(d)` filter see `zone-flush`
|
|
151
155
|
- zonefile `(z)`, journal `(j)`, timers `(t)`, kaspdb `(k)`, keysonly `(o)`, catalog `(c)`, quic `(q)`
|
|
152
156
|
- negative counterparts (eg. `nozonefile`) are symmetrical and capitalized
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
157
|
+
* `zone-restore` <i>analogous to `zone-backup`</i>
|
|
158
|
+
* `zone-sign([ZONE], [FLAGS="B"])`
|
|
159
|
+
* `zone-validate([ZONE], [FLAGS="B"])`
|
|
160
|
+
* `zone-keys-load([ZONE], [FLAGS="B"])`
|
|
161
|
+
* `zone-key-rollover([ZONE], TYPE="ksk"|"zsk", [FLAGS="B"])`
|
|
162
|
+
* `zone-ksk-submitted([ZONE], [FLAGS="B"])`
|
|
163
|
+
* `zone-freeze([ZONE], [FLAGS="B"])`
|
|
164
|
+
* `zone-thaw([ZONE], [FLAGS="B"])`
|
|
165
|
+
* `zone-xfr-freeze([ZONE], [FLAGS="B"])`
|
|
166
|
+
* `zone-xfr-thaw([ZONE], [FLAGS="B"])`
|
|
163
167
|
|
|
164
168
|
#### Zone editing
|
|
165
169
|
|
|
166
170
|
Use `"@"` as `OWNER` if you want to denote `ZONE` itself as the owner.
|
|
167
171
|
|
|
168
|
-
*
|
|
169
|
-
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
172
|
+
* `zone-read([ZONE], [OWNER], [TYPE])`
|
|
173
|
+
+ if `ZONE` is left empty all zones are read
|
|
174
|
+
* `zone-begin(ZONE)`
|
|
175
|
+
* `zone-commit(ZONE)`
|
|
176
|
+
* `zone-abort(ZONE)`
|
|
177
|
+
* `zone-diff(ZONE)`
|
|
178
|
+
* `zone-get(ZONE, [OWNER], [TYPE])` <!-- TODO: test if OWNER and TYPE may be specified independently -->
|
|
179
|
+
* `zone-set(ZONE, OWNER, [TTL], TYPE, DATA)`
|
|
180
|
+
* `zone-unset(ZONE, OWNER, [TYPE, [DATA]])`
|
|
181
|
+
* `zone-purge(ZONE, [FILTERS={ocejktf}], [FLAGS="B"])`
|
|
177
182
|
+ `FILTERS`: orphan `(o)`, catalog `(c)`, expire `(e)`, journal `(j)`, kaspdb `(k)`, timers `(t)`, zonefile `(f)`
|
|
178
|
-
*
|
|
183
|
+
* `zone-stats(ZONE, [SECTION], [ITEM], [FLAGS="F"])`
|
|
184
|
+
+ `SECTION` stores the module, `ITEM` stores the counter
|
|
185
|
+
+ the `F` flag specifies to include 0 counters in server's response
|
|
179
186
|
|
|
180
187
|
#### Configuration
|
|
181
188
|
|
|
@@ -186,15 +193,15 @@ For the following commands:<br/>
|
|
|
186
193
|
· `ID` holds the configuration id (eg. `default`)<br/>
|
|
187
194
|
· `ITEM` holds the configuration item name (eg. `storage`)<br/>
|
|
188
195
|
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
196
|
+
* `conf-list([SECTION, [ID], [ITEM]], [FILTERS="s"])`
|
|
197
|
+
* `conf-read([SECTION, [ID], [ITEM]])`
|
|
198
|
+
* `conf-begin()`
|
|
199
|
+
* `conf-commit()`
|
|
200
|
+
* `conf-abort()`
|
|
201
|
+
* `conf-diff([SECTION, [ID], [ITEM]])`
|
|
202
|
+
* `conf-get([SECTION, [ID], [ITEM]])`
|
|
203
|
+
* `conf-set(SECTION, ID, ITEM, [DATA], [FILTERS="s"])`
|
|
204
|
+
* `conf-unset([SECTION, [ID], [ITEM]], [DATA])`
|
|
198
205
|
|
|
199
206
|
### Control examples<a id="control-examples"></a>
|
|
200
207
|
|
|
@@ -6,10 +6,10 @@ A Python interface for managing the Knot DNS daemon.
|
|
|
6
6
|
|
|
7
7
|
* [Introduction](#introduction)
|
|
8
8
|
* [Control module](#control-module)
|
|
9
|
-
+ [
|
|
10
|
-
+ [
|
|
11
|
-
+ [
|
|
12
|
-
+ [
|
|
9
|
+
+ [Usage](#control-usage)
|
|
10
|
+
+ [Protocol reference](#kctl-proto)
|
|
11
|
+
+ [Commands reference](#kctl-cmds)
|
|
12
|
+
+ [Examples](#control-examples)
|
|
13
13
|
* [Probe module](#probe-module)
|
|
14
14
|
+ [Probe usage](#probe-usage)
|
|
15
15
|
+ [Probe examples](#probe-examples)
|
|
@@ -46,7 +46,7 @@ The module usage consists of several steps:
|
|
|
46
46
|
afterwards.
|
|
47
47
|
* Closing the connection and deinitialization.
|
|
48
48
|
|
|
49
|
-
###
|
|
49
|
+
### Protocol overview<a id="kctl-proto"></a>
|
|
50
50
|
|
|
51
51
|
Connections are supposed to be short-lived, because maintaining a passive
|
|
52
52
|
connection is costly for the server. Therefore the expected usage of the ctl
|
|
@@ -85,22 +85,21 @@ The data section identifiers are defined in `libknot.control.KnotCtlDataIdx`:
|
|
|
85
85
|
| `DATA` | Configuration item/zone record data. |
|
|
86
86
|
| `FILTERS` | Command options or filters for output data processing. |
|
|
87
87
|
|
|
88
|
-
###
|
|
88
|
+
### Commands reference<a id="kctl-cmds"></a>
|
|
89
89
|
|
|
90
90
|
The following is a reference for the low-level CTL API. In case you're unsure
|
|
91
91
|
of the commands' semantics, please consult the
|
|
92
|
-
<a href="https://
|
|
92
|
+
<a href="https://www.knot-dns.cz/docs/latest/singlehtml/index.html#actions">knotc documentation</a>.
|
|
93
93
|
|
|
94
94
|
A concise notation is used for command synopsis:
|
|
95
95
|
|
|
96
96
|
<pre>
|
|
97
|
-
cmd-name(SECTION_NAME
|
|
98
|
-
[OPTIONAL_SECTION
|
|
99
|
-
[OPT_SECTION1, OPT_SECTION2],
|
|
100
|
-
[OPT_MASTER, [OPT_SLAVE]],
|
|
101
|
-
SECTION_NAME2
|
|
102
|
-
SECTION_NAME3={
|
|
103
|
-
SECTION_NAME4=<b>"a"</b><i>:flag's purpouse</i>,<b>"s"</b>,<b>"d"</b>,<b>"f"</b> <i># any subset of characters</i>
|
|
97
|
+
cmd-name(SECTION_NAME,
|
|
98
|
+
[OPTIONAL_SECTION="literal value"],
|
|
99
|
+
[OPT_SECTION1, OPT_SECTION2], # Sections must be present together or not at all
|
|
100
|
+
[OPT_MASTER, [OPT_SLAVE]], # OPT_SLAVE may only appear if OPT_MASTER is present
|
|
101
|
+
SECTION_NAME2="option1"|"option2", # Either one or the other literal may be used
|
|
102
|
+
SECTION_NAME3={"asdf"}, # any subset of characters
|
|
104
103
|
)
|
|
105
104
|
</pre>
|
|
106
105
|
|
|
@@ -108,52 +107,60 @@ The **`"B"`** flag always represents an option to execute in blocking mode.
|
|
|
108
107
|
|
|
109
108
|
#### Server
|
|
110
109
|
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
110
|
+
* `status([TYPE="cert-key"|"configure"|"version"|"workers"])`
|
|
111
|
+
* `stop()`
|
|
112
|
+
* `reload()`
|
|
113
|
+
* `stats([SECTION], [ITEM], [FLAGS="F"])`
|
|
114
|
+
+ `SECTION` stores the module, `ITEM` stores the counter
|
|
115
|
+
+ the `F` flag specifies to include 0 counters in server's response
|
|
115
116
|
|
|
116
117
|
#### Zone events
|
|
117
118
|
|
|
118
119
|
`ZONE`: if none applies to all zones
|
|
119
120
|
|
|
120
|
-
*
|
|
121
|
+
* `zone-status([ZONE], [FILTERS={"rstefc"}])`
|
|
121
122
|
+ `FILTERS`: role `(r)`, serial `(s)`, transaction `(t)`, events `(e)`, freeze `(f)`, catalog `(c)`
|
|
122
|
-
*
|
|
123
|
-
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
123
|
+
* `zone-reload([ZONE], [FLAGS={"BF"}])`
|
|
124
|
+
+ `FLAGS`: `F` reload modules
|
|
125
|
+
* `zone-refresh([ZONE], [FLAGS="B"])`
|
|
126
|
+
* `zone-retransfer([ZONE], [FLAGS="B"])`
|
|
127
|
+
* `zone-notify([ZONE], [FLAGS="B"])`
|
|
128
|
+
* `zone-flush([ZONE], [FILTERS="d", DATA], [FLAGS="B"])`
|
|
129
|
+
+ the outputdir `(d)` filter commands that zone(s) be flushed to path stored in the `DATA` section
|
|
130
|
+
* `zone-backup([ZONE], [FILTERS={"dzjtkocqZJTKOCQ"}, [DATA]], [FLAGS="B"])`
|
|
128
131
|
+ `FILTERS`
|
|
132
|
+
- for description of the outputdir `(d)` filter see `zone-flush`
|
|
129
133
|
- zonefile `(z)`, journal `(j)`, timers `(t)`, kaspdb `(k)`, keysonly `(o)`, catalog `(c)`, quic `(q)`
|
|
130
134
|
- negative counterparts (eg. `nozonefile`) are symmetrical and capitalized
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
135
|
+
* `zone-restore` <i>analogous to `zone-backup`</i>
|
|
136
|
+
* `zone-sign([ZONE], [FLAGS="B"])`
|
|
137
|
+
* `zone-validate([ZONE], [FLAGS="B"])`
|
|
138
|
+
* `zone-keys-load([ZONE], [FLAGS="B"])`
|
|
139
|
+
* `zone-key-rollover([ZONE], TYPE="ksk"|"zsk", [FLAGS="B"])`
|
|
140
|
+
* `zone-ksk-submitted([ZONE], [FLAGS="B"])`
|
|
141
|
+
* `zone-freeze([ZONE], [FLAGS="B"])`
|
|
142
|
+
* `zone-thaw([ZONE], [FLAGS="B"])`
|
|
143
|
+
* `zone-xfr-freeze([ZONE], [FLAGS="B"])`
|
|
144
|
+
* `zone-xfr-thaw([ZONE], [FLAGS="B"])`
|
|
141
145
|
|
|
142
146
|
#### Zone editing
|
|
143
147
|
|
|
144
148
|
Use `"@"` as `OWNER` if you want to denote `ZONE` itself as the owner.
|
|
145
149
|
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
150
|
+
* `zone-read([ZONE], [OWNER], [TYPE])`
|
|
151
|
+
+ if `ZONE` is left empty all zones are read
|
|
152
|
+
* `zone-begin(ZONE)`
|
|
153
|
+
* `zone-commit(ZONE)`
|
|
154
|
+
* `zone-abort(ZONE)`
|
|
155
|
+
* `zone-diff(ZONE)`
|
|
156
|
+
* `zone-get(ZONE, [OWNER], [TYPE])` <!-- TODO: test if OWNER and TYPE may be specified independently -->
|
|
157
|
+
* `zone-set(ZONE, OWNER, [TTL], TYPE, DATA)`
|
|
158
|
+
* `zone-unset(ZONE, OWNER, [TYPE, [DATA]])`
|
|
159
|
+
* `zone-purge(ZONE, [FILTERS={ocejktf}], [FLAGS="B"])`
|
|
155
160
|
+ `FILTERS`: orphan `(o)`, catalog `(c)`, expire `(e)`, journal `(j)`, kaspdb `(k)`, timers `(t)`, zonefile `(f)`
|
|
156
|
-
*
|
|
161
|
+
* `zone-stats(ZONE, [SECTION], [ITEM], [FLAGS="F"])`
|
|
162
|
+
+ `SECTION` stores the module, `ITEM` stores the counter
|
|
163
|
+
+ the `F` flag specifies to include 0 counters in server's response
|
|
157
164
|
|
|
158
165
|
#### Configuration
|
|
159
166
|
|
|
@@ -164,15 +171,15 @@ For the following commands:<br/>
|
|
|
164
171
|
· `ID` holds the configuration id (eg. `default`)<br/>
|
|
165
172
|
· `ITEM` holds the configuration item name (eg. `storage`)<br/>
|
|
166
173
|
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
174
|
+
* `conf-list([SECTION, [ID], [ITEM]], [FILTERS="s"])`
|
|
175
|
+
* `conf-read([SECTION, [ID], [ITEM]])`
|
|
176
|
+
* `conf-begin()`
|
|
177
|
+
* `conf-commit()`
|
|
178
|
+
* `conf-abort()`
|
|
179
|
+
* `conf-diff([SECTION, [ID], [ITEM]])`
|
|
180
|
+
* `conf-get([SECTION, [ID], [ITEM]])`
|
|
181
|
+
* `conf-set(SECTION, ID, ITEM, [DATA], [FILTERS="s"])`
|
|
182
|
+
* `conf-unset([SECTION, [ID], [ITEM]], [DATA])`
|
|
176
183
|
|
|
177
184
|
### Control examples<a id="control-examples"></a>
|
|
178
185
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: libknot
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.14.dev0
|
|
4
4
|
Summary: Python bindings for libknot
|
|
5
5
|
Home-page: https://gitlab.nic.cz/knot/knot-dns/-/tree/master/python/libknot
|
|
6
6
|
Author: CZ.NIC, z.s.p.o.
|
|
@@ -28,10 +28,10 @@ A Python interface for managing the Knot DNS daemon.
|
|
|
28
28
|
|
|
29
29
|
* [Introduction](#introduction)
|
|
30
30
|
* [Control module](#control-module)
|
|
31
|
-
+ [
|
|
32
|
-
+ [
|
|
33
|
-
+ [
|
|
34
|
-
+ [
|
|
31
|
+
+ [Usage](#control-usage)
|
|
32
|
+
+ [Protocol reference](#kctl-proto)
|
|
33
|
+
+ [Commands reference](#kctl-cmds)
|
|
34
|
+
+ [Examples](#control-examples)
|
|
35
35
|
* [Probe module](#probe-module)
|
|
36
36
|
+ [Probe usage](#probe-usage)
|
|
37
37
|
+ [Probe examples](#probe-examples)
|
|
@@ -68,7 +68,7 @@ The module usage consists of several steps:
|
|
|
68
68
|
afterwards.
|
|
69
69
|
* Closing the connection and deinitialization.
|
|
70
70
|
|
|
71
|
-
###
|
|
71
|
+
### Protocol overview<a id="kctl-proto"></a>
|
|
72
72
|
|
|
73
73
|
Connections are supposed to be short-lived, because maintaining a passive
|
|
74
74
|
connection is costly for the server. Therefore the expected usage of the ctl
|
|
@@ -107,22 +107,21 @@ The data section identifiers are defined in `libknot.control.KnotCtlDataIdx`:
|
|
|
107
107
|
| `DATA` | Configuration item/zone record data. |
|
|
108
108
|
| `FILTERS` | Command options or filters for output data processing. |
|
|
109
109
|
|
|
110
|
-
###
|
|
110
|
+
### Commands reference<a id="kctl-cmds"></a>
|
|
111
111
|
|
|
112
112
|
The following is a reference for the low-level CTL API. In case you're unsure
|
|
113
113
|
of the commands' semantics, please consult the
|
|
114
|
-
<a href="https://
|
|
114
|
+
<a href="https://www.knot-dns.cz/docs/latest/singlehtml/index.html#actions">knotc documentation</a>.
|
|
115
115
|
|
|
116
116
|
A concise notation is used for command synopsis:
|
|
117
117
|
|
|
118
118
|
<pre>
|
|
119
|
-
cmd-name(SECTION_NAME
|
|
120
|
-
[OPTIONAL_SECTION
|
|
121
|
-
[OPT_SECTION1, OPT_SECTION2],
|
|
122
|
-
[OPT_MASTER, [OPT_SLAVE]],
|
|
123
|
-
SECTION_NAME2
|
|
124
|
-
SECTION_NAME3={
|
|
125
|
-
SECTION_NAME4=<b>"a"</b><i>:flag's purpouse</i>,<b>"s"</b>,<b>"d"</b>,<b>"f"</b> <i># any subset of characters</i>
|
|
119
|
+
cmd-name(SECTION_NAME,
|
|
120
|
+
[OPTIONAL_SECTION="literal value"],
|
|
121
|
+
[OPT_SECTION1, OPT_SECTION2], # Sections must be present together or not at all
|
|
122
|
+
[OPT_MASTER, [OPT_SLAVE]], # OPT_SLAVE may only appear if OPT_MASTER is present
|
|
123
|
+
SECTION_NAME2="option1"|"option2", # Either one or the other literal may be used
|
|
124
|
+
SECTION_NAME3={"asdf"}, # any subset of characters
|
|
126
125
|
)
|
|
127
126
|
</pre>
|
|
128
127
|
|
|
@@ -130,52 +129,60 @@ The **`"B"`** flag always represents an option to execute in blocking mode.
|
|
|
130
129
|
|
|
131
130
|
#### Server
|
|
132
131
|
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
132
|
+
* `status([TYPE="cert-key"|"configure"|"version"|"workers"])`
|
|
133
|
+
* `stop()`
|
|
134
|
+
* `reload()`
|
|
135
|
+
* `stats([SECTION], [ITEM], [FLAGS="F"])`
|
|
136
|
+
+ `SECTION` stores the module, `ITEM` stores the counter
|
|
137
|
+
+ the `F` flag specifies to include 0 counters in server's response
|
|
137
138
|
|
|
138
139
|
#### Zone events
|
|
139
140
|
|
|
140
141
|
`ZONE`: if none applies to all zones
|
|
141
142
|
|
|
142
|
-
*
|
|
143
|
+
* `zone-status([ZONE], [FILTERS={"rstefc"}])`
|
|
143
144
|
+ `FILTERS`: role `(r)`, serial `(s)`, transaction `(t)`, events `(e)`, freeze `(f)`, catalog `(c)`
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
145
|
+
* `zone-reload([ZONE], [FLAGS={"BF"}])`
|
|
146
|
+
+ `FLAGS`: `F` reload modules
|
|
147
|
+
* `zone-refresh([ZONE], [FLAGS="B"])`
|
|
148
|
+
* `zone-retransfer([ZONE], [FLAGS="B"])`
|
|
149
|
+
* `zone-notify([ZONE], [FLAGS="B"])`
|
|
150
|
+
* `zone-flush([ZONE], [FILTERS="d", DATA], [FLAGS="B"])`
|
|
151
|
+
+ the outputdir `(d)` filter commands that zone(s) be flushed to path stored in the `DATA` section
|
|
152
|
+
* `zone-backup([ZONE], [FILTERS={"dzjtkocqZJTKOCQ"}, [DATA]], [FLAGS="B"])`
|
|
150
153
|
+ `FILTERS`
|
|
154
|
+
- for description of the outputdir `(d)` filter see `zone-flush`
|
|
151
155
|
- zonefile `(z)`, journal `(j)`, timers `(t)`, kaspdb `(k)`, keysonly `(o)`, catalog `(c)`, quic `(q)`
|
|
152
156
|
- negative counterparts (eg. `nozonefile`) are symmetrical and capitalized
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
157
|
+
* `zone-restore` <i>analogous to `zone-backup`</i>
|
|
158
|
+
* `zone-sign([ZONE], [FLAGS="B"])`
|
|
159
|
+
* `zone-validate([ZONE], [FLAGS="B"])`
|
|
160
|
+
* `zone-keys-load([ZONE], [FLAGS="B"])`
|
|
161
|
+
* `zone-key-rollover([ZONE], TYPE="ksk"|"zsk", [FLAGS="B"])`
|
|
162
|
+
* `zone-ksk-submitted([ZONE], [FLAGS="B"])`
|
|
163
|
+
* `zone-freeze([ZONE], [FLAGS="B"])`
|
|
164
|
+
* `zone-thaw([ZONE], [FLAGS="B"])`
|
|
165
|
+
* `zone-xfr-freeze([ZONE], [FLAGS="B"])`
|
|
166
|
+
* `zone-xfr-thaw([ZONE], [FLAGS="B"])`
|
|
163
167
|
|
|
164
168
|
#### Zone editing
|
|
165
169
|
|
|
166
170
|
Use `"@"` as `OWNER` if you want to denote `ZONE` itself as the owner.
|
|
167
171
|
|
|
168
|
-
*
|
|
169
|
-
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
172
|
+
* `zone-read([ZONE], [OWNER], [TYPE])`
|
|
173
|
+
+ if `ZONE` is left empty all zones are read
|
|
174
|
+
* `zone-begin(ZONE)`
|
|
175
|
+
* `zone-commit(ZONE)`
|
|
176
|
+
* `zone-abort(ZONE)`
|
|
177
|
+
* `zone-diff(ZONE)`
|
|
178
|
+
* `zone-get(ZONE, [OWNER], [TYPE])` <!-- TODO: test if OWNER and TYPE may be specified independently -->
|
|
179
|
+
* `zone-set(ZONE, OWNER, [TTL], TYPE, DATA)`
|
|
180
|
+
* `zone-unset(ZONE, OWNER, [TYPE, [DATA]])`
|
|
181
|
+
* `zone-purge(ZONE, [FILTERS={ocejktf}], [FLAGS="B"])`
|
|
177
182
|
+ `FILTERS`: orphan `(o)`, catalog `(c)`, expire `(e)`, journal `(j)`, kaspdb `(k)`, timers `(t)`, zonefile `(f)`
|
|
178
|
-
*
|
|
183
|
+
* `zone-stats(ZONE, [SECTION], [ITEM], [FLAGS="F"])`
|
|
184
|
+
+ `SECTION` stores the module, `ITEM` stores the counter
|
|
185
|
+
+ the `F` flag specifies to include 0 counters in server's response
|
|
179
186
|
|
|
180
187
|
#### Configuration
|
|
181
188
|
|
|
@@ -186,15 +193,15 @@ For the following commands:<br/>
|
|
|
186
193
|
· `ID` holds the configuration id (eg. `default`)<br/>
|
|
187
194
|
· `ITEM` holds the configuration item name (eg. `storage`)<br/>
|
|
188
195
|
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
196
|
+
* `conf-list([SECTION, [ID], [ITEM]], [FILTERS="s"])`
|
|
197
|
+
* `conf-read([SECTION, [ID], [ITEM]])`
|
|
198
|
+
* `conf-begin()`
|
|
199
|
+
* `conf-commit()`
|
|
200
|
+
* `conf-abort()`
|
|
201
|
+
* `conf-diff([SECTION, [ID], [ITEM]])`
|
|
202
|
+
* `conf-get([SECTION, [ID], [ITEM]])`
|
|
203
|
+
* `conf-set(SECTION, ID, ITEM, [DATA], [FILTERS="s"])`
|
|
204
|
+
* `conf-unset([SECTION, [ID], [ITEM]], [DATA])`
|
|
198
205
|
|
|
199
206
|
### Control examples<a id="control-examples"></a>
|
|
200
207
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|