forked from cisco-app-networking/networkservicemesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_forwarders.go
64 lines (61 loc) · 1.58 KB
/
test_forwarders.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package tests
import (
"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection"
"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection/mechanisms/kernel"
"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection/mechanisms/vxlan"
"github.com/networkservicemesh/networkservicemesh/controlplane/pkg/model"
)
var testForwarder1 = &model.Forwarder{
RegisteredName: "test_data_plane",
SocketLocation: "tcp:some_addr",
LocalMechanisms: []*connection.Mechanism{
&connection.Mechanism{
Type: kernel.MECHANISM,
},
},
RemoteMechanisms: []*connection.Mechanism{
&connection.Mechanism{
Type: vxlan.MECHANISM,
Parameters: map[string]string{
vxlan.SrcIP: "127.0.0.1",
},
},
},
MechanismsConfigured: true,
}
var testForwarder1_1 = &model.Forwarder{
RegisteredName: "test_data_plane_11",
SocketLocation: "tcp:some_addr",
LocalMechanisms: []*connection.Mechanism{
{
Type: kernel.MECHANISM,
},
},
RemoteMechanisms: []*connection.Mechanism{
&connection.Mechanism{
Type: vxlan.MECHANISM,
Parameters: map[string]string{
vxlan.SrcIP: "127.0.0.7",
},
},
},
MechanismsConfigured: true,
}
var testForwarder2 = &model.Forwarder{
RegisteredName: "test_data_plane2",
SocketLocation: "tcp:some_addr",
LocalMechanisms: []*connection.Mechanism{
&connection.Mechanism{
Type: kernel.MECHANISM,
},
},
RemoteMechanisms: []*connection.Mechanism{
&connection.Mechanism{
Type: vxlan.MECHANISM,
Parameters: map[string]string{
vxlan.SrcIP: "127.0.0.2",
},
},
},
MechanismsConfigured: true,
}