argus-netconf-exporter/exp/yangcli/h3c-yang/openconfig-tencent-platform-chip@2019-01-24.yang
2025-11-28 14:35:21 +08:00

830 lines
17 KiB
YANG

/*
* Copyright (C) 2018-2019 THL A29 Limited, a Tencent company. All rights reserved.
*/
module openconfig-tencent-platform-chip {
yang-version "1";
// namespace
namespace "http://openconfig.net/yang/platform/chip";
prefix "oc-tc-platform-chip";
// import some basic types
import openconfig-extensions { prefix oc-ext; }
import openconfig-yang-types { prefix oc-yang; }
import openconfig-types { prefix oc-types; }
import openconfig-platform { prefix oc-platform; }
import openconfig-platform-types { prefix oc-platform-types; }
import openconfig-interfaces { prefix oc-if; }
// meta
organization "Tencent DCN working group";
contact
"Tencent TDCP working group";
description
"This module defines a schema for chip components in
the OpenConfig platform model.";
oc-ext:openconfig-version "0.2.0";
revision "2019-01-24" {
description
"Initial revision";
reference "0.1.0";
}
identity CHIP_BUFFER_TYPE {
description
"Base identity for buffer types";
}
identity SHARED_BUFFER {
base CHIP_BUFFER_TYPE;
description
"The shared buffer on chip";
}
identity EXCLUSIVE_BUFFER {
base CHIP_BUFFER_TYPE;
description
"The exclusive buffer on chip";
}
identity HEADROOM {
base CHIP_BUFFER_TYPE;
description
"The headroom buffer on chip";
}
// grouping statements
grouping chip-config {
description
"Configuration data for chip components";
}
grouping chip-state {
description
"Operational state data for chip components";
leaf error-reason {
type string;
description
"the error reason of chip(for example:ECC,parity error and so on)";
}
}
grouping chip-top {
description
"Top-level grouping for chip data";
container chip {
description
"Top-level container for chip data";
container config {
description
"Configuration data for chip";
uses chip-config;
}
container state {
config false;
description
"Operational state data for chip";
uses chip-config;
uses chip-state;
}
uses chip-buffer-top;
}
}
grouping chip-buffer-config {
description
"Configuration data for buffer";
leaf name {
type identityref {
base CHIP_BUFFER_TYPE;
}
description
"buffer includs shared-buffer, exclusive-buffer and headroom, the name should be one of it";
}
}
grouping chip-buffer-state {
description
"Operational state data for buffer";
uses chip-buffer-input-top;
uses chip-buffer-output-top;
leaf congest-discard {
type boolean;
description
"the congest happend(TCB)";
}
}
grouping chip-buffer-top {
description
"Top-level grouping for chip data";
container buffers {
description
"Top-level container for buffer data";
list buffer {
key "name";
description
"Top-level container for the buffer associated with this
chip";
leaf name {
type leafref {
path "../config/name";
}
description
"Reference to the name of the buffer
instantiated on the chip.";
}
container config {
description
"Configuration data for buffer";
uses chip-buffer-config;
}
container state {
config false;
description
"Operational state data for buffer";
uses chip-buffer-config;
uses chip-buffer-state;
}
uses chip-buffer-input-top;
uses chip-buffer-output-top;
uses chip-buffer-interfaces-top;
uses chip-buffer-slices-top;
}
}
}
grouping chip-buffer-interfaces-config {
description
"Configuration data for interfaces referenced in the chip
model";
leaf interface-id {
type string;
description
"Identifier for the interface.";
}
}
grouping chip-buffer-interfaces-state {
description
"Operational state data for interfaces referenced in the chip
model";
leaf current-usage {
type oc-yang:counter64;
units bytes;
description
"current usage of buffer size";
}
leaf available-usage {
type oc-yang:counter64;
units bytes;
description
"available-usage of buffer size";
}
leaf current-utilization {
type oc-types:percentage;
description
"current usage of buffer size";
}
leaf historical-peak {
type oc-yang:counter64;
units bytes;
description
"historical peak of buffer size";
}
leaf historical-peak-time {
type oc-types:timeticks64;
description
"the time of exceeding the historical-peek";
}
leaf alarm-threshold {
type oc-types:percentage;
description
"the threshold of alarm";
}
leaf alarm-count {
type oc-yang:counter32;
description
"the count of alarm";
}
leaf discard-pkt {
type oc-yang:counter64;
description
"the count of packet that dropped since buffer overflow";
}
leaf forward-pkt {
type oc-yang:counter64;
description
"the count of packet that forwarded";
}
leaf forward-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that forwarded";
}
// definitions per-interface counters for QoS
}
grouping chip-buffer-interfaces-top {
description
"Top-level grouping for interfaces referenced in the buffer
model";
container interfaces {
description
"Enclosing container for the list of interface references";
list interface {
key "interface-id";
description
"List of interfaces referenced by buffer entities.";
leaf interface-id {
type leafref {
path "../config/interface-id";
}
description
"Reference to the interface-id list key";
}
container config {
description
"Configuration data ";
uses chip-buffer-interfaces-config;
}
container state {
config false;
description
"Operational state data ";
uses chip-buffer-interfaces-config;
uses chip-buffer-interfaces-state;
}
uses oc-if:interface-ref;
uses chip-buffer-input-top;
uses chip-buffer-output-top;
}
}
}
grouping chip-buffer-slices-config {
description
"Configuration data for slices referenced in the chip
model";
leaf slice-name {
type string;
description
"Identifier for the slice.";
}
}
grouping chip-buffer-slices-state {
description
"Operational state data for slices referenced in the chip
model";
leaf current-usage {
type oc-yang:counter64;
units bytes;
description
"current usage of buffer size";
}
leaf available-usage {
type oc-yang:counter64;
units bytes;
description
"available-usage of buffer size";
}
leaf current-utilization {
type oc-types:percentage;
description
"current usage of buffer size";
}
leaf historical-peak {
type oc-yang:counter64;
units bytes;
description
"historical peak of buffer size";
}
leaf historical-peak-time {
type oc-types:timeticks64;
description
"the time of exceeding the historical-peek";
}
leaf alarm-threshold {
type oc-types:percentage;
description
"the threshold of alarm";
}
leaf alarm-count {
type oc-yang:counter32;
description
"the count of alarm";
}
leaf discard-pkt {
type oc-yang:counter64;
description
"the count of packet that dropped since buffer overflow";
}
leaf forward-pkt {
type oc-yang:counter64;
description
"the count of packet that forwarded";
}
leaf forward-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that forwarded";
}
// definitions per-interface counters for QoS
}
grouping chip-buffer-slices-top {
description
"Top-level grouping for slices referenced in the buffer
model";
container slices {
description
"Enclosing container for the list of interface references";
list slice {
key "slice-name";
description
"List of slices referenced by buffer entities.";
leaf slice-name {
type string;
description
"Reference to the slice-name list key";
}
container config {
description
"Configuration data ";
uses chip-buffer-slices-config;
}
container state {
config false;
description
"Operational state data ";
uses chip-buffer-slices-config;
uses chip-buffer-slices-state;
}
uses oc-if:interface-ref;
uses chip-buffer-input-top;
uses chip-buffer-output-top;
}
}
}
grouping chip-buffer-queue-config {
description
"Configuration data for the queue associated with the
buffer";
leaf name {
type string;
description
"Reference to the queue associated with the buffer.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.";
}
}
grouping chip-buffer-queue-state {
description
"Operational data for the queue associated with the
buffer";
leaf current-usage {
type oc-yang:counter64;
units bytes;
description
"current usage of buffer size";
}
leaf available-usage {
type oc-yang:counter64;
units bytes;
description
"available-usage of buffer size";
}
leaf current-utilization {
type oc-types:percentage;
description
"current usage of buffer size";
}
leaf historical-peak {
type oc-yang:counter64;
units bytes;
description
"historical peak of buffer size";
}
leaf historical-peak-time {
type oc-types:timeticks64;
description
"the time of exceeding the historical-peek";
}
leaf alarm-threshold {
type oc-types:percentage;
description
"the threshold of alarm";
}
leaf alarm-count {
type oc-yang:counter32;
description
"the count of alarm";
}
leaf discard-pkt {
type oc-yang:counter64;
description
"the count of packet that dropped since buffer overflow";
}
leaf forward-pkt {
type oc-yang:counter64;
description
"the count of packet that forwarded";
}
leaf forward-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that forwarded";
}
}
grouping chip-buffer-queue-top {
description
"Top-level grouping for the queue associated with the
buffer";
container queues {
description
"Surrounding container for a list of queues that are
instantiated on the buffer.";
list queue {
key "name";
description
"Top-level container for the queue associated with this
buffer";
leaf name {
type leafref {
path "../config/name";
}
description
"Reference to the name of the queue
instantiated on the buffer.";
}
container config {
description
"Configuration data for the queue associated with the
buffer";
uses chip-buffer-queue-config;
}
container state {
config false;
description
"Operational state data for the queue associated with the
buffer";
uses chip-buffer-queue-config;
uses chip-buffer-queue-state;
}
}
}
}
grouping chip-buffer-output-config {
description
"Configuration data for Buffer on the egress chip";
}
grouping chip-buffer-output-state {
description
"Operational state data for Buffer on the egress chip";
leaf current-usage {
type oc-yang:counter64;
units bytes;
description
"current usage of buffer size";
}
leaf available-usage {
type oc-yang:counter64;
units bytes;
description
"available-usage of buffer size";
}
leaf current-utilization {
type oc-types:percentage;
description
"current usage of buffer size";
}
leaf historical-peak {
type oc-yang:counter64;
units bytes;
description
"historical peak of buffer size";
}
leaf historical-peak-time {
type oc-types:timeticks64;
description
"the time of exceeding the historical-peek";
}
leaf alarm-threshold {
type oc-types:percentage;
description
"the threshold of alarm";
}
leaf alarm-count {
type oc-yang:counter32;
description
"the count of alarm";
}
leaf discard-pkt {
type oc-yang:counter64;
description
"the count of packet that dropped since buffer overflow";
}
leaf discard-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that dropped since buffer overflow";
}
leaf forward-pkt {
type oc-yang:counter64;
description
"the count of packet that forwarded";
}
leaf forward-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that forwarded";
}
}
grouping chip-buffer-output-top {
description
"Top-level grouping for Buffer on the egress chip";
container output {
description
"Top-level container for Buffer data related to the egress
chip";
container config {
description
"Configuration data for Buffer on the egress chip";
uses chip-buffer-output-config;
}
container state {
config false;
description
"Operational state data for Buffer on the egress chip";
uses chip-buffer-output-config;
uses chip-buffer-output-state;
}
uses chip-buffer-queue-top;
}
}
grouping chip-buffer-input-config {
description
"Configuration data for Buffer on the ingress chip";
}
grouping chip-buffer-input-state {
description
"Operational state data for Buffer on the ingress chip";
leaf current-usage {
type oc-yang:counter64;
units bytes;
description
"current usage of buffer size";
}
leaf available-usage {
type oc-yang:counter64;
units bytes;
description
"available-usage of buffer size";
}
leaf current-utilization {
type oc-types:percentage;
description
"current usage of buffer size";
}
leaf historical-peak {
type oc-yang:counter64;
units bytes;
description
"historical peak of buffer size";
}
leaf historical-peak-time {
type oc-types:timeticks64;
description
"the time of exceeding the historical-peek";
}
leaf alarm-threshold {
type oc-types:percentage;
description
"the threshold of alarm";
}
leaf alarm-count {
type oc-yang:counter32;
description
"the count of alarm";
}
leaf discard-pkt {
type oc-yang:counter64;
description
"the count of packet that dropped since buffer overflow";
}
leaf discard-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that dropped since buffer overflow";
}
leaf forward-pkt {
type oc-yang:counter64;
description
"the count of packet that forwarded";
}
leaf forward-traffic {
type oc-yang:counter64;
units bytes;
description
"the count of packet size that forwarded";
}
}
grouping chip-buffer-input-top {
description
"Top-level grouping for Buffer on the ingress chip";
container input {
description
"Top-level container for Buffer data related to the ingress
chip";
container config {
description
"Configuration data for Buffer on the ingress chip";
uses chip-buffer-input-config;
}
container state {
config false;
description
"Operational state data for Buffer on the ingress chip";
uses chip-buffer-input-config;
uses chip-buffer-input-state;
}
uses chip-buffer-queue-top;
}
}
// data definition statements
// augment statements
augment "/oc-platform:components/oc-platform:component/oc-platform:integrated-circuit" {
description
"Adding chip data to physical inventory";
uses chip-top {
when "current()/../oc-platform:state/" +
"oc-platform:type = 'CHIP'" {
description
"Augment is active when component is of type chip";
}
}
}
uses chip-top;
// rpc statements
// notification statements
}