This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
SONiC Management Framework Release 1.0 #23
Merged
Merged
Changes from all commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
979603c
Merge arlo_hw_dev branch build arlo_hw_dev_daily_190529_1519_43 to br…
rupesh-k 2c9b88d
GNMI PoC changes
c98c346
Ignore test results for gnmi_server
nirenjan dd18f0d
Merge pull request #1 from project-arlo/brcm_poc
seiferteric 5431663
Move source files into src, change import paths, fixing Makefile
seiferteric eab8627
More Makefile changes
seiferteric 0c11765
Install CVL deps and update gopath
seiferteric e99617b
Merge pull request #2 from project-arlo/buildimage-refactor
seiferteric 5b97972
Add back install and other targets to fix deb package
seiferteric 9bad8a2
Merge pull request #3 from project-arlo/buildimage-refactor
seiferteric d746189
Add gnmi set and get client to build
seiferteric 4413090
Merge pull request #4 from project-arlo/buildimage-refactor
seiferteric 7e1232d
trigger building ocbinds file in translib, forgot to add gnmi_clients…
seiferteric 1efebb1
Merge pull request #5 from project-arlo/buildimage-refactor
seiferteric fb4e5ab
Fix build issue
seiferteric bcc1005
Merge pull request #6 from project-arlo/buildimage-refactor
jeff-yin 20e9287
Port polling subscriptions code for translib
seiferteric 8327976
Implement ONCE subscribe mode for translib
seiferteric b9c8b55
Add gnmi_cli for subscribe client, update Makefile to build it, add .…
seiferteric eb836de
Merge pull request #7 from project-arlo/subscribe-support
seiferteric 837b6f8
Ad once channel cleanup
seiferteric 8724922
Merge pull request #8 from project-arlo/subscribe-support
seiferteric bf90d2d
Initial support for sample based streaming subscribe
seiferteric e51eef1
Add paths to existing timer group if interval is the same
seiferteric 106f9e7
cleanup
seiferteric 3a47ffc
Use ticker_info struct
seiferteric ba46a2e
cleanup
seiferteric 7bfaff7
Add some dummy code for future subscribe api
seiferteric 7c09914
Fixes, also include binary for gnmi_cli for now
seiferteric 48eb031
Merge pull request #9 from project-arlo/sample-subscribe
jeff-yin 2a992fc
Fix issue with updates and replace with interfaces
seiferteric 3c0ea42
Merge pull request #10 from project-arlo/fix-if-replace-update
seiferteric 7fdf816
wip
seiferteric fd04cae
convert subscribeResponse to gnmi subscribeResponse and return
seiferteric 2ef0803
Fix issue with when sync message is sent. Add heartbeat support. Add …
seiferteric eeca1c2
Update IsSupported to IsOnChangeSupported, add heartbeat_interval sup…
seiferteric 63d870a
Close channel on error, check if timer if HB
seiferteric e43f136
Implement suppress_redundant, fix ticker_map format, remove some debu…
seiferteric 128f8fb
Fix bug with sync messages
seiferteric f090387
Merge pull request #11 from project-arlo/translib-stream-subscribe
seiferteric 3d0dcea
Return models based on translib GetModels API
seiferteric 63fdd24
Merge pull request #12 from project-arlo/capabilities-models
seiferteric 1c5bebf
Check error response before adding to on_change list
seiferteric 8eb460a
Merge pull request #13 from project-arlo/translib-stream-subscribe
seiferteric 801de2c
Implement updates_only for ON_CHANGE streaming mode
seiferteric cc6b0d1
Merge pull request #14 from project-arlo/translib-stream-subscribe
seiferteric 7d4d497
[JIRA SONIC-8247] Merge Telemetry changes done by Dell team
8bf4e24
Add test directory
seiferteric 7ec104a
Merge pull request #15 from project-arlo/tests
seiferteric 84d73e1
Disable old tests that fail due to new fields being added. Add basic …
seiferteric 07568b0
Merge pull request #16 from project-arlo/tests
skg-net ff7af51
[JIRA SONIC-8247] Merge Telemetry changes done by Dell team
3e3cfe3
working gnmi sys and pfm test without clearing bad logs
arunsundark 58ddd0a
[JIRA SONIC-8247] Merge Telemetry changes done by Dell team
ce69aad
Changes for testing get/set operations on OC interfaces
Tejaswi-Goel 6f9b30f
Fix some issues with test infra
seiferteric f0380de
fix
seiferteric d3c279d
Fix paths
seiferteric 253408d
Code cleanup in server_test.go
Tejaswi-Goel f451b18
Add test to set ip address
Tejaswi-Goel 45540f4
Working gnmi server test for sys,pfm,interfaces
arunsundark 8ecd4ab
Add json file for ip config
Tejaswi-Goel c517336
Merge pull request #17 from project-arlo/gnmi_test_sys_pfm
PrabhuSreenivasan a5d9c69
Add delete testcase
Tejaswi-Goel 7316e0b
Merge pull request #18 from project-arlo/gnmi-add-delete-test
seiferteric 370e87e
Minor fix in Delete OC Interface IP testcase
Tejaswi-Goel 0a80583
Merge pull request #19 from project-arlo/gnmi-add-delete-test
seiferteric 4a7c319
Add code to check values set
Tejaswi-Goel 6bc9fae
Merge pull request #20 from project-arlo/gnmi-test-after-set
seiferteric d89e899
[JIRA SONIC-9215] Telemetry UT from Dell
fd40a87
Merge pull request #21 from project-arlo/master
PrabhuSreenivasan 7e518da
Merge remote-tracking branch 'project-arlo-telemetry/brcm_poc' into b…
957486a
Merge remote-tracking branch 'project-arlo-telemetry/brcm_poc' into b…
61404c3
Merge remote-tracking branch 'project-arlo-telemetry/brcm_poc' into b…
e78c8f9
Merge pull request #22 from project-arlo/brcm_poc
seiferteric 6de4dc3
Add full code for gnmi_cli with our changes so it can be built from s…
seiferteric fd5bd55
Merge remote-tracking branch 'sshorigin/master' into gnmi_cli_fixes
seiferteric aead202
[JIRA SONIC-9215] Telemetry UT from Dell
31b29a2
Merge remote-tracking branch 'project-arlo-telemetry/brcm_poc' into b…
ded3628
Fix streaming_type in tests
seiferteric 03a023d
Merge pull request #24 from project-arlo/brcm_poc
seiferteric 93114d8
Merge pull request #23 from project-arlo/gnmi_cli_fixes
seiferteric 7032ce8
Set Min TLS Version and cipher suites
seiferteric 403147a
Fix spaces to tabs
seiferteric fe6d567
Update cipher suite list again
seiferteric d3e75cb
Merge pull request #26 from project-arlo/update_tls_config
seiferteric ce9606f
Remove duplicate ciphers
seiferteric 49013ab
Merge pull request #27 from project-arlo/update_tls_config
seiferteric 7ca2198
Disable platform specific test for now
seiferteric 8e2b182
Merge pull request #28 from project-arlo/tests
Tejaswi-Goel da8e56a
Add check that heartbeat_interval is only valid on streaming query type
seiferteric 3cb0aae
Merge pull request #31 from project-arlo/gnmi_cli_fixes
seiferteric 90c6a1b
Made changes in the Makefile to maintain the github pkg version
mbalachandar 0903f80
Remove gnmi_client direcotry, instead download and patch files as needed
seiferteric f16b0b5
Change project-arlo to Azure in README.md
seiferteric ada2cc3
Remove arlo urls from debian/control
seiferteric 028b843
Address review comments
seiferteric 3e94610
Add cvl deps to telemetry makefile and build cvl locally
seiferteric f9408e3
Use patches from mgmt-framework, make and install yang models.
seiferteric 21bb904
Use isTargetDb instead of hard-coded list
seiferteric 91eca7d
Begin conversion to go modules
seiferteric e7de037
Copy translib and cvl to compile locally until they convert to go mod…
seiferteric 449d9cf
fix
seiferteric 888d836
Add schema and models
seiferteric 38e41b5
Merge remote-tracking branch 'azure/master' into release_1.0_gomod_merge
seiferteric 9f897f1
Change gnmi_server package name back to just gnmi
seiferteric aa09bb5
merge fixes
seiferteric 545901e
Add gnmi clients
seiferteric 8f0c086
For now don't verify tests so that deb can be built
seiferteric 690b1ec
Add test binary compilation back
seiferteric 306b7b5
Split up sonic-mgmt-framework specific steps in Makefile
seiferteric c491dcd
Merge pull request #63 from project-arlo/release_1.0_gomod_merge
seiferteric 3e4519a
Fix translib based tests by preparing db with db dump from switch
seiferteric b5b1f75
Don't stop make check on test failure for now since there is no redis…
seiferteric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build/ | ||
debian/.debhelper/ | ||
debian/files | ||
debian/sonic-telemetry.debhelper.log | ||
debian/sonic-telemetry.substvars | ||
debian/sonic-telemetry/ | ||
vendor | ||
src | ||
cvl | ||
translib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,108 @@ | ||
ifeq ($(GOPATH),) | ||
export GOPATH=/tmp/go | ||
endif | ||
export PATH := $(PATH):$(GOPATH)/bin | ||
|
||
INSTALL := /usr/bin/install | ||
DBDIR := /var/run/redis/sonic-db/ | ||
GO := /usr/local/go/bin/go | ||
TOP_DIR := $(abspath ..) | ||
GO_MGMT_PATH=$(TOP_DIR)/sonic-mgmt-framework | ||
BUILD_DIR := $(GOPATH)/bin | ||
export CVL_SCHEMA_PATH := $(GO_MGMT_PATH)/src/cvl/schema | ||
|
||
all: sonic-telemetry | ||
SRC_FILES=$(shell find . -name '*.go' | grep -v '_test.go' | grep -v '/tests/') | ||
TEST_FILES=$(wildcard *_test.go) | ||
TELEMETRY_TEST_DIR = $(GO_MGMT_PATH)/build/tests/gnmi_server | ||
TELEMETRY_TEST_BIN = $(TELEMETRY_TEST_DIR)/server.test | ||
|
||
sonic-telemetry: | ||
.phony: mgmt-deps | ||
|
||
all: sonic-telemetry $(TELEMETRY_TEST_BIN) | ||
|
||
go.mod: | ||
/usr/local/go/bin/go mod init github.com/Azure/sonic-telemetry | ||
/usr/local/go/bin/go install github.com/Azure/sonic-telemetry/telemetry | ||
/usr/local/go/bin/go install github.com/Azure/sonic-telemetry/dialout/dialout_client_cli | ||
mgmt-deps: | ||
rm -rf cvl | ||
rm -rf translib | ||
cp -r ../sonic-mgmt-framework/src/cvl ./ | ||
cp -r ../sonic-mgmt-framework/src/translib ./ | ||
find cvl -name \*\.go -exec sed -i -e 's/\"translib/\"github.com\/Azure\/sonic-telemetry\/translib/g' {} \; | ||
find translib -name \*\.go -exec sed -i -e 's/\"translib/\"github.com\/Azure\/sonic-telemetry\/translib/g' {} \; | ||
find cvl -name \*\.go -exec sed -i -e 's/\"cvl/\"github.com\/Azure\/sonic-telemetry\/cvl/g' {} \; | ||
find translib -name \*\.go -exec sed -i -e 's/\"cvl/\"github.com\/Azure\/sonic-telemetry\/cvl/g' {} \; | ||
sed -i -e 's/\.\.\/\.\.\/\.\.\/models\/yang/\.\.\/\.\.\/\.\.\/sonic-mgmt-framework\/models\/yang/' translib/ocbinds/oc.go | ||
sed -i -e 's/\$$GO run \$$BUILD_GOPATH\/src\/github.com\/openconfig\/ygot\/generator\/generator.go/generator/' translib/ocbinds/oc.go | ||
$(GO) get github.com/openconfig/gnmi@89b2bf29312cda887da916d0f3a32c1624b7935f | ||
$(GO) get github.com/openconfig/ygot@724a6b18a9224343ef04fe49199dfb6020ce132a | ||
$(GO) get github.com/openconfig/goyang@064f9690516f4f72db189f4690b84622c13b7296 | ||
$(GO) get github.com/openconfig/goyang@064f9690516f4f72db189f4690b84622c13b7296 | ||
$(GO) get golang.org/x/crypto/ssh/terminal@e9b2fee46413 | ||
$(GO) get github.com/jipanyang/gnxi@f0a90cca6fd0041625bcce561b71f849c9b65a8d | ||
$(GO) install github.com/openconfig/ygot/generator | ||
$(GO) get -x github.com/golang/glog@23def4e6c14b4da8ac2ed8007337bc5eb5007998 | ||
rm -rf vendor | ||
$(GO) mod vendor | ||
ln -s vendor src | ||
cp -r $(GOPATH)/pkg/mod/github.com/openconfig/[email protected]/* vendor/github.com/openconfig/gnmi/ | ||
cp -r $(GOPATH)/pkg/mod/github.com/openconfig/[email protected]/* vendor/github.com/openconfig/goyang/ | ||
cp -r $(GOPATH)/pkg/mod/github.com/openconfig/[email protected]/* vendor/github.com/openconfig/ygot/ | ||
cp -r $(GOPATH)/pkg/mod/golang.org/x/[email protected] vendor/golang.org/x/crypto | ||
chmod -R u+w vendor | ||
patch -d vendor -p0 <patches/gnmi_cli.all.patch | ||
patch -d vendor/github.com/antchfx/jsonquery -p1 < ../sonic-mgmt-framework/patches/jsonquery.patch | ||
patch -d vendor/github.com/openconfig/goyang -p1 < ../sonic-mgmt-framework/goyang-modified-files/goyang.patch | ||
patch -d vendor/github.com/openconfig -p1 < ../sonic-mgmt-framework/ygot-modified-files/ygot.patch | ||
$(GO) generate github.com/Azure/sonic-telemetry/translib/ocbinds | ||
make -C $(GO_MGMT_PATH)/src/cvl/schema | ||
make -C $(GO_MGMT_PATH)/models | ||
make -C $(GO_MGMT_PATH)/models/yang | ||
make -C $(GO_MGMT_PATH)/models/yang/sonic | ||
|
||
sonic-telemetry: go.mod mgmt-deps | ||
$(GO) install -mod=vendor github.com/Azure/sonic-telemetry/telemetry | ||
$(GO) install -mod=vendor github.com/Azure/sonic-telemetry/dialout/dialout_client_cli | ||
$(GO) install github.com/jipanyang/gnxi/gnmi_get | ||
$(GO) install github.com/jipanyang/gnxi/gnmi_set | ||
$(GO) install -mod=vendor github.com/openconfig/gnmi/cmd/gnmi_cli | ||
|
||
check: | ||
sudo mkdir -p ${DBDIR} | ||
sudo cp ./testdata/database_config.json ${DBDIR} | ||
/usr/local/go/bin/go test -v github.com/Azure/sonic-telemetry/gnmi_server | ||
/usr/local/go/bin/go test -v github.com/Azure/sonic-telemetry/dialout/dialout_client | ||
sudo mkdir -p /usr/models/yang || true | ||
sudo find $(GO_MGMT_PATH)/models -name '*.yang' -exec cp {} /usr/models/yang/ \; | ||
-$(GO) test -mod=vendor -v github.com/Azure/sonic-telemetry/gnmi_server | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why ignore the test failure? There is an issue to track https://github.com/Azure/sonic-telemetry/issues/110 |
||
-$(GO) test -mod=vendor -v github.com/Azure/sonic-telemetry/dialout/dialout_client | ||
|
||
clean: | ||
rm -rf cvl | ||
rm -rf translib | ||
rm -rf vendor | ||
chmod -f -R u+w $(GOPATH)/pkg || true | ||
rm -rf $(GOPATH) | ||
rm -f src | ||
|
||
$(TELEMETRY_TEST_BIN): $(TEST_FILES) $(SRC_FILES) | ||
$(GO) test -mod=vendor -c -cover github.com/Azure/sonic-telemetry/gnmi_server -o $@ | ||
cp -r testdata $(TELEMETRY_TEST_DIR) | ||
cp -r $(GO_MGMT_PATH)/src/cvl/schema $(TELEMETRY_TEST_DIR) | ||
|
||
install: | ||
$(INSTALL) -D ${GOPATH}/bin/telemetry $(DESTDIR)/usr/sbin/telemetry | ||
$(INSTALL) -D ${GOPATH}/bin/dialout_client_cli $(DESTDIR)/usr/sbin/dialout_client_cli | ||
$(INSTALL) -D $(BUILD_DIR)/telemetry $(DESTDIR)/usr/sbin/telemetry | ||
$(INSTALL) -D $(BUILD_DIR)/dialout_client_cli $(DESTDIR)/usr/sbin/dialout_client_cli | ||
$(INSTALL) -D $(BUILD_DIR)/gnmi_get $(DESTDIR)/usr/sbin/gnmi_get | ||
$(INSTALL) -D $(BUILD_DIR)/gnmi_set $(DESTDIR)/usr/sbin/gnmi_set | ||
$(INSTALL) -D $(BUILD_DIR)/gnmi_cli $(DESTDIR)/usr/sbin/gnmi_cli | ||
|
||
mkdir -p $(DESTDIR)/usr/bin/ | ||
cp -r $(GO_MGMT_PATH)/src/cvl/schema $(DESTDIR)/usr/sbin | ||
mkdir -p $(DESTDIR)/usr/models/yang | ||
find $(GO_MGMT_PATH)/models -name '*.yang' -exec cp {} $(DESTDIR)/usr/models/yang/ \; | ||
|
||
deinstall: | ||
rm $(DESTDIR)/usr/sbin/telemetry | ||
rm $(DESTDIR)/usr/sbin/dialout_client_cli | ||
rm $(DESTDIR)/usr/sbin/gnmi_get | ||
rm $(DESTDIR)/usr/sbin/gnmi_set | ||
|
||
clean: | ||
rm -fr ${GOPATH} | ||
rm -rf go.mod | ||
rm -rf go.sum | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, why these dirs are created here? sonic-telemetry & telemetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to fix debian/control, which will remove all these dirs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand the comment, these are entries in the .gitignore file to prevent accidentally adding the above files into git.