Advertisement
Krakozaber

Untitled

Dec 25th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. File: local/sa/profiles/DLink/DxS/__init__.py (Line: 189)
  2. Function: get_ports
  3. 182 "mdix": match.group("mdix"),
  4. 183 "trap_state": match.group("trap_state"),
  5. 184 "desc": match.group("desc").strip()
  6. 185 }]
  7. 186 elif script.match_version(DxS_L2, platform="DES-1210-10"):
  8. 187 c = script.cli("show ports")
  9. 188 for match in self.rx_port_2.finditer(c):
  10. 189 ==> objects += [{
  11. 190 "port": match.group("port"),
  12. 191 "media_type": match.group("media_type"),
  13. 192 "admin_state": match.group("admin_state") == "Enabled",
  14. 193 "admin_speed": match.group("admin_speed"),
  15. 194 "admin_duplex": match.group("admin_duplex"),
  16. 195 "admin_flowctrl": match.group("admin_flowctrl"),
  17. Variables:
  18. interface = None
  19. c =
  20. 'Command: show ports\n\n\nPort Port Settings Connection MDI/MDIX\n State Speed/Duplex/FlowCtrl Speed/Duplex/FlowCtrl \n---- ----- --------------------- --------------------- --------\n1 Enabled Auto/Disabled 100M/Full/Disabled Auto \n2 Enabled Auto/Disabled 100M/Full/Disabled Auto \n3 Enabled Auto/Disabled 100M/Full/Disabled Auto \n4 Enabled Auto/Disabled 100M/Full/Disabled Auto \n5 Enabled Auto/Disabled 100M/Full/Disabled Auto \n6 Enabled Auto/Disabled 100M/Full/Disabled Auto \n7 Enabled Auto/Disabled Link Down Auto \n8 Enabled Auto/Disabled Link Down Auto \n9 Enabled Auto/Disabled 1000M/Full/Disabled Auto \n10 Enabled Auto/Disabled Link Down Auto \n\n'
  21. self = <noc.local.sa.profiles.DLink.DxS.Profile object at 0x7fb9b3dcbf50>
  22. match = <_sre.SRE_Match object at 0x7fb9b67c0bf0>
  23. script = <Script(Thread-4, started 140435554674432)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement