Skip to content
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
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ endif
git apply patches/0001-Updated-to-filter-and-write-to-file.patch
git apply patches/0003-Fix-client-json-parsing-issue.patch

# Manually adding patched client packages and their dependencies
# to vendor/modules.txt. This satisfies 'go install -mod=vendor' lookup checks,
# which are required after manual patching/copying of gnxi and gnmi-cli code.
echo "github.com/google/gnxi v0.0.0-20181220173256-89f51f0ce1e2" >> vendor/modules.txt
echo "github.com/google/gnxi/gnmi_get" >> vendor/modules.txt
echo "github.com/google/gnxi/gnmi_set" >> vendor/modules.txt
echo "github.com/openconfig/gnmi/cli" >> vendor/modules.txt
echo "github.com/openconfig/gnmi/client/flags" >> vendor/modules.txt
echo "golang.org/x/crypto/ssh/terminal" >> vendor/modules.txt
echo "github.com/openconfig/gnmi/cmd/gnmi_cli" >> vendor/modules.txt

ifeq ($(CROSS_BUILD_ENVIRON),y)
$(GO) build -o ${GOBIN}/gnmi_get -mod=vendor github.com/google/gnxi/gnmi_get
$(GO) build -o ${GOBIN}/gnmi_set -mod=vendor github.com/google/gnxi/gnmi_set
Expand Down
6 changes: 6 additions & 0 deletions common_utils/notification_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"strings"

sdcfg "github.com/sonic-net/sonic-gnmi/sonic_db_config"

Expand Down Expand Up @@ -89,3 +90,8 @@ func (n *NotificationProducer) Send(op, data string, kvs map[string]string) erro
log.Infof("Publishing to channel %s: %v.", n.ch, string(val))
return n.rc.Publish(context.Background(), n.ch, val).Err()
}

// getKey generates the hash key from the supplied string array.
func GetKey(k []string) string {
return strings.Join(k, "|")
}
Loading