Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2012-06-04 10:33:14.997932)
- Working directory: /opt/noc
- <class 'noc.ip.models.DoesNotExist'>
- Prefix matching query does not exist.
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 349)
- Function: get
- 342 if self.query.can_filter():
- 343 clone = clone.order_by()
- 344 num = len(clone)
- 345 if num == 1:
- 346 return clone._result_cache[0]
- 347 if not num:
- 348 raise self.model.DoesNotExist("%s matching query does not exist."
- 349 ==> % self.model._meta.object_name)
- 350 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
- 351 % (self.model._meta.object_name, num, kwargs))
- 352
- 353 def create(self, **kwargs):
- 354 """
- 355 Creates a new object with the given kwargs, saving it to the database
- Variables:
- clone = []
- num = 0
- self = [<Prefix: , '...(remaining elements truncated)...']
- args = ()
- kwargs = {'ipv6_transition__pk': 305}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/fields/related.py (Line: 239)
- Function: __get__
- 232 if instance is None:
- 233 return self
- 234 try:
- 235 return getattr(instance, self.cache_name)
- 236 except AttributeError:
- 237 params = {'%s__pk' % self.related.field.name: instance._get_pk_val()}
- 238 db = router.db_for_read(self.related.model, instance=instance)
- 239 ==> rel_obj = self.related.model._base_manager.using(db).get(**params)
- 240 setattr(instance, self.cache_name, rel_obj)
- 241 return rel_obj
- 242
- 243 def __set__(self, instance, value):
- 244 if instance is None:
- 245 raise AttributeError("%s must be accessed via instance" % self.related.opts.object_name)
- Variables:
- params = {'ipv6_transition__pk': 305}
- self = <django.db.models.fields.related.SingleRelatedObjectDescriptor object at 0x807e4cc10>
- db = 'default'
- instance = <Prefix: Global(6): 2a03:8700::/32>
- instance_type = <class 'noc.ip.models.Prefix'>
- ------------------------------------------------------------------------
- File: /opt/noc/ip/apps/ipam/views.py (Line: 688)
- Function: view_change_prefix
- 681 return self.response_redirect(
- 682 "ip:ipam:vrf_index",
- 683 vrf.id, afi, prefix.prefix)
- 684 else:
- 685 ds_prefix = None
- 686 if afi == "4" and prefix.ipv6_transition:
- 687 ds_prefix = prefix.ipv6_transition.prefix
- 688 ==> elif afi == "6" and prefix.ipv4_transition:
- 689 ds_prefix = prefix.ipv4_transition.prefix
- 690 initial = {
- 691 "asn": prefix.asn.id,
- 692 "state": prefix.state.id,
- 693 "vc": prefix.vc.id if prefix.vc else None,
- 694 "description": prefix.description,
- Variables:
- afi = u'6'
- can_bind_vc = True
- get_form_class = <function get_form_class at 0x809160848>
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
- 'sessionid': 'ea43713788bea92af05c2f2957188983'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=ea43713788bea92af05c2f2957188983',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://noc/ip/ipam/12/6/2a03:8700::/32/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0',
- 'PATH_INFO': u'/ip/ipam/12/6/2a03:8700::/32/change/',
- 'QUERY_STRING': '',
- '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 0x8040ef5d0>,
- 'wsgi.input': <_io.BytesIO object at 0x809148a70>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- prefix = <Prefix: Global(6): 2a03:8700::/32>
- form_class = <class 'noc.ip.apps.ipam.views.EditPrefixForm'>
- ds_prefix = None
- vrf_id = u'12'
- self = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>
- vrf = <VRF: global>
- ------------------------------------------------------------------------
- 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_change_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>>, 'POST': <bound method IPAMAppplication.view_change_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>>, 'GET': <bound method IPAMAppplication.view_change_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>>, 'DELETE': <bound method IPAMAppplication.view_change_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x806390950>
- v = <bound method IPAMAppplication.view_change_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>>
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
- 'sessionid': 'ea43713788bea92af05c2f2957188983'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=ea43713788bea92af05c2f2957188983',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://noc/ip/ipam/12/6/2a03:8700::/32/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0',
- 'PATH_INFO': u'/ip/ipam/12/6/2a03:8700::/32/change/',
- 'QUERY_STRING': '',
- '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 0x8040ef5d0>,
- 'wsgi.input': <_io.BytesIO object at 0x809148a70>,
- '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'2a03:8700::/32', 'afi': u'6'}
- app = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement