-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
354 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
holo-vrrp/tests/conformance/master-down-timer1/01-input-protocol.jsonl
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 @@ | ||
{"MasterDownTimer":{"vrid":1}} |
1 change: 1 addition & 0 deletions
1
holo-vrrp/tests/conformance/master-down-timer1/01-output-ibus.jsonl
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 @@ | ||
{"InterfaceIpAddRequest":{"ifname":"mvlan-vrrp-1","addr":"10.0.1.5/32"}} |
20 changes: 20 additions & 0 deletions
20
holo-vrrp/tests/conformance/master-down-timer1/01-output-northbound-state.json
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,20 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"ietf-ip:ipv4": { | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"state": "master", | ||
"new-master-reason": "no-response" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
holo-vrrp/tests/conformance/master-down-timer1/01-output-protocol.jsonl
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,2 @@ | ||
{"NetTxPacket":{"Vrrp":{"packet":{"ip":{"version":4,"ihl":5,"tos":192,"total_length":40,"identification":7,"flags":0,"offset":0,"ttl":255,"protocol":112,"checksum":0,"src_address":"10.0.1.1","dst_address":"224.0.0.18","options":null,"padding":null},"vrrp":{"version":2,"hdr_type":1,"vrid":1,"priority":10,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":51703,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"NetTxPacket":{"Arp":{"vrid":1,"ifindex":3,"eth_hdr":{"dst_mac":[255,255,255,255,255,255],"src_mac":[0,0,0,0,0,0],"ethertype":2054},"arp_hdr":{"hw_type":1,"proto_type":2048,"hw_length":6,"proto_length":4,"operation":1,"sender_hw_address":[0,0,0,0,0,0],"sender_proto_address":"10.0.1.5","target_hw_address":[255,255,255,255,255,255],"target_proto_address":"10.0.1.5"}}}} |
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,31 @@ | ||
// | ||
// Copyright (c) The Holo Core Contributors | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// Sponsored by NLnet as part of the Next Generation Internet initiative. | ||
// See: https://nlnet.nl/NGI0 | ||
// | ||
|
||
mod topologies; | ||
|
||
use holo_protocol::test::stub::run_test; | ||
use holo_vrrp::interface::Interface; | ||
|
||
// Test description: | ||
// | ||
// The interface in "backup" state should transition to the "master" mode once | ||
// the Master_Down_Timer has expired. | ||
// | ||
// Input: | ||
// * Protocol: Master_Down_Timer has expired | ||
// Output: | ||
// * Protocol: | ||
// - Send VRRP advertisement | ||
// - Send gratuitous ARP | ||
// * Northbound: interface state transitioned to the "master" state | ||
// * Southbound: install the 10.0.1.5/32 address to the mvlan-vrrp-1 interface | ||
#[tokio::test] | ||
async fn master_down_timer1() { | ||
run_test::<Interface>("master-down-timer1", "topo1-1", "rt1").await; | ||
} |
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,20 @@ | ||
// | ||
// Copyright (c) The Holo Core Contributors | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// Sponsored by NLnet as part of the Next Generation Internet initiative. | ||
// See: https://nlnet.nl/NGI0 | ||
// | ||
|
||
use holo_protocol::test::stub::run_test_topology; | ||
use holo_vrrp::interface::Interface; | ||
|
||
#[tokio::test] | ||
async fn topology1_1() { | ||
for rt_num in 1..=3 { | ||
let rt_name = format!("rt{}", rt_num); | ||
run_test_topology::<Interface>("topo1-1", &rt_name).await; | ||
//run_test_topology::<Interface>("topo1-1", "eth-sw1", &rt_name).await; | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
holo-vrrp/tests/conformance/topologies/topo1-1/rt1/config.json
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,48 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"type": "iana-if-type:ethernetCsmacd", | ||
"ietf-ip:ipv4": { | ||
"address": [ | ||
{ | ||
"ip": "10.0.1.1", | ||
"prefix-length": 24 | ||
} | ||
], | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"log-state-change": true, | ||
"priority": 10, | ||
"advertise-interval-sec": 1, | ||
"virtual-ipv4-addresses": { | ||
"virtual-ipv4-address": [ | ||
{ | ||
"ipv4-address": "10.0.1.5" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "lo", | ||
"type": "iana-if-type:softwareLoopback", | ||
"ietf-ip:ipv4": { | ||
"address": [ | ||
{ | ||
"ip": "1.1.1.1", | ||
"prefix-length": 32 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
holo-vrrp/tests/conformance/topologies/topo1-1/rt1/events.jsonl
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,24 @@ | ||
{"Ibus":{"InterfaceQuery":{"ifname":"eth-sw1","af":"Ipv4"}}} | ||
{"Ibus":{"InterfaceQuery":{"ifname":"lo","af":"Ipv4"}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"eth-sw1","ifindex":2,"mtu":1500,"flags":"OPERATIVE | BROADCAST"}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"lo","ifindex":1,"mtu":65536,"flags":"LOOPBACK | OPERATIVE"}}} | ||
{"Ibus":{"MacvlanAdd":{"parent_name":"eth-sw1","name":"mvlan-vrrp-1","mac_address":[0,0,94,0,1,1]}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"eth-sw1","addr":"10.0.1.1/24","flags":""}}} | ||
{"Ibus":{"RouterIdUpdate":"10.0.1.1"}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"lo","addr":"1.1.1.1/32","flags":""}}} | ||
{"Ibus":{"RouterIdUpdate":"1.1.1.1"}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"1.1.1.1/32","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":1}}]}}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"10.0.1.0/24","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":2}}]}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"mvlan-vrrp-1","ifindex":3,"mtu":1500,"flags":"OPERATIVE | BROADCAST"}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"mvlan-vrrp-1","addr":"fe80::200:5eff:fe00:101/64","flags":""}}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"fe80::/64","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":2}}]}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} |
2 changes: 2 additions & 0 deletions
2
holo-vrrp/tests/conformance/topologies/topo1-1/rt1/output/ibus.jsonl
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,2 @@ | ||
{"InterfaceQuery":{"ifname":"eth-sw1","af":"Ipv4"}} | ||
{"MacvlanAdd":{"parent_name":"eth-sw1","name":"mvlan-vrrp-1","mac_address":[0,0,94,0,1,1]}} |
20 changes: 20 additions & 0 deletions
20
holo-vrrp/tests/conformance/topologies/topo1-1/rt1/output/northbound-state.json
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,20 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"ietf-ip:ipv4": { | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"state": "backup", | ||
"new-master-reason": "not-master" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
holo-vrrp/tests/conformance/topologies/topo1-1/rt2/config.json
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,48 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"type": "iana-if-type:ethernetCsmacd", | ||
"ietf-ip:ipv4": { | ||
"address": [ | ||
{ | ||
"ip": "10.0.1.2", | ||
"prefix-length": 24 | ||
} | ||
], | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"log-state-change": true, | ||
"priority": 20, | ||
"advertise-interval-sec": 1, | ||
"virtual-ipv4-addresses": { | ||
"virtual-ipv4-address": [ | ||
{ | ||
"ipv4-address": "10.0.1.5" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "lo", | ||
"type": "iana-if-type:softwareLoopback", | ||
"ietf-ip:ipv4": { | ||
"address": [ | ||
{ | ||
"ip": "2.2.2.2", | ||
"prefix-length": 32 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
holo-vrrp/tests/conformance/topologies/topo1-1/rt2/events.jsonl
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,24 @@ | ||
{"Ibus":{"InterfaceQuery":{"ifname":"eth-sw1","af":"Ipv4"}}} | ||
{"Ibus":{"InterfaceQuery":{"ifname":"lo","af":"Ipv4"}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"eth-sw1","ifindex":2,"mtu":1500,"flags":"OPERATIVE | BROADCAST"}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"lo","ifindex":1,"mtu":65536,"flags":"LOOPBACK | OPERATIVE"}}} | ||
{"Ibus":{"MacvlanAdd":{"parent_name":"eth-sw1","name":"mvlan-vrrp-1","mac_address":[0,0,94,0,1,1]}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"eth-sw1","addr":"10.0.1.2/24","flags":""}}} | ||
{"Ibus":{"RouterIdUpdate":"10.0.1.2"}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"lo","addr":"2.2.2.2/32","flags":""}}} | ||
{"Ibus":{"RouterIdUpdate":"2.2.2.2"}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"10.0.1.0/24","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":2}}]}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"mvlan-vrrp-1","ifindex":3,"mtu":1500,"flags":"OPERATIVE | BROADCAST"}}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"2.2.2.2/32","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":1}}]}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"mvlan-vrrp-1","addr":"fe80::200:5eff:fe00:101/64","flags":""}}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"fe80::/64","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":2}}]}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"Protocol":{"VrrpNetRxPacket":{"src":"10.0.1.3","packet":{"Ok":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} |
2 changes: 2 additions & 0 deletions
2
holo-vrrp/tests/conformance/topologies/topo1-1/rt2/output/ibus.jsonl
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,2 @@ | ||
{"InterfaceQuery":{"ifname":"eth-sw1","af":"Ipv4"}} | ||
{"MacvlanAdd":{"parent_name":"eth-sw1","name":"mvlan-vrrp-1","mac_address":[0,0,94,0,1,1]}} |
20 changes: 20 additions & 0 deletions
20
holo-vrrp/tests/conformance/topologies/topo1-1/rt2/output/northbound-state.json
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,20 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"ietf-ip:ipv4": { | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"state": "backup", | ||
"new-master-reason": "not-master" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
holo-vrrp/tests/conformance/topologies/topo1-1/rt3/config.json
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,48 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"type": "iana-if-type:ethernetCsmacd", | ||
"ietf-ip:ipv4": { | ||
"address": [ | ||
{ | ||
"ip": "10.0.1.3", | ||
"prefix-length": 24 | ||
} | ||
], | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"log-state-change": true, | ||
"priority": 30, | ||
"advertise-interval-sec": 1, | ||
"virtual-ipv4-addresses": { | ||
"virtual-ipv4-address": [ | ||
{ | ||
"ipv4-address": "10.0.1.5" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "lo", | ||
"type": "iana-if-type:softwareLoopback", | ||
"ietf-ip:ipv4": { | ||
"address": [ | ||
{ | ||
"ip": "3.3.3.3", | ||
"prefix-length": 32 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
17 changes: 17 additions & 0 deletions
17
holo-vrrp/tests/conformance/topologies/topo1-1/rt3/events.jsonl
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,17 @@ | ||
{"Ibus":{"InterfaceQuery":{"ifname":"eth-sw1","af":"Ipv4"}}} | ||
{"Ibus":{"InterfaceQuery":{"ifname":"lo","af":"Ipv4"}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"eth-sw1","ifindex":2,"mtu":1500,"flags":"OPERATIVE | BROADCAST"}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"lo","ifindex":1,"mtu":65536,"flags":"LOOPBACK | OPERATIVE"}}} | ||
{"Ibus":{"MacvlanAdd":{"parent_name":"eth-sw1","name":"mvlan-vrrp-1","mac_address":[0,0,94,0,1,1]}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"eth-sw1","addr":"10.0.1.3/24","flags":""}}} | ||
{"Ibus":{"RouterIdUpdate":"10.0.1.3"}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"lo","addr":"3.3.3.3/32","flags":""}}} | ||
{"Ibus":{"RouterIdUpdate":"3.3.3.3"}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"10.0.1.0/24","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":2}}]}}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"3.3.3.3/32","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":1}}]}}} | ||
{"Ibus":{"InterfaceUpd":{"ifname":"mvlan-vrrp-1","ifindex":3,"mtu":1500,"flags":"OPERATIVE | BROADCAST"}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"mvlan-vrrp-1","addr":"fe80::200:5eff:fe00:101/64","flags":""}}} | ||
{"Ibus":{"RouteRedistributeAdd":{"protocol":"direct","prefix":"fe80::/64","distance":0,"metric":0,"tag":null,"nexthops":[{"Interface":{"ifindex":2}}]}}} | ||
{"Protocol":{"MasterDownTimer":{"vrid":1}}} | ||
{"Ibus":{"InterfaceIpAddRequest":{"ifname":"mvlan-vrrp-1","addr":"10.0.1.5/32"}}} | ||
{"Ibus":{"InterfaceAddressAdd":{"ifname":"mvlan-vrrp-1","addr":"10.0.1.5/32","flags":"UNNUMBERED"}}} |
3 changes: 3 additions & 0 deletions
3
holo-vrrp/tests/conformance/topologies/topo1-1/rt3/output/ibus.jsonl
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,3 @@ | ||
{"InterfaceQuery":{"ifname":"eth-sw1","af":"Ipv4"}} | ||
{"MacvlanAdd":{"parent_name":"eth-sw1","name":"mvlan-vrrp-1","mac_address":[0,0,94,0,1,1]}} | ||
{"InterfaceIpAddRequest":{"ifname":"mvlan-vrrp-1","addr":"10.0.1.5/32"}} |
20 changes: 20 additions & 0 deletions
20
holo-vrrp/tests/conformance/topologies/topo1-1/rt3/output/northbound-state.json
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,20 @@ | ||
{ | ||
"ietf-interfaces:interfaces": { | ||
"interface": [ | ||
{ | ||
"name": "eth-sw1", | ||
"ietf-ip:ipv4": { | ||
"ietf-vrrp:vrrp": { | ||
"vrrp-instance": [ | ||
{ | ||
"vrid": 1, | ||
"state": "master", | ||
"new-master-reason": "no-response" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
holo-vrrp/tests/conformance/topologies/topo1-1/rt3/output/protocol.jsonl
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,2 @@ | ||
{"NetTxPacket":{"Vrrp":{"packet":{"ip":{"version":4,"ihl":5,"tos":192,"total_length":40,"identification":7,"flags":0,"offset":0,"ttl":255,"protocol":112,"checksum":0,"src_address":"10.0.1.3","dst_address":"224.0.0.18","options":null,"padding":null},"vrrp":{"version":2,"hdr_type":1,"vrid":1,"priority":30,"count_ip":1,"auth_type":0,"adver_int":1,"checksum":46583,"ip_addresses":["10.0.1.5"],"auth_data":0,"auth_data2":0}}}}} | ||
{"NetTxPacket":{"Arp":{"vrid":1,"ifindex":3,"eth_hdr":{"dst_mac":[255,255,255,255,255,255],"src_mac":[0,0,0,0,0,0],"ethertype":2054},"arp_hdr":{"hw_type":1,"proto_type":2048,"hw_length":6,"proto_length":4,"operation":1,"sender_hw_address":[0,0,0,0,0,0],"sender_proto_address":"10.0.1.5","target_hw_address":[255,255,255,255,255,255],"target_proto_address":"10.0.1.5"}}}} |
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
// See: https://nlnet.nl/NGI0 | ||
// | ||
|
||
mod conformance; | ||
mod packet; |