Skip to content

Commit faa81f3

Browse files
committed
Updated after feedback from Tom Petch and Michal Vaško
1 parent 2232f8f commit faa81f3

File tree

4 files changed

+92
-28
lines changed

4 files changed

+92
-28
lines changed

draft-ietf-netconf-transaction-id.md

Lines changed: 87 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ RESTCONF mechanism relies on HTTP Headers instead, and use none of
119119
the XML attributes described in this document, nor JSON Metadata
120120
(see {{RFC7952}}).
121121

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+
122132
# Conventions and Definitions
123133

124134
{::boilerplate bcp14}
@@ -251,7 +261,7 @@ txid values.
251261
Regardless of whether a server declares the Versioned Nodes or not,
252262
the set of Versioned Nodes in the server's YANG tree MUST remain
253263
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.
255265

256266
The server returning txid values for the Versioned Nodes
257267
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
323333
R9." #fig-baseline}
324334

325335
> 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
327337
is also used for all changed nodes in a given transaction.
328338
These conventions of the examples are convenient and enhances
329339
readability of the examples, but do not necessarily
@@ -343,16 +353,14 @@ described in the coming sections. Servers may expose a configuration parameter
343353
to control the history depth. Such control depends on the local server capabilities.
344354
Refer to {{sec-histo-size}} for more considerations about history size.
345355

346-
Some server implementors may decide to use a monotonically increasing
356+
Some server implementors may decide to use a strictly increasing
347357
integer as the txid value or a timestamp. Doing so obviously makes
348358
it very easy for the server to determine the sequence of historical
349359
transaction ids.
350360

351361
Some server implementors may decide to use a completely different txid
352362
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.
356364

357365
## Subsequent Configuration Retrieval
358366

@@ -397,6 +405,8 @@ key nodes MUST be included in the response, and other child nodes
397405
MUST NOT be included. For containers, child nodes MUST NOT
398406
be included.
399407

408+
### When there is No Change
409+
400410
Here follows a couple of examples of how the rules above are applied.
401411
See [the example above](#fig-baseline) for the most recent server
402412
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
426436
amount of information that is already known by the client to be sent
427437
to and processed by the client.
428438

439+
### When there is an Out-Of-Band (OOB) Change
440+
429441
In the following example someone has made a change to the
430442
configuration on the server. This server has chosen to implement
431443
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
480492
recent c-txid value given by the client (5152, on the closest ancestor
481493
acl A2) than the s-txid held on the server (6614).
482494

495+
### When a Txid value is Inherited from an Ancestor Node
496+
483497
In the example shown in {{fig-vn}}, the client specifies the c-txid for a node that
484498
the server does not maintain a s-txid for, i.e., it is not a
485499
Versioned Node.
@@ -519,7 +533,8 @@ for the list entry ace R7, but not for any of its children. Thus
519533
the server finds the server side s-txid value to be 4711 (from ace R7),
520534
which matches the client's c-txid value of 4711.
521535

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
523538
txid values.
524539

525540
## Candidate Datastore Configuration Retrieval
@@ -957,7 +972,7 @@ txid values in the candidate datastore get the same txid values
957972
as in the running datastore when this operation runs.
958973

959974
``<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
961976
datastores. The server MUST ensure the txid values are retained
962977
and changed as if the data being copied had been sent in through an
963978
edit-config operation.
@@ -1163,15 +1178,9 @@ The last-modified attribute values are yang:date-and-time values as
11631178
defined in ietf-yang-types.yang, {{RFC6991}}.
11641179

11651180
"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.
11751184

11761185
It is RECOMMENDED that the same last-modified txid values are used
11771186
across all management interfaces (i.e. NETCONF and any other the
@@ -1311,12 +1320,6 @@ In server messages sent to a client:
13111320

13121321
### With etag
13131322

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-
13201323
To retrieve etag attributes across the entire NETCONF server
13211324
configuration, a client might send:
13221325

@@ -1333,6 +1336,52 @@ configuration, a client might send:
13331336

13341337
The server's reply might then be:
13351338

1339+
~~~ xml
1340+
<rpc-reply message-id="1"
1341+
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
1342+
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
1343+
<data txid:etag="fd6a52d9-5152-811c-a117-b99d3b723c93">
1344+
<acls xmlns=
1345+
"urn:ietf:params:xml:ns:yang:ietf-access-control-list"
1346+
txid:etag="fd6a52d9-5152-811c-a117-b99d3b723c93">
1347+
<acl txid:etag="2c4b50e4-4711-49f8-a2b2-2e20aebe120f">
1348+
<name>A1</name>
1349+
<aces txid:etag="2c4b50e4-4711-49f8-a2b2-2e20aebe120f">
1350+
<ace txid:etag="2c4b50e4-4711-49f8-a2b2-2e20aebe120f">
1351+
<name>R1</name>
1352+
<matches>
1353+
<ipv4>
1354+
<protocol>17</protocol>
1355+
</ipv4>
1356+
</matches>
1357+
<actions>
1358+
<forwarding xmlns:acl=
1359+
"urn:ietf:params:xml:ns:yang:ietf-access-control-list">
1360+
acl:accept
1361+
<forwarding>
1362+
</actions>
1363+
</ace>
1364+
</aces>
1365+
</acl>
1366+
...
1367+
~~~
1368+
1369+
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+
13361385
~~~ xml
13371386
<rpc-reply message-id="1"
13381387
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
@@ -2671,6 +2720,21 @@ registry.
26712720

26722721
# Changes
26732722

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+
26742738
## Major changes in -06 since -05
26752739

26762740
* Many language, style, spelling and formatting improvements thanks

yang/ietf-netconf-txid-nmda-compare.yang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module ietf-netconf-txid-nmda-compare {
1414
import ietf-netconf-txid {
1515
prefix ietf-netconf-txid;
1616
reference
17-
"RFC XXXX: Xxxxxxxxx";
17+
"RFC XXXX: Transaction ID Mechanism for NETCONF";
1818
}
1919

2020
organization
@@ -55,7 +55,7 @@ module ietf-netconf-txid-nmda-compare {
5555
description
5656
"Initial revision";
5757
reference
58-
"RFC XXXX: Xxxxxxxxx";
58+
"RFC XXXX: Transaction ID Mechanism for NETCONF";
5959
}
6060

6161
augment "/cmp:compare/cmp:input" {

yang/ietf-netconf-txid-yang-push.yang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module ietf-netconf-txid-yang-push {
1919
import ietf-netconf-txid {
2020
prefix ietf-netconf-txid;
2121
reference
22-
"RFC XXXX: Xxxxxxxxx";
22+
"RFC XXXX: Transaction ID Mechanism for NETCONF";
2323
}
2424

2525
organization
@@ -60,7 +60,7 @@ module ietf-netconf-txid-yang-push {
6060
description
6161
"Initial revision";
6262
reference
63-
"RFC XXXX: Xxxxxxxxx";
63+
"RFC XXXX: Transaction ID Mechanism for NETCONF";
6464
}
6565

6666
augment "/sn:establish-subscription/sn:input" {

yang/ietf-netconf-txid.yang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module ietf-netconf-txid {
5858
description
5959
"Initial revision";
6060
reference
61-
"RFC XXXX: Xxxxxxxxx";
61+
"RFC XXXX: Transaction ID Mechanism for NETCONF";
6262
}
6363

6464
feature last-modified {

0 commit comments

Comments
 (0)