Skip to content
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

TUN-1.3 Interface based IPv4 GRE Encapsulation #2005

Open
wants to merge 104 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
43e1a01
TUN-1.3
charantejag504 Aug 11, 2023
7af34d7
fix static analysis errors
charantejag504 Aug 11, 2023
e5591c3
update
charantejag504 Aug 11, 2023
de70fde
update
charantejag504 Aug 15, 2023
fbd278a
Merge branch 'main' into TUN13
charantejag504 Aug 15, 2023
b6a89d6
update
charantejag504 Aug 17, 2023
351c0cb
Merge branch 'main' into TUN13
charantejag504 Aug 17, 2023
4effcdc
update
charantejag504 Aug 17, 2023
d060cc4
Merge branch 'main' into TUN13
charantejag504 Aug 17, 2023
2551837
update
charantejag504 Aug 17, 2023
0eefdaa
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Aug 17, 2023
8c1f348
update
charantejag504 Aug 17, 2023
485bc38
update
charantejag504 Aug 17, 2023
9a986b3
static analysis
charantejag504 Aug 17, 2023
02ab905
Merge branch 'main' into TUN13
charantejag504 Aug 17, 2023
ac69ce1
update proto files
charantejag504 Aug 18, 2023
7d5c6dc
Merge branch 'main' into TUN13
charantejag504 Aug 18, 2023
7fd7275
resolve conflict
charantejag504 Aug 18, 2023
2543642
Merge branch 'main' into TUN13
charantejag504 Aug 18, 2023
3d6a722
Update tunnel_interface_based_ipv4_gre_encapsulation_test.go
mohanasm Sep 5, 2023
0a7e185
resolving conflicts because of new deviations
charantejag504 Sep 8, 2023
5e1454e
Merge branch 'main' into TUN13
charantejag504 Sep 8, 2023
1308a5a
fix static error
charantejag504 Sep 8, 2023
da89c1e
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Sep 8, 2023
dc8ad0d
fix static error
charantejag504 Sep 8, 2023
90f77d0
update
charantejag504 Sep 8, 2023
0ebb3ab
fix README
charantejag504 Sep 8, 2023
e4c0853
resolve conflicts
charantejag504 Sep 11, 2023
9e51c64
Merge branch 'main' into TUN13
charantejag504 Sep 11, 2023
0395145
Merge branch 'main' into TUN13
charantejag504 Sep 11, 2023
ea94e38
address comment
charantejag504 Sep 12, 2023
f1ac4a3
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Sep 12, 2023
b53364d
Merge branch 'main' into TUN13
charantejag504 Sep 12, 2023
55b30d0
fixing formatting issues
charantejag504 Sep 12, 2023
ee1b619
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Sep 12, 2023
eb91c4c
fix
charantejag504 Sep 12, 2023
0e8b020
Update metadata.textproto
mohanasm Sep 14, 2023
489f077
address comments
charantejag504 Sep 21, 2023
fb24b6e
address comments
charantejag504 Sep 27, 2023
61f56fb
Merge branch 'main' into TUN13
charantejag504 Sep 27, 2023
610e617
update
charantejag504 Sep 27, 2023
7e72463
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Sep 27, 2023
f055ece
update
charantejag504 Sep 27, 2023
44c4941
Merge branch 'main' into TUN13
charantejag504 Oct 4, 2023
c176948
update
charantejag504 Oct 4, 2023
5807fc7
update
charantejag504 Oct 4, 2023
a517a8c
Merge branch 'main' into TUN13
charantejag504 Oct 4, 2023
c5de68e
Merge branch 'main' into TUN13
charantejag504 Oct 4, 2023
03807a9
Merge branch 'main' into TUN13
arulkumarsekar Oct 5, 2023
9017613
Merge branch 'main' into TUN13
arulkumarsekar Oct 5, 2023
48cb51e
Merge branch 'main' into TUN13
charantejag504 Oct 6, 2023
8fe5b7b
addressed latest comments
charantejag504 Oct 6, 2023
7ae8bc2
Merge branch 'main' into TUN13
charantejag504 Oct 6, 2023
05b7862
update
charantejag504 Oct 6, 2023
2c6c6eb
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Oct 6, 2023
2f93569
Merge branch 'main' into TUN13
charantejag504 Oct 6, 2023
244fed4
resolve conflicts
charantejag504 Oct 10, 2023
6184cb8
Merge branch 'main' into TUN13
charantejag504 Oct 10, 2023
a4a899a
resolve conflicts
charantejag504 Oct 14, 2023
79f6dfe
Merge branch 'main' into TUN13
charantejag504 Oct 14, 2023
3ce7dd1
Merge branch 'main' into TUN13
arulkumarsekar Oct 16, 2023
f7f99a2
Merge branch 'main' into TUN13
arulkumarsekar Oct 17, 2023
c6138e2
Merge branch 'main' into TUN13
arulkumarsekar Oct 17, 2023
2b35411
resolve conflict
charantejag504 Oct 17, 2023
49abc35
Merge branch 'main' into TUN13
charantejag504 Oct 17, 2023
8564167
resolve conflict
charantejag504 Oct 19, 2023
0cd0058
Merge branch 'main' into TUN13
charantejag504 Oct 19, 2023
05afc99
update
charantejag504 Oct 19, 2023
f4fb317
update
charantejag504 Oct 19, 2023
96d8134
Merge branch 'main' into TUN13
charantejag504 Oct 20, 2023
034bed0
Merge branch 'main' into TUN13
charantejag504 Oct 23, 2023
8fa0ade
Merge branch 'main' into TUN13
charantejag504 Oct 23, 2023
b505923
Merge branch 'main' into TUN13
charantejag504 Oct 24, 2023
15ce71b
Merge branch 'main' into TUN13
arulkumarsekar Dec 19, 2023
4c7af78
Merge branch 'main' into TUN13
arulkumarsekar Dec 20, 2023
f10a1aa
Merge branch 'main' into TUN13
arulkumarsekar Jan 3, 2024
28f68f1
Merge branch 'main' into TUN13
charantejag504 Mar 6, 2024
c344256
Merge branch 'main' into TUN13
charantejag504 Mar 7, 2024
25ffdb3
Merge branch 'main' into TUN13
charantejag504 Apr 24, 2024
90940fc
Merge branch 'main' into TUN13
charantejag504 Apr 29, 2024
2cd3861
Merge branch 'main' into TUN13
charantejag504 Apr 29, 2024
e6e8f0f
Merge branch 'main' into TUN13
charantejag504 Jun 5, 2024
3297fa6
update
charantejag504 Jun 11, 2024
f3915ac
Merge branch 'main' into TUN13
charantejag504 Jun 17, 2024
1a0fbf9
Merge branch 'main' into TUN13
charantejag504 Oct 11, 2024
6b2125e
Merge branch 'main' into TUN13
charantejag504 Oct 16, 2024
fff43c7
Merge branch 'main' into TUN13
charantejag504 Jan 6, 2025
9165c06
Merge branch 'main' into TUN13
charantejag504 Jan 6, 2025
255c12a
address comments
charantejag504 Jan 7, 2025
3b5452c
update
charantejag504 Jan 7, 2025
d18aa7f
update
charantejag504 Jan 7, 2025
624f17a
update
charantejag504 Jan 8, 2025
f231b4c
Merge branch 'main' into TUN13
charantejag504 Jan 8, 2025
e33682e
Merge branch 'main' into TUN13
charantejag504 Jan 9, 2025
7fce84f
Merge branch 'main' into TUN13
charantejag504 Jan 10, 2025
2a95026
Merge branch 'main' into TUN13
charantejag504 Jan 13, 2025
9556b84
update
charantejag504 Jan 15, 2025
e61766f
Merge branch 'TUN13' of https://github.com/charantejag504/featureprof…
charantejag504 Jan 15, 2025
62a615a
Merge branch 'main' into TUN13
charantejag504 Jan 15, 2025
7939504
Merge branch 'main' into TUN13
charantejag504 Jan 16, 2025
6ad3510
Merge branch 'main' into TUN13
charantejag504 Jan 19, 2025
7f98f99
Merge branch 'main' into TUN13
charantejag504 Jan 23, 2025
9a0b98f
Merge branch 'main' into TUN13
lvaish05 Jan 29, 2025
05b84e3
Merge branch 'main' into TUN13
lvaish05 Feb 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
charantejag504 committed Sep 21, 2023
commit 489f0778d49a94501fab04136ada8a6545b51319
Original file line number Diff line number Diff line change
@@ -14,18 +14,12 @@ Tunnel Destination
Directly on Tunnel interface or Tunnel Group
Configure such 32 tunnel interfaces
Configure static route with IPv4 NH pointing to Tunnel interfaces
Send 1000 IPv4 flows from tester on ATE-PORT1 connected to DUT-PORT1 where GRE Encap filter is applied with the traffic profile documented
IPv4 flows are made of 5 tuples
Source IP address
Source port
Destination IP address
Destination port
Payload protocol
Enable the packet capture on ATE ingress port to verify the GRE header of uncapped traffic
Send 1000 IPv4 flows from tester on ATE-PORT1 connected to DUT-PORT1
Enable the packet capture on ATE ingress port to verify the GRE header of encapped traffic
Verify the tunnel interfaces counters to confirm the traffic encapsulation
After encapsulation, traffic should be load balanced/hash to all available L3 ECMP or LAG or combination of both features
Validate system for:
Health-1.1 #To do
Health-1.1
No feature related error or drop counters incrementing, discussion with vendors required to highlight additional fields to monitor based on implementation and architecture

