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 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
16 changes: 16 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# How to rebuild the gRIBI protos on OSX

## Install dependencies

* brew install coreutils
dplore marked this conversation as resolved.
Show resolved Hide resolved
* brew install protoc-gen-go-grpc
* brew install protoc-gen-go
* go install github.com/openconfig/ygot/proto_generator@latest

## Update AFT yang

* Copy the YANG model files for openconfig public AFTs
* 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
3 changes: 2 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,7 @@ if [ -z $SRCDIR ]; then
SRC_DIR=`runreadlink -m ${THIS_DIR}/..`
fi

proto_generator \
${GOPATH}/bin/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
180 changes: 93 additions & 87 deletions v1/proto/gribi_aft/enums/enums.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions v1/proto/gribi_aft/enums/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum OpenconfigAftTypesEncapsulationHeaderType {
OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV6 = 3 [(yext.yang_name) = "IPV6"];
OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_MPLS = 4 [(yext.yang_name) = "MPLS"];
OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_VXLAN = 5 [(yext.yang_name) = "VXLAN"];
OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_UDP = 6 [(yext.yang_name) = "UDP"];
}

// OpenconfigMplsTypesMplsLabelEnum represents an enumerated type generated for the YANG enumerated type mpls-label.
Expand Down
Loading
Loading