-
Notifications
You must be signed in to change notification settings - Fork 19
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
Make vxlan port configurable #394
Conversation
networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
I believe if you rebase this on main you will find it passes CI :) |
networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
@@ -42,9 +42,9 @@ type vxlanServer struct { | |||
} | |||
|
|||
// NewServer - returns a new server for the vxlan remote mechanism | |||
func NewServer(vppConn api.Connection, tunnelIP net.IP) networkservice.NetworkServiceServer { | |||
func NewServer(vppConn api.Connection, tunnelIP net.IP, vniOptions ...vni.Option) networkservice.NetworkServiceServer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please make the Option pattern here local to this package... importing another packages option here precludes other unrelated Options in the future.
type Option func(o *vxlanOpions) | ||
|
||
// WithVniOptions sets vni options | ||
func WithVniOptions(vniOptions ...vni.Option) Option { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please make this a WithVniPort that takes an int. Passing layers of Options cross binds us at the API level in an unpleasant way. Its easy enough to translate the options in the NewClient/NewServer functions.
} | ||
} | ||
|
||
type vxlanOpions struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo:
type vxlanOpions struct { | |
type vxlanOptions struct { |
} | ||
|
||
type vxlanOpions struct { | ||
vniPort uint16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vniPort uint16 | |
port uint16 |
@@ -44,13 +44,18 @@ type vxlanClient struct { | |||
} | |||
|
|||
// NewClient - returns a new client for the vxlan remote mechanism | |||
func NewClient(vppConn api.Connection, tunnelIP net.IP) networkservice.NetworkServiceClient { | |||
func NewClient(vppConn api.Connection, tunnelIP net.IP, options ...Option) networkservice.NetworkServiceClient { | |||
opts := &vxlanOpions{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opts := &vxlanOpions{} | |
opts := &vxlanOptions{ | |
port: 4789, | |
} |
networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#394 Commit: a3f3e2c Author: zolug Date: 2021-10-06 22:52:48 +0200 Message: - Make vxlan port configurable (#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#394 Commit: a3f3e2c Author: zolug Date: 2021-10-06 22:52:48 +0200 Message: - Make vxlan port configurable (#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#394 Commit: a3f3e2c Author: zolug Date: 2021-10-06 22:52:48 +0200 Message: - Make vxlan port configurable (#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#394 Commit: a3f3e2c Author: zolug Date: 2021-10-06 22:52:48 +0200 Message: - Make vxlan port configurable (#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: NSMBot <[email protected]>
networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: Zoltan Lugossy <[email protected]>
…d-forwarder-vpp@main PR link: https://github.com/networkservicemesh/cmd-forwarder-vpp/pull/ Commit: d531e5d Author: zolug Date: 2021-10-07 16:23:45 +0200 Message: - Make vxlan port configurable (#341) (#352) networkservicemesh/sdk-vpp commit message: Make vxlan port configurable (see networkservicemesh/sdk-vpp#394) networkservicemesh/sdk commit message: Make vxlan port configurable (see networkservicemesh/sdk#1091) Signed-off-by: NSMBot <[email protected]>
networkservicemesh/sdk commit message:
Make vxlan port configurable
Signed-off-by: Zoltan Lugossy [email protected]