From 92f8a2cd6e9103fa18dcfafffc4fd09e3c0610a2 Mon Sep 17 00:00:00 2001 From: RoRonoa Date: Thu, 23 Feb 2023 17:47:20 +0500 Subject: [PATCH] updated input and expected output for switchport db_migrator --- .../config_db/switchport-expected.json | 104 ++++++++++++++++++ .../config_db/switchport-input.json | 101 +++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 tests/db_migrator_input/config_db/switchport-expected.json create mode 100644 tests/db_migrator_input/config_db/switchport-input.json diff --git a/tests/db_migrator_input/config_db/switchport-expected.json b/tests/db_migrator_input/config_db/switchport-expected.json new file mode 100644 index 0000000000..b1eddc0b74 --- /dev/null +++ b/tests/db_migrator_input/config_db/switchport-expected.json @@ -0,0 +1,104 @@ +{ + "PORT": { + "Ethernet0": { + "admin_status": "up", + "alias": "fortyGigE0/0", + "index": "0", + "lanes": "25,26,27,28", + "mode": "trunk", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet4": { + "admin_status": "up", + "alias": "fortyGigE0/4", + "index": "1", + "lanes": "29,30,31,32", + "mode": "routed", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet8": { + "admin_status": "up", + "alias": "fortyGigE0/8", + "index": "2", + "lanes": "33,34,35,36", + "mode": "trunk", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet12": { + "admin_status": "up", + "alias": "fortyGigE0/12", + "index": "3", + "lanes": "37,38,39,40", + "mode": "access", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet16": { + "admin_status": "up", + "alias": "fortyGigE0/16", + "index": "4", + "lanes": "45,46,47,48", + "mode": "routed", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet20": { + "admin_status": "up", + "alias": "fortyGigE0/20", + "index": "5", + "lanes": "41,42,43,44", + "mode": "trunk", + "mtu": "9100", + "speed": "40000" + } + }, + "VLAN": { + "Vlan2": { + "vlanid": "2" + }, + "Vlan3": { + "vlanid": "3" + }, + "Vlan4": { + "vlanid": "4" + }, + "Vlan5": { + "vlanid": "5" + }, + "Vlan6": { + "vlanid": "6" + }, + "Vlan7": { + "vlanid": "7" + } + }, + "VLAN_MEMBER": { + "Vlan2|Ethernet0": { + "tagging_mode": "tagged" + }, + "Vlan3|Ethernet8": { + "tagging_mode": "tagged" + }, + "Vlan4|Ethernet0": { + "tagging_mode": "tagged" + }, + "Vlan6|Ethernet0": { + "tagging_mode": "tagged" + }, + "Vlan6|Ethernet8": { + "tagging_mode": "untagged" + }, + "Vlan7|Ethernet8": { + "tagging_mode": "tagged" + }, + "Vlan5|Ethernet8": { + "tagging_mode": "untagged" + } + }, + "VERSIONS|DATABASE": { + "VERSION": "version_4_0_1" + } +} \ No newline at end of file diff --git a/tests/db_migrator_input/config_db/switchport-input.json b/tests/db_migrator_input/config_db/switchport-input.json new file mode 100644 index 0000000000..aa4c85c772 --- /dev/null +++ b/tests/db_migrator_input/config_db/switchport-input.json @@ -0,0 +1,101 @@ +{ + "PORT": { + "Ethernet0": { + "admin_status": "up", + "alias": "fortyGigE0/0", + "index": "0", + "lanes": "25,26,27,28", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet4": { + "admin_status": "up", + "alias": "fortyGigE0/4", + "index": "1", + "lanes": "29,30,31,32", + "mode": "routed", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet8": { + "admin_status": "up", + "alias": "fortyGigE0/8", + "index": "2", + "lanes": "33,34,35,36", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet12": { + "admin_status": "up", + "alias": "fortyGigE0/12", + "index": "3", + "lanes": "37,38,39,40", + "mode": "access", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet16": { + "admin_status": "up", + "alias": "fortyGigE0/16", + "index": "4", + "lanes": "45,46,47,48", + "mtu": "9100", + "speed": "40000" + }, + "Ethernet20": { + "admin_status": "up", + "alias": "fortyGigE0/20", + "index": "5", + "lanes": "41,42,43,44", + "mode": "trunk", + "mtu": "9100", + "speed": "40000" + } + }, + "VLAN": { + "Vlan2": { + "vlanid": "2" + }, + "Vlan3": { + "vlanid": "3" + }, + "Vlan4": { + "vlanid": "4" + }, + "Vlan5": { + "vlanid": "5" + }, + "Vlan6": { + "vlanid": "6" + }, + "Vlan7": { + "vlanid": "7" + } + }, + "VLAN_MEMBER": { + "Vlan2|Ethernet0": { + "tagging_mode": "tagged" + }, + "Vlan3|Ethernet8": { + "tagging_mode": "tagged" + }, + "Vlan4|Ethernet0": { + "tagging_mode": "tagged" + }, + "Vlan6|Ethernet0": { + "tagging_mode": "tagged" + }, + "Vlan6|Ethernet8": { + "tagging_mode": "untagged" + }, + "Vlan7|Ethernet8": { + "tagging_mode": "tagged" + }, + "Vlan5|Ethernet8": { + "tagging_mode": "untagged" + } + }, + "VERSIONS|DATABASE": { + "VERSION": "version_4_0_1" + } +} \ No newline at end of file