module ietf-traffic-analyzer {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-traffic-analyzer";
prefix ta;
import ietf-interfaces {
prefix if;
}
import ietf-yang-types {
prefix yang;
}
organization
"IETF Benchmarking Methodology Working Group";
contact
"WG Web:
WG List:
Editor: Vladimir Vassilev
";
description
"This module contains a collection of YANG definitions for
description and management of network interconnect testers.
Copyright (c) 2019 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 Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://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 2019-03-09 {
description
"Initial revision.";
reference "RFC XXXX: Network Interconnect Tester";
}
feature egress-direction {
description
"The device can analyze traffic from the egress direction.";
}
feature ingress-direction {
description
"The device can generate traffic from the ingress direction.";
}
feature filter {
description
"This feature indicates that the device implements
filter that can specify a subset of packets to be
analyzed when filtering is enabled.";
}
feature capture {
description
"This feature indicates that the device implements
packet capture functionality.";
}
identity filter {
description
"Base filter identity.";
}
identity ethernet {
base ta:filter;
}
grouping statistics-data {
leaf pkts {
type yang:counter64;
}
leaf errors {
type yang:counter64;
}
container testframe-stats {
leaf testframe-pkts {
type yang:counter64;
}
leaf sequence-errors {
type yang:counter64;
}
leaf payload-errors {
type yang:counter64;
}
container latency {
leaf samples {
type uint64;
}
leaf min {
units "nanoseconds";
type uint64;
}
leaf max {
units "nanoseconds";
type uint64;
}
leaf average {
description
"The sum of all sampled latencies divided
by the number of samples.";
units "nanoseconds";
type uint64;
}
leaf latest {
units "nanoseconds";
type uint64;
}
}
}
}
grouping capture-data {
container capture {
if-feature "capture";
list frame {
key "sequence-number";
leaf sequence-number {
type uint64;
}
leaf timestamp {
type yang:date-and-time;
}
leaf length {
type uint32;
}
leaf preceding-interframe-gap {
type uint32;
}
leaf data {
type string {
pattern '([0-9A-F]{2})*';
}
}
}
}
}
grouping filter-data {
container filter {
presence
"When present ingress packets are
filtered before analyzed according
to the filter type";
if-feature "filter";
leaf type {
mandatory true;
type identityref {
base ta:filter;
}
}
}
}
augment "/if:interfaces/if:interface" {
container traffic-analyzer {
if-feature "ingress-direction";
presence "Enables the traffic analyzer for ingress traffic.";
uses filter-data;
container state {
config false;
uses statistics-data;
uses capture-data;
}
}
container traffic-analyzer-egress {
if-feature "egress-direction";
presence "Enables the traffic analyzer for egress traffic.";
uses filter-data;
container state {
config false;
uses statistics-data;
uses capture-data;
}
}
}
augment "/if:interfaces/if:interface/ta:traffic-analyzer/ta:filter" {
when "ta:type = 'ta:ethernet'";
leaf ether-type {
type uint16;
description
"The Ethernet Type (or Length) value
defined by IEEE 802.";
reference "IEEE 802-2014 Clause 9.2";
}
}
augment "/if:interfaces-state/if:interface/if:statistics" {
if-feature "ingress-direction";
description
"Counters implemented by ports with analyzers.";
leaf testframe-pkts {
type yang:counter64;
description
"Testframe packets recognized by the traffic analyzer.";
}
leaf testframe-sequence-errors {
type yang:counter64;
description
"Testframe packets part of the recognized total
but with unexpected sequence number.";
}
leaf testframe-payload-errors {
type yang:counter64;
description
"Testframe packets part of the recognized total
but with payload errors.";
}
}
augment "/if:interfaces-state/if:interface/if:statistics" {
if-feature "egress-direction";
description
"Counters implemented by ports with egress analyzers.";
leaf testframe-egress-pkts {
type yang:counter64;
description
"Testframe egress packets recognized by the traffic analyzer.";
}
leaf testframe-egress-sequence-errors {
type yang:counter64;
description
"Testframe egress packets part of the recognized total
but with unexpected sequence number.";
}
leaf testframe-egress-payload-errors {
type yang:counter64;
description
"Testframe egress packets part of the recognized total
but with payload errors.";
}
}
}