SHOW:
|
|
- or go back to the newest paste.
| 1 | Working directory: /opt/noc | |
| 2 | <type 'exceptions.TypeError'> | |
| 3 | string indices must be integers, not str | |
| 4 | START OF TRACEBACK | |
| 5 | ------------------------------------------------------------------------ | |
| 6 | File: /opt/noc/inv/discovery/jobs/rep_discovery.py (Line: 34) | |
| 7 | Function: process_result | |
| 8 | 27 def process_result(self, object, result): | |
| 9 | 28 first_mac, last_mac = self.get_object_macs(object) | |
| 10 | 29 if not first_mac or not last_mac: | |
| 11 | 30 return # ID discovery is incomplete | |
| 12 | 31 for segment in result: | |
| 13 | 32 # Find own ports | |
| 14 | 33 o = [i for i, p in enumerate(segment) | |
| 15 | 34 ==> if first_mac <= p["mac"] <= last_mac] | |
| 16 | 35 if not o: | |
| 17 | 36 continue # Not found | |
| 18 | 37 elif len(o) == 2: | |
| 19 | 38 # Inside the ring | |
| 20 | 39 self.submit_pair(object, | |
| 21 | 40 segment[o[0]], segment[o[0] - 1]) | |
| 22 | - | Variables: |
| 22 | + | Variables: |
| 23 | i = 0 | |
| 24 | self = <noc.inv.discovery.jobs.rep_discovery.REPLinkDiscoveryJob object at 0x807c45250> | |
| 25 | object = <ManagedObject: cat-r23> | |
| 26 | p = 'segment' | |
| 27 | result = [{'segment': 73, 'topology': [{'edge_no_neighbor': True, ...
| |
| 28 | last_mac = u'68:BD:AB:AA:16:80' | |
| 29 | first_mac = u'68:BD:AB:AA:16:80' | |
| 30 | segment = {'segment': 73, 'topology': [{'edge_no_neighbor': True, ... |