Skip to content

Commit

Permalink
Manually update api version (#427)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
  • Loading branch information
Vladimir Popov authored Nov 3, 2021
1 parent 44183de commit c2f5a3e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/edwarnicke/govpp v0.0.0-20211023203533-76f2c92be8d5
github.com/golang/protobuf v1.4.3
github.com/hashicorp/go-multierror v1.1.1
github.com/networkservicemesh/api v1.0.1-0.20210907194827-9a36433d7d6e
github.com/networkservicemesh/sdk v0.5.1-0.20211102193303-a94a249e2f5f
github.com/networkservicemesh/sdk-kernel v0.0.0-20211102193653-c878506a3577
github.com/networkservicemesh/api v1.0.1-0.20211103090613-64784f3465ce
github.com/networkservicemesh/sdk v0.5.1-0.20211103091303-7c4cfcd913b8
github.com/networkservicemesh/sdk-kernel v0.0.0-20211103091648-fc8bfe254113
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
github.com/thanhpk/randstr v1.0.4
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1t
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.10.0/go.mod h1:0jEuBXKauB1HHJswHM/lx05K48TJ1Yxj6VIfM4k+aB4=
github.com/networkservicemesh/api v1.0.1-0.20210907194827-9a36433d7d6e h1:PO6tDo/bGLJqz1qiqCecht/HqMWCKunAds2U9Hvc0yM=
github.com/networkservicemesh/api v1.0.1-0.20210907194827-9a36433d7d6e/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20211102193303-a94a249e2f5f h1:eukVjhE/VfbWFBIyCdEAavJ0I1Rn35xD2FQNVuSALqk=
github.com/networkservicemesh/sdk v0.5.1-0.20211102193303-a94a249e2f5f/go.mod h1:Y9dl3Y4VS+g5oIGQCr3n8fIDQmrPBxi2MD9Yz8ouCKA=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211102193653-c878506a3577 h1:/WMqdzruFAVQfmDGLjdiu2PpY3120zntXGL70LnOx3M=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211102193653-c878506a3577/go.mod h1:tO0QpDJeTAwJdfwOhrPmodozLTsfdQZDxwEMXwlrepw=
github.com/networkservicemesh/api v1.0.1-0.20211103090613-64784f3465ce h1:J3OGFqeGLfBOSMI88Z3zmhLA1OHWMLYpdxnhPMlGhCg=
github.com/networkservicemesh/api v1.0.1-0.20211103090613-64784f3465ce/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20211103091303-7c4cfcd913b8 h1:ePZ7yqgQlkLLWm5OstY727R9uuGHzczrACFNOhso/7w=
github.com/networkservicemesh/sdk v0.5.1-0.20211103091303-7c4cfcd913b8/go.mod h1:LcfybR5YvHlf1f3P/BvOi1WW6TQCHyb7B9zlgmo+YvI=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211103091648-fc8bfe254113 h1:mQkgjOu3OgnqM06pO3IyKVEItP04AWEatpxiv6RYxUY=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211103091648-fc8bfe254113/go.mod h1:s9tYSINEUkCIDMPq8tNFQ2zxMwjgXEcCKfcp4gStycU=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
Expand Down
6 changes: 3 additions & 3 deletions pkg/networkservice/mechanisms/memif/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func createMemifSocket(ctx context.Context, mechanism *memifMech.Mechanism, vppC
if err != nil {
return 0, errors.Wrapf(err, "not a valid url %q", mechanism.GetSocketFileURL())
}
if u.Scheme != memifMech.SocketFileScheme {
return 0, errors.Errorf("socket file url must have scheme %q, actual %q", memifMech.SocketFileScheme, u.Scheme)
if u.Scheme != memifMech.FileScheme {
return 0, errors.Errorf("socket file url must have scheme %q, actual %q", memifMech.FileScheme, u.Scheme)
}

// Create the socketID
Expand Down Expand Up @@ -162,7 +162,7 @@ func create(ctx context.Context, conn *networkservice.Connection, vppConn api.Co
if err := os.MkdirAll(filepath.Dir(socketFile(conn)), 0700); err != nil {
return errors.Wrapf(err, "failed to create memif socket directory %s", socketFile(conn))
}
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.SocketFileScheme, Path: socketFile(conn)}).String())
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.FileScheme, Path: socketFile(conn)}).String())
}
mode := memif.MEMIF_MODE_API_IP
if conn.GetPayload() == payload.Ethernet {
Expand Down
6 changes: 3 additions & 3 deletions pkg/networkservice/mechanisms/memif/memifproxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (m *memifProxyClient) Request(ctx context.Context, request *networkservice.

if mechanism := memifMech.ToMechanism(request.GetConnection().GetMechanism()); mechanism != nil {
if listener, ok := load(ctx, metadata.IsClient(m)); ok {
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.SocketFileScheme, Path: listener.socketFilename}).String())
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.FileScheme, Path: listener.socketFilename}).String())
}
}

Expand All @@ -69,7 +69,7 @@ func (m *memifProxyClient) Request(ctx context.Context, request *networkservice.

// If we are already running a proxy... just keep running it
if _, ok := load(ctx, true); ok {
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.SocketFileScheme, Path: listenSocketFilename(conn)}).String())
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.FileScheme, Path: listenSocketFilename(conn)}).String())
return conn, nil
}

Expand Down Expand Up @@ -106,7 +106,7 @@ func (m *memifProxyClient) closeOnFailure(postponeCtxFunc func() (context.Contex
func (m *memifProxyClient) Close(ctx context.Context, conn *networkservice.Connection, opts ...grpc.CallOption) (*empty.Empty, error) {
if mechanism := memifMech.ToMechanism(conn.GetMechanism()); mechanism != nil {
if listener, ok := load(ctx, metadata.IsClient(m)); ok {
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.SocketFileScheme, Path: listener.socketFilename}).String())
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.FileScheme, Path: listener.socketFilename}).String())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func newProxyListener(mechanism *memifMech.Mechanism, listenSocketFilename strin
if err != nil {
return nil, errors.Wrapf(err, "not a valid url %q", mechanism.GetSocketFileURL())
}
if u.Scheme != memifMech.SocketFileScheme {
return nil, errors.Errorf("socket file url must have scheme %q, actual %q", memifMech.SocketFileScheme, u.Scheme)
if u.Scheme != memifMech.FileScheme {
return nil, errors.Errorf("socket file url must have scheme %q, actual %q", memifMech.FileScheme, u.Scheme)
}
p := &proxyListener{
socketFilename: u.Path,
Expand All @@ -58,7 +58,7 @@ func newProxyListener(mechanism *memifMech.Mechanism, listenSocketFilename strin
return nil, errors.Wrapf(err, "proxyListener unable to listen on %s", listenSocketFilename)
}
go p.accept()
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.SocketFileScheme, Path: listenSocketFilename}).String())
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.FileScheme, Path: listenSocketFilename}).String())
return p, nil
}

Expand Down

0 comments on commit c2f5a3e

Please sign in to comment.