Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ./noc script --debug get_chassis_id 10.170.112.9 2017-12-18 18:02:02,949 [noc.core.dcs.base] Resolve near service postgres
- 2017-12-18 18:02:02,949 [noc.core.http.client] HTTP GET http://consul:8500/v1/catalog/service/postgres?near=_agent
- 2017-12-18 18:02:02,952 [noc.core.http.client] HTTP Response 200
- 2017-12-18 18:02:02,953 [noc.core.dcs.base] Resolved near service postgres to ['10.10.10.41:5432']
- 2017-12-18 18:02:02,992 [root] Loading PeriodicRegistry
- 2017-12-18 18:02:03,791 [noc.core.dcs.base] Running resolver for service mongo
- 2017-12-18 18:02:03,791 [noc.core.dcs.base] [mongo] Starting resolver
- 2017-12-18 18:02:03,791 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2017-12-18 18:02:03,793 [noc.core.http.client] HTTP Response 200
- 2017-12-18 18:02:03,794 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.10.10.41:27017
- 2017-12-18 18:02:03,794 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=704573&passing=1
- 2017-12-18 18:02:03,795 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'readPreference': 'secondaryPreferred', 'replicaSet': 'noc', 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:********@10.10.10.41:27017/noc', 'password': '********'}
- 2017-12-18 18:02:03,806 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2017-12-18 18:02:03,843 [noc.main.models.doccategory] Registering Capability
- 2017-12-18 18:02:03,844 [noc.main.models.doccategory] Registering MetricType
- 2017-12-18 18:02:03,888 [noc.main.models.doccategory] Registering ConnectionType
- 2017-12-18 18:02:03,892 [noc.main.models.doccategory] Registering ObjectModel
- 2017-12-18 18:02:03,904 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2017-12-18 18:02:03,925 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2017-12-18 18:02:03,929 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2017-12-18 18:02:03,932 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2017-12-18 18:02:03,933 [noc.main.models.textindex] Adding FTS index for ip.address
- 2017-12-18 18:02:03,982 [noc.core.script.loader] Loading script DLink.DxS.get_chassis_id
- 2017-12-18 18:02:04,005 [noc.core.profile.loader] Loading profile DLink.DxS
- 2017-12-18 18:02:04,005 [script] [DLink.DxS.get_chassis_id|10.170.112.9] Filling get_version cache with {'platform': u'DXS-3326GSR', 'version': u'4.50-B19', 'vendor': u'D-Link'}
- 2017-12-18 18:02:04,006 [script] [DLink.DxS.get_chassis_id|10.170.112.9] Running. Input arguments: {}, timeout 3600
- 2017-12-18 18:02:04,006 [noc.core.script.loader] Loading script DLink.DxS.get_switch
- 2017-12-18 18:02:04,006 [script] [DLink.DxS.get_switch|10.170.112.9] Running. Input arguments: {}, timeout 3600
- 2017-12-18 18:02:04,006 [script] [DLink.DxS.get_chassis_id|10.170.112.9] Open telnet CLI
- 2017-12-18 18:02:04,008 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Setup session
- 2017-12-18 18:02:04,008 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Creating IOLoop
- 2017-12-18 18:02:04,008 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Connecting (u'10.170.112.9', 23)
- 2017-12-18 18:02:04,012 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Connected
- 2017-12-18 18:02:04,012 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <START>
- 2017-12-18 18:02:04,012 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Setting timeout: 60s
- 2017-12-18 18:02:04,078 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received DO SGA
- 2017-12-18 18:02:04,078 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send WILL SGA
- 2017-12-18 18:02:04,087 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received WILL SGA
- 2017-12-18 18:02:04,087 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send DO SGA
- 2017-12-18 18:02:04,087 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received WILL ECHO
- 2017-12-18 18:02:04,087 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send DO ECHO
- 2017-12-18 18:02:04,131 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '\x1b[0m\x1b[1;1H\x1b[2J\x1b[1;1H\x1b[2J\n\r DXS-3326GSR Stackable Ethernet Switch\n\r Command Line Interface\n\r\n\r Firmware: Build 4.50-B19\n\r Copyright(C) 2004-2007 D-Link All rights reserved.\n\r \rUserName:'
- 2017-12-18 18:02:04,131 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
- 2017-12-18 18:02:04,131 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <USERNAME>
- 2017-12-18 18:02:04,131 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: 'script2\n'
- 2017-12-18 18:02:04,132 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Setting timeout: 30s
- 2017-12-18 18:02:04,302 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 's'
- 2017-12-18 18:02:04,343 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 'cript2\n\r \rPassWord:'
- 2017-12-18 18:02:04,343 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2017-12-18 18:02:04,343 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PASSWORD>
- 2017-12-18 18:02:04,343 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: 'wre4fel\r\n'
- 2017-12-18 18:02:04,343 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Setting timeout: 30s
- 2017-12-18 18:02:04,364 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '*'
- 2017-12-18 18:02:04,407 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '******\n\r\n\rDXS-3326GSR:5#'
- 2017-12-18 18:02:04,407 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: (?P<hostname>\S+)(?<!:(3|6))(?<!:operator)(?<!:user)#
- 2017-12-18 18:02:04,407 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PROMT>
- 2017-12-18 18:02:04,407 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Refining pattern prompt to 'DXS\\-3326GSR\\:5(?<!:(3|6))(?<!:operator)(?<!:user)#'
- 2017-12-18 18:02:04,408 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Resetting timeouts
- 2017-12-18 18:02:04,408 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: '\n'
- 2017-12-18 18:02:04,417 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '\n\rDXS-3326GSR:5#'
- 2017-12-18 18:02:04,417 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: DXS\-3326GSR\:5(?<!:(3|6))(?<!:operator)(?<!:user)#
- 2017-12-18 18:02:04,417 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PROMT>
- 2017-12-18 18:02:04,417 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Command:
- 2017-12-18 18:02:04,417 [script] [DLink.DxS.get_switch|10.170.112.9] Running. Input arguments: {}, timeout 3600
- 2017-12-18 18:02:04,417 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: 'show switch\n'
- 2017-12-18 18:02:04,544 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 's'
- 2017-12-18 18:02:04,587 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 'how switch'
- 2017-12-18 18:02:04,693 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '\n\rCommand: show switch\n\r\n\rDevice Type : DXS-3326GSR Stackable Ethernet Switch\n\rUnit ID : 1\n\rMAC Address : 00-15-E9-3B-66-00\n\rIP Address : 10.170.112.9 (Manual)\n\rVLAN Name : manag-egor\n\rSubnet Mask : 255.255.255.0\n\rDefault Gateway : 10.170.112.254\n\rBoot PROM Version : Build 2.01-B01\n\rFirmware Version : Build 4.50-B19\n\rHardware Version : 5A1.2A1\n\rDevice S/N : \n\rSystem Name : \n\rSystem Location : \n\rSystem Contact : \n\rSpanning Tree '
- 2017-12-18 18:02:04,694 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: ': Disabled\n\rGVRP : Disabled\n\rIGMP Snooping : Disabled\n\rRIP : Disabled\n\rDVMRP : Disabled\n\rPIM : Disabled\n\rOSPF : Disabled\n\rTELNET : Enabled (TCP 23)\n\rRMON : Disabled\n\rSSH status : Disabled\n\r802.1x : Disabled\n\rJumbo Frame : On\n\rClipaging : Disabled\n\rMAC Notification : Disabled\n\rPort Mirror : Disabled\n\rSNTP : Disabled\n\rBootp Relay : Disabled\r\r\n\rDNSR'
- 2017-12-18 18:02:04,694 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: ' Status : Disabled \n\rVRRP : Disabled\n\rHOL Prevention State : Enabled\n\rSyslog Global State : Disabled\n\rSingle IP Management : Disabled\n\rDual Image : Supported\n\rCPU Interface Filter : Disabled\n\r\n\rDXS-3326GSR:5#'
- 2017-12-18 18:02:04,694 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: DXS\-3326GSR\:5(?<!:(3|6))(?<!:operator)(?<!:user)#
- 2017-12-18 18:02:04,694 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PROMT>
- 2017-12-18 18:02:04,694 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Command: show switch
- show switch
- Command: show switch
- Device Type : DXS-3326GSR Stackable Ethernet Switch
- Unit ID : 1
- MAC Address : 00-15-E9-3B-66-00
- IP Address : 10.170.112.9 (Manual)
- VLAN Name : manag-egor
- Subnet Mask : 255.255.255.0
- Default Gateway : 10.170.112.254
- Boot PROM Version : Build 2.01-B01
- Firmware Version : Build 4.50-B19
- Hardware Version : 5A1.2A1
- Device S/N :
- System Name :
- System Location :
- System Contact :
- Spanning Tree : Disabled
- GVRP : Disabled
- IGMP Snooping : Disabled
- RIP : Disabled
- DVMRP : Disabled
- PIM : Disabled
- OSPF : Disabled
- TELNET : Enabled (TCP 23)
- RMON : Disabled
- SSH status : Disabled
- 802.1x : Disabled
- Jumbo Frame : On
- Clipaging : Disabled
- MAC Notification : Disabled
- Port Mirror : Disabled
- SNTP : Disabled
- Bootp Relay : Disabled
- DNSR Status : Disabled
- VRRP : Disabled
- HOL Prevention State : Enabled
- Syslog Global State : Disabled
- Single IP Management : Disabled
- Dual Image : Supported
- CPU Interface Filter : Disabled
- 2017-12-18 18:02:04,695 [script] [DLink.DxS.get_switch|10.170.112.9] Caching result
- 2017-12-18 18:02:04,695 [script] [DLink.DxS.get_switch|10.170.112.9] Result: Command: show switch
- Device Type : DXS-3326GSR Stackable Ethernet Switch
- Unit ID : 1
- MAC Address : 00-15-E9-3B-66-00
- IP Address : 10.170.112.9 (Manual)
- VLAN Name : manag-egor
- Subnet Mask : 255.255.255.0
- Default Gateway : 10.170.112.254
- Boot PROM Version : Build 2.01-B01
- Firmware Version : Build 4.50-B19
- Hardware Version : 5A1.2A1
- Device S/N :
- System Name :
- System Location :
- System Contact :
- Spanning Tree : Disabled
- GVRP : Disabled
- IGMP Snooping : Disabled
- RIP : Disabled
- DVMRP : Disabled
- PIM : Disabled
- OSPF : Disabled
- TELNET : Enabled (TCP 23)
- RMON : Disabled
- SSH status : Disabled
- 802.1x : Disabled
- Jumbo Frame : On
- Clipaging : Disabled
- MAC Notification : Disabled
- Port Mirror : Disabled
- SNTP : Disabled
- Bootp Relay : Disabled
- DNSR Status : Disabled
- VRRP : Disabled
- HOL Prevention State : Enabled
- Syslog Global State : Disabled
- Single IP Management : Disabled
- Dual Image : Supported
- CPU Interface Filter : Disabled
- 2017-12-18 18:02:04,695 [script] [DLink.DxS.get_switch|10.170.112.9] Complete (277.89ms)
- 2017-12-18 18:02:04,695 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: 'show switch\n'
- 2017-12-18 18:02:04,824 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 's'
- 2017-12-18 18:02:04,867 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 'how switch'
- 2017-12-18 18:02:04,984 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '\n\rCommand: show switch\n\r\n\rDevice Type : DXS-3326GSR Stackable Ethernet Switch\n\rUnit ID : 1\n\rMAC Address : 00-15-E9-3B-66-00\n\rIP Address : 10.170.112.9 (Manual)\n\rVLAN Name : manag-egor\n\rSubnet Mask : 255.255.255.0\n\rDefault Gateway : 10.170.112.254\n\rBoot PROM Version : Build 2.01-B01\n\rFirmware Version : Build 4.50-B19\n\rHardware Version : 5A1.2A1\n\rDevice S/N : \n\rSystem Name : \n\rSystem Location : \n\rSystem Contact : \n\rSpanning Tree '
- 2017-12-18 18:02:04,984 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: ': Disabled\n\rGVRP : Disabled\n\rIGMP Snooping : Disabled\n\rRIP : Disabled\n\rDVMRP : Disabled\n\rPIM : Disabled\n\rOSPF : Disabled\n\rTELNET : Enabled (TCP 23)\n\rRMON : Disabled\n\rSSH status : Disabled\n\r802.1x : Disabled\n\rJumbo Frame : On\n\rClipaging : Disabled\n\rMAC Notification : Disabled\n\rPort Mirror : Disabled\n\rSNTP : Disabled\n\rBootp Relay : Disabled\r\r\n\rDNSR'
- 2017-12-18 18:02:04,984 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: ' Status : Disabled \n\rVRRP : Disabled\n\rHOL Prevention State : Enabled\n\rSyslog Global State : Disabled\n\rSingle IP Management : Disabled\n\rDual Image : Supported\n\rCPU Interface Filter : Disabled\n\r\n\rDXS-3326GSR:5#'
- 2017-12-18 18:02:04,984 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: DXS\-3326GSR\:5(?<!:(3|6))(?<!:operator)(?<!:user)#
- 2017-12-18 18:02:04,984 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PROMT>
- 2017-12-18 18:02:04,985 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Command: show switch
- show switch
- Command: show switch
- Device Type : DXS-3326GSR Stackable Ethernet Switch
- Unit ID : 1
- MAC Address : 00-15-E9-3B-66-00
- IP Address : 10.170.112.9 (Manual)
- VLAN Name : manag-egor
- Subnet Mask : 255.255.255.0
- Default Gateway : 10.170.112.254
- Boot PROM Version : Build 2.01-B01
- Firmware Version : Build 4.50-B19
- Hardware Version : 5A1.2A1
- Device S/N :
- System Name :
- System Location :
- System Contact :
- Spanning Tree : Disabled
- GVRP : Disabled
- IGMP Snooping : Disabled
- RIP : Disabled
- DVMRP : Disabled
- PIM : Disabled
- OSPF : Disabled
- TELNET : Enabled (TCP 23)
- RMON : Disabled
- SSH status : Disabled
- 802.1x : Disabled
- Jumbo Frame : On
- Clipaging : Disabled
- MAC Notification : Disabled
- Port Mirror : Disabled
- SNTP : Disabled
- Bootp Relay : Disabled
- DNSR Status : Disabled
- VRRP : Disabled
- HOL Prevention State : Enabled
- Syslog Global State : Disabled
- Single IP Management : Disabled
- Dual Image : Supported
- CPU Interface Filter : Disabled
- 2017-12-18 18:02:04,985 [script] [DLink.DxS.get_switch|10.170.112.9] Caching result
- 2017-12-18 18:02:04,985 [script] [DLink.DxS.get_switch|10.170.112.9] Result: Command: show switch
- Device Type : DXS-3326GSR Stackable Ethernet Switch
- Unit ID : 1
- MAC Address : 00-15-E9-3B-66-00
- IP Address : 10.170.112.9 (Manual)
- VLAN Name : manag-egor
- Subnet Mask : 255.255.255.0
- Default Gateway : 10.170.112.254
- Boot PROM Version : Build 2.01-B01
- Firmware Version : Build 4.50-B19
- Hardware Version : 5A1.2A1
- Device S/N :
- System Name :
- System Location :
- System Contact :
- Spanning Tree : Disabled
- GVRP : Disabled
- IGMP Snooping : Disabled
- RIP : Disabled
- DVMRP : Disabled
- PIM : Disabled
- OSPF : Disabled
- TELNET : Enabled (TCP 23)
- RMON : Disabled
- SSH status : Disabled
- 802.1x : Disabled
- Jumbo Frame : On
- Clipaging : Disabled
- MAC Notification : Disabled
- Port Mirror : Disabled
- SNTP : Disabled
- Bootp Relay : Disabled
- DNSR Status : Disabled
- VRRP : Disabled
- HOL Prevention State : Enabled
- Syslog Global State : Disabled
- Single IP Management : Disabled
- Dual Image : Supported
- CPU Interface Filter : Disabled
- 2017-12-18 18:02:04,985 [script] [DLink.DxS.get_switch|10.170.112.9] Complete (979.15ms)
- 2017-12-18 18:02:04,985 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: 'show fdb static\n'
- 2017-12-18 18:02:05,051 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 's'
- 2017-12-18 18:02:05,092 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 'how fdb static\n\rCommand: show fdb static\n\r\n\r VID VLAN Name MAC Address Port Type \n\r ---- -------------------------------- ----------------- ----- -----------------\n\r 112 manag-egor 00-15-E9-3B-66-00 CPU Self\n\r 970 v970 00-15-E9-3B-66-01 CPU Self'
- 2017-12-18 18:02:05,294 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '\n\r\n\rTotal Entries: 2\n\r\n\r\n\rDXS-3326GSR:5#'
- 2017-12-18 18:02:05,294 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: DXS\-3326GSR\:5(?<!:(3|6))(?<!:operator)(?<!:user)#
- 2017-12-18 18:02:05,294 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PROMT>
- 2017-12-18 18:02:05,294 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Command: show fdb static
- show fdb static
- Command: show fdb static
- VID VLAN Name MAC Address Port Type
- ---- -------------------------------- ----------------- ----- -----------------
- 112 manag-egor 00-15-E9-3B-66-00 CPU Self
- 970 v970 00-15-E9-3B-66-01 CPU Self
- Total Entries: 2
- 2017-12-18 18:02:05,294 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Send: 'show stack_information\n'
- 2017-12-18 18:02:05,358 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 's'
- 2017-12-18 18:02:05,524 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: 'how stack_information\n\rCommand: show stack_information\n\r\n\r Box User Prio- Prom Runtime H/W \n\r ID Set Type Exist rity version version version\n\r --- ---- ---------------- ----- ----- -------- ---------------- --------\n\r 1 1 DXS-3326GSR exist 16 2.01-B01 4.50-B19 5A1.2A1 \n\r 2 - USR-NOT-CFG no \n\r 3 - USR-NOT-CFG no \n\r 4 - USR-NOT-CFG no \n\r 5 - USR-NOT-CFG no \n\r 6 '
- 2017-12-18 18:02:05,527 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Received: '- USR-NOT-CFG no \n\r 7 - USR-NOT-CFG no \n\r 8 - USR-NOT-CFG no \n\r 9 - USR-NOT-CFG no \n\r 10 - USR-NOT-CFG no \n\r 11 - USR-NOT-CFG no \n\r 12 - USR-NOT-CFG no \n\r -----------------------------------------------------------------\n\rTopology :DUPLEX_CHAIN\n\rMy Box ID :1\n\rCurrent state:MASTER\n\rBox Count :1\n\r\n\r\n\rDXS-3326GSR:5#'
- 2017-12-18 18:02:05,527 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Match: DXS\-3326GSR\:5(?<!:(3|6))(?<!:operator)(?<!:user)#
- 2017-12-18 18:02:05,527 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] State: <PROMT>
- 2017-12-18 18:02:05,528 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Command: show stack_information
- show stack_information
- Command: show stack_information
- Box User Prio- Prom Runtime H/W
- ID Set Type Exist rity version version version
- --- ---- ---------------- ----- ----- -------- ---------------- --------
- 1 1 DXS-3326GSR exist 16 2.01-B01 4.50-B19 5A1.2A1
- 2 - USR-NOT-CFG no
- 3 - USR-NOT-CFG no
- 4 - USR-NOT-CFG no
- 5 - USR-NOT-CFG no
- 6 - USR-NOT-CFG no
- 7 - USR-NOT-CFG no
- 8 - USR-NOT-CFG no
- 9 - USR-NOT-CFG no
- 10 - USR-NOT-CFG no
- 11 - USR-NOT-CFG no
- 12 - USR-NOT-CFG no
- -----------------------------------------------------------------
- Topology :DUPLEX_CHAIN
- My Box ID :1
- Current state:MASTER
- Box Count :1
- 2017-12-18 18:02:05,529 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Shutdown session
- 2017-12-18 18:02:05,529 [script] [DLink.DxS.get_chassis_id|10.170.112.9] [telnet] Closing IOLoop
- 2017-12-18 18:02:05,677 [noc.core.debug] UNHANDLED EXCEPTION (2017-12-18 18:02:05.539845)
- PROCESS: ./commands/script.py
- VERSION: 15.05.1+microservices.8145.10e1beb1
- BRANCH: microservices CHANGESET: 10e1beb1
- ERROR FINGERPRINT: 7f8c208b-f099-5372-9705-25ef4683eab4
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <type 'exceptions.ValueError'> Invalid MAC: '--------'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: core/mac.py (Line: 121)
- Function: _clean
- 114 match = rx_mac_address_hp.match(value)
- 115 if match:
- 116 value = value.replace("-", "")
- 117 else:
- 118 value = value.replace("-", ":")
- 119 match = rx_mac_address_sixblock.match(value)
- 120 if not match:
- 121 ==> raise ValueError("Invalid MAC: '%s'" % mac)
- 122 value = ""
- 123 for i in range(1, 7):
- 124 v = match.group(i)
- 125 if len(v) == 1:
- 126 v = "0" + v
- 127 value += v
- Variables:
- mac = '--------'
- value = '::::::::'
- match = None
- cls = <class 'noc.core.mac.MAC'>
- ------------------------------------------------------------------------
- File: core/mac.py (Line: 74)
- Function: __new__
- 67 'AA:BB:CC:DD:EE:FF'
- 68 >>> MAC(0xAABBCCDDEEFF)
- 69 'AA:BB:CC:DD:EE:FF'
- 70 >>> MAC("AABBCCDDEEFF") + " -- " + MAC("0011.2233.4455")
- 71 'AA:BB:CC:DD:EE:FF -- 00:11:22:33:44:55'
- 72 """
- 73 def __new__(cls, mac):
- 74 ==> return super(MAC, cls).__new__(cls, cls._clean(mac))
- 75
- 76 def __long__(self):
- 77 return int(self.replace(":", ""), 16)
- 78
- 79 def __int__(self):
- 80 return int(self.replace(":", ""), 16)
- Variables:
- mac = '--------'
- cls = <class 'noc.core.mac.MAC'>
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 537)
- Function: <genexpr>
- 530 def macs_to_ranges(self, macs):
- 531 """
- 532 Converts list of macs to rangea
- 533 :param macs: Iterable yielding mac addresses
- 534 :returns: [(from, to), ..]
- 535 """
- 536 r = []
- 537 ==> for m in sorted(MAC(x) for x in macs):
- 538 if r:
- 539 if r[-1][1].shift(1) == m:
- 540 # Expand last range
- 541 r[-1][1] = m
- 542 else:
- 543 r += [[m, m]]
- Variables:
- .0 = <listiterator object at 0x7fb732c355d0>
- x = '--------'
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 537)
- Function: macs_to_ranges
- 530 def macs_to_ranges(self, macs):
- 531 """
- 532 Converts list of macs to rangea
- 533 :param macs: Iterable yielding mac addresses
- 534 :returns: [(from, to), ..]
- 535 """
- 536 r = []
- 537 ==> for m in sorted(MAC(x) for x in macs):
- 538 if r:
- 539 if r[-1][1].shift(1) == m:
- 540 # Expand last range
- 541 r[-1][1] = m
- 542 else:
- 543 r += [[m, m]]
- Variables:
- self =
- <noc.sa.profiles.DLink.DxS.get_chassis_id.Script object at 0x7fb71ef77f50>
- r = []
- macs = ['--------', '00-15-E9-3B-66-00', '00-15-E9-3B-66-01', '2.01-B01']
- ------------------------------------------------------------------------
- File: sa/profiles/DLink/DxS/get_chassis_id.py (Line: 65)
- Function: execute
- 58 except:
- 59 pass
- 60 if macs:
- 61 macs.sort()
- 62 return [{
- 63 "first_chassis_mac": f,
- 64 "last_chassis_mac": t
- 65 ==> } for f, t in self.macs_to_ranges(macs)]
- 66
- 67 return {
- 68 "first_chassis_mac": mac,
- 69 "last_chassis_mac": mac
- 70 }
- Variables:
- macs = ['--------', '00-15-E9-3B-66-00', '00-15-E9-3B-66-01', '2.01-B01']
- i = ['ox', 'ount', ':1', '', '', '', '', '']
- self =
- <noc.sa.profiles.DLink.DxS.get_chassis_id.Script object at 0x7fb71ef77f50>
- m = '2.01-B01'
- mac = '00-15-E9-3B-66-00'
- v =
- 'Command: show stack_information\n\n Box User Prio- Prom Runtime H/W \n ID Set Type Exist rity version version version\n --- ---- ---------------- ----- ----- -------- ---------------- --------\n 1 1 DXS-3326GSR exist 16 2.01-B01 4.50-B19 5A1.2A1 \n 2 - USR-NOT-CFG no \n 3 - USR-NOT-CFG no \n 4 - USR-NOT-CFG no \n 5 - USR-NOT-CFG no \n 6 - USR-NOT-CFG no \n 7 - USR-NOT-CFG no \n 8 - USR-NOT-CFG no \n 9 - USR-NOT-CFG no \n 10 - USR-NOT-CFG no \n 11 - USR-NOT-CFG no \n 12 - USR-NOT-CFG no \n -----------------------------------------------------------------\nTopology :DUPLEX_CHAIN\nMy Box ID :1\nCurrent state:MASTER\nBox Count :1\n\n\n'
- found = False
- match = <_sre.SRE_Match object at 0x7fb71e9020a8>
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 246)
- Function: run
- 239 self.logger.info("Using cached result")
- 240 cache_hit = True
- 241 except KeyError:
- 242 pass
- 243 # Execute script
- 244 if not cache_hit:
- 245 try:
- 246 ==> result = self.execute(**self.args)
- 247 if self.cache and self.parent and result:
- 248 self.logger.info("Caching result")
- 249 self.set_cache(self.name, self.args, result)
- 250 finally:
- 251 if not self.parent:
- 252 # Close SNMP socket when necessary
- Variables:
- cache_hit = False
- self =
- <noc.sa.profiles.DLink.DxS.get_chassis_id.Script object at 0x7fb71ef77f50>
- ------------------------------------------------------------------------
- File: commands/script.py (Line: 118)
- Function: handle
- 111 capabilities=caps,
- 112 args=args,
- 113 version=version,
- 114 timeout=3600,
- 115 name=script,
- 116 collect_beef=bool(beef)
- 117 )
- 118 ==> result = scr.run()
- 119 if pretty:
- 120 pprint.pprint(result)
- 121 elif yaml:
- 122 import yaml
- 123 import sys
- 124 yaml.dump(result, sys.stdout)
- Variables:
- obj = <ManagedObject: 10.170.112.9>
- beef = None
- service = <__main__.ServiceStub object at 0x7fb71ef77710>
- script = u'DLink.DxS.get_chassis_id'
- script_class = <class 'noc.sa.profiles.DLink.DxS.get_chassis_id.Script'>
- self = <__main__.Command object at 0x7fb733b80890>
- args = {}
- use_snmp = True
- caps =
- {u'DB | Interfaces': 26,
- u'Network | LLDP': True,
- u'SNMP': True,
- u'SNMP | Bulk': True,
- u'SNMP | IF-MIB': True,
- u'SNMP | IF-MIB | HC': True,
- u'SNMP | v1': True,
- u'SNMP | v2c': True,
- u'SNMP | v3': False}
- yaml = False
- object_name = ['10.170.112.9']
- version =
- {'platform': u'DXS-3326GSR', 'vendor': u'D-Link', 'version': u'4.50-B19'}
- arguments = []
- pretty = False
- credentials =
- {'access_preference': u'CS',
- 'address': u'10.170.112.9',
- 'cli_protocol': 'telnet',
- 'password': u'wre4fel',
- 'path': None,
- 'raise_privileges': True,
- 'snmp_ro': u'public',
- 'snmp_version': 'v2c',
- 'super_password': u'admin',
- 'user': u'script2'}
- access_preference = None
- options = {}
- scr =
- <noc.sa.profiles.DLink.DxS.get_chassis_id.Script object at 0x7fb71ef77f50>
- ------------------------------------------------------------------------
- File: core/management/base.py (Line: 75)
- Function: run_from_argv
- 68 enable_profiling = cmd_options.pop("enable_profiling", False)
- 69 show_metrics = cmd_options.pop("show_metrics", False)
- 70 if enable_profiling:
- 71 # Start profiler
- 72 import yappi
- 73 yappi.start()
- 74 try:
- 75 ==> return self.handle(*args, **cmd_options) or 0
- 76 except CommandError as e:
- 77 self.print(str(e))
- 78 return 1
- 79 except KeyboardInterrupt:
- 80 self.print("Ctrl+C")
- 81 return 3
- Variables:
- parser =
- ArgumentParser(prog='script.py', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
- loglevel = 'debug'
- enable_profiling = False
- args = ()
- cmd_options =
- {'access_preference': None,
- 'arguments': [],
- 'beef': None,
- 'object_name': ['10.170.112.9'],
- 'pretty': False,
- 'script': ['get_chassis_id'],
- 'use_snmp': True,
- 'yaml': False}
- argv = ['--debug', 'get_chassis_id', '10.170.112.9']
- self = <__main__.Command object at 0x7fb733b80890>
- show_metrics = False
- options =
- Namespace(access_preference=None, arguments=[], beef=None, object_name=['10.170.112.9'], pretty=False, script=['get_chassis_id'], use_snmp=True, yaml=False)
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement