Advertisement
Guest User

Untitled

a guest
May 21st, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-05-21 10:53:41.921315)
  2. Working directory: /opt/noc
  3. <type 'exceptions.TypeError'>
  4. 'project' is an invalid keyword argument for this function
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 364)
  8. Function: __init__
  9. 357 for prop in kwargs.keys():
  10. 358 try:
  11. 359 if isinstance(getattr(self.__class__, prop), property):
  12. 360 setattr(self, prop, kwargs.pop(prop))
  13. 361 except AttributeError:
  14. 362 pass
  15. 363 if kwargs:
  16. 364 ==> raise TypeError("'%s' is an invalid keyword argument for this function" % kwargs.keys()[0])
  17. 365 super(Model, self).__init__()
  18. 366 signals.post_init.send(sender=self.__class__, instance=self)
  19. 367
  20. 368 def __repr__(self):
  21. 369 try:
  22. 370 u = unicode(self)
  23. Variables:
  24. rel_obj = <ResourceState: ALLOCATED>
  25. fields_iter = <listiterator object at 0x80941e110>
  26. val = None
  27. args_len = 0
  28. self = <Prefix: Global(4): x.x.x.x/30>
  29. args = ()
  30. is_related_object = False
  31. field = <django.db.models.fields.related.OneToOneField object at 0x807f1fb90>
  32. kwargs = {'project': u''}
  33. prop = 'project'
  34. ------------------------------------------------------------------------
  35. File: /opt/noc/ip/apps/ipam/views.py (Line: 511)
  36. Function: view_add_prefix
  37. 504 asn=form.cleaned_data["asn"],
  38. 505 description=form.cleaned_data["description"],
  39. 506 tags=form.cleaned_data["tags"],
  40. 507 tt=form.cleaned_data["tt"],
  41. 508 style=form.cleaned_data["style"])
  42. 509 self.apply_custom_fields(p, form.cleaned_data, "ip_prefix")
  43. 510 p.save()
  44. 511 ==> self.message_user(request,
  45. 512 _("Prefix %(prefix)s was created") % {
  46. 513 "prefix": p.prefix})
  47. 514 # Process dual-stack linking
  48. 515 ds_prefix = form.cleaned_data["dual_stack_prefix"]
  49. 516 self.process_dual_stacking(p, ds_prefix)
  50. 517 # Redirect depending on submit button pressed
  51. Variables:
  52. vrf = <VRF: global>
  53. form = <noc.ip.apps.ipam.views.AddPrefixForm object at 0x80918fa90>
  54. parent = <Prefix: Global(4): x.x.x.x/24>
  55. get_form_class = <function get_form_class at 0x809427c80>
  56. request = <WSGIRequest
  57. GET:<QueryDict: {u'prefix': [u'x.x.x.x/30']}>,
  58. POST:<QueryDict: {u'style': [u''], u'description': [u'\u0417\u0410\u041e "\u0411\u0430\u043d\u043a", \u041d\u0430\u0440\u044f\u0434 AAA'], u'_save': [u'Save'], u'tags': [u''], u'tt': [u''], u'state': [u'1'], u'project': [u''], u'prefix': [u'x.x.x.x/30'], u'asn': [u'1'], u'dual_stack_prefix': [u'']}>,
  59. COOKIES:{'csrftoken': '0aeef216b3c87a5c504878885bfea071',
  60. 'sessionid': 'df7b316eab2071fcf70f9ef4c7d3e361'},
  61. META:{'CONTENT_LENGTH': '250',
  62. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  63. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  64. 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
  65. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  66. 'HTTP_ACCEPT_LANGUAGE': 'en-GB,en-US;q=0.8,en;q=0.6',
  67. 'HTTP_CACHE_CONTROL': 'max-age=0',
  68. 'HTTP_CONNECTION': 'close',
  69. 'HTTP_COOKIE': 'csrftoken=0aeef216b3c87a5c504878885bfea071; sessionid=df7b316eab2071fcf70f9ef4c7d3e361',
  70. 'HTTP_HOST': '127.0.0.1:8000',
  71. 'HTTP_ORIGIN': 'http://noc',
  72. 'HTTP_REFERER': 'http://noc/ip/ipam/12/4/x.x.x.x/24/add_prefix/?prefix=x.x.x.x/30',
  73. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
  74. 'PATH_INFO': u'/ip/ipam/12/4/x.x.x.x/24/add_prefix/',
  75. 'QUERY_STRING': 'prefix=x.x.x.x/30',
  76. 'REMOTE_ADDR': '127.0.0.1',
  77. 'REQUEST_METHOD': 'POST',
  78. 'SCRIPT_NAME': u'',
  79. 'SERVER_NAME': '127.0.0.1',
  80. 'SERVER_PORT': '8000',
  81. 'SERVER_PROTOCOL': 'HTTP/1.0',
  82. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8040f25d0>,
  83. 'wsgi.input': <_io.BytesIO object at 0x80918e410>,
  84. 'wsgi.multiprocess': True,
  85. 'wsgi.multithread': False,
  86. 'wsgi.run_once': False,
  87. 'wsgi.url_scheme': 'http',
  88. 'wsgi.version': (1, 0)}>
  89. prefix = u'x.x.x.x/24'
  90. form_class = <class 'noc.ip.apps.ipam.views.AddPrefixForm'>
  91. vrf_id = u'12'
  92. self = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>
  93. afi = u'4'
  94. ------------------------------------------------------------------------
  95. File: /opt/noc/lib/app/site.py (Line: 225)
  96. Function: inner
  97. 218 for k, v in request.POST.lists())
  98. 219 elif request.method == "GET":
  99. 220 a = dict((k, v[0] if len(v) == 1 else v)
  100. 221 for k, v in request.GET.lists())
  101. 222 logging.debug("API %s %s %s" % (request.method,
  102. 223 request.path, a))
  103. 224 # Call handler
  104. 225 ==> r = v(request, *args, **kwargs)
  105. 226 # Dump SQL statements
  106. 227 if self.log_sql_statements:
  107. 228 from django.db import connections
  108. 229 tsc = 0
  109. 230 sc = defaultdict(int)
  110. 231 for conn in connections.all():
  111. Variables:
  112. args = ()
  113. view_map = {'PUT': <bound method IPAMAppplication.view_add_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>>, 'POST': <bound method IPAMAppplication.view_add_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>>, 'GET': <bound method IPAMAppplication.view_add_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>>, 'DELETE': <bound method IPAMAppplication.view_add_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>>}
  114. Form = <class 'django.forms.forms.Form'>
  115. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  116. self = <noc.lib.app.site.Site object at 0x80635db50>
  117. v = <bound method IPAMAppplication.view_add_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>>
  118. request = <WSGIRequest
  119. GET:<QueryDict: {u'prefix': [u'x.x.x.x/30']}>,
  120. POST:<QueryDict: {u'style': [u''], u'description': [u'\u0417\u0410\u041e "\u0414\u0436\u0438\u0418 \u041c\u0430\u043d\u0438 \u0411\u0430\u043d\u043a", \u041d\u0430\u0440\u044f\u0434 AAA'], u'_save': [u'Save'], u'tags': [u''], u'tt': [u''], u'state': [u'1'], u'project': [u''], u'prefix': [u'x.x.x.x/30'], u'asn': [u'1'], u'dual_stack_prefix': [u'']}>,
  121. COOKIES:{'csrftoken': '0aeef216b3c87a5c504878885bfea071',
  122. 'sessionid': 'df7b316eab2071fcf70f9ef4c7d3e361'},
  123. META:{'CONTENT_LENGTH': '250',
  124. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  125. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  126. 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
  127. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  128. 'HTTP_ACCEPT_LANGUAGE': 'en-GB,en-US;q=0.8,en;q=0.6',
  129. 'HTTP_CACHE_CONTROL': 'max-age=0',
  130. 'HTTP_CONNECTION': 'close',
  131. 'HTTP_COOKIE': 'csrftoken=0aeef216b3c87a5c504878885bfea071; sessionid=df7b316eab2071fcf70f9ef4c7d3e361',
  132. 'HTTP_HOST': '127.0.0.1:8000',
  133. 'HTTP_ORIGIN': 'http://noc',
  134. 'HTTP_REFERER': 'http://noc/ip/ipam/12/4/x.x.x.x/24/add_prefix/?prefix=x.x.x.x/30',
  135. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
  136. 'PATH_INFO': u'/ip/ipam/12/4/x.x.x.x/24/add_prefix/',
  137. 'QUERY_STRING': 'prefix=x.x.x.x/30',
  138. 'REMOTE_ADDR': '127.0.0.1',
  139. 'REQUEST_METHOD': 'POST',
  140. 'SCRIPT_NAME': u'',
  141. 'SERVER_NAME': '127.0.0.1',
  142. 'SERVER_PORT': '8000',
  143. 'SERVER_PROTOCOL': 'HTTP/1.0',
  144. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8040f25d0>,
  145. 'wsgi.input': <_io.BytesIO object at 0x80918e410>,
  146. 'wsgi.multiprocess': True,
  147. 'wsgi.multithread': False,
  148. 'wsgi.run_once': False,
  149. 'wsgi.url_scheme': 'http',
  150. 'wsgi.version': (1, 0)}>
  151. to_log_api_call = False
  152. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  153. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  154. kwargs = {'vrf_id': u'12', 'prefix': u'x.x.x.x/24', 'afi': u'4'}
  155. app = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>
  156. ------------------------------------------------------------------------
  157. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement