Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@noc:/opt/noc # hg diff
- diff -r 4c3caef9b6a2 inv/collections/objectmodels/Cisco/me3400.json
- --- a/inv/collections/objectmodels/Cisco/me3400.json Sun Nov 17 21:10:53 2013 +0400
- +++ b/inv/collections/objectmodels/Cisco/me3400.json Mon Nov 18 09:22:59 2013 +0400
- @@ -2,7 +2,7 @@
- {
- "name": "Cisco | PWR | ME34X-PWR-AC",
- "vendor__code": "CISCO",
- - "description": "AC PSU for Cisco ME3400E Series switches",
- + "description": "80 Watt AC PSU for Cisco ME3400E Series switches",
- "connections": [
- {
- "description": "PSU connect to switch",
- @@ -21,9 +21,9 @@
- },
- {
- - "name": "Cisco | ME3400E | ME34X-PWR-DC",
- + "name": "Cisco | PWR | ME34X-PWR-DC",
- "vendor__code": "CISCO",
- - "description": "DC PSU for Cisco ME3400E Series switches",
- + "description": "80 Watt DC PSU for Cisco ME3400E Series switches",
- "connections": [
- {
- "description": "PSU connect to switch",
- @@ -315,7 +315,7 @@
- },
- {
- - "name": "Cisco | ME3400 | ME-3400-24-TS-D",
- + "name": "Cisco | ME3400 | ME-3400-24TS-D",
- "vendor__code": "CISCO",
- "description": "Cisco ME3400 Series Metro Ethernet access switch with DC power supply, 24 FastEthernet + 2 SFP ports",
- "connection_rule__name": "Generic | Switch SFP Prefixed",
- @@ -579,13 +579,13 @@
- "intake": "f"
- },
- "asset": {
- - "part_no0": "ME-3400-24-TS-D"
- + "part_no0": "ME-3400-24TS-D"
- }
- }
- },
- {
- - "name": "Cisco | ME3400E | ME-3400E-24-TS-M",
- + "name": "Cisco | ME3400E | ME-3400E-24TS-M",
- "vendor__code": "CISCO",
- "description": "Cisco ME3400E Series Metro Ethernet access switch with 24 FastEthernet + 2 combo ports",
- "connection_rule__name": "Generic | Switch SFP Prefixed",
- @@ -918,7 +918,7 @@
- "intake": "f"
- },
- "asset": {
- - "part_no0": "ME-3400E-24-TS-M"
- + "part_no0": "ME-3400E-24TS-M"
- }
- }
- },
- @@ -1555,6 +1555,9 @@
- },
- "asset": {
- "part_no0": "ME-3400EG-12CS-M"
- + },
- + "management": {
- + "managed": true
- }
- }
- },
- diff -r 4c3caef9b6a2 sa/profiles/Cisco/IOSXR/get_inventory.py
- --- a/sa/profiles/Cisco/IOSXR/get_inventory.py Sun Nov 17 21:10:53 2013 +0400
- +++ b/sa/profiles/Cisco/IOSXR/get_inventory.py Mon Nov 18 09:22:59 2013 +0400
- @@ -36,7 +36,7 @@
- def execute(self):
- objects = []
- - v = self.cli("show inventory")
- + v = self.cli("admin show inventory")
- for match in self.rx_item.finditer(v):
- type, number, part_no = self.get_type(
- match.group("name"), match.group("pid"),
- @@ -64,7 +64,7 @@
- Get type, number and part_no
- """
- if "RSP" in pid:
- - number = name.split()[1].split("/")[0]
- + number = name.split()[1].split("/")[1][3]
- return "RSP", number, pid
- elif "MOD" in pid:
- number = name.split()[1]
- @@ -72,10 +72,13 @@
- elif "MPA" in pid:
- number = name.split()[1].split("/")[-1]
- return "MPA", number, pid
- - elif "XFP" in pid or "GLC" in pid:
- - number = name.split()[1].split("/")[-1]
- + elif "XFP" in pid or "GLC" in pid or "SFP" in pid:
- + number = name.split()[2].split("/")[-1]
- return "XCVR", number, pid
- - elif "PWR" in pid:
- + elif "FAN" in pid:
- + number = name.split()[1].split("/")[1][2]
- + return "FAN", number, pid
- + elif "Power Module" in descr:
- number = name.split()[1]
- return "PWR", number, pid
- elif name.startswith("chassis"):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement