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

Rename PriorityMechanisms to MechanismPriority #766

Merged
merged 2 commits into from
Dec 7, 2022
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
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
github.com/google/uuid v1.2.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd
github.com/networkservicemesh/sdk v0.5.1-0.20221206103812-b6979bfe147d
github.com/networkservicemesh/sdk v0.5.1-0.20221207123638-d94a145092d6
github.com/networkservicemesh/sdk-k8s v0.0.0-20221207123727-3fd96c399bba
github.com/networkservicemesh/sdk-sriov v0.0.0-20221206105157-ce61d862f46f
github.com/networkservicemesh/sdk-vpp v0.0.0-20221206112452-c9d7291b5e3b
github.com/networkservicemesh/sdk-vpp v0.0.0-20221207124521-0c5429932a90
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
github.com/spiffe/go-spiffe/v2 v2.0.0
Expand Down Expand Up @@ -51,7 +51,7 @@ require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe // indirect
github.com/networkservicemesh/sdk-kernel v0.0.0-20221206104345-fd91dd9e8f6d // indirect
github.com/networkservicemesh/sdk-kernel v0.0.0-20221207123951-e21560e65118 // indirect
github.com/open-policy-agent/opa v0.44.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,16 @@ github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc=
github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd h1:26HR90HrJFZHIPPP3SCLGNRpPCMFoEnSSZfhHH8MPSo=
github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8=
github.com/networkservicemesh/sdk v0.5.1-0.20221206103812-b6979bfe147d h1:m6B7ls2B+c48SNHiXak7HTxB1bs/aX4rmygixFhIlgg=
github.com/networkservicemesh/sdk v0.5.1-0.20221206103812-b6979bfe147d/go.mod h1:zEYFbCVXGlTT5f0x6sx8XtL2GazkYBpCoEpooxkz2vE=
github.com/networkservicemesh/sdk v0.5.1-0.20221207123638-d94a145092d6 h1:d/HQEcyiJ+AJQoBp3S7feCPWNiERI//vUGHE4eX035U=
github.com/networkservicemesh/sdk v0.5.1-0.20221207123638-d94a145092d6/go.mod h1:zEYFbCVXGlTT5f0x6sx8XtL2GazkYBpCoEpooxkz2vE=
github.com/networkservicemesh/sdk-k8s v0.0.0-20221207123727-3fd96c399bba h1:Q7wbUaOj/8KIQ9Xn426kr+CUcEXwkdQUqwPTHA5Jbjk=
github.com/networkservicemesh/sdk-k8s v0.0.0-20221207123727-3fd96c399bba/go.mod h1:OLZoPHXed6fZ1XKYDDHbsfjLH5GCOx0/rRj+9Wo26Wg=
github.com/networkservicemesh/sdk-kernel v0.0.0-20221206104345-fd91dd9e8f6d h1:enSFaWQzfU2MS90DUh2f5muBLnmL9SxoAKXv4fUNEKY=
github.com/networkservicemesh/sdk-kernel v0.0.0-20221206104345-fd91dd9e8f6d/go.mod h1:t4A46Ph49k1kfuiEUPjmFvnIeaU3cfigQjUxr+gSmwE=
github.com/networkservicemesh/sdk-kernel v0.0.0-20221207123951-e21560e65118 h1:4QgyRhTK5CMMwK0oRbM270KN0RR16B5BfHeZ+yooZ7U=
github.com/networkservicemesh/sdk-kernel v0.0.0-20221207123951-e21560e65118/go.mod h1:DMU7vjqK8WmfAZXWfkqRphwoCF93osI5KvzHk3XhKE0=
github.com/networkservicemesh/sdk-sriov v0.0.0-20221206105157-ce61d862f46f h1:WOicK+q0roBwdWQqriWKk3YYqRniVszIAd0FafH2+tg=
github.com/networkservicemesh/sdk-sriov v0.0.0-20221206105157-ce61d862f46f/go.mod h1:pVMdEtwTPziKjhbqFEQWpz3DhXfOfJ+FfVyzENdNCb8=
github.com/networkservicemesh/sdk-vpp v0.0.0-20221206112452-c9d7291b5e3b h1:tJrY7VBHaTc6u5BLh3w1cPs362eiSD/dbTxdEWSDVSM=
github.com/networkservicemesh/sdk-vpp v0.0.0-20221206112452-c9d7291b5e3b/go.mod h1:9XCG5+2GxZs2jN9PkQb08iQ2Qg1mx22/OTbtLhpbcxc=
github.com/networkservicemesh/sdk-vpp v0.0.0-20221207124521-0c5429932a90 h1:sCQaCNUZ5B0nMZ6of1rV++JR4Q7pTOxecKwAFmGUMz4=
github.com/networkservicemesh/sdk-vpp v0.0.0-20221207124521-0c5429932a90/go.mod h1:j76iItYVvwFg8q26R/1XkNvcRYyivxGX4Rvx3yhVXmE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.1.0 h1:e3YP4dN/HYPpGh29X1ZkcxcEICsOls9huyVCRBaxjq8=
github.com/onsi/gomega v1.1.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Config struct {
PCIDriversPath string `default:"/sys/bus/pci/drivers" desc:"path to the PCI drivers directory" split_words:"true"`
CgroupPath string `default:"/host/sys/fs/cgroup/devices" desc:"path to the host cgroup directory" split_words:"true"`
VFIOPath string `default:"/host/dev/vfio" desc:"path to the host VFIO directory" split_words:"true"`
PriorityMechanisms []string `default:"" desc:"sets priorities for mechanisms" split_words:"true"`
MechanismPriority []string `default:"" desc:"sets priorities for mechanisms" split_words:"true"`
}

