Advertisement
Guest User

Untitled

a guest
Nov 20th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. diff -r df433cf7169a sa/profiles/Cisco/IOS/get_inventory.py
  2. --- a/sa/profiles/Cisco/IOS/get_inventory.py Tue Nov 19 12:39:43 2013 +0400
  3. +++ b/sa/profiles/Cisco/IOS/get_inventory.py Wed Nov 20 11:23:56 2013 +0400
  4. @@ -92,12 +92,18 @@
  5. except ValueError:
  6. number = None
  7. return "CHASSIS", number, pid
  8. - elif name.startswith("module "):
  9. + elif name.startswith("module ") or pid.startswith("WS-X"):
  10. # Linecards or supervisors
  11. - if pid.startswith("RSP"):
  12. + if pid.startswith("RSP") or "-SUP" in pid:
  13. return "SUP", name[7:], pid
  14. else:
  15. return "LINECARD", name[7:], pid
  16. + elif "-MSFC" in pid:
  17. + # MSFC subcard
  18. + return "MSFC", None, pid
  19. + elif "-PFC" in pid:
  20. + # PFC subcard
  21. + return "PFC", None, pid
  22. elif "-DFC" in pid:
  23. # DFC subcard
  24. return "DFC", None, pid
  25. @@ -116,4 +122,4 @@
  26. match = self.rx_trans.search(descr)
  27. if match:
  28. return self.TRANS_MAP.get(match.group(1).upper())
  29. - return None
  30. \ No newline at end of file
  31. + return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement