Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2012-05-21 10:53:41.921315)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- 'project' is an invalid keyword argument for this function
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 364)
- Function: __init__
- 357 for prop in kwargs.keys():
- 358 try:
- 359 if isinstance(getattr(self.__class__, prop), property):
- 360 setattr(self, prop, kwargs.pop(prop))
- 361 except AttributeError:
- 362 pass
- 363 if kwargs:
- 364 ==> raise TypeError("'%s' is an invalid keyword argument for this function" % kwargs.keys()[0])
- 365 super(Model, self).__init__()
- 366 signals.post_init.send(sender=self.__class__, instance=self)
- 367
- 368 def __repr__(self):
- 369 try:
- 370 u = unicode(self)
- Variables:
- rel_obj = <ResourceState: ALLOCATED>
- fields_iter = <listiterator object at 0x80941e110>
- val = None
- args_len = 0
- self = <Prefix: Global(4): x.x.x.x/30>
- args = ()
- is_related_object = False
- field = <django.db.models.fields.related.OneToOneField object at 0x807f1fb90>
- kwargs = {'project': u''}
- prop = 'project'
- ------------------------------------------------------------------------
- File: /opt/noc/ip/apps/ipam/views.py (Line: 511)
- Function: view_add_prefix
- 504 asn=form.cleaned_data["asn"],
- 505 description=form.cleaned_data["description"],
- 506 tags=form.cleaned_data["tags"],
- 507 tt=form.cleaned_data["tt"],
- 508 style=form.cleaned_data["style"])
- 509 self.apply_custom_fields(p, form.cleaned_data, "ip_prefix")
- 510 p.save()
- 511 ==> self.message_user(request,
- 512 _("Prefix %(prefix)s was created") % {
- 513 "prefix": p.prefix})
- 514 # Process dual-stack linking
- 515 ds_prefix = form.cleaned_data["dual_stack_prefix"]
- 516 self.process_dual_stacking(p, ds_prefix)
- 517 # Redirect depending on submit button pressed
- Variables:
- vrf = <VRF: global>
- form = <noc.ip.apps.ipam.views.AddPrefixForm object at 0x80918fa90>
- parent = <Prefix: Global(4): x.x.x.x/24>
- get_form_class = <function get_form_class at 0x809427c80>
- request = <WSGIRequest
- GET:<QueryDict: {u'prefix': [u'x.x.x.x/30']}>,
- 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'']}>,
- COOKIES:{'csrftoken': '0aeef216b3c87a5c504878885bfea071',
- 'sessionid': 'df7b316eab2071fcf70f9ef4c7d3e361'},
- META:{'CONTENT_LENGTH': '250',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'en-GB,en-US;q=0.8,en;q=0.6',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=0aeef216b3c87a5c504878885bfea071; sessionid=df7b316eab2071fcf70f9ef4c7d3e361',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://noc',
- 'HTTP_REFERER': 'http://noc/ip/ipam/12/4/x.x.x.x/24/add_prefix/?prefix=x.x.x.x/30',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
- 'PATH_INFO': u'/ip/ipam/12/4/x.x.x.x/24/add_prefix/',
- 'QUERY_STRING': 'prefix=x.x.x.x/30',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- '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 0x8040f25d0>,
- 'wsgi.input': <_io.BytesIO object at 0x80918e410>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- prefix = u'x.x.x.x/24'
- form_class = <class 'noc.ip.apps.ipam.views.AddPrefixForm'>
- vrf_id = u'12'
- self = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>
- afi = u'4'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 225)
- Function: inner
- 218 for k, v in request.POST.lists())
- 219 elif request.method == "GET":
- 220 a = dict((k, v[0] if len(v) == 1 else v)
- 221 for k, v in request.GET.lists())
- 222 logging.debug("API %s %s %s" % (request.method,
- 223 request.path, a))
- 224 # Call handler
- 225 ==> r = v(request, *args, **kwargs)
- 226 # Dump SQL statements
- 227 if self.log_sql_statements:
- 228 from django.db import connections
- 229 tsc = 0
- 230 sc = defaultdict(int)
- 231 for conn in connections.all():
- Variables:
- args = ()
- 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>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x80635db50>
- v = <bound method IPAMAppplication.view_add_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>>
- request = <WSGIRequest
- GET:<QueryDict: {u'prefix': [u'x.x.x.x/30']}>,
- 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'']}>,
- COOKIES:{'csrftoken': '0aeef216b3c87a5c504878885bfea071',
- 'sessionid': 'df7b316eab2071fcf70f9ef4c7d3e361'},
- META:{'CONTENT_LENGTH': '250',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'en-GB,en-US;q=0.8,en;q=0.6',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=0aeef216b3c87a5c504878885bfea071; sessionid=df7b316eab2071fcf70f9ef4c7d3e361',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://noc',
- 'HTTP_REFERER': 'http://noc/ip/ipam/12/4/x.x.x.x/24/add_prefix/?prefix=x.x.x.x/30',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
- 'PATH_INFO': u'/ip/ipam/12/4/x.x.x.x/24/add_prefix/',
- 'QUERY_STRING': 'prefix=x.x.x.x/30',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- '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 0x8040f25d0>,
- 'wsgi.input': <_io.BytesIO object at 0x80918e410>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- to_log_api_call = False
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- kwargs = {'vrf_id': u'12', 'prefix': u'x.x.x.x/24', 'afi': u'4'}
- app = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e50f10>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement