Advertisement
Guest User

Untitled

a guest
Apr 1st, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.66 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2014-04-01 15:09:53.191610)
  2. Working directory: /opt/noc
  3. <type 'exceptions.TypeError'>
  4. 'NoneType' object is not iterable
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/sa/apps/network_info/views.py (Line: 40)
  8. Function: api_main
  9. 33 subs = SubInterface.objects.filter(ipv4_addresses__contains=a.address+'/')
  10. 34 for s in subs:
  11. 35 if s.managed_object:
  12. 36 mo = s.managed_object
  13. 37 ni += "L3 device: "+mo.name+"\n"
  14. 38 ni += "L3 interface: "+s.name+"\n"
  15. 39 arps = mo.scripts.get_arp()
  16. 40 ==> for arp in arps:
  17. 41 if s.name == arp['interface']: ni += "ARP entry: "+arp['ip']+" "+arp['mac']+"\n"
  18. 42 needbreak = True
  19. 43 break
  20. 44 if needbreak: break
  21. 45 return {
  22. 46 "network_info": ni,
  23. Variables:
  24. a = <Address: default(4): 212.233.127.49>
  25. ni = u'L3 device: msk-sbl-cr1\nL3 interface: Vl 412\n'
  26. prf = <Prefix: default(4): 212.233.127.48/29>
  27. subs = .. queryset mid-iteration ..
  28. mo = <ManagedObject: msk-sbl-cr1>
  29. req =
  30. <QueryDict: {u'_dc': [u'1396265717036'], u'network': [u'212.233.127.48/29'], u'__format': [u'ext']}>
  31. request =
  32. <WSGIRequest
  33. path:/sa/network_info/,
  34. GET:<QueryDict: {u'_dc': [u'1396265717036'], u'network': [u'212.233.127.48/29'], u'__format': [u'ext']}>,
  35. POST:<QueryDict: {}>,
  36. COOKIES:{'__utma': '134894689.1825718386.1333963432.1380012789.1380120727.12',
  37. 'csrftoken': 'Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
  38. 'sessionid': '5560f0fe8b16177a94414c251a81f341'},
  39. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  40. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  41. 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
  42. 'HTTP_CONNECTION': 'close',
  43. 'HTTP_COOKIE': '__utma=134894689.1825718386.1333963432.1380012789.1380120727.12; sessionid=5560f0fe8b16177a94414c251a81f341; csrftoken=Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
  44. 'HTTP_HOST': '127.0.0.1:8000',
  45. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36',
  46. 'PATH_INFO': u'/sa/network_info/',
  47. 'QUERY_STRING': '_dc=1396265717036&__format=ext&network=212.233.127.48%2F29',
  48. 'REMOTE_ADDR': '127.0.0.1',
  49. 'REQUEST_METHOD': 'GET',
  50. 'SCRIPT_NAME': u'',
  51. 'SERVER_NAME': '127.0.0.1',
  52. 'SERVER_PORT': '8000',
  53. 'SERVER_PROTOCOL': 'HTTP/1.0',
  54. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1adcf60>,
  55. 'wsgi.input': <_io.BytesIO object at 0x4ec5d70>,
  56. 'wsgi.multiprocess': True,
  57. 'wsgi.multithread': False,
  58. 'wsgi.run_once': False,
  59. 'wsgi.url_scheme': 'http',
  60. 'wsgi.version': (1, 0)}>
  61. s = <SubInterface: msk-sbl-cr1 Vl 412>
  62. addrs =
  63. [<Address: default(4): 212.233.127.49>, <Address: default(4): 212.233.127.50>]
  64. needbreak = False
  65. self =
  66. <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>
  67. arps = None
  68. network = u'212.233.127.48/29'
  69. ------------------------------------------------------------------------
  70. File: /opt/noc/lib/app/site.py (Line: 232)
  71. Function: inner
  72. 225 for k, v in request.POST.lists())
  73. 226 elif request.method == "GET":
  74. 227 a = dict((k, v[0] if len(v) == 1 else v)
  75. 228 for k, v in request.GET.lists())
  76. 229 logging.debug("API %s %s %s" % (request.method,
  77. 230 request.path, a))
  78. 231 # Call handler
  79. 232 ==> r = v(request, *args, **kwargs)
  80. 233 # Dump SQL statements
  81. 234 if self.log_sql_statements:
  82. 235 from django.db import connections
  83. 236 tsc = 0
  84. 237 sc = defaultdict(int)
  85. 238 for conn in connections.all():
  86. Variables:
  87. args = ()
  88. view_map =
  89. {'GET': <bound method network_infoAppplication.api_main of <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>>}
  90. Form = <class 'django.forms.forms.Form'>
  91. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  92. self = <noc.lib.app.site.Site object at 0x24c1750>
  93. v =
  94. <bound method network_infoAppplication.api_main of <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>>
  95. request =
  96. <WSGIRequest
  97. path:/sa/network_info/,
  98. GET:<QueryDict: {u'_dc': [u'1396265717036'], u'network': [u'212.233.127.48/29'], u'__format': [u'ext']}>,
  99. POST:<QueryDict: {}>,
  100. COOKIES:{'__utma': '134894689.1825718386.1333963432.1380012789.1380120727.12',
  101. 'csrftoken': 'Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
  102. 'sessionid': '5560f0fe8b16177a94414c251a81f341'},
  103. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  104. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  105. 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
  106. 'HTTP_CONNECTION': 'close',
  107. 'HTTP_COOKIE': '__utma=134894689.1825718386.1333963432.1380012789.1380120727.12; sessionid=5560f0fe8b16177a94414c251a81f341; csrftoken=Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
  108. 'HTTP_HOST': '127.0.0.1:8000',
  109. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36',
  110. 'PATH_INFO': u'/sa/network_info/',
  111. 'QUERY_STRING': '_dc=1396265717036&__format=ext&network=212.233.127.48%2F29',
  112. 'REMOTE_ADDR': '127.0.0.1',
  113. 'REQUEST_METHOD': 'GET',
  114. 'SCRIPT_NAME': u'',
  115. 'SERVER_NAME': '127.0.0.1',
  116. 'SERVER_PORT': '8000',
  117. 'SERVER_PROTOCOL': 'HTTP/1.0',
  118. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1adcf60>,
  119. 'wsgi.input': <_io.BytesIO object at 0x4ec5d70>,
  120. 'wsgi.multiprocess': True,
  121. 'wsgi.multithread': False,
  122. 'wsgi.run_once': False,
  123. 'wsgi.url_scheme': 'http',
  124. 'wsgi.version': (1, 0)}>
  125. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  126. to_log_api_call = False
  127. kwargs = {}
  128. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  129. app =
  130. <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>
  131. ------------------------------------------------------------------------
  132. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement