Advertisement
Guest User

Untitled

a guest
Sep 24th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.85 KB | None | 0 0
  1. Syncing noc.enumerations:
  2. Syncing noc.alarmseverities:
  3. ERROR:root:UNHANDLED EXCEPTION (2012-09-24 16:28:22.973873)
  4. Working directory: /opt/noc
  5. <class 'noc.main.models.style.DoesNotExist'>
  6. Style matching query does not exist.
  7. START OF TRACEBACK
  8. ------------------------------------------------------------------------
  9. File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 366)
  10. Function: get
  11. 359 if self.query.can_filter():
  12. 360 clone = clone.order_by()
  13. 361 num = len(clone)
  14. 362 if num == 1:
  15. 363 return clone._result_cache[0]
  16. 364 if not num:
  17. 365 raise self.model.DoesNotExist("%s matching query does not exist."
  18. 366 ==> % self.model._meta.object_name)
  19. 367 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
  20. 368 % (self.model._meta.object_name, num, kwargs))
  21. 369
  22. 370 def create(self, **kwargs):
  23. 371 """
  24. 372 Creates a new object with the given kwargs, saving it to the database
  25. Variables:
  26. clone = []
  27. num = 0
  28. 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>]
  29. args = ()
  30. kwargs = {'pk': 2}
  31. ------------------------------------------------------------------------
  32. File: /opt/noc/contrib/lib/django/db/models/manager.py (Line: 131)
  33. Function: get
  34. 124 def distinct(self, *args, **kwargs):
  35. 125 return self.get_query_set().distinct(*args, **kwargs)
  36. 126
  37. 127 def extra(self, *args, **kwargs):
  38. 128 return self.get_query_set().extra(*args, **kwargs)
  39. 129
  40. 130 def get(self, *args, **kwargs):
  41. 131 ==> return self.get_query_set().get(*args, **kwargs)
  42. 132
  43. 133 def get_or_create(self, **kwargs):
  44. 134 return self.get_query_set().get_or_create(**kwargs)
  45. 135
  46. 136 def create(self, **kwargs):
  47. 137 return self.get_query_set().create(**kwargs)
  48. Variables:
  49. self = <django.db.models.manager.Manager object at 0x7fbf1ce93350>
  50. args = ()
  51. kwargs = {'pk': 2}
  52. ------------------------------------------------------------------------
  53. File: /opt/noc/lib/nosql.py (Line: 206)
  54. Function: __get__
  55. 199 # Document class being used rather than a document object
  56. 200 return self
  57. 201
  58. 202 # Get value from document instance if available
  59. 203 value = instance._data.get(self.name)
  60. 204 # Dereference
  61. 205 if isinstance(value, int):
  62. 206 ==> value = self.document_type.objects.get(pk=value)
  63. 207 if value is not None:
  64. 208 instance._data[self.name] = value
  65. 209 return super(ForeignKeyField, self).__get__(instance, owner)
  66. 210
  67. 211 def to_mongo(self, document):
  68. 212 if isinstance(document, Model):
  69. Variables:
  70. owner = <class 'noc.fm.models.AlarmSeverity'>
  71. instance = <AlarmSeverity: WARNING>
  72. self = <noc.lib.nosql.ForeignKeyField object at 0x7fbf1b833f10>
  73. value = 2
  74. ------------------------------------------------------------------------
  75. File: /opt/noc/main/management/commands/sync-collections.py (Line: 120)
  76. Function: sync_item
  77. 113 # Dereference ref_field__field lookups
  78. 114 if "__" in i and not i.startswith("__"):
  79. 115 i, f = i.split("__")
  80. 116 if i not in self.doc._fields:
  81. 117 self.die("Invalid lookup field: %s" % i)
  82. 118 ref = self.doc._fields[i].document_type
  83. 119 v = self.lookup(ref, f, v)
  84. 120 ==> cv = getattr(obj, i)
  85. 121 if cv is None or cv.id != v.id:
  86. 122 changed = True
  87. 123 setattr(obj, i, v)
  88. 124 continue
  89. 125 # Process fields
  90. 126 try:
  91. Variables:
  92. changed = False
  93. obj = <AlarmSeverity: WARNING>
  94. 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'}
  95. f = 'name'
  96. i = 'style'
  97. allow_partial = True
  98. k = {'name': 'WARNING'}
  99. created = False
  100. sk = [{'name': 'WARNING'}]
  101. field = <mongoengine.fields.BooleanField object at 0x7fbf1b833e50>
  102. u = 'name'
  103. v = <Style: FM WARNING>
  104. partial = False
  105. ref = <class 'noc.main.models.style.Style'>
  106. self = <noc.main.management.commands.sync-collections.CollectionSync object at 0x7fbf1b00f9d0>
  107. ------------------------------------------------------------------------
  108. File: /opt/noc/main/management/commands/sync-collections.py (Line: 197)
  109. Function: sync
  110. 190 self.unique = set()
  111. 191 for index in self.doc._meta["unique_indexes"]:
  112. 192 for f, flag in index:
  113. 193 self.unique.add(f)
  114. 194 # Sync items
  115. 195 retry = []
  116. 196 for d in self.get_data():
  117. 197 ==> item_id, to_retry = self.sync_item(d, True)
  118. 198 try:
  119. 199 self.builtin_ids.remove(item_id)
  120. 200 except KeyError:
  121. 201 pass
  122. 202 if to_retry:
  123. 203 retry += [d]
  124. Variables:
  125. index = [('name', 1)]
  126. retry = []
  127. 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'}
  128. f = 'name'
  129. self = <noc.main.management.commands.sync-collections.CollectionSync object at 0x7fbf1b00f9d0>
  130. o = <AlarmSeverity: CRITICAL>
  131. item_id = '4f7d76d24a5e68205a0000b6'
  132. flag = 1
  133. to_retry = False
  134. ------------------------------------------------------------------------
  135. File: /opt/noc/main/management/commands/sync-collections.py (Line: 266)
  136. Function: handle
  137. 259 if not a:
  138. 260 raise CommandError("Invalid collection: %s" % name)
  139. 261 CollectionSync(*a)
  140. 262 else:
  141. 263 # Sync all collections
  142. 264 for app, collections in self.collections:
  143. 265 for collection, doc in collections:
  144. 266 ==> CollectionSync(app, collection, doc).sync()
  145. 267 except CommandError, why:
  146. 268 raise CommandError(why)
  147. 269 except:
  148. 270 error_report()
  149. Variables:
  150. doc = <class 'noc.fm.models.AlarmSeverity'>
  151. app = 'fm'
  152. args = ()
  153. collection = 'alarmseverities'
  154. self = <noc.main.management.commands.sync-collections.Command object at 0x7fbf1b00fa10>
  155. 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'>)]
  156. options = {'pythonpath': None, 'verbosity': '1', 'traceback': None, 'settings': None}
  157. ------------------------------------------------------------------------
  158. END OF TRACEBACK
  159. Syncronizing refbooks
  160. UPDATE RefBook IEEE OUI
  161. UPDATE RefBook SMI Network Management Private Enterprise Codes
  162. UPDATE RefBook Российский План Нумерации
  163. UPDATE RefBook E.164 Country Prefixes
  164. UPDATE RefBook ISO 3166 Country Codes
  165. UPDATE RefBook Q.931 Call Clearings
  166. UPDATE RefBook Выписка из реестра Российской системы нумерации
  167. Syncronize MIBs
  168. Synchnonizing MIBs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement