Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Syncing noc.enumerations:
- Syncing noc.alarmseverities:
- ERROR:root:UNHANDLED EXCEPTION (2012-09-24 16:28:22.973873)
- Working directory: /opt/noc
- <class 'noc.main.models.style.DoesNotExist'>
- Style matching query does not exist.
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 366)
- Function: get
- 359 if self.query.can_filter():
- 360 clone = clone.order_by()
- 361 num = len(clone)
- 362 if num == 1:
- 363 return clone._result_cache[0]
- 364 if not num:
- 365 raise self.model.DoesNotExist("%s matching query does not exist."
- 366 ==> % self.model._meta.object_name)
- 367 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
- 368 % (self.model._meta.object_name, num, kwargs))
- 369
- 370 def create(self, **kwargs):
- 371 """
- 372 Creates a new object with the given kwargs, saving it to the database
- Variables:
- clone = []
- num = 0
- self = [<Style: FM CRITICAL>, <Style: FM INFO>, <Style: FM MAJOR>, <Style: FM MINOR>, <Style: FM WARNING>, <Style: IP - DHCP Start>, <Style: IP - DHCP Stop>, <Style: IP - Disconnected>, <Style: IP - Gateway>, <Style: IP/NET - Reserved>, <Style: NET - Telenor Unused>, <Style: NET - Unused>]
- args = ()
- kwargs = {'pk': 2}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/manager.py (Line: 131)
- Function: get
- 124 def distinct(self, *args, **kwargs):
- 125 return self.get_query_set().distinct(*args, **kwargs)
- 126
- 127 def extra(self, *args, **kwargs):
- 128 return self.get_query_set().extra(*args, **kwargs)
- 129
- 130 def get(self, *args, **kwargs):
- 131 ==> return self.get_query_set().get(*args, **kwargs)
- 132
- 133 def get_or_create(self, **kwargs):
- 134 return self.get_query_set().get_or_create(**kwargs)
- 135
- 136 def create(self, **kwargs):
- 137 return self.get_query_set().create(**kwargs)
- Variables:
- self = <django.db.models.manager.Manager object at 0x7fbf1ce93350>
- args = ()
- kwargs = {'pk': 2}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 206)
- Function: __get__
- 199 # Document class being used rather than a document object
- 200 return self
- 201
- 202 # Get value from document instance if available
- 203 value = instance._data.get(self.name)
- 204 # Dereference
- 205 if isinstance(value, int):
- 206 ==> value = self.document_type.objects.get(pk=value)
- 207 if value is not None:
- 208 instance._data[self.name] = value
- 209 return super(ForeignKeyField, self).__get__(instance, owner)
- 210
- 211 def to_mongo(self, document):
- 212 if isinstance(document, Model):
- Variables:
- owner = <class 'noc.fm.models.AlarmSeverity'>
- instance = <AlarmSeverity: WARNING>
- self = <noc.lib.nosql.ForeignKeyField object at 0x7fbf1b833f10>
- value = 2
- ------------------------------------------------------------------------
- File: /opt/noc/main/management/commands/sync-collections.py (Line: 120)
- Function: sync_item
- 113 # Dereference ref_field__field lookups
- 114 if "__" in i and not i.startswith("__"):
- 115 i, f = i.split("__")
- 116 if i not in self.doc._fields:
- 117 self.die("Invalid lookup field: %s" % i)
- 118 ref = self.doc._fields[i].document_type
- 119 v = self.lookup(ref, f, v)
- 120 ==> cv = getattr(obj, i)
- 121 if cv is None or cv.id != v.id:
- 122 changed = True
- 123 setattr(obj, i, v)
- 124 continue
- 125 # Process fields
- 126 try:
- Variables:
- changed = False
- obj = <AlarmSeverity: WARNING>
- d = {'severity': 2000, 'is_builtin': True, 'style__name': 'FM WARNING', 'name': 'WARNING', 'description': 'Some services can be affected. Overall impact on network operation is small'}
- f = 'name'
- i = 'style'
- allow_partial = True
- k = {'name': 'WARNING'}
- created = False
- sk = [{'name': 'WARNING'}]
- field = <mongoengine.fields.BooleanField object at 0x7fbf1b833e50>
- u = 'name'
- v = <Style: FM WARNING>
- partial = False
- ref = <class 'noc.main.models.style.Style'>
- self = <noc.main.management.commands.sync-collections.CollectionSync object at 0x7fbf1b00f9d0>
- ------------------------------------------------------------------------
- File: /opt/noc/main/management/commands/sync-collections.py (Line: 197)
- Function: sync
- 190 self.unique = set()
- 191 for index in self.doc._meta["unique_indexes"]:
- 192 for f, flag in index:
- 193 self.unique.add(f)
- 194 # Sync items
- 195 retry = []
- 196 for d in self.get_data():
- 197 ==> item_id, to_retry = self.sync_item(d, True)
- 198 try:
- 199 self.builtin_ids.remove(item_id)
- 200 except KeyError:
- 201 pass
- 202 if to_retry:
- 203 retry += [d]
- Variables:
- index = [('name', 1)]
- retry = []
- d = {'severity': 2000, 'is_builtin': True, 'style__name': 'FM WARNING', 'name': 'WARNING', 'description': 'Some services can be affected. Overall impact on network operation is small'}
- f = 'name'
- self = <noc.main.management.commands.sync-collections.CollectionSync object at 0x7fbf1b00f9d0>
- o = <AlarmSeverity: CRITICAL>
- item_id = '4f7d76d24a5e68205a0000b6'
- flag = 1
- to_retry = False
- ------------------------------------------------------------------------
- File: /opt/noc/main/management/commands/sync-collections.py (Line: 266)
- Function: handle
- 259 if not a:
- 260 raise CommandError("Invalid collection: %s" % name)
- 261 CollectionSync(*a)
- 262 else:
- 263 # Sync all collections
- 264 for app, collections in self.collections:
- 265 for collection, doc in collections:
- 266 ==> CollectionSync(app, collection, doc).sync()
- 267 except CommandError, why:
- 268 raise CommandError(why)
- 269 except:
- 270 error_report()
- Variables:
- doc = <class 'noc.fm.models.AlarmSeverity'>
- app = 'fm'
- args = ()
- collection = 'alarmseverities'
- self = <noc.main.management.commands.sync-collections.Command object at 0x7fbf1b00fa10>
- collections = [('oidaliases', <class 'noc.fm.models.OIDAlias'>), ('syntaxaliases', <class 'noc.fm.models.SyntaxAlias'>), ('mibaliases', <class 'noc.fm.models.MIBAlias'>), ('mibpreferences', <class 'noc.fm.models.MIBPreference'>), ('enumerations', <class 'noc.fm.models.Enumeration'>), ('alarmseverities', <class 'noc.fm.models.AlarmSeverity'>), ('alarmclasses', <class 'noc.fm.models.AlarmClass'>), ('eventclasses', <class 'noc.fm.models.EventClass'>), ('eventclassificationrules', <class 'noc.fm.models.EventClassificationRule'>), ('cloneclassificationrules', <class 'noc.fm.models.CloneClassificationRule'>)]
- options = {'pythonpath': None, 'verbosity': '1', 'traceback': None, 'settings': None}
- ------------------------------------------------------------------------
- END OF TRACEBACK
- Syncronizing refbooks
- UPDATE RefBook IEEE OUI
- UPDATE RefBook SMI Network Management Private Enterprise Codes
- UPDATE RefBook Российский План Нумерации
- UPDATE RefBook E.164 Country Prefixes
- UPDATE RefBook ISO 3166 Country Codes
- UPDATE RefBook Q.931 Call Clearings
- UPDATE RefBook Выписка из реестра Российской системы нумерации
- Syncronize MIBs
- Synchnonizing MIBs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement