<reponame>balmasea/genieparser<gh_stars>100-1000
expected_output = {
    "main": {
        "Switch1 Clock Module": {
            "WS-X4K-CLOCK-E": {
                "descr": "Clock Module",
                "name": "Switch1 Clock Module",
                "pid": "WS-X4K-CLOCK-E",
                "sn": "FXS193805C1",
                "vid": "",
            }
        },
        "Switch1 FanTray 1": {
            "WS-X4597+E": {
                "descr": "FanTray",
                "name": "Switch1 FanTray 1",
                "pid": "WS-X4597+E",
                "sn": "FXS1941Q0K6",
                "vid": "V04",
            }
        },
        "Switch1 Linecard 1 (virtual slot 1)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 1 (virtual slot 1)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L2JF",
                "vid": "V05",
            }
        },
        "Switch1 Linecard 2 (virtual slot 2)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 2 (virtual slot 2)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L2S1",
                "vid": "V05",
            }
        },
        "Switch1 Linecard 5 (virtual slot 5)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 5 (virtual slot 5)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L14U",
                "vid": "V05",
            }
        },
        "Switch1 Linecard 7 (virtual slot 7)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 7 (virtual slot 7)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L1BT",
                "vid": "V05",
            }
        },
        "Switch1 Mux Buffer 1": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 1",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193800RL",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 2": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 2",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193800RK",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 5": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 5",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193900AF",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 6": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 6",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193900AH",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 7": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 7",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193800RG",
                "vid": "",
            }
        },
        "Switch1 Power Supply 1": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch1 Power Supply 1",
                "pid": "PWR-C45-2800ACV",
                "sn": "SDG1940EA1T",
                "vid": "V07",
            }
        },
        "Switch1 Power Supply 2": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch1 Power Supply 2",
                "pid": "PWR-C45-2800ACV",
                "sn": "SDG1940EA0U",
                "vid": "V07",
            }
        },
        "Switch1 Supervisor 3 (virtual slot 3)": {
            "WS-X45-SUP8-E": {
                "descr": "Sup 8-E 10GE (SFP+), 1000BaseX (SFP) with 8 SFP+ Ports",
                "name": "Switch1 Supervisor 3 (virtual slot 3)",
                "pid": "WS-X45-SUP8-E",
                "sn": "CAT1947L6E4",
                "vid": "V05",
            }
        },
        "Switch1 System": {
            "WS-C4507R+E": {
                "descr": "Cisco Systems, Inc. WS-C4507R+E 7 slot switch",
                "name": "Switch1 System",
                "pid": "WS-C4507R+E",
                "sn": "FXS1941Q20T",
                "vid": "V09",
            }
        },
        "Switch2 FanTray 1": {
            "WS-X4596-E": {
                "descr": "FanTray",
                "name": "Switch2 FanTray 1",
                "pid": "WS-X4596-E",
                "sn": "FOX1352H2X8",
                "vid": "V03",
            }
        },
        "Switch2 Linecard 2 (virtual slot 12)": {
            "WS-X4648-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch2 Linecard 2 (virtual slot 12)",
                "pid": "WS-X4648-RJ45V+E",
                "sn": "JAE140539YZ",
                "vid": "V05",
            }
        },
        "Switch2 Linecard 3 (virtual slot 13)": {
            "WS-X4648-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch2 Linecard 3 (virtual slot 13)",
                "pid": "WS-X4648-RJ45V+E",
                "sn": "JAE14053A0H",
                "vid": "V05",
            }
        },
        "Switch2 Power Supply 1": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch2 Power Supply 1",
                "pid": "PWR-C45-2800ACV",
                "sn": "SNI1937A7JL",
                "vid": "V07",
            }
        },
        "Switch2 Power Supply 2": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch2 Power Supply 2",
                "pid": "PWR-C45-2800ACV",
                "sn": "SNI1937A7EB",
                "vid": "V07",
            }
        },
        "Switch2 Supervisor 1 (virtual slot 11)": {
            "WS-X45-SUP8-E": {
                "descr": "Sup 8-E 10GE (SFP+), 1000BaseX (SFP) with 8 SFP+ Ports",
                "name": "Switch2 Supervisor 1 (virtual slot 11)",
                "pid": "WS-X45-SUP8-E",
                "sn": "CAT1947L2JB",
                "vid": "V05",
            }
        },
        "Switch2 System": {
            "WS-C4506-E": {
                "descr": "Cisco Systems, Inc. WS-C4506-E 6 slot switch",
                "name": "Switch2 System",
                "pid": "WS-C4506-E",
                "sn": "FOX1353G062",
                "vid": "V02",
            }
        },
        "TenGigabitEthernet1/3/1": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet1/3/1",
                "pid": "SFP-10G-LRM",
                "sn": "FNS1946164Q",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet1/3/2": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet1/3/2",
                "pid": "SFP-10G-LRM",
                "sn": "FNS1946169N",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet1/3/3": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/3",
                "pid": "Unspecified",
                "sn": "A58069025",
                "vid": "",
            }
        },
        "TenGigabitEthernet1/3/4": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/4",
                "pid": "Unspecified",
                "sn": "A58072076",
                "vid": "",
            }
        },
        "TenGigabitEthernet1/3/5": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/5",
                "pid": "Unspecified",
                "sn": "Z2005291",
                "vid": "",
            }
        },
        "TenGigabitEthernet1/3/6": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/6",
                "pid": "Unspecified",
                "sn": "AGM1549L6SN",
                "vid": "",
            }
        },
        "TenGigabitEthernet2/1/1": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet2/1/1",
                "pid": "SFP-10G-LRM",
                "sn": "AGD1944V1X0",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet2/1/2": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet2/1/2",
                "pid": "SFP-10G-LRM",
                "sn": "FNS19461646",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet2/1/3": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet2/1/3",
                "pid": "Unspecified",
                "sn": "A58069142",
                "vid": "",
            }
        },
        "TenGigabitEthernet2/1/4": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet2/1/4",
                "pid": "Unspecified",
                "sn": "Z2005495",
                "vid": "",
            }
        },
    }
}

expected_output = {
    "main": {
        "Switch1 Clock Module": {
            "WS-X4K-CLOCK-E": {
                "descr": "Clock Module",
                "name": "Switch1 Clock Module",
                "pid": "WS-X4K-CLOCK-E",
                "sn": "FXS193805C1",
                "vid": "",
            }
        },
        "Switch1 FanTray 1": {
            "WS-X4597+E": {
                "descr": "FanTray",
                "name": "Switch1 FanTray 1",
                "pid": "WS-X4597+E",
                "sn": "FXS1941Q0K6",
                "vid": "V04",
            }
        },
        "Switch1 Linecard 1 (virtual slot 1)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 1 (virtual slot 1)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L2JF",
                "vid": "V05",
            }
        },
        "Switch1 Linecard 2 (virtual slot 2)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 2 (virtual slot 2)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L2S1",
                "vid": "V05",
            }
        },
        "Switch1 Linecard 5 (virtual slot 5)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 5 (virtual slot 5)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L14U",
                "vid": "V05",
            }
        },
        "Switch1 Linecard 7 (virtual slot 7)": {
            "WS-X4748-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch1 Linecard 7 (virtual slot 7)",
                "pid": "WS-X4748-RJ45V+E",
                "sn": "CAT1948L1BT",
                "vid": "V05",
            }
        },
        "Switch1 Mux Buffer 1": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 1",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193800RL",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 2": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 2",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193800RK",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 5": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 5",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193900AF",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 6": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 6",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193900AH",
                "vid": "",
            }
        },
        "Switch1 Mux Buffer 7": {
            "WS-X4590-EX=": {
                "descr": "Mux Buffers for Redundancy Logic",
                "name": "Switch1 Mux Buffer 7",
                "pid": "WS-X4590-EX=",
                "sn": "FXS193800RG",
                "vid": "",
            }
        },
        "Switch1 Power Supply 1": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch1 Power Supply 1",
                "pid": "PWR-C45-2800ACV",
                "sn": "SDG1940EA1T",
                "vid": "V07",
            }
        },
        "Switch1 Power Supply 2": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch1 Power Supply 2",
                "pid": "PWR-C45-2800ACV",
                "sn": "SDG1940EA0U",
                "vid": "V07",
            }
        },
        "Switch1 Supervisor 3 (virtual slot 3)": {
            "WS-X45-SUP8-E": {
                "descr": "Sup 8-E 10GE (SFP+), 1000BaseX (SFP) with 8 SFP+ Ports",
                "name": "Switch1 Supervisor 3 (virtual slot 3)",
                "pid": "WS-X45-SUP8-E",
                "sn": "CAT1947L6E4",
                "vid": "V05",
            }
        },
        "Switch1 System": {
            "WS-C4507R+E": {
                "descr": "Cisco Systems, Inc. WS-C4507R+E 7 slot switch",
                "name": "Switch1 System",
                "pid": "WS-C4507R+E",
                "sn": "FXS1941Q20T",
                "vid": "V09",
            }
        },
        "Switch2 FanTray 1": {
            "WS-X4596-E": {
                "descr": "FanTray",
                "name": "Switch2 FanTray 1",
                "pid": "WS-X4596-E",
                "sn": "FOX1352H2X8",
                "vid": "V03",
            }
        },
        "Switch2 Linecard 2 (virtual slot 12)": {
            "WS-X4648-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch2 Linecard 2 (virtual slot 12)",
                "pid": "WS-X4648-RJ45V+E",
                "sn": "JAE140539YZ",
                "vid": "V05",
            }
        },
        "Switch2 Linecard 3 (virtual slot 13)": {
            "WS-X4648-RJ45V+E": {
                "descr": "10/100/1000BaseT (RJ45)+V E Series with 48 10/100/1000 baseT Premium PoE ports (Cisco/IEEE)",
                "name": "Switch2 Linecard 3 (virtual slot 13)",
                "pid": "WS-X4648-RJ45V+E",
                "sn": "JAE14053A0H",
                "vid": "V05",
            }
        },
        "Switch2 Power Supply 1": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch2 Power Supply 1",
                "pid": "PWR-C45-2800ACV",
                "sn": "SNI1937A7JL",
                "vid": "V07",
            }
        },
        "Switch2 Power Supply 2": {
            "PWR-C45-2800ACV": {
                "descr": "Power Supply ( AC 2800W )",
                "name": "Switch2 Power Supply 2",
                "pid": "PWR-C45-2800ACV",
                "sn": "SNI1937A7EB",
                "vid": "V07",
            }
        },
        "Switch2 Supervisor 1 (virtual slot 11)": {
            "WS-X45-SUP8-E": {
                "descr": "Sup 8-E 10GE (SFP+), 1000BaseX (SFP) with 8 SFP+ Ports",
                "name": "Switch2 Supervisor 1 (virtual slot 11)",
                "pid": "WS-X45-SUP8-E",
                "sn": "CAT1947L2JB",
                "vid": "V05",
            }
        },
        "Switch2 System": {
            "WS-C4506-E": {
                "descr": "Cisco Systems, Inc. WS-C4506-E 6 slot switch",
                "name": "Switch2 System",
                "pid": "WS-C4506-E",
                "sn": "FOX1353G062",
                "vid": "V02",
            }
        },
        "TenGigabitEthernet1/3/1": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet1/3/1",
                "pid": "SFP-10G-LRM",
                "sn": "FNS1946164Q",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet1/3/2": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet1/3/2",
                "pid": "SFP-10G-LRM",
                "sn": "FNS1946169N",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet1/3/3": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/3",
                "pid": "Unspecified",
                "sn": "A58069025",
                "vid": "",
            }
        },
        "TenGigabitEthernet1/3/4": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/4",
                "pid": "Unspecified",
                "sn": "A58072076",
                "vid": "",
            }
        },
        "TenGigabitEthernet1/3/5": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/5",
                "pid": "Unspecified",
                "sn": "Z2005291",
                "vid": "",
            }
        },
        "TenGigabitEthernet1/3/6": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet1/3/6",
                "pid": "Unspecified",
                "sn": "AGM1549L6SN",
                "vid": "",
            }
        },
        "TenGigabitEthernet2/1/1": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet2/1/1",
                "pid": "SFP-10G-LRM",
                "sn": "AGD1944V1X0",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet2/1/2": {
            "SFP-10G-LRM": {
                "descr": "SFP-10Gbase-LRM",
                "name": "TenGigabitEthernet2/1/2",
                "pid": "SFP-10G-LRM",
                "sn": "FNS19461646",
                "vid": "V03",
            }
        },
        "TenGigabitEthernet2/1/3": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet2/1/3",
                "pid": "Unspecified",
                "sn": "A58069142",
                "vid": "",
            }
        },
        "TenGigabitEthernet2/1/4": {
            "Unspecified": {
                "descr": "1000BaseSX",
                "name": "TenGigabitEthernet2/1/4",
                "pid": "Unspecified",
                "sn": "Z2005495",
                "vid": "",
            }
        },
    }
}