summaryrefslogtreecommitdiff
path: root/tests/unit/fixtures
diff options
context:
space:
mode:
authoromnom62 <75066712+omnom62@users.noreply.github.com>2026-10-07 21:21:04 +1000
committerGitHub <noreply@github.com>2026-10-07 14:21:04 +0300
commit41781e7a16e73fdca1f26c677ed3645ca2a8a3d0 (patch)
tree61cf5e168e55ffd81c8d79d607b4ba3d9d91ad57 /tests/unit/fixtures
parent7cfca28e5857b480920c22ae12557f55ca2a8a19 (diff)
downloadrest.vyos-41781e7a16e73fdca1f26c677ed3645ca2a8a3d0.tar.gz
rest.vyos-41781e7a16e73fdca1f26c677ed3645ca2a8a3d0.zip
T8989: vyos_interfaces dict_op refactor (#33)HEADmain
* T8989: vyos_interfaces dict_op refactor --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Daniil Baturin <daniil@vyos.io>
Diffstat (limited to 'tests/unit/fixtures')
-rw-r--r--tests/unit/fixtures/interfaces_running.json156
1 files changed, 144 insertions, 12 deletions
diff --git a/tests/unit/fixtures/interfaces_running.json b/tests/unit/fixtures/interfaces_running.json
index ee67fa2..91b132c 100644
--- a/tests/unit/fixtures/interfaces_running.json
+++ b/tests/unit/fixtures/interfaces_running.json
@@ -1,15 +1,147 @@
{
- "ethernet": {
- "eth0": {
- "address": "dhcp",
- "description": "Management",
- "duplex": "auto",
- "hw-id": "52:54:00:65:5a:24",
- "mtu": "1500",
- "speed": "auto"
- }
- },
- "loopback": {
- "lo": {}
+ "default": {
+ "ethernet": {
+ "eth0": {
+ "description": "mgmt",
+ "mtu": "1500",
+ "duplex": "auto",
+ "speed": "auto",
+ "vrf": "mgmt",
+ "vif": { "200": { "description": "vif200", "mtu": "1400" } }
+ },
+ "eth1": {
+ "disable": {}
+ }
+ },
+ "bonding": {
+ "bond0": { "description": "lag" }
+ },
+ "loopback": {
+ "lo": {}
+ }
+ },
+
+ "iface_with_address_mtu_description": {
+ "ethernet": {
+ "eth0": {
+ "address": ["192.168.122.6/24"],
+ "description": "mgmt",
+ "mtu": "1500"
+ }
+ }
+ },
+ "iface_address_only": {
+ "ethernet": { "eth0": { "address": ["192.168.122.6/24"] } }
+ },
+ "two_ifaces_one_with_address": {
+ "ethernet": {
+ "eth0": {},
+ "eth1": { "address": ["10.0.0.1/24"], "description": "old" }
+ }
+ },
+ "iface_address_and_description": {
+ "ethernet": { "eth0": { "address": ["10.0.0.1/24"], "description": "old" } }
+ },
+
+ "vif_address_base": {
+ "ethernet": {
+ "eth0": {
+ "description": "mgmt",
+ "vif": {
+ "200": {
+ "address": { "192.0.2.1/24": {} },
+ "description": "management vlan"
+ }
+ }
+ }
+ }
+ },
+ "vif_stale_disable_kept": {
+ "ethernet": {
+ "eth0": {
+ "description": "x",
+ "vif": { "200": { "description": "management vlan", "disable": {} } }
+ }
+ }
+ },
+ "vif_multi_mixed": {
+ "ethernet": {
+ "eth0": {
+ "description": "mgmt",
+ "vif": {
+ "100": { "description": "kept-vlan" },
+ "200": {
+ "address": { "192.0.2.1/24": {} },
+ "description": "removed-vlan"
+ },
+ "300": { "address": { "10.0.0.1/24": {} } }
+ }
+ }
+ }
+ },
+ "vif_mtu_with_address": {
+ "ethernet": {
+ "eth0": {
+ "vif": { "200": { "address": { "192.0.2.1/24": {} }, "mtu": "1400" } }
+ }
+ }
+ },
+ "vif_new_vif_base": {
+ "ethernet": { "eth0": { "description": "mgmt" } }
+ },
+
+ "description_mtu_only": {
+ "ethernet": { "eth0": { "description": "x", "mtu": "1500" } }
+ },
+ "iface_disabled_with_fields": {
+ "ethernet": {
+ "eth0": { "disable": {}, "mtu": "1500", "description": "keep" }
+ }
+ },
+ "vif_disabled_on_device": {
+ "ethernet": { "eth0": { "vif": { "200": { "disable": {} } } } }
+ },
+ "description_mtu_old_1400": {
+ "ethernet": { "eth0": { "description": "old", "mtu": "1400" } }
+ },
+ "description_mtu_duplex": {
+ "ethernet": {
+ "eth0": { "description": "old", "mtu": "1500", "duplex": "auto" }
+ }
+ },
+ "eth0_old_eth1_keepme": {
+ "ethernet": {
+ "eth0": { "description": "old" },
+ "eth1": { "description": "keep-me" }
+ }
+ },
+ "eth0_empty_eth1_described": {
+ "ethernet": { "eth0": {}, "eth1": { "description": "old" } }
+ },
+ "two_described_ifaces": {
+ "ethernet": {
+ "eth0": { "description": "a" },
+ "eth1": { "description": "b" }
+ }
+ },
+ "one_described_iface": {
+ "ethernet": { "eth0": { "description": "a", "mtu": "1500" } }
+ },
+ "eth0_truly_empty": {
+ "ethernet": { "eth0": {} }
+ },
+ "eth1_truly_empty": {
+ "ethernet": { "eth1": {} }
+ },
+
+ "bridge_ethbr0": {
+ "bridge": { "ethbr0": {} }
+ },
+ "ethernet_and_bonding": {
+ "ethernet": { "eth0": {} },
+ "bonding": { "bond0": {} }
+ },
+ "bonding_bond0_only": {
+ "bonding": { "bond0": {} }
}
}