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

Add gRIBI support for OC AFT model 2.7.0 #93

Merged
merged 7 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
14 changes: 14 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to rebuild the gribi protos
dplore marked this conversation as resolved.
Show resolved Hide resolved

## Install dependencies

* brew install coreutils
dplore marked this conversation as resolved.
Show resolved Hide resolved
* http://github.com/openconfig/ygot for proto_generator
dplore marked this conversation as resolved.
Show resolved Hide resolved
* build ygot proto_generator

## Update aft yang
dplore marked this conversation as resolved.
Show resolved Hide resolved

* Add deviations as needed to gribi-aft.yang
* Run update_schema.sh
* Run generate_proto.sh
* Run check-updated.sh to review for any unexpected changes
4 changes: 3 additions & 1 deletion scripts/update-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# Hack to ensure that if we are running on OS X with a homebrew installed
# GNU sed then we can still run sed.

runsed() {
if hash gsed 2>/dev/null; then
gsed "$@"
Expand All @@ -38,7 +39,8 @@ if [ -z $SRCDIR ]; then
SRC_DIR=`runreadlink -m ${THIS_DIR}/..`
fi

proto_generator \
echo ${SRC_DIR}
./proto_generator \
-path=${SRC_DIR}/v1/yang,${SRC_DIR}/v1/yang/deps \
dplore marked this conversation as resolved.
Show resolved Hide resolved
-output_dir=${SRC_DIR}/v1/proto -compress_paths -generate_fakeroot -fakeroot_name=device \
-package_name=gribi_aft -exclude_modules=ietf-interfaces,openconfig-interfaces \
Expand Down
216 changes: 157 additions & 59 deletions v1/proto/gribi_aft/enums/enums.pb.go

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions v1/proto/gribi_aft/enums/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ enum OpenconfigMplsTypesMplsLabelEnum {
OPENCONFIGMPLSTYPESMPLSLABELENUM_NO_LABEL = 9 [(yext.yang_name) = "NO_LABEL"];
}

// OpenconfigMplsTypesMplsLabelStackEnum represents an enumerated type generated for the YANG enumerated type mpls-label-stack.
enum OpenconfigMplsTypesMplsLabelStackEnum {
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_UNSET = 0;
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_IPV4_EXPLICIT_NULL = 1 [(yext.yang_name) = "IPV4_EXPLICIT_NULL"];
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_ROUTER_ALERT = 2 [(yext.yang_name) = "ROUTER_ALERT"];
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_IPV6_EXPLICIT_NULL = 3 [(yext.yang_name) = "IPV6_EXPLICIT_NULL"];
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_IMPLICIT_NULL = 4 [(yext.yang_name) = "IMPLICIT_NULL"];
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_ENTROPY_LABEL_INDICATOR = 8 [(yext.yang_name) = "ENTROPY_LABEL_INDICATOR"];
OPENCONFIGMPLSTYPESMPLSLABELSTACKENUM_NO_LABEL = 9 [(yext.yang_name) = "NO_LABEL"];
}

// OpenconfigPacketMatchTypesIPPROTOCOL represents an enumerated type generated for the YANG identity IP_PROTOCOL.
enum OpenconfigPacketMatchTypesIPPROTOCOL {
OPENCONFIGPACKETMATCHTYPESIPPROTOCOL_UNSET = 0;
Expand Down
Loading
Loading