Skip to content

Commit

Permalink
Merge pull request networkservicemesh#292 from glazychev-art/api_upd
Browse files Browse the repository at this point in the history
Manual api update
  • Loading branch information
denis-tingaikin authored Jul 15, 2021
2 parents 9a5c5c8 + cdb79e8 commit afc0dc3
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.16
require (
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/networkservicemesh/api v1.0.1-0.20210707174502-3bce416a9f33
github.com/networkservicemesh/sdk v0.5.1-0.20210715134725-7f3f374fdd00
github.com/networkservicemesh/api v1.0.1-0.20210715134717-6e4a0f8eae3e
github.com/networkservicemesh/sdk v0.5.1-0.20210715135313-7f2c944e1f2b
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
github.com/vishvananda/netlink v1.1.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.6.0/go.mod h1:eIcD5bi3pqbHT/xIIvXMwvzXYElgouBvaVRftaE+eac=
github.com/networkservicemesh/api v1.0.1-0.20210707174502-3bce416a9f33 h1:jBCwRQUVHVjKCiv9JYhtSyF0YorVMQ17Tnyllt1HcRw=
github.com/networkservicemesh/api v1.0.1-0.20210707174502-3bce416a9f33/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20210715134725-7f3f374fdd00 h1:VVpZrAmsPn5btQoKj4oDeLA+o0KneVltx6ESyAnBvJs=
github.com/networkservicemesh/sdk v0.5.1-0.20210715134725-7f3f374fdd00/go.mod h1:Yg/NZAvRkvWjwkBviBsnylXf/GSx3F632KYvHfRhdQE=
github.com/networkservicemesh/api v1.0.1-0.20210715134717-6e4a0f8eae3e h1:cCRjV+1sOuOrCF/0IPXH2PJ1y7hEbuqX9k+OFnU7xhU=
github.com/networkservicemesh/api v1.0.1-0.20210715134717-6e4a0f8eae3e/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20210715135313-7f2c944e1f2b h1:PY42nRcY0g1f7PMCLdBQmscumSm6HyRJPSzNfFWKzJY=
github.com/networkservicemesh/sdk v0.5.1-0.20210715135313-7f2c944e1f2b/go.mod h1:7whufn2CIGBX+KW3U5b0IWB6f7bJJizY1vV1a5t2HXI=
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func create(ctx context.Context, conn *networkservice.Connection, isClient bool)
}
defer netlinkHandle.Delete()

ifName := mechanism.GetInterfaceName(conn)
ifName := mechanism.GetInterfaceName()

l, err := netlinkHandle.LinkByName(ifName)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func create(ctx context.Context, conn *networkservice.Connection) error {
}
defer netlinkHandle.Delete()

ifName := mechanism.GetInterfaceName(conn)
ifName := mechanism.GetInterfaceName()

l, err := netlinkHandle.LinkByName(ifName)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func create(ctx context.Context, conn *networkservice.Connection, isClient bool)
}
defer netlinkHandle.Delete()

ifName := mechanism.GetInterfaceName(conn)
ifName := mechanism.GetInterfaceName()

l, err := netlinkHandle.LinkByName(ifName)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func setMTU(ctx context.Context, conn *networkservice.Connection) error {
}
defer netlinkHandle.Delete()

ifName := mechanism.GetInterfaceName(conn)
ifName := mechanism.GetInterfaceName()

l, err := netlinkHandle.LinkByName(ifName)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/kernel/networkservice/inject/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (s *injectServer) Request(ctx context.Context, request *networkservice.Netw
}
defer func() { _ = clientNetNS.Close() }()

ifName := mech.GetInterfaceName(request.GetConnection())
ifName := mech.GetInterfaceName()
err = moveInterfaceToAnotherNamespace(ifName, curNetNS, curNetNS, clientNetNS)
if err != nil {
return nil, err
Expand Down Expand Up @@ -101,7 +101,7 @@ func (s *injectServer) Close(ctx context.Context, conn *networkservice.Connectio
}
defer func() { _ = clientNetNS.Close() }()

ifName = mech.GetInterfaceName(conn)
ifName = mech.GetInterfaceName()
if injectErr = moveInterfaceToAnotherNamespace(ifName, curNetNS, clientNetNS, curNetNS); injectErr != nil {
goto exit
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/kernel/networkservice/rename/server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 Doc.ai and/or its affiliates.
// Copyright (c) 2020-2021 Doc.ai and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -49,7 +49,7 @@ func (s *renameServer) Request(ctx context.Context, request *networkservice.Netw
if mech == nil {
return next.Server(ctx).Request(ctx, request)
}
ifName := mech.GetInterfaceName(request.GetConnection())
ifName := mech.GetInterfaceName()

vfConfig := vfconfig.Config(ctx)
if vfConfig == nil || vfConfig.VFInterfaceName == ifName {
Expand Down Expand Up @@ -82,7 +82,7 @@ func (s *renameServer) Close(ctx context.Context, conn *networkservice.Connectio

var renameErr error
if mech := kernel.ToMechanism(conn.GetMechanism()); mech != nil {
ifName := mech.GetInterfaceName(conn)
ifName := mech.GetInterfaceName()
if oldIfName, renamed := loadOldIfName(ctx, s.id); renamed {
renameErr = renameLink(ifName, oldIfName)
}
Expand Down

0 comments on commit afc0dc3

Please sign in to comment.