Skip to content

Commit

Permalink
fix(evpn): remove vendor-plugins and related config
Browse files Browse the repository at this point in the history
Signed-off-by: atulpatel261194 <Atul.Patel@intel.com>
  • Loading branch information
atulpatel261194 authored and artek-koltun committed Sep 2, 2024
1 parent 48780c6 commit 8f51de1
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 5,028 deletions.
27 changes: 0 additions & 27 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,10 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
ci_linux "github.com/opiproject/opi-evpn-bridge/pkg/LinuxCIModule"
gen_linux "github.com/opiproject/opi-evpn-bridge/pkg/LinuxGeneralModule"
intel_e2000_linux "github.com/opiproject/opi-evpn-bridge/pkg/LinuxVendorModule/intele2000"
frr "github.com/opiproject/opi-evpn-bridge/pkg/frr"
netlink "github.com/opiproject/opi-evpn-bridge/pkg/netlink"
"github.com/opiproject/opi-evpn-bridge/pkg/vendor_plugins/intel-e2000/p4runtime/p4driverapi"
ipu_vendor "github.com/opiproject/opi-evpn-bridge/pkg/vendor_plugins/intel-e2000/p4runtime/p4translation"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
)

const (
intelStr = "intel_e2000"
)

var rootCmd = &cobra.Command{
Use: "opi-evpn-bridge",
Short: "evpn bridge",
Expand All @@ -69,12 +61,6 @@ var rootCmd = &cobra.Command{
go runGatewayServer(config.GlobalConfig.GRPCPort, config.GlobalConfig.HTTPPort)

switch config.GlobalConfig.Buildenv {
case intelStr:
gen_linux.Initialize()
intel_e2000_linux.Initialize()
frr.Initialize()
ipu_vendor.Initialize()

case "ci":
gen_linux.Initialize()
ci_linux.Initialize()
Expand All @@ -87,11 +73,6 @@ var rootCmd = &cobra.Command{
if err := createGrdVrf(); err != nil {
log.Panicf("Error: %v", err)
}
switch config.GlobalConfig.Buildenv {
case intelStr:
netlink.Initialize()
default:
}
runGrpcServer(config.GlobalConfig.GRPCPort, config.GlobalConfig.TLSFiles)

},
Expand Down Expand Up @@ -139,14 +120,6 @@ func cleanUp() {
log.Println("Failed to delete all the resources: ", err)
}
switch config.GlobalConfig.Buildenv {
case intelStr:
gen_linux.DeInitialize()
intel_e2000_linux.DeInitialize()
frr.DeInitialize()
netlink.DeInitialize()
ipu_vendor.DeInitialize()
close(p4driverapi.StopCh)

case "ci":
gen_linux.DeInitialize()
ci_linux.DeInitialize()
Expand Down
59 changes: 0 additions & 59 deletions config-intel-e2000.yaml

This file was deleted.

7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@ module github.com/opiproject/opi-evpn-bridge
go 1.19

require (
github.com/antoninbas/p4runtime-go-client v0.0.0-20231025232350-c5ccfd6512c8
github.com/golang/protobuf v1.5.3
github.com/golangci/golangci-lint v1.55.2
github.com/google/uuid v1.5.0
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0
github.com/onsi/ginkgo/v2 v2.14.0
github.com/opiproject/opi-api v0.0.0-20240304222410-5dba226aaa9e
github.com/opiproject/opi-smbios-bridge v0.1.3-0.20240113044816-4401aa6a3d1a
github.com/p4lang/p4runtime v1.4.0-rc.5
github.com/philippgille/gokv v0.6.0
github.com/philippgille/gokv/gomap v0.6.0
github.com/philippgille/gokv/redis v0.6.0
github.com/roman-kachanovsky/go-binary-pack v0.0.0-20170214094030-e260e0dc6732
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.4
Expand Down Expand Up @@ -100,6 +95,7 @@ require (
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
Expand Down Expand Up @@ -182,6 +178,7 @@ require (
github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect
github.com/securego/gosec/v2 v2.18.2 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.1 // indirect
Expand Down
7 changes: 0 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pO
github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE=
github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw=
github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I=
github.com/antoninbas/p4runtime-go-client v0.0.0-20231025232350-c5ccfd6512c8 h1:XcwLFZZzDCD08/cQVX4/hCBBDJkY6j/DdO2PJfv3cM4=
github.com/antoninbas/p4runtime-go-client v0.0.0-20231025232350-c5ccfd6512c8/go.mod h1:2NyBT5g9J8C9BpV+c+uk7acGBZDQmYXqLbtxr679REs=
github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY=
github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU=
github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s=
Expand Down Expand Up @@ -465,8 +463,6 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/p4lang/p4runtime v1.4.0-rc.5 h1:zztZGEkRM09Hf25SIX0p0ML07dmRCgsy0oC8uafmjtg=
github.com/p4lang/p4runtime v1.4.0-rc.5/go.mod h1:m9laObIMXM9N1ElGXijc66/MSM5eheZJLRLxg/TG+fU=
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
github.com/philippgille/gokv v0.0.0-20191001201555-5ac9a20de634/go.mod h1:OCoWPt+mbYuTO1FUVrQ2SxQU0oaaHBsn6lRhFX3JHOc=
Expand Down Expand Up @@ -525,8 +521,6 @@ github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4l
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/roman-kachanovsky/go-binary-pack v0.0.0-20170214094030-e260e0dc6732 h1:cu91qu1+Yzl3BC0BUKKuiPkT5O2E4MaVTUAkh9Xeneg=
github.com/roman-kachanovsky/go-binary-pack v0.0.0-20170214094030-e260e0dc6732/go.mod h1:4aW4O8uyDJOg9waxhoBpMtBTjVFT+m8NUoawVIAJMso=
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w=
github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0=
Expand Down Expand Up @@ -1053,7 +1047,6 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
Expand Down
2 changes: 1 addition & 1 deletion pkg/LinuxGeneralModule/lgm.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ func setUpVrf(vrf *infradb.Vrf) (string, bool) {
// Create bridge for external VXLAN under vrf
// Linux apparently creates a deterministic MAC address for a bridge type link with a given
// name. We need to assign a true random MAC address to avoid collisions when pairing two
// intel e2000 servers.
// servers.

brErr := nlink.LinkAdd(ctx, &netlink.Bridge{
LinkAttrs: netlink.LinkAttrs{Name: brStr + path.Base(vrf.Name)},
Expand Down
Loading

0 comments on commit 8f51de1

Please sign in to comment.