// Process reads config from env
Expand Down
8 changes: 4 additions & 4 deletions internal/xconnectns/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type xconnOptions struct {
clientURL *url.URL
dialTimeout time.Duration
domain2Device map[string]string
prioriyMechanismList []string
mechanismPrioriyList []string
statsOpts []stats.Option
cleanupOpts []cleanup.Option
vxlanOpts []vxlan.Option
Expand Down Expand Up @@ -116,10 +116,10 @@ func WithVxlanOptions(opts ...vxlan.Option) Option {
}
}

// WithPriorityMechanisms sets prioritymechanisms options
func WithPriorityMechanisms(priorityList []string) Option {
// WithMechanismPriority sets mechanismpriority option
func WithMechanismPriority(priorityList []string) Option {
return func(o *xconnOptions) {
o.prioriyMechanismList = priorityList
o.mechanismPrioriyList = priorityList
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/xconnectns/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func NewServer(
vppforwarder.WithClientURL(xconnOpts.clientURL),
vppforwarder.WithDialTimeout(xconnOpts.dialTimeout),
vppforwarder.WithVlanDomain2Device(xconnOpts.domain2Device),
vppforwarder.WithPriorityMechanisms(xconnOpts.prioriyMechanismList),
vppforwarder.WithMechanismPriority(xconnOpts.mechanismPrioriyList),
vppforwarder.WithCleanupOptions(xconnOpts.cleanupOpts...),
vppforwarder.WithStatsOptions(xconnOpts.statsOpts...),
vppforwarder.WithVxlanOptions(xconnOpts.vxlanOpts...),
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func main() {
xconnectns.WithAuthorizeServer(authorize.NewServer(authorize.WithSpiffeIDConnectionMap(&spiffeIDConnMap))),
xconnectns.WithAuthorizeMonitorConnectionsServer(authmonitor.NewMonitorConnectionServer(authmonitor.WithSpiffeIDConnectionMap(&spiffeIDConnMap))),
xconnectns.WithVlanDomain2Device(deviceMap),
xconnectns.WithPriorityMechanisms(cfg.PriorityMechanisms),
xconnectns.WithMechanismPriority(cfg.MechanismPriority),
xconnectns.WithClientURL(&cfg.ConnectTo),
xconnectns.WithDialTimeout(cfg.DialTimeout),
xconnectns.WithStatsOptions(statsOpts...),
Expand Down