Skip to content

Commit

Permalink
Merge pull request #93 from openconfig/dplore/aft-2.7.0
Browse files Browse the repository at this point in the history
Add gRIBI support for OC AFT model 2.7.0
  • Loading branch information
dplore authored Oct 17, 2024
2 parents 8d7654d + b1a65b5 commit 024356c
Show file tree
Hide file tree
Showing 22 changed files with 4,689 additions and 1,428 deletions.
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
* 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 \
-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

0 comments on commit 024356c

Please sign in to comment.