You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-ietf-netconf-transaction-id.md
+87-23Lines changed: 87 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,16 @@ RESTCONF mechanism relies on HTTP Headers instead, and use none of
119
119
the XML attributes described in this document, nor JSON Metadata
120
120
(see {{RFC7952}}).
121
121
122
+
## How to Read this Document
123
+
124
+
At the heart of this document, in chapter [Txid Mechanisms](#txid-mechanisms), there are two transaction-id handling mechanisms defined, the "Etag" and "Last-Modified" Transaction-id mechanisms.
125
+
126
+
The common and general principles for all transaction-id mechanisms are defined in the chapter before that, [NETCONF Txid Extension](#netconf-txid-extension). Since the two Transaction-id mechanisms defined in this document have a lot in common, and the future might bring additional such mechanisms, this arrangement keeps the repetition to a minimum. By necessity, this chapter is a bit abstract. The details of how the principles are expressed in a specific Transaction-id mechanism follows in the [Txid Mechanisms](#txid-mechanisms) chapter.
127
+
128
+
Next after the central chapter with the definitions of the Transaction-id handling mechanisms, there is an extensive chapter with usage examples. This chapter is called [Txid Mechanism Examples](#txid-mechanism-examples).
129
+
130
+
Towards the end, there is also a chapter with [YANG Modules](#yang-modules). These are necessary for a correct implementation, but reading them will not provide much for the understanding of this document. The mechanisms defined in this document are largely on the NETCONF protocol level, and most aspects cannot be described by YANG modules.
131
+
122
132
# Conventions and Definitions
123
133
124
134
{::boilerplate bcp14}
@@ -251,7 +261,7 @@ txid values.
251
261
Regardless of whether a server declares the Versioned Nodes or not,
252
262
the set of Versioned Nodes in the server's YANG tree MUST remain
253
263
constant, except at system redefining events, such as software upgrades
254
-
or entitlement installations or removals.
264
+
or entitlement (a.k.a. "license") installations or removals.
255
265
256
266
The server returning txid values for the Versioned Nodes
257
267
MUST ensure that the txid values are changed every time there has
@@ -323,7 +333,7 @@ recent change seems to have been an update to ace R8 and
323
333
R9." #fig-baseline}
324
334
325
335
> The call flow examples in this document use a 4-digit,
326
-
monotonously increasing integer as txid. The same txid value
336
+
strictly increasing integer as txid. The same txid value
327
337
is also used for all changed nodes in a given transaction.
328
338
These conventions of the examples are convenient and enhances
329
339
readability of the examples, but do not necessarily
@@ -343,16 +353,14 @@ described in the coming sections. Servers may expose a configuration parameter
343
353
to control the history depth. Such control depends on the local server capabilities.
344
354
Refer to {{sec-histo-size}} for more considerations about history size.
345
355
346
-
Some server implementors may decide to use a monotonically increasing
356
+
Some server implementors may decide to use a strictly increasing
347
357
integer as the txid value or a timestamp. Doing so obviously makes
348
358
it very easy for the server to determine the sequence of historical
349
359
transaction ids.
350
360
351
361
Some server implementors may decide to use a completely different txid
352
362
value sequence, to the point that the sequence may appear completely
353
-
random to outside observers. Clients MUST NOT assume or infer any semantic from txids. For example, clients must not assume that
354
-
servers use a txid value scheme that reveals information about the
355
-
temporal sequence of txid values.
363
+
random to outside observers.
356
364
357
365
## Subsequent Configuration Retrieval
358
366
@@ -397,6 +405,8 @@ key nodes MUST be included in the response, and other child nodes
397
405
MUST NOT be included. For containers, child nodes MUST NOT
398
406
be included.
399
407
408
+
### When there is No Change
409
+
400
410
Here follows a couple of examples of how the rules above are applied.
401
411
See [the example above](#fig-baseline) for the most recent server
402
412
configuration state that the client is aware of, before this happens:
@@ -426,6 +436,8 @@ In this case, the server's txid-based pruning saved a substantial
426
436
amount of information that is already known by the client to be sent
427
437
to and processed by the client.
428
438
439
+
### When there is an Out-Of-Band (OOB) Change
440
+
429
441
In the following example someone has made a change to the
430
442
configuration on the server. This server has chosen to implement
431
443
a Txid History with up to 5 entries. The 5 most recently used
@@ -480,6 +492,8 @@ exactly match (5152). Finally, acl R9 is returned because of its less
480
492
recent c-txid value given by the client (5152, on the closest ancestor
481
493
acl A2) than the s-txid held on the server (6614).
482
494
495
+
### When a Txid value is Inherited from an Ancestor Node
496
+
483
497
In the example shown in {{fig-vn}}, the client specifies the c-txid for a node that
484
498
the server does not maintain a s-txid for, i.e., it is not a
485
499
Versioned Node.
@@ -519,7 +533,8 @@ for the list entry ace R7, but not for any of its children. Thus
519
533
the server finds the server side s-txid value to be 4711 (from ace R7),
520
534
which matches the client's c-txid value of 4711.
521
535
522
-
Servers MUST NOT ever use the special txid values, txid-match, txid-request, txid-unknown (e.g., "=", "?", or "!") as actual
536
+
Servers MUST NOT use the special txid values, txid-match,
537
+
txid-request, txid-unknown (e.g., "=", "?", or "!") as actual
523
538
txid values.
524
539
525
540
## Candidate Datastore Configuration Retrieval
@@ -957,7 +972,7 @@ txid values in the candidate datastore get the same txid values
957
972
as in the running datastore when this operation runs.
958
973
959
974
``<copy-config>``:
960
-
: The `<copy-config>`` operation can be used to copy contents between
975
+
: The ``<copy-config>`` operation can be used to copy contents between
961
976
datastores. The server MUST ensure the txid values are retained
962
977
and changed as if the data being copied had been sent in through an
963
978
edit-config operation.
@@ -1163,15 +1178,9 @@ The last-modified attribute values are yang:date-and-time values as
1163
1178
defined in ietf-yang-types.yang, {{RFC6991}}.
1164
1179
1165
1180
"2022-04-01T12:34:56.123456Z"is an example of what this time stamp
1166
-
format looks like. It is RECOMMENDED that the time stamps provided
1167
-
by the server closely match the real world clock. Servers
1168
-
MUST ensure the timestamps provided are monotonously increasing for
1169
-
as long as the server's operation is maintained.
1170
-
1171
-
It is RECOMMENDED that server implementors choose the number of
1172
-
digits of precision used for the fractional second timestamps
1173
-
high enough so that there is no risk that multiple transactions on
1174
-
the server would get the same timestamp.
1181
+
format looks like. Servers MUST ensure the timestamps provided are
1182
+
strictly increasing for as long as the server's operation is
1183
+
maintained.
1175
1184
1176
1185
It is RECOMMENDED that the same last-modified txid values are used
1177
1186
across all management interfaces (i.e. NETCONF and any other the
@@ -1311,12 +1320,6 @@ In server messages sent to a client:
1311
1320
1312
1321
### With etag
1313
1322
1314
-
NOTE: In the etag examples below, we have chosen to use a txid
1315
-
value consisting of "nc" followed by a monotonously increasing
1316
-
integer. This is convenient for the reader trying to make sense
1317
-
of the examples, but is not an implementation requirement. An
1318
-
etag would often be implemented as a "random" string of characters.
1319
-
1320
1323
To retrieve etag attributes across the entire NETCONF server
1321
1324
configuration, a client might send:
1322
1325
@@ -1333,6 +1336,52 @@ configuration, a client might send:
It is up to the server implementor to decide on the format of the
1370
+
etag txid value. In the example above, the server used "random"
1371
+
UUID values. This is one valid implementation choice.
1372
+
1373
+
For the etag txid examples below, we have chosen to use an etag txid
1374
+
value consisting of "nc" (or "cli" in some cases) followed by a
1375
+
strictly increasing integer. This is another valid implementation
1376
+
choice. This format is convenient for the reader trying to make
1377
+
sense of the examples, but is not an implementation requirement.
1378
+
1379
+
Clients have to be prepared to receive etag txid values in different
1380
+
formats.
1381
+
1382
+
Repeating the example above, but now with a server returning more
1383
+
human readable etag txid values, the server's reply might be:
1384
+
1336
1385
~~~ xml
1337
1386
<rpc-reply message-id="1"
1338
1387
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
@@ -2671,6 +2720,21 @@ registry.
2671
2720
2672
2721
# Changes
2673
2722
2723
+
## Major changes in -07 since -06
2724
+
2725
+
* Changed "monotonically increasing" to "strictly increasing" in
2726
+
multiple locations. Removed recommendation about timestamps in the
2727
+
last-modified txid mechanism being similar to wall clock time.
2728
+
2729
+
* Removed two clumsily formulated sentences stating that clients MUST NOT infer temporal order from txid values. The remaining wording states that some servers use sequences of txid values that may appear random to outside observers.
2730
+
2731
+
* Added brief explanation that entitlements are sometimes also
2732
+
known as "licenses".
2733
+
2734
+
* Added introductory section on "How to Read this Document"
2735
+
2736
+
* Added an example to highlight that the etag txid values can have different formats, and do not need to consist of strictly increasing integers, as in most of the examples.
2737
+
2674
2738
## Major changes in -06 since -05
2675
2739
2676
2740
* Many language, style, spelling and formatting improvements thanks
0 commit comments