-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add base autotests for route, decap, nat64stateless modules
- Loading branch information
Showing
64 changed files
with
1,314 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
steps: | ||
- ipv4Update: "0.0.0.0/0 -> 200.0.0.1" | ||
- sendPackets: | ||
- port: kni0 | ||
send: send.pcap | ||
expect: expect.pcap |
32 changes: 32 additions & 0 deletions
32
autotests/units/001_one_port/001_default/controlplane.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"modules": { | ||
"lp0.100": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "100", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "vrf0" | ||
}, | ||
"lp0.200": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "200", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "vrf0" | ||
}, | ||
"vrf0": { | ||
"type": "route", | ||
"interfaces": { | ||
"kni0.100": { | ||
"nextModule": "lp0.100" | ||
}, | ||
"kni0.200": { | ||
"ipv4Prefix": "200.0.0.2/24", | ||
"neighborIPv4Address": "200.0.0.1", | ||
"neighborMacAddress": "00:00:00:11:11:11", | ||
"nextModule": "lp0.200" | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
steps: | ||
- ipv4Update: "0.0.0.0/0 -> 200.0.0.1" | ||
- sendPackets: | ||
- port: kni0 | ||
send: send.pcap | ||
expect: expect.pcap |
45 changes: 45 additions & 0 deletions
45
autotests/units/001_one_port/002_decap_default/controlplane.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"modules": { | ||
"lp0.100": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "100", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl0" | ||
}, | ||
"lp0.200": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "200", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "drop" | ||
}, | ||
"acl0": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap0" | ||
] | ||
}, | ||
"decap0": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"nextModule": "vrf0" | ||
}, | ||
"vrf0": { | ||
"type": "route", | ||
"interfaces": { | ||
"kni0.100": { | ||
"nextModule": "lp0.100" | ||
}, | ||
"kni0.200": { | ||
"ipv4Prefix": "200.0.0.2/24", | ||
"neighborIPv4Address": "200.0.0.1", | ||
"neighborMacAddress": "00:00:00:11:11:11", | ||
"nextModule": "lp0.200" | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
steps: | ||
- ipv4Update: | ||
- "0.0.0.0/0 -> 200.0.2.1 200.0.3.1" | ||
- "128.0.0.0/1 -> 99.0.0.1 99.0.0.2 99.0.0.3" | ||
- ipv4LabelledUpdate: | ||
- "99.0.0.1/32 -> 200.0.2.1:1200 200.0.3.1:1300" | ||
- "99.0.0.2/32 -> 200.0.2.1:2200 200.0.3.1:2300" | ||
- "99.0.0.3/32 -> 200.0.2.1:3200 200.0.3.1:3300" | ||
- "100.0.0.1/32 -> 200.0.2.1:4001 200.0.3.1:4002" | ||
- "111.0.0.0/24 -> 100.0.0.1:50001" | ||
- sendPackets: | ||
- port: kni0 | ||
send: send.pcap | ||
expect: expect.pcap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"modules": { | ||
"lp0.100": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "100", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "vrf0" | ||
}, | ||
"lp0.200": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "200", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "vrf0" | ||
}, | ||
"lp0.300": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "300", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "vrf0" | ||
}, | ||
"vrf0": { | ||
"type": "route", | ||
"interfaces": { | ||
"kni0.100": { | ||
"nextModule": "lp0.100" | ||
}, | ||
"kni0.200": { | ||
"ipv4Prefix": "200.0.2.2/24", | ||
"neighborIPv4Address": "200.0.2.1", | ||
"neighborMacAddress": "00:00:00:22:22:22", | ||
"nextModule": "lp0.200" | ||
}, | ||
"kni0.300": { | ||
"ipv4Prefix": "200.0.3.2/24", | ||
"neighborIPv4Address": "200.0.3.1", | ||
"neighborMacAddress": "00:00:00:33:33:33", | ||
"nextModule": "lp0.300" | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
steps: | ||
- ipv4Update: | ||
- "0.0.0.0/0 -> 200.0.2.1 200.0.3.1" | ||
- "1.1.0.0/16 -> 99.0.0.1 99.0.0.2 99.0.0.3 99.0.0.4" | ||
- ipv4LabelledUpdate: | ||
- "99.0.0.1/32 -> 200.0.3.1:1300" | ||
- "99.0.0.2/32 -> 200.0.2.1:2200 200.0.3.1:2300" | ||
- "99.0.0.3/32 -> 200.0.2.1:3200 200.0.3.1:3300" | ||
- "99.0.0.4/32 -> 200.0.2.1:4200" | ||
- sendPackets: | ||
- port: kni0 | ||
send: send.pcap | ||
expect: expect.pcap |
58 changes: 58 additions & 0 deletions
58
autotests/units/001_one_port/004_decap_ecmp/controlplane.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"modules": { | ||
"lp0.100": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "100", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl0" | ||
}, | ||
"lp0.200": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "200", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "drop" | ||
}, | ||
"lp0.300": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "300", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "drop" | ||
}, | ||
"acl0": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap0" | ||
] | ||
}, | ||
"decap0": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"nextModule": "vrf0" | ||
}, | ||
"vrf0": { | ||
"type": "route", | ||
"interfaces": { | ||
"kni0.100": { | ||
"nextModule": "lp0.100" | ||
}, | ||
"kni0.200": { | ||
"ipv4Prefix": "200.0.2.2/24", | ||
"neighborIPv4Address": "200.0.2.1", | ||
"neighborMacAddress": "00:00:00:22:22:22", | ||
"nextModule": "lp0.200" | ||
}, | ||
"kni0.300": { | ||
"ipv4Prefix": "200.0.3.2/24", | ||
"neighborIPv4Address": "200.0.3.1", | ||
"neighborMacAddress": "00:00:00:33:33:33", | ||
"nextModule": "lp0.300" | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
steps: | ||
- ipv4Update: "0.0.0.0/0 -> 200.0.0.1" | ||
- sendPackets: | ||
- port: kni0 | ||
send: send.pcap | ||
expect: expect.pcap | ||
# - sendPackets: | ||
# - port: kni0 | ||
# send: send_many.pcap | ||
# expect: expect_many.pcap |
134 changes: 134 additions & 0 deletions
134
autotests/units/001_one_port/005_decap_dscp/controlplane.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{ | ||
"modules": { | ||
"lp0.100": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "100", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl0" | ||
}, | ||
"lp0.101": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "101", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl1" | ||
}, | ||
"lp0.102": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "102", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl2" | ||
}, | ||
"lp0.103": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "103", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl3" | ||
}, | ||
"lp0.104": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "104", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "acl4" | ||
}, | ||
"lp0.200": { | ||
"type": "logicalPort", | ||
"physicalPort": "kni0", | ||
"vlanId": "200", | ||
"macAddress": "00:11:22:33:44:55", | ||
"nextModule": "drop" | ||
}, | ||
"acl0": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap0" | ||
] | ||
}, | ||
"acl1": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap1" | ||
] | ||
}, | ||
"acl2": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap2" | ||
] | ||
}, | ||
"acl3": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap3" | ||
] | ||
}, | ||
"acl4": { | ||
"type": "acl", | ||
"nextModules": [ | ||
"decap4" | ||
] | ||
}, | ||
"decap0": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"dscpMarkType": "never", | ||
"nextModule": "vrf0" | ||
}, | ||
"decap1": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"dscpMarkType": "onlyDefault", | ||
"dscp": 10, | ||
"nextModule": "vrf0" | ||
}, | ||
"decap2": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"dscpMarkType": "always", | ||
"dscp": 20, | ||
"nextModule": "vrf0" | ||
}, | ||
"decap3": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"dscpMarkType": "always", | ||
"dscp": 40, | ||
"nextModule": "vrf0" | ||
}, | ||
"decap4": { | ||
"type": "decap", | ||
"ipv6DestinationPrefixes": [ | ||
"1:2:3:4::abcd/128" | ||
], | ||
"dscpMarkType": "onlyDefault", | ||
"dscp": 40, | ||
"nextModule": "vrf0" | ||
}, | ||
"vrf0": { | ||
"type": "route", | ||
"interfaces": { | ||
"kni0.100": { | ||
"nextModule": "lp0.100" | ||
}, | ||
"kni0.200": { | ||
"ipv4Prefix": "200.0.0.2/24", | ||
"neighborIPv4Address": "200.0.0.1", | ||
"neighborMacAddress": "00:00:00:11:11:11", | ||
"nextModule": "lp0.200" | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.