leaf-list change {
type instance-identifier;
}
}
The notification in Example 12-7 has two nodes: one for
the name of the operator that performed the change and
one for the list of changes performed during the
configuration session.
Reading a YANG data model straight from an RFC
specification can be a daunting task, especially when
you’re new to data models. pyang is a Python program
that has been developed to validate and convert YANG
models to more user-friendly and readable formats.
pyang can be downloaded from
https://github.com/mbj4668/pyang. To see how pyang
version 2.1.1 works, consider the ietf-interfaces YANG
model defined in RFC 8343 and downloaded from
https://github.com/YangModels/yang. This data model
follows the structure discussed in this chapter, and
Example 12-8 shows what the ietf-interfaces.yang file
looks like.
Example 12-8 ietf-interfaces YANG Data Model
Snippet
Click here to view code image
module ietf-interfaces {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-
interfaces";
prefix if;
import ietf-yang-types {
prefix yang;
}
organization
"IETF NETMOD (Network Modeling) Working
Group";
contact