module ietf-external-transaction-id {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-external-transaction-id";
prefix ext-txid;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types, Section 3";
}
organization
"IETF NETCONF Working Group";
contact
"WG Web:
WG List:
Author: Benoit Claise
Author: Jean Quilbeuf ";
description
"This module enables tracing of configuration changes in a
network for the sake of automated correlation between
configuration changes and the external request that triggered
that change.
The module stores the identifier of the trace, if any, that
triggered the change in a device. If that trace-id was provided
by a client, (i.e. not created locally by the server), the id
of that client is stored as well to indicated which client
triggered the configuration change.
Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Revised BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see the
RFC itself for full legal notices. ";
revision 2022-10-20 {
description
"Initial revision";
reference
"RFC xxxx: Title to be completed";
}
typedef hex-digits {
type string {
pattern '[0-9a-f]*';
}
description
"A string composed of hexadecimal digits. Digits represented by
letters are restricted to lowercase so that a single
representation of a given value is allowed. This enables using
the string equality to check equality of the represented
values.";
}
grouping trace-parent-g {
description
"Trace parent frow the W3C trace-context recommandation.
Follows the format version 00.";
leaf version {
type hex-digits {
length "2";
}
must "../version = '00'";
description
"Version of the trace context. Must be 00 to match the
format described in this module.";
}
leaf trace-id {
type hex-digits {
length "32";
}
must "../trace-id != '00000000000000000000000000000000'";
description
"Trace ID that is common for every transaction that is
part of the configuration chain. This value can be used
to match a local commit id to a commit local to another
system.";
}
leaf parent-id {
type hex-digits {
length "16";
}
description
"ID of the request (client-side) that lead to configuring
the server hosting this module.";
}
leaf trace-flags {
type hex-digits {
length "2";
}
description
"Flags enabled for this trace. See W3C reference for the
details about flags.";
}
}
container external-transactions-id {
config false;
description
"Contains the IDs of configuration transactions that are
external to the device.";
list configuration-change {
key "local-commit-id";
description
"List of configuration changes, identified by their
local-commit-id";
leaf local-commit-id {
type string;
description
"Stores the identifier as saved by the server. Can be used
to retrieve the corresponding changes using the server
mechanism if available.";
}
leaf timestamp {
type yang:date-and-time;
description
"A timestamp that can be used to further filter change
events.";
}
container trace-parent {
description
"Trace parent associated to the local-commit-id. If a
client ID is present as well, the trace context was
transmitted by that client. If not, the trace context was
created locally.
This trace-parent must come from the trace context of the
request actually modifying the running configuration
datastore. This request might be an edit-config or a
commit depending on whether the candidate datastore is
used.";
uses trace-parent-g;
}
leaf client-id {
type string;
description
"ID of the client that originated the modification, to
further query information about the corresponding
change.
This data node is present only when the configuration was
pushed by a compatible system.";
}
}
}
}