Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2013-05-23 14:45:44,549 UNHANDLED EXCEPTION (2013-05-23 14:45:44.474930)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- 'ObjectId' object is not iterable
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 166)
- Function: to_mongo
- 159 else:
- 160 id = value
- 161 return id_field.to_mongo(id)
- 162
- 163 id_field_name = self.document_type._meta["id_field"]
- 164 id_field = self.document_type._fields[id_field_name]
- 165 if document:
- 166 ==> return [convert(v) for v in document]
- 167 else:
- 168 return document
- 169
- 170
- 171 class ForeignKeyField(BaseField):
- 172 """
- Variables:
- id_field_name = 'id'
- convert = <function convert at 0x505ade8>
- self = <noc.lib.nosql.PlainReferenceListField object at 0x4448110>
- id_field = <mongoengine.base.ObjectIdField object at 0x2b7d350>
- _[1] = []
- document = ObjectId('5107e4927e85c97d40e2979d')
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 125)
- Function: prepare_query_value
- 118
- 119 def lookup_member(self, name):
- 120 return self.document_type._fields.get(name)
- 121
- 122 def prepare_query_value(self, op, value):
- 123 if value is None:
- 124 return None
- 125 ==> return self.to_mongo(value)
- 126
- 127
- 128 class PlainReferenceListField(PlainReferenceField):
- 129 def __get__(self, instance, owner):
- 130 def convert(value):
- 131 if isinstance(value, ObjectId):
- Variables:
- self = <noc.lib.nosql.PlainReferenceListField object at 0x4448110>
- value = ObjectId('5107e4927e85c97d40e2979d')
- op = 'in'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 731)
- Function: _transform_query
- 724 value = StringField.prepare_query_value(op, value)
- 725 else:
- 726 value = field
- 727 else:
- 728 value = field.prepare_query_value(op, value)
- 729 elif op in ('in', 'nin', 'all', 'near'):
- 730 # 'in', 'nin' and 'all' require a list of values
- 731 ==> value = [field.prepare_query_value(op, v) for v in value]
- 732
- 733 # if op and op not in match_operators:
- 734 if op:
- 735 if op in geo_operators:
- 736 if op == "within_distance":
- 737 value = {'$within': {'$center': value}}
- Variables:
- cleaned_fields = [<noc.lib.nosql.PlainReferenceListField object at 0x4448110>]
- match_operators =
- ['contains',
- 'icontains',
- 'startswith',
- 'istartswith',
- 'endswith',
- 'iendswith',
- 'exact',
- 'iexact']
- _doc_cls = <class 'noc.inv.models.link.Link'>
- _field_operation = False
- value = .. queryset mid-iteration ..
- negate = False
- query = {'interfaces__in': .. queryset mid-iteration ..}
- append_field = True
- geo_operators =
- ['within_distance',
- 'within_spherical_distance',
- 'within_box',
- 'within_polygon',
- 'near',
- 'near_sphere']
- field = <noc.lib.nosql.PlainReferenceListField object at 0x4448110>
- parts = ['interfaces']
- cls = <class 'mongoengine.queryset.QuerySet'>
- mongo_query = {}
- operators =
- ['ne',
- 'gt',
- 'gte',
- 'lt',
- 'lte',
- 'in',
- 'nin',
- 'mod',
- 'all',
- 'size',
- 'exists',
- 'not']
- part = 'in'
- key = 'interfaces__in'
- i = 1
- fields = [<noc.lib.nosql.PlainReferenceListField object at 0x4448110>]
- singular_ops =
- [None,
- 'ne',
- 'gt',
- 'gte',
- 'lt',
- 'lte',
- 'not',
- 'contains',
- 'icontains',
- 'startswith',
- 'istartswith',
- 'endswith',
- 'iendswith',
- 'exact',
- 'iexact']
- p = 'in'
- v = ObjectId('5107e4927e85c97d40e2979d')
- indices = []
- _[3] = []
- op = 'in'
- custom_operators = ['match']
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 162)
- Function: visit_query
- 155 if combination.operation == combination.OR:
- 156 return {'$or': combination.children}
- 157 elif combination.operation == combination.AND:
- 158 return self._mongo_query_conjunction(combination.children)
- 159 return combination
- 160
- 161 def visit_query(self, query):
- 162 ==> return QuerySet._transform_query(self.document, **query.query)
- 163
- 164 def _mongo_query_conjunction(self, queries):
- 165 """Merges Mongo query dicts - effectively &ing them together.
- 166 """
- 167 combined_query = {}
- 168 for query in queries:
- Variables:
- query = <mongoengine.queryset.Q object at 0x5387b50>
- self = <mongoengine.queryset.QueryCompilerVisitor object at 0x5387bd0>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 270)
- Function: accept
- 263 query structures.
- 264 """
- 265
- 266 def __init__(self, **query):
- 267 self.query = query
- 268
- 269 def accept(self, visitor):
- 270 ==> return visitor.visit_query(self)
- 271
- 272 @property
- 273 def empty(self):
- 274 return not bool(self.query)
- 275
- 276
- Variables:
- visitor = <mongoengine.queryset.QueryCompilerVisitor object at 0x5387bd0>
- self = <mongoengine.queryset.Q object at 0x5387b50>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 205)
- Function: to_query
- 198
- 199 AND = 0
- 200 OR = 1
- 201
- 202 def to_query(self, document):
- 203 query = self.accept(SimplificationVisitor())
- 204 query = query.accept(QueryTreeTransformerVisitor())
- 205 ==> query = query.accept(QueryCompilerVisitor(document))
- 206 return query
- 207
- 208 def accept(self, visitor):
- 209 raise NotImplementedError
- 210
- 211 def _combine(self, other, operation):
- Variables:
- query = <mongoengine.queryset.Q object at 0x5387b50>
- self = <mongoengine.queryset.Q object at 0x5387b50>
- document = <class 'noc.inv.models.link.Link'>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 379)
- Function: _query
- 372 setattr(c, prop, copy.deepcopy(val))
- 373
- 374 return c
- 375
- 376 @property
- 377 def _query(self):
- 378 if self._mongo_query is None:
- 379 ==> self._mongo_query = self._query_obj.to_query(self._document)
- 380 if self._class_check:
- 381 self._mongo_query.update(self._initial_query)
- 382 return self._mongo_query
- 383
- 384 def ensure_index(self, key_or_list, drop_dups=False, background=False,
- 385 **kwargs):
- Variables:
- self = repr() failed
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 583)
- Function: _cursor
- 576 cursor_args['fields'] = self._loaded_fields.as_dict()
- 577 return cursor_args
- 578
- 579 @property
- 580 def _cursor(self):
- 581 if self._cursor_obj is None:
- 582
- 583 ==> self._cursor_obj = self._collection.find(self._query,
- 584 **self._cursor_args)
- 585 # Apply where clauses to cursor
- 586 if self._where_clause:
- 587 self._cursor_obj.where(self._where_clause)
- 588
- 589 # apply default ordering
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 990)
- Function: rewind
- 983
- 984 def rewind(self):
- 985 """Rewind the cursor to its unevaluated state.
- 986
- 987 .. versionadded:: 0.3
- 988 """
- 989 self._iter = False
- 990 ==> self._cursor.rewind()
- 991
- 992 def count(self):
- 993 """Count the selected elements in the query.
- 994 """
- 995 if self._limit == 0:
- 996 return 0
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 1517)
- Function: __iter__
- 1510
- 1511 if ret is not None and 'n' in ret:
- 1512 return ret['n']
- 1513 except pymongo.errors.OperationFailure, e:
- 1514 raise OperationError(u'Update failed [%s]' % unicode(e))
- 1515
- 1516 def __iter__(self):
- 1517 ==> self.rewind()
- 1518 return self
- 1519
- 1520 def _get_scalar(self, doc):
- 1521
- 1522 def lookup(obj, name):
- 1523 chunks = name.split('__')
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/link_discovery.py (Line: 112)
- Function: load_existing_links
- 105 Process job result and submit candidates
- 106 :param result:
- 107 :return:
- 108 """
- 109 pass
- 110
- 111 def load_existing_links(self, object):
- 112 ==> for l in Link.object_links(object):
- 113 if l.is_ptp:
- 114 i1, i2 = l.interfaces
- 115 if l.is_loop:
- 116 # Loop to self
- 117 self.submited.add((i1.name, object, i2.name))
- 118 self.submited.add((i2.name, object, i1.name))
- Variables:
- self =
- <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x49db550>
- object = <ManagedObject: Gagarina_15a_2>
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/link_discovery.py (Line: 212)
- Function: handler
- 205 :param result:
- 206 :return:
- 207 """
- 208 # Caches
- 209 self.neighbor_by_mac_cache = {} # mac -> object
- 210 # Fetch existing links
- 211 self.submited = set() # (local_iface, remote_object, remote_iface)
- 212 ==> self.load_existing_links(object)
- 213 # Process results
- 214 self.candidates = defaultdict(list) # remote -> [(local iface, remote_iface)]
- 215 # remote iface may be unknown
- 216 self.process_result(object, result)
- 217 # Fetch pending link checks
- 218 self.p_candidates = defaultdict(list) # remote -> [(local iface, remote_iface)]
- Variables:
- self =
- <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x49db550>
- object = <ManagedObject: Gagarina_15a_2>
- result =
- [{'local_interface': 'GigabitEthernet0/0/1',
- 'neighbors': [{'remote_capabilities': 4,
- 'remote_chassis_id': '80:FB:06:03:7A:D7',
- 'remote_chassis_id_subtype': 4,
- 'remote_port': 'GigabitEthernet0/0/1',
- 'remote_port_subtype': 5,
- 'remote_system_name': 'Gagarina_13a_2'}]},
- {'local_interface': 'GigabitEthernet0/0/2',
- 'neighbors': [{'remote_capabilities': 4,
- 'remote_chassis_id': '80:FB:06:03:89:87',
- 'remote_chassis_id_subtype': 4,
- 'remote_port': 'GigabitEthernet0/0/2',
- 'remote_port_subtype': 5,
- 'remote_system_name': 'Gagarina_15a_7'}]}]
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 253)
- Function: _job_wrapper
- 246 t.start()
- 247 else:
- 248 return self._job_wrapper(job, **kwargs)
- 249
- 250 def _job_wrapper(self, job, **kwargs):
- 251 tb = None
- 252 try:
- 253 ==> r = job.handler(**kwargs)
- 254 except Exception:
- 255 error_report()
- 256 job.on_exception()
- 257 s = job.S_EXCEPTION
- 258 tb = get_traceback()
- 259 else:
- Variables:
- job =
- <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x49db550>
- tb = None
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x2ae63d0>
- kwargs =
- {'object': <ManagedObject: Gagarina_15a_2>,
- 'result': [{'local_interface': 'GigabitEthernet0/0/1',
- 'neighbors': [{'remote_capabilities': 4,
- 'remote_chassis_id': '80:FB:06:03:7A:D7',
- 'remote_chassis_id_subtype': 4,
- 'remote_port': 'GigabitEthernet0/0/1',
- 'remote_port_subtype': 5,
- 'remote_system_name': 'Gagarina_13a_2'}]},
- {'local_interface': 'GigabitEthernet0/0/2',
- 'neighbors': [{'remote_capabilities': 4,
- 'remote_chassis_id': '80:FB:06:03:89:87',
- 'remote_chassis_id_subtype': 4,
- 'remote_port': 'GigabitEthernet0/0/2',
- 'remote_port_subtype': 5,
- 'remote_system_name': 'Gagarina_15a_7'}]}]}
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2013-05-23 14:45:48,027 [inv.discovery: mac_discovery(dsw01-par-lyj)] MAC 00:0C:85:3A:73:70. VC Domain: default, VLAN 2070 at 9
- 2013-05-23 14:45:48,135 [inv.discovery: mac_discovery(dsw01-par-lyj)] MAC 00:1E:58:99:23:AF. VC Domain: default, VLAN 2070 at 9
- 2013-05-23 14:45:48,434 UNHANDLED EXCEPTION (2013-05-23 14:45:48.264075)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- 'ObjectId' object is not iterable
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 166)
- Function: to_mongo
- 159 else:
- 160 id = value
- 161 return id_field.to_mongo(id)
- 162
- 163 id_field_name = self.document_type._meta["id_field"]
- 164 id_field = self.document_type._fields[id_field_name]
- 165 if document:
- 166 ==> return [convert(v) for v in document]
- 167 else:
- 168 return document
- 169
- 170
- 171 class ForeignKeyField(BaseField):
- 172 """
- Variables:
- id_field_name = 'id'
- convert = <function convert at 0x505ade8>
- self = <noc.lib.nosql.PlainReferenceListField object at 0x4448110>
- id_field = <mongoengine.base.ObjectIdField object at 0x2b7d350>
- _[1] = []
- document = ObjectId('50fe3f747e85c96228e4c1b7')
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 125)
- Function: prepare_query_value
- 118
- 119 def lookup_member(self, name):
- 120 return self.document_type._fields.get(name)
- 121
- 122 def prepare_query_value(self, op, value):
- 123 if value is None:
- 124 return None
- 125 ==> return self.to_mongo(value)
- 126
- 127
- 128 class PlainReferenceListField(PlainReferenceField):
- 129 def __get__(self, instance, owner):
- 130 def convert(value):
- 131 if isinstance(value, ObjectId):
- Variables:
- self = <noc.lib.nosql.PlainReferenceListField object at 0x4448110>
- value = ObjectId('50fe3f747e85c96228e4c1b7')
- op = None
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 728)
- Function: _transform_query
- 721 if isinstance(field, basestring):
- 722 if op in match_operators and isinstance(value, basestring):
- 723 from mongoengine import StringField
- 724 value = StringField.prepare_query_value(op, value)
- 725 else:
- 726 value = field
- 727 else:
- 728 ==> value = field.prepare_query_value(op, value)
- 729 elif op in ('in', 'nin', 'all', 'near'):
- 730 # 'in', 'nin' and 'all' require a list of values
- 731 value = [field.prepare_query_value(op, v) for v in value]
- 732
- 733 # if op and op not in match_operators:
- 734 if op:
- Variables:
- cleaned_fields = [<noc.lib.nosql.PlainReferenceListField object at 0x4448110>]
- match_operators =
- ['contains',
- 'icontains',
- 'startswith',
- 'istartswith',
- 'endswith',
- 'iendswith',
- 'exact',
- 'iexact']
- _doc_cls = <class 'noc.inv.models.link.Link'>
- _field_operation = False
- value = ObjectId('50fe3f747e85c96228e4c1b7')
- negate = False
- query = {'interfaces': ObjectId('50fe3f747e85c96228e4c1b7')}
- append_field = True
- geo_operators =
- ['within_distance',
- 'within_spherical_distance',
- 'within_box',
- 'within_polygon',
- 'near',
- 'near_sphere']
- field = <noc.lib.nosql.PlainReferenceListField object at 0x4448110>
- parts = ['interfaces']
- cls = <class 'mongoengine.queryset.QuerySet'>
- mongo_query = {}
- operators =
- ['ne',
- 'gt',
- 'gte',
- 'lt',
- 'lte',
- 'in',
- 'nin',
- 'mod',
- 'all',
- 'size',
- 'exists',
- 'not']
- part = 'interfaces'
- key = 'interfaces'
- i = 0
- fields = [<noc.lib.nosql.PlainReferenceListField object at 0x4448110>]
- singular_ops =
- [None,
- 'ne',
- 'gt',
- 'gte',
- 'lt',
- 'lte',
- 'not',
- 'contains',
- 'icontains',
- 'startswith',
- 'istartswith',
- 'endswith',
- 'iendswith',
- 'exact',
- 'iexact']
- p = 'interfaces'
- indices = []
- op = None
- custom_operators = ['match']
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 162)
- Function: visit_query
- 155 if combination.operation == combination.OR:
- 156 return {'$or': combination.children}
- 157 elif combination.operation == combination.AND:
- 158 return self._mongo_query_conjunction(combination.children)
- 159 return combination
- 160
- 161 def visit_query(self, query):
- 162 ==> return QuerySet._transform_query(self.document, **query.query)
- 163
- 164 def _mongo_query_conjunction(self, queries):
- 165 """Merges Mongo query dicts - effectively &ing them together.
- 166 """
- 167 combined_query = {}
- 168 for query in queries:
- Variables:
- query = <mongoengine.queryset.Q object at 0x49e1290>
- self = <mongoengine.queryset.QueryCompilerVisitor object at 0x49dd390>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 270)
- Function: accept
- 263 query structures.
- 264 """
- 265
- 266 def __init__(self, **query):
- 267 self.query = query
- 268
- 269 def accept(self, visitor):
- 270 ==> return visitor.visit_query(self)
- 271
- 272 @property
- 273 def empty(self):
- 274 return not bool(self.query)
- 275
- 276
- Variables:
- visitor = <mongoengine.queryset.QueryCompilerVisitor object at 0x49dd390>
- self = <mongoengine.queryset.Q object at 0x49e1290>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 205)
- Function: to_query
- 198
- 199 AND = 0
- 200 OR = 1
- 201
- 202 def to_query(self, document):
- 203 query = self.accept(SimplificationVisitor())
- 204 query = query.accept(QueryTreeTransformerVisitor())
- 205 ==> query = query.accept(QueryCompilerVisitor(document))
- 206 return query
- 207
- 208 def accept(self, visitor):
- 209 raise NotImplementedError
- 210
- 211 def _combine(self, other, operation):
- Variables:
- query = <mongoengine.queryset.Q object at 0x49e1290>
- self = <mongoengine.queryset.Q object at 0x49e1290>
- document = <class 'noc.inv.models.link.Link'>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 379)
- Function: _query
- 372 setattr(c, prop, copy.deepcopy(val))
- 373
- 374 return c
- 375
- 376 @property
- 377 def _query(self):
- 378 if self._mongo_query is None:
- 379 ==> self._mongo_query = self._query_obj.to_query(self._document)
- 380 if self._class_check:
- 381 self._mongo_query.update(self._initial_query)
- 382 return self._mongo_query
- 383
- 384 def ensure_index(self, key_or_list, drop_dups=False, background=False,
- 385 **kwargs):
- Variables:
- self = repr() failed
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 583)
- Function: _cursor
- 576 cursor_args['fields'] = self._loaded_fields.as_dict()
- 577 return cursor_args
- 578
- 579 @property
- 580 def _cursor(self):
- 581 if self._cursor_obj is None:
- 582
- 583 ==> self._cursor_obj = self._collection.find(self._query,
- 584 **self._cursor_args)
- 585 # Apply where clauses to cursor
- 586 if self._where_clause:
- 587 self._cursor_obj.where(self._where_clause)
- 588
- 589 # apply default ordering
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 1159)
- Function: __getitem__
- 1152 # Allow further QuerySet modifications to be performed
- 1153 return self
- 1154 # Integer index provided
- 1155 elif isinstance(key, int):
- 1156 if self._scalar:
- 1157 return self._get_scalar(self._document._from_son(
- 1158 self._cursor[key]))
- 1159 ==> return self._document._from_son(self._cursor[key])
- 1160 raise AttributeError
- 1161
- 1162 def distinct(self, field):
- 1163 """Return a list of distinct values for a given field.
- 1164
- 1165 :param field: the field to select distinct values from
- Variables:
- self = .. queryset mid-iteration ..
- key = 0
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/queryset.py (Line: 864)
- Function: first
- 857 doc.save()
- 858 return doc
- 859
- 860 def first(self):
- 861 """Retrieve the first object matching the query.
- 862 """
- 863 try:
- 864 ==> result = self[0]
- 865 except IndexError:
- 866 result = None
- 867 return result
- 868
- 869 def insert(self, doc_or_docs, load_bulk=True, safe=False, write_options=None):
- 870 """bulk insert documents
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/inv/models/interface.py (Line: 83)
- Function: link
- 76
- 77 @property
- 78 def link(self):
- 79 """
- 80 Return Link instance or None
- 81 :return:
- 82 """
- 83 ==> return Link.objects.filter(interfaces=self.id).first()
- 84
- 85 @property
- 86 def is_linked(self):
- 87 """
- 88 Check interface is linked
- 89 :returns: True if interface is linked, False otherwise
- Variables:
- self = <Interface: dsw01-par-lyj: 2>
- ------------------------------------------------------------------------
- File: /opt/noc/inv/models/interface.py (Line: 91)
- Function: is_linked
- 84
- 85 @property
- 86 def is_linked(self):
- 87 """
- 88 Check interface is linked
- 89 :returns: True if interface is linked, False otherwise
- 90 """
- 91 ==> return self.link is not None
- 92
- 93 def unlink(self):
- 94 """
- 95 Remove existing link.
- 96 Raise ValueError if interface is not linked
- 97 """
- Variables:
- self = <Interface: dsw01-par-lyj: 2>
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 139)
- Function: check_port
- 132 """
- 133 # Local interface
- 134 iface = Interface.objects.filter(
- 135 managed_object=object.id, name=port).first()
- 136 if not iface:
- 137 return # Not found
- 138 # Check interface is still unlinked
- 139 ==> if iface.is_linked:
- 140 return # Already linked
- 141 # Try to find remote interface by MAC
- 142 interfaces = list(Interface.objects.filter(mac=mac))
- 143 if len(interfaces) != 1:
- 144 return # No strict match
- 145 remote_iface = interfaces[0]
- Variables:
- iface = <Interface: dsw01-par-lyj: 2>
- self =
- <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x7017a90>
- object = <ManagedObject: dsw01-par-lyj>
- mac = '00:16:36:AB:C7:B6'
- vlans = [844]
- port = '2'
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 80)
- Function: handler
- 73 mh = defaultdict(int)
- 74 for p, m in pmc:
- 75 mh[m] += 1
- 76 # Check all unique MACs
- 77 for port, mac in pmc:
- 78 if mh[mac] == 1:
- 79 self.check_port(object, port, mac,
- 80 ==> [vlan for vlan, mac in port_macs[port]])
- 81 return True
- 82
- 83 @classmethod
- 84 def initial_submit_queryset(cls):
- 85 return {"object_profile__enable_mac_discovery": True}
- 86
- Variables:
- iface = '9'
- port_macs =
- defaultdict(<type 'set'>, {'9': set([(235, '00:19:21:78:08:95'), (235, 'BC:5F:F4:00:04:28'), (235, '68:05:CA:01:DF:E2'), (235, '68:05:CA:02:0C:AA'), (235, '30:85:A9:AC:51:15'), (844, 'F0:DE:F1:8A:74:6C'), (2070, '00:10:00:00:00:03'), (235, '68:05:CA:01:E4:A0'), (235, 'C8:9C:DC:53:8C:F2'), (235, '68:05:CA:01:E1:18'), (235, '4C:02:89:00:75:7F'), (235, '30:85:A9:AC:3F:A6'), (844, '00:1F:A4:2B:58:78'), (2070, '4C:B1:6C:16:81:28'), (2070, '00:1E:58:99:23:AF'), (235, '68:05:CA:01:DC:56'), (235, '68:05:CA:01:D9:DE'), (235, '30:85:A9:15:0F:03'), (2070, '00:10:00:00:00:04'), (235, '30:85:A9:AC:44:6D'), (235, '68:05:CA:08:7B:1E'), (2070, '4C:B1:6C:D2:74:95'), (235, '68:05:CA:01:D9:58'), (235, '00:1A:92:38:34:62'), (235, '00:15:F2:5E:0E:C9'), (2070, '08:19:A6:93:18:9E'), (235, '00:30:67:DD:F4:1D'), (235, '00:26:18:DA:5F:52'), (2070, '00:1B:0D:6A:78:91'), (235, '68:05:CA:01:C2:28'), (235, '00:26:18:DC:F3:FF'), (235, '68:05:CA:01:E3:DA'), (235, '00:1B:0D:6A:78:91'), (235, 'BC:5F:F4:00:03:A1'), (235, '48:5B:39:D1:D6:19'), (2070, '00:25:9E:DC:D5:7E'), (235, '00:1B:21:87:B6:74'), (844, '00:1E:8C:1D:13:0B'), (235, '38:60:77:C2:80:0C'), (235, '68:05:CA:01:DC:A0'), (2070, '4C:1F:CC:67:14:2E'), (235, '68:05:CA:01:E0:F0'), (844, 'D8:6C:E9:62:4A:55'), (235, '50:46:5D:8A:BC:1C'), (235, '30:85:A9:AC:44:67'), (2070, '00:1E:4C:9D:1E:07'), (235, '68:05:CA:01:E0:CE'), (235, '68:05:CA:01:DA:20'), (235, '00:1B:21:81:77:F2'), (403, '00:1F:6C:B9:19:C0'), (2070, '00:10:00:00:00:05'), (235, '30:85:A9:AC:50:A6'), (2070, '4C:1F:CC:65:CD:68'), (3651, '00:1B:0D:6A:78:91'), (235, '30:85:A9:AC:40:17'), (2070, '4C:1F:CC:66:3F:0A'), (235, '00:21:91:54:15:3A'), (235, '30:85:A9:AC:4C:4A'), (2070, '00:10:00:00:00:38'), (844, '28:6E:D4:10:52:42'), (235, '00:0E:38:5F:6F:1B'), (2070, '00:0C:85:3A:73:70'), (235, '68:05:CA:02:0C:B8'), (2070, '4C:B1:6C:D2:74:32'), (235, '00:15:E9:3D:10:63'), (235, '00:13:D4:1F:D6:1F'), (2070, '00:10:00:43:00:01'), (235, '30:85:A9:AC:51:18'), (235, '20:CF:30:E7:9B:5E'), (235, 'FC:75:16:8E:40:81'), (844, '00:1B:0D:6A:78:91'), (844, '54:04:A6:99:FE:B2'), (235, '68:05:CA:01:E4:B0'), (2070, '00:10:00:00:00:84'), (2070, '00:10:00:52:52:01'), (235, '30:85:A9:AC:44:94'), (844, '00:24:1D:97:4B:34'), (235, '00:25:22:60:87:37'), (403, '00:1B:0D:6A:78:91'), (235, '30:85:A9:AC:48:D8'), (235, '30:85:A9:AC:50:FA'), (844, 'B4:B3:62:5E:32:40'), (2070, '00:10:00:00:00:89'), (235, '00:11:11:9F:58:54'), (2070, '4C:B1:6C:D2:71:BF'), (2070, '00:20:35:22:3B:DF'), (235, '68:05:CA:01:E3:64'), (235, '30:85:A9:AC:4C:8E'), (2070, '00:10:00:00:00:07'), (235, '00:30:67:82:22:75'), (235, '30:85:A9:AC:4C:8C'), (235, '00:04:61:5B:C8:AA'), (235, '00:1B:21:84:BE:EA'), (2070, '08:19:A6:93:18:5C'), (2070, '08:19:A6:93:1A:CF'), (235, '30:85:A9:AC:51:99'), (2070, '00:18:82:4D:1B:22'), (2070, '4C:1F:CC:65:CD:2E'), (235, '30:85:A9:AC:52:1B'), (844, '00:14:2A:9F:76:2D')]), '1': set([(844, '00:13:49:D2:25:05'), (844, '00:13:49:E8:04:85')]), '2': set([(844, '00:16:36:AB:C7:B6')])})
- dups = set(['00:1B:0D:6A:78:91'])
- v =
- {'interfaces': ['9'], 'mac': '00:1B:0D:6A:78:91', 'type': 'D', 'vlan_id': 3651}
- vc_domain = <VCDomain: default>
- self =
- <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x7017a90>
- vlan = 844
- m = '00:16:36:AB:C7:B6'
- mh = defaultdict(<type 'int'>, {'00:16:36:AB:C7:B6': 1})
- object = <ManagedObject: dsw01-par-lyj>
- p = '2'
- mac = '00:16:36:AB:C7:B6'
- result =
- [{'interfaces': ['9'],
- 'mac': '00:04:61:5B:C8:AA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:0E:38:5F:6F:1B',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:11:11:9F:58:54',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:13:D4:1F:D6:1F',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:15:E9:3D:10:63',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:15:F2:5E:0E:C9',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:19:21:78:08:95',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1A:92:38:34:62',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:21:81:77:F2',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:21:84:BE:EA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:21:87:B6:74',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:21:91:54:15:3A',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:25:22:60:87:37',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:26:18:DA:5F:52',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:26:18:DC:F3:FF',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:30:67:82:22:75',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:30:67:DD:F4:1D',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '20:CF:30:E7:9B:5E',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:15:0F:03',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:3F:A6',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:40:17',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:44:67',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:44:6D',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:44:94',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:48:D8',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:4C:4A',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:4C:8C',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:4C:8E',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:50:A6',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:50:FA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:51:15',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:51:18',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:51:99',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:52:1B',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '38:60:77:C2:80:0C',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '48:5B:39:D1:D6:19',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '4C:02:89:00:75:7F',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '50:46:5D:8A:BC:1C',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:C2:28',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:D9:58',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:D9:DE',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DA:20',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DC:56',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DC:A0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DF:E2',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E0:CE',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E0:F0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E1:18',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E3:64',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E3:DA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E4:A0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E4:B0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:02:0C:AA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:02:0C:B8',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:08:7B:1E',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'BC:5F:F4:00:03:A1',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'BC:5F:F4:00:04:28',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'C8:9C:DC:53:8C:F2',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'FC:75:16:8E:40:81',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 403},
- {'interfaces': ['9'],
- 'mac': '00:1F:6C:B9:19:C0',
- 'type': 'D',
- 'vlan_id': 403},
- {'interfaces': ['1'],
- 'mac': '00:13:49:D2:25:05',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['1'],
- 'mac': '00:13:49:E8:04:85',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:14:2A:9F:76:2D',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['2'],
- 'mac': '00:16:36:AB:C7:B6',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:1E:8C:1D:13:0B',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:1F:A4:2B:58:78',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:24:1D:97:4B:34',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '28:6E:D4:10:52:42',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '54:04:A6:99:FE:B2',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': 'B4:B3:62:5E:32:40',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': 'D8:6C:E9:62:4A:55',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': 'F0:DE:F1:8A:74:6C',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:0C:85:3A:73:70',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:03',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:04',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:05',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:07',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:38',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:84',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:89',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:43:00:01',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:52:52:01',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:18:82:4D:1B:22',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1E:4C:9D:1E:07',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1E:58:99:23:AF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:20:35:22:3B:DF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:25:9E:DC:D5:7E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '08:19:A6:93:18:5C',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '08:19:A6:93:18:9E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '08:19:A6:93:1A:CF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:65:CD:2E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:65:CD:68',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:66:3F:0A',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:67:14:2E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:16:81:28',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:D2:71:BF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:D2:74:32',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:D2:74:95',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 3651}]
- pmc = [('2', '00:16:36:AB:C7:B6')]
- seen =
- {'00:04:61:5B:C8:AA': 235,
- '00:0C:85:3A:73:70': 2070,
- '00:0E:38:5F:6F:1B': 235,
- '00:10:00:00:00:03': 2070,
- '00:10:00:00:00:04': 2070,
- '00:10:00:00:00:05': 2070,
- '00:10:00:00:00:07': 2070,
- '00:10:00:00:00:38': 2070,
- '00:10:00:00:00:84': 2070,
- '00:10:00:00:00:89': 2070,
- '00:10:00:43:00:01': 2070,
- '00:10:00:52:52:01': 2070,
- '00:11:11:9F:58:54': 235,
- '00:13:49:D2:25:05': 844,
- '00:13:49:E8:04:85': 844,
- '00:13:D4:1F:D6:1F': 235,
- '00:14:2A:9F:76:2D': 844,
- '00:15:E9:3D:10:63': 235,
- '00:15:F2:5E:0E:C9': 235,
- '00:16:36:AB:C7:B6': 844,
- '00:18:82:4D:1B:22': 2070,
- '00:19:21:78:08:95': 235,
- '00:1A:92:38:34:62': 235,
- '00:1B:0D:6A:78:91': 235,
- '00:1B:21:81:77:F2': 235,
- '00:1B:21:84:BE:EA': 235,
- '00:1B:21:87:B6:74': 235,
- '00:1E:4C:9D:1E:07': 2070,
- '00:1E:58:99:23:AF': 2070,
- '00:1E:8C:1D:13:0B': 844,
- '00:1F:6C:B9:19:C0': 403,
- '00:1F:A4:2B:58:78': 844,
- '00:20:35:22:3B:DF': 2070,
- '00:21:91:54:15:3A': 235,
- '00:24:1D:97:4B:34': 844,
- '00:25:22:60:87:37': 235,
- '00:25:9E:DC:D5:7E': 2070,
- '00:26:18:DA:5F:52': 235,
- '00:26:18:DC:F3:FF': 235,
- '00:30:67:82:22:75': 235,
- '00:30:67:DD:F4:1D': 235,
- '08:19:A6:93:18:5C': 2070,
- '08:19:A6:93:18:9E': 2070,
- '08:19:A6:93:1A:CF': 2070,
- '20:CF:30:E7:9B:5E': 235,
- '28:6E:D4:10:52:42': 844,
- '30:85:A9:15:0F:03': 235,
- '30:85:A9:AC:3F:A6': 235,
- '30:85:A9:AC:40:17': 235,
- '30:85:A9:AC:44:67': 235,
- '30:85:A9:AC:44:6D': 235,
- '30:85:A9:AC:44:94': 235,
- '30:85:A9:AC:48:D8': 235,
- '30:85:A9:AC:4C:4A': 235,
- '30:85:A9:AC:4C:8C': 235,
- '30:85:A9:AC:4C:8E': 235,
- '30:85:A9:AC:50:A6': 235,
- '30:85:A9:AC:50:FA': 235,
- '30:85:A9:AC:51:15': 235,
- '30:85:A9:AC:51:18': 235,
- '30:85:A9:AC:51:99': 235,
- '30:85:A9:AC:52:1B': 235,
- '38:60:77:C2:80:0C': 235,
- '48:5B:39:D1:D6:19': 235,
- '4C:02:89:00:75:7F': 235,
- '4C:1F:CC:65:CD:2E': 2070,
- '4C:1F:CC:65:CD:68': 2070,
- '4C:1F:CC:66:3F:0A': 2070,
- '4C:1F:CC:67:14:2E': 2070,
- '4C:B1:6C:16:81:28': 2070,
- '4C:B1:6C:D2:71:BF': 2070,
- '4C:B1:6C:D2:74:32': 2070,
- '4C:B1:6C:D2:74:95': 2070,
- '50:46:5D:8A:BC:1C': 235,
- '54:04:A6:99:FE:B2': 844,
- '68:05:CA:01:C2:28': 235,
- '68:05:CA:01:D9:58': 235,
- '68:05:CA:01:D9:DE': 235,
- '68:05:CA:01:DA:20': 235,
- '68:05:CA:01:DC:56': 235,
- '68:05:CA:01:DC:A0': 235,
- '68:05:CA:01:DF:E2': 235,
- '68:05:CA:01:E0:CE': 235,
- '68:05:CA:01:E0:F0': 235,
- '68:05:CA:01:E1:18': 235,
- '68:05:CA:01:E3:64': 235,
- '68:05:CA:01:E3:DA': 235,
- '68:05:CA:01:E4:A0': 235,
- '68:05:CA:01:E4:B0': 235,
- '68:05:CA:02:0C:AA': 235,
- '68:05:CA:02:0C:B8': 235,
- '68:05:CA:08:7B:1E': 235,
- 'B4:B3:62:5E:32:40': 844,
- 'BC:5F:F4:00:03:A1': 235,
- 'BC:5F:F4:00:04:28': 235,
- 'C8:9C:DC:53:8C:F2': 235,
- 'D8:6C:E9:62:4A:55': 844,
- 'F0:DE:F1:8A:74:6C': 844,
- 'FC:75:16:8E:40:81': 235}
- port = '2'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 253)
- Function: _job_wrapper
- 246 t.start()
- 247 else:
- 248 return self._job_wrapper(job, **kwargs)
- 249
- 250 def _job_wrapper(self, job, **kwargs):
- 251 tb = None
- 252 try:
- 253 ==> r = job.handler(**kwargs)
- 254 except Exception:
- 255 error_report()
- 256 job.on_exception()
- 257 s = job.S_EXCEPTION
- 258 tb = get_traceback()
- 259 else:
- Variables:
- job =
- <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x7017a90>
- tb = None
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x2ae63d0>
- kwargs =
- {'object': <ManagedObject: dsw01-par-lyj>,
- 'result': [{'interfaces': ['9'],
- 'mac': '00:04:61:5B:C8:AA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:0E:38:5F:6F:1B',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:11:11:9F:58:54',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:13:D4:1F:D6:1F',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:15:E9:3D:10:63',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:15:F2:5E:0E:C9',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:19:21:78:08:95',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1A:92:38:34:62',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:21:81:77:F2',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:21:84:BE:EA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:21:87:B6:74',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:21:91:54:15:3A',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:25:22:60:87:37',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:26:18:DA:5F:52',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:26:18:DC:F3:FF',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:30:67:82:22:75',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:30:67:DD:F4:1D',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '20:CF:30:E7:9B:5E',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:15:0F:03',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:3F:A6',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:40:17',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:44:67',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:44:6D',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:44:94',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:48:D8',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:4C:4A',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:4C:8C',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:4C:8E',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:50:A6',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:50:FA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:51:15',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:51:18',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:51:99',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '30:85:A9:AC:52:1B',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '38:60:77:C2:80:0C',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '48:5B:39:D1:D6:19',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '4C:02:89:00:75:7F',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '50:46:5D:8A:BC:1C',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:C2:28',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:D9:58',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:D9:DE',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DA:20',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DC:56',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DC:A0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:DF:E2',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E0:CE',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E0:F0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E1:18',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E3:64',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E3:DA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E4:A0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:01:E4:B0',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:02:0C:AA',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:02:0C:B8',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '68:05:CA:08:7B:1E',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'BC:5F:F4:00:03:A1',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'BC:5F:F4:00:04:28',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'C8:9C:DC:53:8C:F2',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': 'FC:75:16:8E:40:81',
- 'type': 'D',
- 'vlan_id': 235},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 403},
- {'interfaces': ['9'],
- 'mac': '00:1F:6C:B9:19:C0',
- 'type': 'D',
- 'vlan_id': 403},
- {'interfaces': ['1'],
- 'mac': '00:13:49:D2:25:05',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['1'],
- 'mac': '00:13:49:E8:04:85',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:14:2A:9F:76:2D',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['2'],
- 'mac': '00:16:36:AB:C7:B6',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:1E:8C:1D:13:0B',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:1F:A4:2B:58:78',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:24:1D:97:4B:34',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '28:6E:D4:10:52:42',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '54:04:A6:99:FE:B2',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': 'B4:B3:62:5E:32:40',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': 'D8:6C:E9:62:4A:55',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': 'F0:DE:F1:8A:74:6C',
- 'type': 'D',
- 'vlan_id': 844},
- {'interfaces': ['9'],
- 'mac': '00:0C:85:3A:73:70',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:03',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:04',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:05',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:07',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:38',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:84',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:00:00:89',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:43:00:01',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:10:00:52:52:01',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:18:82:4D:1B:22',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1E:4C:9D:1E:07',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1E:58:99:23:AF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:20:35:22:3B:DF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:25:9E:DC:D5:7E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '08:19:A6:93:18:5C',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '08:19:A6:93:18:9E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '08:19:A6:93:1A:CF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:65:CD:2E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:65:CD:68',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:66:3F:0A',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:1F:CC:67:14:2E',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:16:81:28',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:D2:71:BF',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:D2:74:32',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '4C:B1:6C:D2:74:95',
- 'type': 'D',
- 'vlan_id': 2070},
- {'interfaces': ['9'],
- 'mac': '00:1B:0D:6A:78:91',
- 'type': 'D',
- 'vlan_id': 3651}]}
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2013-05-23 14:45:48,505 [inv.discovery] Rescheduling job mac_discovery(548) to 2013-05-23 14:58:03.485391 status=W
- 2013-05-23 14:45:48,671 [inv.discovery] Running job stp_discovery(core-sw-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement