usually not interoperable with other platforms; they
closely mirror the structure of the CLI and define extra
features that are specific to each vendor.
YANG is an extensible language, allowing extension
statements to be defined by standards bodies, vendors,
and individuals. The statement syntax allows these
extensions to coexist with standard YANG statements in
a natural way. YANG allows a module to augment a data
model by inserting additional YANG nodes into the
model. This allows vendors to add vendor-specific
parameters to standard data models in an interoperable
way. The augment statement allows a module to add
data to the schema tree. As an example, let’s consider the
statistics container as being part of the interfaces-
statistics module. The statistics container looks as
shown in Example 12-5.
Example 12-5 YANG Data Model Augmentation
Click here to view code image
container statistics {
description "A collection of interface
statistics.";
leaf in-octets {
type yang:counter64;
description "The total number of
octets received on the interface.";
}
leaf in-errors {
type yang:counter32;
description "Number of inbound
packets that contained errors.";
}
leaf out-octets {
type yang:counter64;
description "The total number of
octets sent out on the interface.";
}
leaf out-errors {
type yang:counter32;
description "Number of outbound
packets that contained errors.";
}
}