Advertisement
Guest User

Untitled

a guest
Nov 17th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. root@noc:/opt/noc # hg diff
  2. diff -r 4c3caef9b6a2 inv/collections/objectmodels/Cisco/me3400.json
  3. --- a/inv/collections/objectmodels/Cisco/me3400.json Sun Nov 17 21:10:53 2013 +0400
  4. +++ b/inv/collections/objectmodels/Cisco/me3400.json Mon Nov 18 09:22:59 2013 +0400
  5. @@ -2,7 +2,7 @@
  6. {
  7. "name": "Cisco | PWR | ME34X-PWR-AC",
  8. "vendor__code": "CISCO",
  9. - "description": "AC PSU for Cisco ME3400E Series switches",
  10. + "description": "80 Watt AC PSU for Cisco ME3400E Series switches",
  11. "connections": [
  12. {
  13. "description": "PSU connect to switch",
  14. @@ -21,9 +21,9 @@
  15. },
  16.  
  17. {
  18. - "name": "Cisco | ME3400E | ME34X-PWR-DC",
  19. + "name": "Cisco | PWR | ME34X-PWR-DC",
  20. "vendor__code": "CISCO",
  21. - "description": "DC PSU for Cisco ME3400E Series switches",
  22. + "description": "80 Watt DC PSU for Cisco ME3400E Series switches",
  23. "connections": [
  24. {
  25. "description": "PSU connect to switch",
  26. @@ -315,7 +315,7 @@
  27. },
  28.  
  29. {
  30. - "name": "Cisco | ME3400 | ME-3400-24-TS-D",
  31. + "name": "Cisco | ME3400 | ME-3400-24TS-D",
  32. "vendor__code": "CISCO",
  33. "description": "Cisco ME3400 Series Metro Ethernet access switch with DC power supply, 24 FastEthernet + 2 SFP ports",
  34. "connection_rule__name": "Generic | Switch SFP Prefixed",
  35. @@ -579,13 +579,13 @@
  36. "intake": "f"
  37. },
  38. "asset": {
  39. - "part_no0": "ME-3400-24-TS-D"
  40. + "part_no0": "ME-3400-24TS-D"
  41. }
  42. }
  43. },
  44.  
  45. {
  46. - "name": "Cisco | ME3400E | ME-3400E-24-TS-M",
  47. + "name": "Cisco | ME3400E | ME-3400E-24TS-M",
  48. "vendor__code": "CISCO",
  49. "description": "Cisco ME3400E Series Metro Ethernet access switch with 24 FastEthernet + 2 combo ports",
  50. "connection_rule__name": "Generic | Switch SFP Prefixed",
  51. @@ -918,7 +918,7 @@
  52. "intake": "f"
  53. },
  54. "asset": {
  55. - "part_no0": "ME-3400E-24-TS-M"
  56. + "part_no0": "ME-3400E-24TS-M"
  57. }
  58. }
  59. },
  60. @@ -1555,6 +1555,9 @@
  61. },
  62. "asset": {
  63. "part_no0": "ME-3400EG-12CS-M"
  64. + },
  65. + "management": {
  66. + "managed": true
  67. }
  68. }
  69. },
  70. diff -r 4c3caef9b6a2 sa/profiles/Cisco/IOSXR/get_inventory.py
  71. --- a/sa/profiles/Cisco/IOSXR/get_inventory.py Sun Nov 17 21:10:53 2013 +0400
  72. +++ b/sa/profiles/Cisco/IOSXR/get_inventory.py Mon Nov 18 09:22:59 2013 +0400
  73. @@ -36,7 +36,7 @@
  74.  
  75. def execute(self):
  76. objects = []
  77. - v = self.cli("show inventory")
  78. + v = self.cli("admin show inventory")
  79. for match in self.rx_item.finditer(v):
  80. type, number, part_no = self.get_type(
  81. match.group("name"), match.group("pid"),
  82. @@ -64,7 +64,7 @@
  83. Get type, number and part_no
  84. """
  85. if "RSP" in pid:
  86. - number = name.split()[1].split("/")[0]
  87. + number = name.split()[1].split("/")[1][3]
  88. return "RSP", number, pid
  89. elif "MOD" in pid:
  90. number = name.split()[1]
  91. @@ -72,10 +72,13 @@
  92. elif "MPA" in pid:
  93. number = name.split()[1].split("/")[-1]
  94. return "MPA", number, pid
  95. - elif "XFP" in pid or "GLC" in pid:
  96. - number = name.split()[1].split("/")[-1]
  97. + elif "XFP" in pid or "GLC" in pid or "SFP" in pid:
  98. + number = name.split()[2].split("/")[-1]
  99. return "XCVR", number, pid
  100. - elif "PWR" in pid:
  101. + elif "FAN" in pid:
  102. + number = name.split()[1].split("/")[1][2]
  103. + return "FAN", number, pid
  104. + elif "Power Module" in descr:
  105. number = name.split()[1]
  106. return "PWR", number, pid
  107. elif name.startswith("chassis"):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement