Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce refactored aft summary model #997

Merged
merged 4 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions release/models/aft/.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
docs:
- yang/aft/openconfig-aft.yang
- yang/aft/openconfig-aft-types.yang
- yang/aft/openconfig-aft-summary.yang
build:
- yang/network-instance/openconfig-network-instance.yang
- yang/aft/openconfig-aft-network-instance.yang
- yang/aft/openconfig-aft-summary.yang
dplore marked this conversation as resolved.
Show resolved Hide resolved
run-ci: true
120 changes: 120 additions & 0 deletions release/models/aft/openconfig-aft-summary.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
module openconfig-aft-summary {
yang-version "1";

namespace "http://openconfig.net/yang/aft-summary";

prefix "oc-aftsummary";

import openconfig-extensions { prefix "oc-ext"; }
import openconfig-yang-types { prefix "oc-yang-types"; }
import openconfig-policy-types { prefix "oc-pol-types"; }
import openconfig-network-instance { prefix "oc-ni"; }

organization
"OpenConfig working group";

contact
"OpenConfig working group
www.openconfig.net";

description
"This module provides summary of aft entry counts per protocol type for each network
instance.";

oc-ext:openconfig-version "0.1.0";

revision "2023-11-09" {
description
"Initial version.";
reference "0.1.0";
}

grouping protocols-state {
description
"Grouping for protocol type state.";

leaf origin-protocol {
description
"Protocol type that keys the protocol list.";

type identityref {
base "oc-pol-types:INSTALL_PROTOCOL_TYPE";
}
}

container counters {
description
"Enclosing container for aft entry counters";

leaf aft-entries {
description
"Total number of entries in the aft.";
type oc-yang-types:counter64;
}
}
}

grouping aft-summary {
description
"A summary of aft entries by protocol type.";

container protocols {
description
"Enclosing container for a list of protocols";
list protocol {
key "origin-protocol";

description
"Protocol type that keys the aft entry count list.";

leaf origin-protocol {
type leafref {
path "../state/origin-protocol";
}
description
"Reference to the protocol type which added the aft entry.";
}

container state {
description
"State parameters for the aft entry list.";
uses protocols-state;
}
}
}
}

grouping aft-summary-ipv4 {
description
"Grouping of all aft summaries for ipv4.";
container ipv4-unicast {
description
"Container for ipv4 unicast aft summary by protocol type.";
uses aft-summary;
}
}

grouping aft-summary-ipv6 {
description
"Grouping of all aft summaries for ipv6.";
container ipv6-unicast {
description
"Container for ipv6 aft counts by protocol type.";
uses aft-summary;
}
}

augment "/oc-ni:network-instances/oc-ni:network-instance/oc-ni:afts" {
description
"Augment the afts model with the aft summary container.";

container aft-summaries {
uses aft-summary-ipv4;
uses aft-summary-ipv6;

description
"Aft summary for the network instance.";
}
}

}
11 changes: 7 additions & 4 deletions release/models/network-instance/.spec.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
- name: openconfig-network-instance
docs:
- yang/network-instance/openconfig-network-instance-types.yang
- yang/network-instance/openconfig-network-instance.yang
- yang/aft/openconfig-aft-network-instance.yang
- yang/aft/openconfig-aft-summary.yang
- yang/network-instance/openconfig-evpn-types.yang
- yang/network-instance/openconfig-evpn.yang
- yang/network-instance/openconfig-network-instance-types.yang
- yang/network-instance/openconfig-network-instance.yang
- yang/network-instance/openconfig-programming-errors.yang
- yang/aft/openconfig-aft-network-instance.yang
- yang/segment-routing/openconfig-rsvp-sr-ext.yang
- yang/segment-routing/openconfig-segment-routing.yang
- yang/rib/openconfig-rib-bgp-ext.yang

build:
- yang/aft/openconfig-aft-network-instance.yang
- yang/aft/openconfig-aft-summary.yang
- yang/network-instance/openconfig-network-instance.yang
- yang/network-instance/openconfig-programming-errors.yang
- yang/aft/openconfig-aft-network-instance.yang
- yang/segment-routing/openconfig-rsvp-sr-ext.yang
run-ci: true
- name: openconfig-network-instance-bgp-rib-augment
Expand Down