## Config Parameter coverage
Original file line number Diff line number Diff line change
@@ -120,30 +120,91 @@ type parameters struct {
func TestFtiTunnels(t *testing.T) {

p := &parameters{
rtIntf1Ipv4Add: "198.51.100.2",
rtIntf2Ipv4Add: "198.51.100.3",
rtIntf5Ipv4Add: "198.51.100.5",
rtIntf6Ipv4Add: "198.51.100.6",
rtIntf1MacAdd: "00:00:aa:aa:aa:aa",
rtIntf2MacAdd: "00:00:bb:bb:bb:bb",
rtIntf5MacAdd: "00:00:cc:cc:cc:cc",
rtIntf6MacAdd: "00:00:dd:dd:dd:dd",
r0Intf1Ipv4Add: "198.51.100.1",
r0Intf2Ipv4Add: "198.51.100.4",
r0Intf3Ipv4Add: "198.51.100.7",
r0Intf4Ipv4Add: "198.51.100.8",
r0Fti0Ipv4Add: "198.51.100.9",
r0Fti1Ipv4Add: "198.51.100.10",
r0Fti2Ipv4Add: "198.51.100.11",
r0Fti3Ipv4Add: "198.51.100.12",
r0Fti4Ipv4Add: "198.51.100.13",
r0Fti5Ipv4Add: "198.51.100.14",
r0Fti6Ipv4Add: "198.51.100.15",
r0Fti7Ipv4Add: "198.51.100.16",
r0Lo0Ut0Ipv4Add: "198.51.100.17",
r0Lo0Ut1Ipv4Add: "198.51.100.18",
r0Lo0Ut2Ipv4Add: "198.51.100.19",
r0Lo0Ut3Ipv4Add: "198.51.100.20",
rtIntf1Ipv4Add: "198.51.100.2",
rtIntf2Ipv4Add: "198.51.100.3",
rtIntf5Ipv4Add: "198.51.100.5",
rtIntf6Ipv4Add: "198.51.100.6",
rtIntf1MacAdd: "00:00:aa:aa:aa:aa",
rtIntf2MacAdd: "00:00:bb:bb:bb:bb",
rtIntf5MacAdd: "00:00:cc:cc:cc:cc",
rtIntf6MacAdd: "00:00:dd:dd:dd:dd",
r0Intf1Ipv4Add: "198.51.100.1",
r0Intf2Ipv4Add: "198.51.100.4",
r0Intf3Ipv4Add: "198.51.100.7",
r0Intf4Ipv4Add: "198.51.100.8",
r0Fti0Ipv4Add: "198.51.100.9",
r0Fti1Ipv4Add: "198.51.100.10",
r0Fti2Ipv4Add: "198.51.100.11",
r0Fti3Ipv4Add: "198.51.100.12",
r0Fti4Ipv4Add: "198.51.100.13",
r0Fti5Ipv4Add: "198.51.100.14",
r0Fti6Ipv4Add: "198.51.100.15",
r0Fti7Ipv4Add: "198.51.100.16",
r0Lo0Ut0Ipv4Add: "198.18.70.1",
r0Lo0Ut1Ipv4Add: "198.18.71.1",
r0Lo0Ut2Ipv4Add: "198.18.72.1",
r0Lo0Ut3Ipv4Add: "198.18.73.1",
r0Lo0Ut4Ipv4Add: "198.18.74.1",
r0Lo0Ut5Ipv4Add: "198.18.75.1",
r0Lo0Ut6Ipv4Add: "198.18.76.1",
r0Lo0Ut7Ipv4Add: "198.18.77.1",
r0Lo0Ut8Ipv4Add: "198.18.78.1",
r0Lo0Ut9Ipv4Add: "198.18.79.1",
r0Lo0Ut10Ipv4Add: "198.18.80.1",
r0Lo0Ut11Ipv4Add: "198.18.81.1",
r0Lo0Ut12Ipv4Add: "198.18.82.1",
r0Lo0Ut13Ipv4Add: "198.18.83.1",
r0Lo0Ut14Ipv4Add: "198.18.84.1",
r0Lo0Ut15Ipv4Add: "198.18.85.1",
r0Lo0Ut16Ipv4Add: "198.18.86.1",
r0Lo0Ut17Ipv4Add: "198.18.87.1",
r0Lo0Ut18Ipv4Add: "198.18.88.1",
r0Lo0Ut19Ipv4Add: "198.18.89.1",
r0Lo0Ut20Ipv4Add: "198.18.90.1",
r0Lo0Ut21Ipv4Add: "198.18.91.1",
r0Lo0Ut22Ipv4Add: "198.18.92.1",
r0Lo0Ut23Ipv4Add: "198.18.93.1",
r0Lo0Ut24Ipv4Add: "198.18.94.1",
r0Lo0Ut25Ipv4Add: "198.18.95.1",
r0Lo0Ut26Ipv4Add: "198.18.96.1",
r0Lo0Ut27Ipv4Add: "198.18.97.1",
r0Lo0Ut28Ipv4Add: "198.18.98.1",
r0Lo0Ut29Ipv4Add: "198.18.99.1",
r0Lo0Ut30Ipv4Add: "198.18.100.1",
r0Lo0Ut31Ipv4Add: "198.18.101.1",
rtLo0Ut0Ipv4Add: "198.18.110.1",
rtLo0Ut1Ipv4Add: "198.18.111.1",
rtLo0Ut2Ipv4Add: "198.18.112.1",
rtLo0Ut3Ipv4Add: "198.18.113.1",
rtLo0Ut4Ipv4Add: "198.18.114.1",
rtLo0Ut5Ipv4Add: "198.18.115.1",
rtLo0Ut6Ipv4Add: "198.18.116.1",
rtLo0Ut7Ipv4Add: "198.18.117.1",
rtLo0Ut8Ipv4Add: "198.18.118.1",
rtLo0Ut9Ipv4Add: "198.18.119.1",
rtLo0Ut10Ipv4Add: "198.18.120.1",
rtLo0Ut11Ipv4Add: "198.18.121.1",
rtLo0Ut12Ipv4Add: "198.18.122.1",
rtLo0Ut13Ipv4Add: "198.18.123.1",
rtLo0Ut14Ipv4Add: "198.18.124.1",
rtLo0Ut15Ipv4Add: "198.18.125.1",
rtLo0Ut16Ipv4Add: "198.18.126.1",
rtLo0Ut17Ipv4Add: "198.18.127.1",
rtLo0Ut18Ipv4Add: "198.18.128.1",
rtLo0Ut19Ipv4Add: "198.18.129.1",
rtLo0Ut20Ipv4Add: "198.18.130.1",
rtLo0Ut21Ipv4Add: "198.18.131.1",
rtLo0Ut22Ipv4Add: "198.18.132.1",
rtLo0Ut23Ipv4Add: "198.18.133.1",
rtLo0Ut24Ipv4Add: "198.18.134.1",
rtLo0Ut25Ipv4Add: "198.18.135.1",
rtLo0Ut26Ipv4Add: "198.18.136.1",
rtLo0Ut27Ipv4Add: "198.18.137.1",
rtLo0Ut28Ipv4Add: "198.18.138.1",
rtLo0Ut29Ipv4Add: "198.18.139.1",
rtLo0Ut30Ipv4Add: "198.18.140.1",
rtLo0Ut31Ipv4Add: "198.18.141.1",

ipv4Mask: 24,
ipv4FullMask: 32,
flow1: "IPv4-flow1",
@@ -167,26 +228,41 @@ func TestFtiTunnels(t *testing.T) {
ConfigureTunnelEncapDUT(t, p, dut1, d1p1, d1p2, d1p3, d1p4)
})

t.Run("Configure loopback interface on dut1 and dut2 ", func(t *testing.T) {
// configure addtional loop address by native cli configuration.
ConfigureLoobackInterfaceWithIPv4address(t, p.r0Lo0Ut1Ipv4Add, dut1)
ConfigureLoobackInterfaceWithIPv4address(t, p.r0Lo0Ut2Ipv4Add, dut1)
ConfigureLoobackInterfaceWithIPv4address(t, p.r0Lo0Ut3Ipv4Add, dut1)

t.Run("Configure 32 tunnel interface on DUT ", func(t *testing.T) {
ConfigureTunnelInterface(t, 0, p.r0Lo0Ut0Ipv4Add, p.rtLo0Ut0Ipv4Add, dut1)
ConfigureTunnelInterface(t, 1, p.r0Lo0Ut1Ipv4Add, p.rtLo0Ut1Ipv4Add, dut1)
ConfigureTunnelInterface(t, 2, p.r0Lo0Ut2Ipv4Add, p.rtLo0Ut2Ipv4Add, dut1)
ConfigureTunnelInterface(t, 3, p.r0Lo0Ut3Ipv4Add, p.rtLo0Ut3Ipv4Add, dut1)
ConfigureTunnelInterface(t, 4, p.r0Lo0Ut4Ipv4Add, p.rtLo0Ut4Ipv4Add, dut1)
ConfigureTunnelInterface(t, 5, p.r0Lo0Ut5Ipv4Add, p.rtLo0Ut5Ipv4Add, dut1)
ConfigureTunnelInterface(t, 6, p.r0Lo0Ut6Ipv4Add, p.rtLo0Ut6Ipv4Add, dut1)
ConfigureTunnelInterface(t, 7, p.r0Lo0Ut7Ipv4Add, p.rtLo0Ut7Ipv4Add, dut1)
ConfigureTunnelInterface(t, 8, p.r0Lo0Ut8Ipv4Add, p.rtLo0Ut8Ipv4Add, dut1)
ConfigureTunnelInterface(t, 9, p.r0Lo0Ut9Ipv4Add, p.rtLo0Ut9Ipv4Add, dut1)
ConfigureTunnelInterface(t, 10, p.r0Lo0Ut10Ipv4Add, p.rtLo0Ut10Ipv4Add, dut1)
ConfigureTunnelInterface(t, 11, p.r0Lo0Ut11Ipv4Add, p.rtLo0Ut11Ipv4Add, dut1)
ConfigureTunnelInterface(t, 12, p.r0Lo0Ut12Ipv4Add, p.rtLo0Ut12Ipv4Add, dut1)
ConfigureTunnelInterface(t, 13, p.r0Lo0Ut13Ipv4Add, p.rtLo0Ut13Ipv4Add, dut1)
ConfigureTunnelInterface(t, 14, p.r0Lo0Ut14Ipv4Add, p.rtLo0Ut14Ipv4Add, dut1)
ConfigureTunnelInterface(t, 15, p.r0Lo0Ut15Ipv4Add, p.rtLo0Ut15Ipv4Add, dut1)
ConfigureTunnelInterface(t, 16, p.r0Lo0Ut16Ipv4Add, p.rtLo0Ut16Ipv4Add, dut1)
ConfigureTunnelInterface(t, 17, p.r0Lo0Ut17Ipv4Add, p.rtLo0Ut17Ipv4Add, dut1)
ConfigureTunnelInterface(t, 18, p.r0Lo0Ut18Ipv4Add, p.rtLo0Ut18Ipv4Add, dut1)
ConfigureTunnelInterface(t, 19, p.r0Lo0Ut19Ipv4Add, p.rtLo0Ut19Ipv4Add, dut1)
ConfigureTunnelInterface(t, 20, p.r0Lo0Ut20Ipv4Add, p.rtLo0Ut20Ipv4Add, dut1)
ConfigureTunnelInterface(t, 21, p.r0Lo0Ut21Ipv4Add, p.rtLo0Ut21Ipv4Add, dut1)
ConfigureTunnelInterface(t, 22, p.r0Lo0Ut22Ipv4Add, p.rtLo0Ut22Ipv4Add, dut1)
ConfigureTunnelInterface(t, 23, p.r0Lo0Ut23Ipv4Add, p.rtLo0Ut23Ipv4Add, dut1)
ConfigureTunnelInterface(t, 24, p.r0Lo0Ut24Ipv4Add, p.rtLo0Ut24Ipv4Add, dut1)
ConfigureTunnelInterface(t, 25, p.r0Lo0Ut25Ipv4Add, p.rtLo0Ut25Ipv4Add, dut1)
ConfigureTunnelInterface(t, 26, p.r0Lo0Ut26Ipv4Add, p.rtLo0Ut26Ipv4Add, dut1)
ConfigureTunnelInterface(t, 27, p.r0Lo0Ut27Ipv4Add, p.rtLo0Ut27Ipv4Add, dut1)
ConfigureTunnelInterface(t, 28, p.r0Lo0Ut28Ipv4Add, p.rtLo0Ut28Ipv4Add, dut1)
ConfigureTunnelInterface(t, 29, p.r0Lo0Ut29Ipv4Add, p.rtLo0Ut29Ipv4Add, dut1)
ConfigureTunnelInterface(t, 30, p.r0Lo0Ut30Ipv4Add, p.rtLo0Ut30Ipv4Add, dut1)
ConfigureTunnelInterface(t, 31, p.r0Lo0Ut31Ipv4Add, p.rtLo0Ut31Ipv4Add, dut1)
})

t.Run("Configure 8 tunnel interface on DUT ", func(t *testing.T) {
// configure tunnel interface on dut1 - IPv4
ConfigureTunnelInterface(t, "fti0", p.r0Lo0Ut0Ipv4Add, p.r1Lo0Ut0Ipv4Add, dut1)
ConfigureTunnelInterface(t, "fti1", p.r0Lo0Ut1Ipv4Add, p.r1Lo0Ut1Ipv4Add, dut1)
ConfigureTunnelInterface(t, "fti2", p.r0Lo0Ut2Ipv4Add, p.r1Lo0Ut2Ipv4Add, dut1)
ConfigureTunnelInterface(t, "fti3", p.r0Lo0Ut3Ipv4Add, p.r1Lo0Ut3Ipv4Add, dut1)
})
// configure tunnel termination on dut1
t.Run("Configure tunnel termination at underlay interface on dut1 and dut2", func(t *testing.T) {
ConfigureTunnelTermination(t, d1p3, dut1)
ConfigureTunnelTermination(t, d1p4, dut1)
})
//configure Network Instance for both dut
t.Run("Configure routing instance on dut1 and dut2", func(t *testing.T) {
configureNetworkInstance(t, dut1)
@@ -288,7 +364,7 @@ func ConfigureTunnelInterface(t *testing.T, intf string, tunnelSrc string, tunne
t.Logf("Push the IPv4 tunnel endpoint config:\n%s", dut.Vendor())
switch dut.Vendor() {
case ondatra.JUNIPER:
config := ConfigureTunnelEndPoints(intf, tunnelSrc, tunnelDst)
config := ConfigureTunnelCLI(intf, tunnelSrc, tunnelDst)
t.Logf("Push the CLI config:\n%s", config)
gnmiClient := dut.RawAPIs().GNMI().Default(t)
gpbSetRequest, err := buildCliConfigRequest(config)
@@ -575,28 +651,6 @@ func ConfigureAdditionalIPv4AddressonLoopback(address string) string {

}

func ConfigureTunnelEndPoints(intf string, tunnelSrc string, tunnelDest string) string {

return fmt.Sprintf(`
interfaces {
%s {
unit 0 {
tunnel {
encapsulation gre {
source {
address %s;
}
destination {
address %s;
}
}
}
}
}
}`, intf, tunnelSrc, tunnelDest)

}

func buildCliConfigRequest(config string) (*gpb.SetRequest, error) {
// Build config with Origin set to cli and Ascii encoded config.
gpbSetRequest := &gpb.SetRequest{
@@ -823,3 +877,25 @@ func ConfigureTunnelTermination(t *testing.T, intf *ondatra.Port, dut *ondatra.D
t.Errorf("Invalid Tunnel termination configuration")
}
}

func ConfigureTunnelCLI(tunnelUnit string, tunnelSrc string, tunnelDest string) string {

return fmt.Sprintf(`
interfaces {
fti0 {
unit %s {
tunnel {
encapsulation gre {
source {
address %s;
}
destination {
address %s;
}
}
}
}
}
}`, tunnelUnit, tunnelSrc, tunnelDest, tunnelInet)

}