Guest User

Untitled

a guest
Apr 11th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.92 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2013-04-11 10:10:44.825943)
  2. Working directory: /usr/local/noc
  3. <class 'mongoengine.queryset.InvalidQueryError'>
  4. Cannot resolve field "is_bridge"
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 639)
  8. Function: _lookup_field
  9. 632 if field_name in document._fields:
  10. 633 field = document._fields[field_name]
  11. 634 elif document._dynamic:
  12. 635 from fields import DynamicField
  13. 636 field = DynamicField(db_field=field_name)
  14. 637 else:
  15. 638 raise InvalidQueryError('Cannot resolve field "%s"'
  16. 639 ==> % field_name)
  17. 640 else:
  18. 641 from mongoengine.fields import ReferenceField, GenericReferenceField
  19. 642 if isinstance(field, (ReferenceField, GenericReferenceField)):
  20. 643 raise InvalidQueryError('Cannot perform join in mongoDB: %s' % '__'.join(parts))
  21. 644 if hasattr(getattr(field, 'field', None), 'lookup_member'):
  22. 645 new_field = field.field.lookup_member(field_name)
  23. Variables:
  24. fields = []
  25. field = None
  26. parts = ['is_bridge']
  27. document = <class 'noc.inv.models.subinterface.SubInterface'>
  28. field_name = 'is_bridge'
  29. cls = <class 'mongoengine.queryset.QuerySet'>
  30. ------------------------------------------------------------------------
  31. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 701)
  32. Function: _transform_query
  33. 694 negate = False
  34. 695 if parts[-1] == 'not':
  35. 696 parts.pop()
  36. 697 negate = True
  37. 698
  38. 699 if _doc_cls:
  39. 700 # Switch field names to proper names [set in Field(name='foo')]
  40. 701 ==> fields = QuerySet._lookup_field(_doc_cls, parts)
  41. 702 parts = []
  42. 703
  43. 704 cleaned_fields = []
  44. 705 for field in fields:
  45. 706 append_field = True
  46. 707 if isinstance(field, basestring):
  47. Variables:
  48. mongo_query = {}
  49. _field_operation = False
  50. geo_operators =
  51. ['within_distance',
  52. 'within_spherical_distance',
  53. 'within_box',
  54. 'within_polygon',
  55. 'near',
  56. 'near_sphere']
  57. match_operators =
  58. ['contains',
  59. 'icontains',
  60. 'startswith',
  61. 'istartswith',
  62. 'endswith',
  63. 'iendswith',
  64. 'exact',
  65. 'iexact']
  66. p = 'is_bridge'
  67. i = 0
  68. operators =
  69. ['ne',
  70. 'gt',
  71. 'gte',
  72. 'lt',
  73. 'lte',
  74. 'in',
  75. 'nin',
  76. 'mod',
  77. 'all',
  78. 'size',
  79. 'exists',
  80. 'not']
  81. parts = ['is_bridge']
  82. value = True
  83. indices = []
  84. _doc_cls = <class 'noc.inv.models.subinterface.SubInterface'>
  85. part = 'is_bridge'
  86. cls = <class 'mongoengine.queryset.QuerySet'>
  87. key = 'is_bridge'
  88. negate = False
  89. query = {'is_bridge': True, 'managed_object': 34}
  90. custom_operators = ['match']
  91. op = None
  92. ------------------------------------------------------------------------
  93. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 162)
  94. Function: visit_query
  95. 155 if combination.operation == combination.OR:
  96. 156 return {'$or': combination.children}
  97. 157 elif combination.operation == combination.AND:
  98. 158 return self._mongo_query_conjunction(combination.children)
  99. 159 return combination
  100. 160
  101. 161 def visit_query(self, query):
  102. 162 ==> return QuerySet._transform_query(self.document, **query.query)
  103. 163
  104. 164 def _mongo_query_conjunction(self, queries):
  105. 165 """Merges Mongo query dicts - effectively &ing them together.
  106. 166 """
  107. 167 combined_query = {}
  108. 168 for query in queries:
  109. Variables:
  110. query = <mongoengine.queryset.Q object at 0x80953e850>
  111. self = <mongoengine.queryset.QueryCompilerVisitor object at 0x80953e4d0>
  112. ------------------------------------------------------------------------
  113. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 270)
  114. Function: accept
  115. 263 query structures.
  116. 264 """
  117. 265
  118. 266 def __init__(self, **query):
  119. 267 self.query = query
  120. 268
  121. 269 def accept(self, visitor):
  122. 270 ==> return visitor.visit_query(self)
  123. 271
  124. 272 @property
  125. 273 def empty(self):
  126. 274 return not bool(self.query)
  127. 275
  128. 276
  129. Variables:
  130. visitor = <mongoengine.queryset.QueryCompilerVisitor object at 0x80953e4d0>
  131. self = <mongoengine.queryset.Q object at 0x80953e850>
  132. ------------------------------------------------------------------------
  133. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 205)
  134. Function: to_query
  135. 198
  136. 199 AND = 0
  137. 200 OR = 1
  138. 201
  139. 202 def to_query(self, document):
  140. 203 query = self.accept(SimplificationVisitor())
  141. 204 query = query.accept(QueryTreeTransformerVisitor())
  142. 205 ==> query = query.accept(QueryCompilerVisitor(document))
  143. 206 return query
  144. 207
  145. 208 def accept(self, visitor):
  146. 209 raise NotImplementedError
  147. 210
  148. 211 def _combine(self, other, operation):
  149. Variables:
  150. query = <mongoengine.queryset.Q object at 0x80953e850>
  151. self = <mongoengine.queryset.Q object at 0x80953e850>
  152. document = <class 'noc.inv.models.subinterface.SubInterface'>
  153. ------------------------------------------------------------------------
  154. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 379)
  155. Function: _query
  156. 372 setattr(c, prop, copy.deepcopy(val))
  157. 373
  158. 374 return c
  159. 375
  160. 376 @property
  161. 377 def _query(self):
  162. 378 if self._mongo_query is None:
  163. 379 ==> self._mongo_query = self._query_obj.to_query(self._document)
  164. 380 if self._class_check:
  165. 381 self._mongo_query.update(self._initial_query)
  166. 382 return self._mongo_query
  167. 383
  168. 384 def ensure_index(self, key_or_list, drop_dups=False, background=False,
  169. 385 **kwargs):
  170. Variables:
  171. self = repr() failed
  172. ------------------------------------------------------------------------
  173. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 583)
  174. Function: _cursor
  175. 576 cursor_args['fields'] = self._loaded_fields.as_dict()
  176. 577 return cursor_args
  177. 578
  178. 579 @property
  179. 580 def _cursor(self):
  180. 581 if self._cursor_obj is None:
  181. 582
  182. 583 ==> self._cursor_obj = self._collection.find(self._query,
  183. 584 **self._cursor_args)
  184. 585 # Apply where clauses to cursor
  185. 586 if self._where_clause:
  186. 587 self._cursor_obj.where(self._where_clause)
  187. 588
  188. 589 # apply default ordering
  189. Variables:
  190. self = .. queryset mid-iteration ..
  191. ------------------------------------------------------------------------
  192. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 990)
  193. Function: rewind
  194. 983
  195. 984 def rewind(self):
  196. 985 """Rewind the cursor to its unevaluated state.
  197. 986
  198. 987 .. versionadded:: 0.3
  199. 988 """
  200. 989 self._iter = False
  201. 990 ==> self._cursor.rewind()
  202. 991
  203. 992 def count(self):
  204. 993 """Count the selected elements in the query.
  205. 994 """
  206. 995 if self._limit == 0:
  207. 996 return 0
  208. Variables:
  209. self = .. queryset mid-iteration ..
  210. ------------------------------------------------------------------------
  211. File: build/bdist.freebsd-8.2-STABLE-amd64/egg/mongoengine/queryset.py (Line: 1517)
  212. Function: __iter__
  213. 1510
  214. 1511 if ret is not None and 'n' in ret:
  215. 1512 return ret['n']
  216. 1513 except pymongo.errors.OperationFailure, e:
  217. 1514 raise OperationError(u'Update failed [%s]' % unicode(e))
  218. 1515
  219. 1516 def __iter__(self):
  220. 1517 ==> self.rewind()
  221. 1518 return self
  222. 1519
  223. 1520 def _get_scalar(self, doc):
  224. 1521
  225. 1522 def lookup(obj, name):
  226. 1523 chunks = name.split('__')
  227. Variables:
  228. self = .. queryset mid-iteration ..
  229. ------------------------------------------------------------------------
  230. File: /usr/local/noc/inv/apps/interface/views.py (Line: 129)
  231. Function: api_get_interfaces
  232. 122 {
  233. 123 "name": i.name,
  234. 124 "description": i.description,
  235. 125 "untagged_vlan": i.untagged_vlan,
  236. 126 "tagged_vlans": i.tagged_vlans
  237. 127 } for i in
  238. 128 SubInterface.objects.filter(managed_object=o.id,
  239. 129 ==> is_bridge=True)
  240. 130 ]
  241. 131 # L3 interfaces
  242. 132 q = Q(is_ipv4=True) | Q(is_ipv6=True)
  243. 133 l3 = [
  244. 134 {
  245. 135 "name": i.name,
  246. Variables:
  247. get_style = <function get_style at 0x809840938>
  248. j = <Interface: CAT3560: Gi 0/38>
  249. get_link = <function get_link at 0x80983dd70>
  250. i = <Interface: CAT3560: Po 1>
  251. self =
  252. <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80896a390>
  253. lag =
  254. [{'description': u'etherchanel_888_vnesnik_112_ett',
  255. 'members': [u'Gi 0/35', u'Gi 0/36', u'Gi 0/37', u'Gi 0/38'],
  256. 'name': u'Po 1'}]
  257. request =
  258. <WSGIRequest
  259. path:/inv/interface/34/,
  260. GET:<QueryDict: {u'_dc': [u'1365664265252']}>,
  261. POST:<QueryDict: {}>,
  262. COOKIES:{'csrftoken': 'lE7aU1X8dYl5XeCHA4ZNiPYnrhaUb3fY',
  263. 'sessionid': 'f1cc12b53458ad565b20b8613c761534'},
  264. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  265. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  266. 'HTTP_ACCEPT_LANGUAGE': 'uk-UA,uk,ru-RU,ru;q=0.9,en-US;q=0.9,en;q=0.9,en-gb;q=0.9,de-DE;q=0.8,de;q=0.8,es-EC;q=0.8,es;q=0.7,en-US-x-Hixie;q=0.7,ru-ru;q=0.7,en-gb;q=0.7,en-us;q=0.6,uk-ua;q=0.6,fr-FR;q=0.6,fr;q=0.6,pl-PL;q=0.5,pl;q=0.5,lv-LV;q=0.5,lv;q=0.5,se-SE;q=0.4,se;q=0.4,ja-JP;q=0.4,ja;q=0.4,de-LI;q=0.3,de-CH;q=0.3,hu-HU;q=0.3,hu;q=0.3,nl-NL;q=0.2,nl;q=0.2,ru-RU.UTF-8;q=0.2,en-AU;q=0.2,it-IT;q=0.1,it;q=0.1,br-FR;q=0.1,br;q=0.1,ro-RO;q=0.0,ro;q=0.0',
  267. 'HTTP_CONNECTION': 'close',
  268. 'HTTP_COOKIE': 'csrftoken=lE7aU1X8dYl5XeCHA4ZNiPYnrhaUb3fY; sessionid=f1cc12b53458ad565b20b8613c761534',
  269. 'HTTP_HOST': '127.0.0.1:8000',
  270. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/17.0 Firefox/17.0',
  271. 'PATH_INFO': u'/inv/interface/34/',
  272. 'QUERY_STRING': '_dc=1365664265252',
  273. 'REMOTE_ADDR': '127.0.0.1',
  274. 'REQUEST_METHOD': 'GET',
  275. 'SCRIPT_NAME': u'',
  276. 'SERVER_NAME': '127.0.0.1',
  277. 'SERVER_PORT': '8000',
  278. 'SERVER_PROTOCOL': 'HTTP/1.0',
  279. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8042349c0>,
  280. 'wsgi.input': <_io.BytesIO object at 0x8097a2050>,
  281. 'wsgi.multiprocess': True,
  282. 'wsgi.multithread': False,
  283. 'wsgi.run_once': False,
  284. 'wsgi.url_scheme': 'http',
  285. 'wsgi.version': (1, 0)}>
  286. managed_object = u'34'
  287. o = <ManagedObject: CAT3560>
  288. style_cache = {ObjectId('500a5ee4bcf4b15bb7000000'): ''}
  289. sorted_iname = <function sorted_iname at 0x8096d0578>
  290. l1 =
  291. [{'description': None,
  292. 'enabled_protocols': [u'LLDP'],
  293. 'id': '4eeb514cbcf4b106d2000026',
  294. 'ifindex': None,
  295. 'lag': '',
  296. 'link': None,
  297. 'mac': u'00:19:55:E0:C9:01',
  298. 'name': u'Gi 0/1',
  299. 'profile': '500a5ee4bcf4b15bb7000000',
  300. 'profile__label': u'default',
  301. 'row_class': ''},
  302. {'description': None,
  303. 'enabled_protocols': [u'LLDP'],
  304. 'id': '4eeb514cbcf4b106d2000038',
  305. 'ifindex': None,
  306. 'lag': '',
  307. 'link': None,
  308. 'mac': u'00:19:55:E0:C9:0A',
  309. 'name': u'Gi 0/10',
  310. 'profile': '500a5ee4bcf4b15bb7000000',
  311. 'profile__label': u'default',
  312. 'row_class': ''},
  313. {'description': None,
  314. 'enabled_protocols': [u'LLDP'],
  315. 'id': '4eeb514cbcf4b106d200003a',
  316. 'ifindex': None,
  317. 'lag': '',
  318. 'link': None,
  319. 'mac': u'00:19:55:E0:C9:0B',
  320. 'name': u'Gi 0/11',
  321. 'profile': '500a5ee4bcf4b15bb7000000',
  322. 'profile__label': u'default',
  323. 'row_class': ''},
  324. {'description': u'VPNS_INET',
  325. 'enabled_protocols': [u'LLDP'],
  326. 'id': '4eeb514cbcf4b106d200003c',
  327. 'ifindex': None,
  328. 'lag': '',
  329. 'link': None,
  330. 'mac': u'00:19:55:E0:C9:0C',
  331. 'name': u'Gi 0/12',
  332. 'profile': '500a5ee4bcf4b15bb7000000',
  333. 'profile__label': u'default',
  334. 'row_class': ''},
  335. {'description': None,
  336. 'enabled_protocols': [u'LLDP'],
  337. 'id': '4eeb514cbcf4b106d200003e',
  338. 'ifindex': None,
  339. 'lag': '',
  340. 'link': None,
  341. 'mac': u'00:19:55:E0:C9:0D',
  342. 'name': u'Gi 0/13',
  343. 'profile': '500a5ee4bcf4b15bb7000000',
  344. 'profile__label': u'default',
  345. 'row_class': ''},
  346. {'description': None,
  347. 'enabled_protocols': [u'LLDP'],
  348. 'id': '4eeb514cbcf4b106d2000040',
  349. 'ifindex': None,
  350. 'lag': '',
  351. 'link': None,
  352. 'mac': u'00:19:55:E0:C9:0E',
  353. 'name': u'Gi 0/14',
  354. 'profile': '500a5ee4bcf4b15bb7000000',
  355. 'profile__label': u'default',
  356. 'row_class': ''},
  357. {'description': None,
  358. 'enabled_protocols': [u'LLDP'],
  359. 'id': '4eeb514cbcf4b106d2000042',
  360. 'ifindex': None,
  361. 'lag': '',
  362. 'link': None,
  363. 'mac': u'00:19:55:E0:C9:0F',
  364. 'name': u'Gi 0/15',
  365. 'profile': '500a5ee4bcf4b15bb7000000',
  366. 'profile__label': u'default',
  367. 'row_class': ''},
  368. {'description': None,
  369. 'enabled_protocols': [u'LLDP'],
  370. 'id': '4eeb514cbcf4b106d2000044',
  371. 'ifindex': None,
  372. 'lag': '',
  373. 'link': None,
  374. 'mac': u'00:19:55:E0:C9:10',
  375. 'name': u'Gi 0/16',
  376. 'profile': '500a5ee4bcf4b15bb7000000',
  377. 'profile__label': u'default',
  378. 'row_class': ''},
  379. {'description': u'ubr7114-1',
  380. 'enabled_protocols': [u'LLDP'],
  381. 'id': '4eeb514cbcf4b106d2000046',
  382. 'ifindex': None,
  383. 'lag': '',
  384. 'link': {'id': '5072b8f2bcf4b14513000002', 'label': u'ubr7114-1:Fa 0/0'},
  385. 'mac': u'00:19:55:E0:C9:11',
  386. 'name': u'Gi 0/17',
  387. 'profile': '500a5ee4bcf4b15bb7000000',
  388. 'profile__label': u'default',
  389. 'row_class': ''},
  390. {'description': None,
  391. 'enabled_protocols': [u'LLDP'],
  392. 'id': '4eeb514cbcf4b106d2000048',
  393. 'ifindex': None,
  394. 'lag': '',
  395. 'link': None,
  396. 'mac': u'00:19:55:E0:C9:12',
  397. 'name': u'Gi 0/18',
  398. 'profile': '500a5ee4bcf4b15bb7000000',
  399. 'profile__label': u'default',
  400. 'row_class': ''},
  401. {'description': u'ubr7114-3',
  402. 'enabled_protocols': [u'LLDP'],
  403. 'id': '4eeb514cbcf4b106d200004a',
  404. 'ifindex': None,
  405. 'lag': '',
  406. 'link': {'id': '5072b8febcf4b14513000003', 'label': u'ubr7114-3:Fa 0/0'},
  407. 'mac': u'00:19:55:E0:C9:13',
  408. 'name': u'Gi 0/19',
  409. 'profile': '500a5ee4bcf4b15bb7000000',
  410. 'profile__label': u'default',
  411. 'row_class': ''},
  412. {'description': None,
  413. 'enabled_protocols': [u'LLDP'],
  414. 'id': '4eeb514cbcf4b106d2000028',
  415. 'ifindex': None,
  416. 'lag': '',
  417. 'link': None,
  418. 'mac': u'00:19:55:E0:C9:02',
  419. 'name': u'Gi 0/2',
  420. 'profile': '500a5ee4bcf4b15bb7000000',
  421. 'profile__label': u'default',
  422. 'row_class': ''},
  423. {'description': u'K.Marksa_11b (GT)',
  424. 'enabled_protocols': [u'LLDP'],
  425. 'id': '4eeb514cbcf4b106d200004c',
  426. 'ifindex': None,
  427. 'lag': '',
  428. 'link': None,
  429. 'mac': u'00:19:55:E0:C9:14',
  430. 'name': u'Gi 0/20',
  431. 'profile': '500a5ee4bcf4b15bb7000000',
  432. 'profile__label': u'default',
  433. 'row_class': ''},
  434. {'description': None,
  435. 'enabled_protocols': [u'LLDP'],
  436. 'id': '4eeb514cbcf4b106d200004e',
  437. 'ifindex': None,
  438. 'lag': '',
  439. 'link': None,
  440. 'mac': u'00:19:55:E0:C9:15',
  441. 'name': u'Gi 0/21',
  442. 'profile': '500a5ee4bcf4b15bb7000000',
  443. 'profile__label': u'default',
  444. 'row_class': ''},
  445. {'description': None,
  446. 'enabled_protocols': [u'LLDP'],
  447. 'id': '4eeb514cbcf4b106d2000050',
  448. 'ifindex': None,
  449. 'lag': '',
  450. 'link': None,
  451. 'mac': u'00:19:55:E0:C9:16',
  452. 'name': u'Gi 0/22',
  453. 'profile': '500a5ee4bcf4b15bb7000000',
  454. 'profile__label': u'default',
  455. 'row_class': ''},
  456. {'description': None,
  457. 'enabled_protocols': [u'LLDP'],
  458. 'id': '4eeb514cbcf4b106d2000052',
  459. 'ifindex': None,
  460. 'lag': '',
  461. 'link': None,
  462. 'mac': u'00:19:55:E0:C9:17',
  463. 'name': u'Gi 0/23',
  464. 'profile': '500a5ee4bcf4b15bb7000000',
  465. 'profile__label': u'default',
  466. 'row_class': ''},
  467. {'description': None,
  468. 'enabled_protocols': [u'LLDP'],
  469. 'id': '4eeb514cbcf4b106d2000054',
  470. 'ifindex': None,
  471. 'lag': '',
  472. 'link': None,
  473. 'mac': u'00:19:55:E0:C9:18',
  474. 'name': u'Gi 0/24',
  475. 'profile': '500a5ee4bcf4b15bb7000000',
  476. 'profile__label': u'default',
  477. 'row_class': ''},
  478. {'description': u'Souzinform',
  479. 'enabled_protocols': [u'LLDP'],
  480. 'id': '4eeb514cbcf4b106d2000056',
  481. 'ifindex': None,
  482. 'lag': '',
  483. 'link': {'id': '5072bc53bcf4b1484a000000',
  484. 'label': u'\u041d\u044c\u044e\u0442\u043e\u043d\u0430 42:1'},
  485. 'mac': u'00:19:55:E0:C9:19',
  486. 'name': u'Gi 0/25',
  487. 'profile': '500a5ee4bcf4b15bb7000000',
  488. 'profile__label': u'default',
  489. 'row_class': ''},
  490. {'description': u'Privet Bank',
  491. 'enabled_protocols': [u'LLDP'],
  492. 'id': '4eeb514cbcf4b106d2000058',
  493. 'ifindex': None,
  494. 'lag': '',
  495. 'link': None,
  496. 'mac': u'00:19:55:E0:C9:1A',
  497. 'name': u'Gi 0/26',
  498. 'profile': '500a5ee4bcf4b15bb7000000',
  499. 'profile__label': u'default',
  500. 'row_class': ''},
  501. {'description': None,
  502. 'enabled_protocols': [u'LLDP'],
  503. 'id': '4eeb514cbcf4b106d200005a',
  504. 'ifindex': None,
  505. 'lag': '',
  506. 'link': None,
  507. 'mac': u'00:19:55:E0:C9:1B',
  508. 'name': u'Gi 0/27',
  509. 'profile': '500a5ee4bcf4b15bb7000000',
  510. 'profile__label': u'default',
  511. 'row_class': ''},
  512. {'description': None,
  513. 'enabled_protocols': [u'LLDP'],
  514. 'id': '4eeb514cbcf4b106d200005c',
  515. 'ifindex': None,
  516. 'lag': '',
  517. 'link': None,
  518. 'mac': u'00:19:55:E0:C9:1C',
  519. 'name': u'Gi 0/28',
  520. 'profile': '500a5ee4bcf4b15bb7000000',
  521. 'profile__label': u'default',
  522. 'row_class': ''},
  523. {'description': None,
  524. 'enabled_protocols': [u'LLDP'],
  525. 'id': '4eeb514cbcf4b106d200005e',
  526. 'ifindex': None,
  527. 'lag': '',
  528. 'link': None,
  529. 'mac': u'00:19:55:E0:C9:1D',
  530. 'name': u'Gi 0/29',
  531. 'profile': '500a5ee4bcf4b15bb7000000',
  532. 'profile__label': u'default',
  533. 'row_class': ''},
  534. {'description': None,
  535. 'enabled_protocols': [u'LLDP'],
  536. 'id': '4eeb514cbcf4b106d200002a',
  537. 'ifindex': None,
  538. 'lag': '',
  539. 'link': None,
  540. 'mac': u'00:19:55:E0:C9:03',
  541. 'name': u'Gi 0/3',
  542. 'profile': '500a5ee4bcf4b15bb7000000',
  543. 'profile__label': u'default',
  544. 'row_class': ''},
  545. {'description': None,
  546. 'enabled_protocols': [u'LLDP'],
  547. 'id': '4eeb514cbcf4b106d2000060',
  548. 'ifindex': None,
  549. 'lag': '',
  550. 'link': None,
  551. 'mac': u'00:19:55:E0:C9:1E',
  552. 'name': u'Gi 0/30',
  553. 'profile': '500a5ee4bcf4b15bb7000000',
  554. 'profile__label': u'default',
  555. 'row_class': ''},
  556. {'description': None,
  557. 'enabled_protocols': [u'LLDP'],
  558. 'id': '4eeb514cbcf4b106d2000062',
  559. 'ifindex': None,
  560. 'lag': '',
  561. 'link': None,
  562. 'mac': u'00:19:55:E0:C9:1F',
  563. 'name': u'Gi 0/31',
  564. 'profile': '500a5ee4bcf4b15bb7000000',
  565. 'profile__label': u'default',
  566. 'row_class': ''},
  567. {'description': None,
  568. 'enabled_protocols': [u'LLDP'],
  569. 'id': '4eeb514cbcf4b106d2000064',
  570. 'ifindex': None,
  571. 'lag': '',
  572. 'link': None,
  573. 'mac': u'00:19:55:E0:C9:20',
  574. 'name': u'Gi 0/32',
  575. 'profile': '500a5ee4bcf4b15bb7000000',
  576. 'profile__label': u'default',
  577. 'row_class': ''},
  578. {'description': None,
  579. 'enabled_protocols': [u'LLDP'],
  580. 'id': '4eeb514cbcf4b106d2000066',
  581. 'ifindex': None,
  582. 'lag': '',
  583. 'link': None,
  584. 'mac': u'00:19:55:E0:C9:21',
  585. 'name': u'Gi 0/33',
  586. 'profile': '500a5ee4bcf4b15bb7000000',
  587. 'profile__label': u'default',
  588. 'row_class': ''},
  589. {'description': None,
  590. 'enabled_protocols': [u'LLDP'],
  591. 'id': '4eeb514cbcf4b106d2000068',
  592. 'ifindex': None,
  593. 'lag': '',
  594. 'link': None,
  595. 'mac': u'00:19:55:E0:C9:22',
  596. 'name': u'Gi 0/34',
  597. 'profile': '500a5ee4bcf4b15bb7000000',
  598. 'profile__label': u'default',
  599. 'row_class': ''},
  600. {'description': None,
  601. 'enabled_protocols': [u'LLDP', u'LACP'],
  602. 'id': '4eeb514cbcf4b106d200006a',
  603. 'ifindex': None,
  604. 'lag': u'Po 1',
  605. 'link': None,
  606. 'mac': u'00:19:55:E0:C9:23',
  607. 'name': u'Gi 0/35',
  608. 'profile': '500a5ee4bcf4b15bb7000000',
  609. 'profile__label': u'default',
  610. 'row_class': ''},
  611. {'description': None,
  612. 'enabled_protocols': [u'LLDP', u'LACP'],
  613. 'id': '4eeb514cbcf4b106d200006c',
  614. 'ifindex': None,
  615. 'lag': u'Po 1',
  616. 'link': None,
  617. 'mac': u'00:19:55:E0:C9:24',
  618. 'name': u'Gi 0/36',
  619. 'profile': '500a5ee4bcf4b15bb7000000',
  620. 'profile__label': u'default',
  621. 'row_class': ''},
  622. {'description': None,
  623. 'enabled_protocols': [u'LLDP', u'LACP'],
  624. 'id': '4eeb514cbcf4b106d200006e',
  625. 'ifindex': None,
  626. 'lag': u'Po 1',
  627. 'link': None,
  628. 'mac': u'00:19:55:E0:C9:25',
  629. 'name': u'Gi 0/37',
  630. 'profile': '500a5ee4bcf4b15bb7000000',
  631. 'profile__label': u'default',
  632. 'row_class': ''},
  633. {'description': None,
  634. 'enabled_protocols': [u'LLDP', u'LACP'],
  635. 'id': '4eeb514cbcf4b106d2000070',
  636. 'ifindex': None,
  637. 'lag': u'Po 1',
  638. 'link': None,
  639. 'mac': u'00:19:55:E0:C9:26',
  640. 'name': u'Gi 0/38',
  641. 'profile': '500a5ee4bcf4b15bb7000000',
  642. 'profile__label': u'default',
  643. 'row_class': ''},
  644. {'description': u'Gagarina',
  645. 'enabled_protocols': [u'LLDP'],
  646. 'id': '4eeb514cbcf4b106d2000072',
  647. 'ifindex': None,
  648. 'lag': '',
  649. 'link': {'id': '5072b8b8bcf4b14513000001',
  650. 'label': u'\u0413\u0430\u0433\u0430\u0440\u0438\u043d\u0430:24'},
  651. 'mac': u'00:19:55:E0:C9:27',
  652. 'name': u'Gi 0/39',
  653. 'profile': '500a5ee4bcf4b15bb7000000',
  654. 'profile__label': u'default',
  655. 'row_class': ''},
  656. {'description': u'Loopback for TRK switches',
  657. 'enabled_protocols': [u'LLDP'],
  658. 'id': '4eeb514cbcf4b106d200002c',
  659. 'ifindex': None,
  660. 'lag': '',
  661. 'link': None,
  662. 'mac': u'00:19:55:E0:C9:04',
  663. 'name': u'Gi 0/4',
  664. 'profile': '500a5ee4bcf4b15bb7000000',
  665. 'profile__label': u'default',
  666. 'row_class': ''},
  667. {'description': None,
  668. 'enabled_protocols': [u'LLDP'],
  669. 'id': '4eeb514cbcf4b106d2000074',
  670. 'ifindex': None,
  671. 'lag': '',
  672. 'link': None,
  673. 'mac': u'00:19:55:E0:C9:28',
  674. 'name': u'Gi 0/40',
  675. 'profile': '500a5ee4bcf4b15bb7000000',
  676. 'profile__label': u'default',
  677. 'row_class': ''},
  678. {'description': u'niko->kirova12',
  679. 'enabled_protocols': [u'LLDP'],
  680. 'id': '4eeb514cbcf4b106d2000076',
  681. 'ifindex': None,
  682. 'lag': '',
  683. 'link': {'id': '5076b2c6bcf4b127a400000b',
  684. 'label': u'\u041a\u0438\u0440\u043e\u0432\u0430 12-1:1'},
  685. 'mac': u'00:19:55:E0:C9:29',
  686. 'name': u'Gi 0/41',
  687. 'profile': '500a5ee4bcf4b15bb7000000',
  688. 'profile__label': u'default',
  689. 'row_class': ''},
  690. {'description': None,
  691. 'enabled_protocols': [u'LLDP'],
  692. 'id': '4eeb514cbcf4b106d2000078',
  693. 'ifindex': None,
  694. 'lag': '',
  695. 'link': None,
  696. 'mac': u'00:19:55:E0:C9:2A',
  697. 'name': u'Gi 0/42',
  698. 'profile': '500a5ee4bcf4b15bb7000000',
  699. 'profile__label': u'default',
  700. 'row_class': ''},
  701. {'description': None,
  702. 'enabled_protocols': [u'LLDP'],
  703. 'id': '4eeb514cbcf4b106d200007a',
  704. 'ifindex': None,
  705. 'lag': '',
  706. 'link': None,
  707. 'mac': u'00:19:55:E0:C9:2B',
  708. 'name': u'Gi 0/43',
  709. 'profile': '500a5ee4bcf4b15bb7000000',
  710. 'profile__label': u'default',
  711. 'row_class': ''},
  712. {'description': None,
  713. 'enabled_protocols': [u'LLDP'],
  714. 'id': '4eeb514cbcf4b106d200007c',
  715. 'ifindex': None,
  716. 'lag': '',
  717. 'link': None,
  718. 'mac': u'00:19:55:E0:C9:2C',
  719. 'name': u'Gi 0/44',
  720. 'profile': '500a5ee4bcf4b15bb7000000',
  721. 'profile__label': u'default',
  722. 'row_class': ''},
  723. {'description': u'fenomen->lisovogo',
  724. 'enabled_protocols': [u'LLDP'],
  725. 'id': '4eeb514cbcf4b106d200007e',
  726. 'ifindex': None,
  727. 'lag': '',
  728. 'link': {'id': '5076b28bbcf4b127a4000008',
  729. 'label': u'\u041b\u0438\u0441\u043e\u0432\u043e\u0433\u043e 41:1'},
  730. 'mac': u'00:19:55:E0:C9:2D',
  731. 'name': u'Gi 0/45',
  732. 'profile': '500a5ee4bcf4b15bb7000000',
  733. 'profile__label': u'default',
  734. 'row_class': ''},
  735. {'description': None,
  736. 'enabled_protocols': [u'LLDP'],
  737. 'id': '4eeb514cbcf4b106d2000080',
  738. 'ifindex': None,
  739. 'lag': '',
  740. 'link': None,
  741. 'mac': u'00:19:55:E0:C9:2E',
  742. 'name': u'Gi 0/46',
  743. 'profile': '500a5ee4bcf4b15bb7000000',
  744. 'profile__label': u'default',
  745. 'row_class': ''},
  746. {'description': None,
  747. 'enabled_protocols': [u'LLDP'],
  748. 'id': '4eeb514cbcf4b106d2000082',
  749. 'ifindex': None,
  750. 'lag': '',
  751. 'link': None,
  752. 'mac': u'00:19:55:E0:C9:2F',
  753. 'name': u'Gi 0/47',
  754. 'profile': '500a5ee4bcf4b15bb7000000',
  755. 'profile__label': u'default',
  756. 'row_class': ''},
  757. {'description': None,
  758. 'enabled_protocols': [u'LLDP'],
  759. 'id': '4eeb514cbcf4b106d2000084',
  760. 'ifindex': None,
  761. 'lag': '',
  762. 'link': None,
  763. 'mac': u'00:19:55:E0:C9:30',
  764. 'name': u'Gi 0/48',
  765. 'profile': '500a5ee4bcf4b15bb7000000',
  766. 'profile__label': u'default',
  767. 'row_class': ''},
  768. {'description': u'Bluhera_3',
  769. 'enabled_protocols': [u'LLDP'],
  770. 'id': '4eeb514cbcf4b106d2000086',
  771. 'ifindex': None,
  772. 'lag': '',
  773. 'link': {'id': '5076b2a1bcf4b127a4000009',
  774. 'label': u'\u0411\u043b\u044e\u0445\u0435\u0440\u0430:1'},
  775. 'mac': u'00:19:55:E0:C9:31',
  776. 'name': u'Gi 0/49',
  777. 'profile': '500a5ee4bcf4b15bb7000000',
  778. 'profile__label': u'default',
  779. 'row_class': ''},
  780. {'description': None,
  781. 'enabled_protocols': [u'LLDP'],
  782. 'id': '4eeb514cbcf4b106d200002e',
  783. 'ifindex': None,
  784. 'lag': '',
  785. 'link': None,
  786. 'mac': u'00:19:55:E0:C9:05',
  787. 'name': u'Gi 0/5',
  788. 'profile': '500a5ee4bcf4b15bb7000000',
  789. 'profile__label': u'default',
  790. 'row_class': ''},
  791. {'description': u'vishka_wnet_gt_reklama',
  792. 'enabled_protocols': [u'LLDP'],
  793. 'id': '4eeb514cbcf4b106d2000088',
  794. 'ifindex': None,
  795. 'lag': '',
  796. 'link': {'id': '5076b4b0bcf4b127a4000010',
  797. 'label': u'\u0422\u0435\u043b\u0435\u0432\u044b\u0448\u043a\u0430:Gi 0/8'},
  798. 'mac': u'00:19:55:E0:C9:32',
  799. 'name': u'Gi 0/50',
  800. 'profile': '500a5ee4bcf4b15bb7000000',
  801. 'profile__label': u'default',
  802. 'row_class': ''},
  803. {'description': u'Makulan',
  804. 'enabled_protocols': [u'LLDP'],
  805. 'id': '4eeb514cbcf4b106d200008a',
  806. 'ifindex': None,
  807. 'lag': '',
  808. 'link': {'id': '5076b2b5bcf4b127a400000a',
  809. 'label': u'\u041c\u0430\u043a\u0443\u043b\u0430\u043d:1'},
  810. 'mac': u'00:19:55:E0:C9:33',
  811. 'name': u'Gi 0/51',
  812. 'profile': '500a5ee4bcf4b15bb7000000',
  813. 'profile__label': u'default',
  814. 'row_class': ''},
  815. {'description': u'Muhinoy_3',
  816. 'enabled_protocols': [u'LLDP'],
  817. 'id': '4eeb514cbcf4b106d200008c',
  818. 'ifindex': None,
  819. 'lag': '',
  820. 'link': None,
  821. 'mac': u'00:19:55:E0:C9:34',
  822. 'name': u'Gi 0/52',
  823. 'profile': '500a5ee4bcf4b15bb7000000',
  824. 'profile__label': u'default',
  825. 'row_class': ''},
  826. {'description': u'Office DES-3010G',
  827. 'enabled_protocols': [u'LLDP'],
  828. 'id': '4eeb514cbcf4b106d2000030',
  829. 'ifindex': None,
  830. 'lag': '',
  831. 'link': None,
  832. 'mac': u'00:19:55:E0:C9:06',
  833. 'name': u'Gi 0/6',
  834. 'profile': '500a5ee4bcf4b15bb7000000',
  835. 'profile__label': u'default',
  836. 'row_class': ''},
  837. {'description': None,
  838. 'enabled_protocols': [u'LLDP'],
  839. 'id': '4eeb514cbcf4b106d2000032',
  840. 'ifindex': None,
  841. 'lag': '',
  842. 'link': None,
  843. 'mac': u'00:19:55:E0:C9:07',
  844. 'name': u'Gi 0/7',
  845. 'profile': '500a5ee4bcf4b15bb7000000',
  846. 'profile__label': u'default',
  847. 'row_class': ''},
  848. {'description': None,
  849. 'enabled_protocols': [u'LLDP'],
  850. 'id': '4eeb514cbcf4b106d2000034',
  851. 'ifindex': None,
  852. 'lag': '',
  853. 'link': None,
  854. 'mac': u'00:19:55:E0:C9:08',
  855. 'name': u'Gi 0/8',
  856. 'profile': '500a5ee4bcf4b15bb7000000',
  857. 'profile__label': u'default',
  858. 'row_class': ''},
  859. {'description': None,
  860. 'enabled_protocols': [u'LLDP'],
  861. 'id': '4eeb514cbcf4b106d2000036',
  862. 'ifindex': None,
  863. 'lag': '',
  864. 'link': None,
  865. 'mac': u'00:19:55:E0:C9:09',
  866. 'name': u'Gi 0/9',
  867. 'profile': '500a5ee4bcf4b15bb7000000',
  868. 'profile__label': u'default',
  869. 'row_class': ''}]
  870. ------------------------------------------------------------------------
  871. File: /usr/local/noc/lib/app/site.py (Line: 232)
  872. Function: inner
  873. 225 for k, v in request.POST.lists())
  874. 226 elif request.method == "GET":
  875. 227 a = dict((k, v[0] if len(v) == 1 else v)
  876. 228 for k, v in request.GET.lists())
  877. 229 logging.debug("API %s %s %s" % (request.method,
  878. 230 request.path, a))
  879. 231 # Call handler
  880. 232 ==> r = v(request, *args, **kwargs)
  881. 233 # Dump SQL statements
  882. 234 if self.log_sql_statements:
  883. 235 from django.db import connections
  884. 236 tsc = 0
  885. 237 sc = defaultdict(int)
  886. 238 for conn in connections.all():
  887. Variables:
  888. args = ()
  889. view_map =
  890. {'GET': <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80896a390>>}
  891. Form = <class 'django.forms.forms.Form'>
  892. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  893. self = <noc.lib.app.site.Site object at 0x806624590>
  894. v =
  895. <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80896a390>>
  896. request =
  897. <WSGIRequest
  898. path:/inv/interface/34/,
  899. GET:<QueryDict: {u'_dc': [u'1365664265252']}>,
  900. POST:<QueryDict: {}>,
  901. COOKIES:{'csrftoken': 'lE7aU1X8dYl5XeCHA4ZNiPYnrhaUb3fY',
  902. 'sessionid': 'f1cc12b53458ad565b20b8613c761534'},
  903. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  904. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  905. 'HTTP_ACCEPT_LANGUAGE': 'uk-UA,uk,ru-RU,ru;q=0.9,en-US;q=0.9,en;q=0.9,en-gb;q=0.9,de-DE;q=0.8,de;q=0.8,es-EC;q=0.8,es;q=0.7,en-US-x-Hixie;q=0.7,ru-ru;q=0.7,en-gb;q=0.7,en-us;q=0.6,uk-ua;q=0.6,fr-FR;q=0.6,fr;q=0.6,pl-PL;q=0.5,pl;q=0.5,lv-LV;q=0.5,lv;q=0.5,se-SE;q=0.4,se;q=0.4,ja-JP;q=0.4,ja;q=0.4,de-LI;q=0.3,de-CH;q=0.3,hu-HU;q=0.3,hu;q=0.3,nl-NL;q=0.2,nl;q=0.2,ru-RU.UTF-8;q=0.2,en-AU;q=0.2,it-IT;q=0.1,it;q=0.1,br-FR;q=0.1,br;q=0.1,ro-RO;q=0.0,ro;q=0.0',
  906. 'HTTP_CONNECTION': 'close',
  907. 'HTTP_COOKIE': 'csrftoken=lE7aU1X8dYl5XeCHA4ZNiPYnrhaUb3fY; sessionid=f1cc12b53458ad565b20b8613c761534',
  908. 'HTTP_HOST': '127.0.0.1:8000',
  909. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/17.0 Firefox/17.0',
  910. 'PATH_INFO': u'/inv/interface/34/',
  911. 'QUERY_STRING': '_dc=1365664265252',
  912. 'REMOTE_ADDR': '127.0.0.1',
  913. 'REQUEST_METHOD': 'GET',
  914. 'SCRIPT_NAME': u'',
  915. 'SERVER_NAME': '127.0.0.1',
  916. 'SERVER_PORT': '8000',
  917. 'SERVER_PROTOCOL': 'HTTP/1.0',
  918. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8042349c0>,
  919. 'wsgi.input': <_io.BytesIO object at 0x8097a2050>,
  920. 'wsgi.multiprocess': True,
  921. 'wsgi.multithread': False,
  922. 'wsgi.run_once': False,
  923. 'wsgi.url_scheme': 'http',
  924. 'wsgi.version': (1, 0)}>
  925. to_log_api_call = False
  926. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  927. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  928. kwargs = {'managed_object': u'34'}
  929. app =
  930. <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80896a390>
  931. ------------------------------------------------------------------------
  932. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment