Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2014-04-01 15:09:53.191610)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- 'NoneType' object is not iterable
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/sa/apps/network_info/views.py (Line: 40)
- Function: api_main
- 33 subs = SubInterface.objects.filter(ipv4_addresses__contains=a.address+'/')
- 34 for s in subs:
- 35 if s.managed_object:
- 36 mo = s.managed_object
- 37 ni += "L3 device: "+mo.name+"\n"
- 38 ni += "L3 interface: "+s.name+"\n"
- 39 arps = mo.scripts.get_arp()
- 40 ==> for arp in arps:
- 41 if s.name == arp['interface']: ni += "ARP entry: "+arp['ip']+" "+arp['mac']+"\n"
- 42 needbreak = True
- 43 break
- 44 if needbreak: break
- 45 return {
- 46 "network_info": ni,
- Variables:
- a = <Address: default(4): 212.233.127.49>
- ni = u'L3 device: msk-sbl-cr1\nL3 interface: Vl 412\n'
- prf = <Prefix: default(4): 212.233.127.48/29>
- subs = .. queryset mid-iteration ..
- mo = <ManagedObject: msk-sbl-cr1>
- req =
- <QueryDict: {u'_dc': [u'1396265717036'], u'network': [u'212.233.127.48/29'], u'__format': [u'ext']}>
- request =
- <WSGIRequest
- path:/sa/network_info/,
- GET:<QueryDict: {u'_dc': [u'1396265717036'], u'network': [u'212.233.127.48/29'], u'__format': [u'ext']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'__utma': '134894689.1825718386.1333963432.1380012789.1380120727.12',
- 'csrftoken': 'Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
- 'sessionid': '5560f0fe8b16177a94414c251a81f341'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': '__utma=134894689.1825718386.1333963432.1380012789.1380120727.12; sessionid=5560f0fe8b16177a94414c251a81f341; csrftoken=Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36',
- 'PATH_INFO': u'/sa/network_info/',
- 'QUERY_STRING': '_dc=1396265717036&__format=ext&network=212.233.127.48%2F29',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1adcf60>,
- 'wsgi.input': <_io.BytesIO object at 0x4ec5d70>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- s = <SubInterface: msk-sbl-cr1 Vl 412>
- addrs =
- [<Address: default(4): 212.233.127.49>, <Address: default(4): 212.233.127.50>]
- needbreak = False
- self =
- <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>
- arps = None
- network = u'212.233.127.48/29'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 232)
- Function: inner
- 225 for k, v in request.POST.lists())
- 226 elif request.method == "GET":
- 227 a = dict((k, v[0] if len(v) == 1 else v)
- 228 for k, v in request.GET.lists())
- 229 logging.debug("API %s %s %s" % (request.method,
- 230 request.path, a))
- 231 # Call handler
- 232 ==> r = v(request, *args, **kwargs)
- 233 # Dump SQL statements
- 234 if self.log_sql_statements:
- 235 from django.db import connections
- 236 tsc = 0
- 237 sc = defaultdict(int)
- 238 for conn in connections.all():
- Variables:
- args = ()
- view_map =
- {'GET': <bound method network_infoAppplication.api_main of <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x24c1750>
- v =
- <bound method network_infoAppplication.api_main of <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>>
- request =
- <WSGIRequest
- path:/sa/network_info/,
- GET:<QueryDict: {u'_dc': [u'1396265717036'], u'network': [u'212.233.127.48/29'], u'__format': [u'ext']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'__utma': '134894689.1825718386.1333963432.1380012789.1380120727.12',
- 'csrftoken': 'Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
- 'sessionid': '5560f0fe8b16177a94414c251a81f341'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': '__utma=134894689.1825718386.1333963432.1380012789.1380120727.12; sessionid=5560f0fe8b16177a94414c251a81f341; csrftoken=Vp53dYKe6Cmn8WDDiR2oPncNjtt2XtOY',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36',
- 'PATH_INFO': u'/sa/network_info/',
- 'QUERY_STRING': '_dc=1396265717036&__format=ext&network=212.233.127.48%2F29',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1adcf60>,
- 'wsgi.input': <_io.BytesIO object at 0x4ec5d70>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- to_log_api_call = False
- kwargs = {}
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- app =
- <noc.sa.apps.network_info.views.network_infoAppplication object at 0x4735650>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement