Advertisement
Guest User

Untitled

a guest
Jun 4th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.65 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-06-04 10:33:14.997932)
  2. Working directory: /opt/noc
  3. <class 'noc.ip.models.DoesNotExist'>
  4. Prefix matching query does not exist.
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 349)
  8. Function: get
  9. 342 if self.query.can_filter():
  10. 343 clone = clone.order_by()
  11. 344 num = len(clone)
  12. 345 if num == 1:
  13. 346 return clone._result_cache[0]
  14. 347 if not num:
  15. 348 raise self.model.DoesNotExist("%s matching query does not exist."
  16. 349 ==> % self.model._meta.object_name)
  17. 350 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
  18. 351 % (self.model._meta.object_name, num, kwargs))
  19. 352
  20. 353 def create(self, **kwargs):
  21. 354 """
  22. 355 Creates a new object with the given kwargs, saving it to the database
  23. Variables:
  24. clone = []
  25. num = 0
  26. self = [<Prefix: , '...(remaining elements truncated)...']
  27. args = ()
  28. kwargs = {'ipv6_transition__pk': 305}
  29. ------------------------------------------------------------------------
  30. File: /opt/noc/contrib/lib/django/db/models/fields/related.py (Line: 239)
  31. Function: __get__
  32. 232 if instance is None:
  33. 233 return self
  34. 234 try:
  35. 235 return getattr(instance, self.cache_name)
  36. 236 except AttributeError:
  37. 237 params = {'%s__pk' % self.related.field.name: instance._get_pk_val()}
  38. 238 db = router.db_for_read(self.related.model, instance=instance)
  39. 239 ==> rel_obj = self.related.model._base_manager.using(db).get(**params)
  40. 240 setattr(instance, self.cache_name, rel_obj)
  41. 241 return rel_obj
  42. 242
  43. 243 def __set__(self, instance, value):
  44. 244 if instance is None:
  45. 245 raise AttributeError("%s must be accessed via instance" % self.related.opts.object_name)
  46. Variables:
  47. params = {'ipv6_transition__pk': 305}
  48. self = <django.db.models.fields.related.SingleRelatedObjectDescriptor object at 0x807e4cc10>
  49. db = 'default'
  50. instance = <Prefix: Global(6): 2a03:8700::/32>
  51. instance_type = <class 'noc.ip.models.Prefix'>
  52. ------------------------------------------------------------------------
  53. File: /opt/noc/ip/apps/ipam/views.py (Line: 688)
  54. Function: view_change_prefix
  55. 681 return self.response_redirect(
  56. 682 "ip:ipam:vrf_index",
  57. 683 vrf.id, afi, prefix.prefix)
  58. 684 else:
  59. 685 ds_prefix = None
  60. 686 if afi == "4" and prefix.ipv6_transition:
  61. 687 ds_prefix = prefix.ipv6_transition.prefix
  62. 688 ==> elif afi == "6" and prefix.ipv4_transition:
  63. 689 ds_prefix = prefix.ipv4_transition.prefix
  64. 690 initial = {
  65. 691 "asn": prefix.asn.id,
  66. 692 "state": prefix.state.id,
  67. 693 "vc": prefix.vc.id if prefix.vc else None,
  68. 694 "description": prefix.description,
  69. Variables:
  70. afi = u'6'
  71. can_bind_vc = True
  72. get_form_class = <function get_form_class at 0x809160848>
  73. request = <WSGIRequest
  74. GET:<QueryDict: {}>,
  75. POST:<QueryDict: {}>,
  76. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  77. 'sessionid': 'ea43713788bea92af05c2f2957188983'},
  78. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  79. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  80. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  81. 'HTTP_CONNECTION': 'close',
  82. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=ea43713788bea92af05c2f2957188983',
  83. 'HTTP_DNT': '1',
  84. 'HTTP_HOST': '127.0.0.1:8000',
  85. 'HTTP_REFERER': 'http://noc/ip/ipam/12/6/2a03:8700::/32/',
  86. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0',
  87. 'PATH_INFO': u'/ip/ipam/12/6/2a03:8700::/32/change/',
  88. 'QUERY_STRING': '',
  89. 'REMOTE_ADDR': '127.0.0.1',
  90. 'REQUEST_METHOD': 'GET',
  91. 'SCRIPT_NAME': u'',
  92. 'SERVER_NAME': '127.0.0.1',
  93. 'SERVER_PORT': '8000',
  94. 'SERVER_PROTOCOL': 'HTTP/1.0',
  95. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8040ef5d0>,
  96. 'wsgi.input': <_io.BytesIO object at 0x809148a70>,
  97. 'wsgi.multiprocess': True,
  98. 'wsgi.multithread': False,
  99. 'wsgi.run_once': False,
  100. 'wsgi.url_scheme': 'http',
  101. 'wsgi.version': (1, 0)}>
  102. prefix = <Prefix: Global(6): 2a03:8700::/32>
  103. form_class = <class 'noc.ip.apps.ipam.views.EditPrefixForm'>
  104. ds_prefix = None
  105. vrf_id = u'12'
  106. self = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>
  107. vrf = <VRF: global>
  108. ------------------------------------------------------------------------
  109. File: /opt/noc/lib/app/site.py (Line: 225)
  110. Function: inner
  111. 218 for k, v in request.POST.lists())
  112. 219 elif request.method == "GET":
  113. 220 a = dict((k, v[0] if len(v) == 1 else v)
  114. 221 for k, v in request.GET.lists())
  115. 222 logging.debug("API %s %s %s" % (request.method,
  116. 223 request.path, a))
  117. 224 # Call handler
  118. 225 ==> r = v(request, *args, **kwargs)
  119. 226 # Dump SQL statements
  120. 227 if self.log_sql_statements:
  121. 228 from django.db import connections
  122. 229 tsc = 0
  123. 230 sc = defaultdict(int)
  124. 231 for conn in connections.all():
  125. Variables:
  126. args = ()
  127. 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>>}
  128. Form = <class 'django.forms.forms.Form'>
  129. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  130. self = <noc.lib.app.site.Site object at 0x806390950>
  131. v = <bound method IPAMAppplication.view_change_prefix of <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>>
  132. request = <WSGIRequest
  133. GET:<QueryDict: {}>,
  134. POST:<QueryDict: {}>,
  135. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  136. 'sessionid': 'ea43713788bea92af05c2f2957188983'},
  137. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  138. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  139. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  140. 'HTTP_CONNECTION': 'close',
  141. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=ea43713788bea92af05c2f2957188983',
  142. 'HTTP_DNT': '1',
  143. 'HTTP_HOST': '127.0.0.1:8000',
  144. 'HTTP_REFERER': 'http://noc/ip/ipam/12/6/2a03:8700::/32/',
  145. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0',
  146. 'PATH_INFO': u'/ip/ipam/12/6/2a03:8700::/32/change/',
  147. 'QUERY_STRING': '',
  148. 'REMOTE_ADDR': '127.0.0.1',
  149. 'REQUEST_METHOD': 'GET',
  150. 'SCRIPT_NAME': u'',
  151. 'SERVER_NAME': '127.0.0.1',
  152. 'SERVER_PORT': '8000',
  153. 'SERVER_PROTOCOL': 'HTTP/1.0',
  154. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8040ef5d0>,
  155. 'wsgi.input': <_io.BytesIO object at 0x809148a70>,
  156. 'wsgi.multiprocess': True,
  157. 'wsgi.multithread': False,
  158. 'wsgi.run_once': False,
  159. 'wsgi.url_scheme': 'http',
  160. 'wsgi.version': (1, 0)}>
  161. to_log_api_call = False
  162. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  163. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  164. kwargs = {'vrf_id': u'12', 'prefix': u'2a03:8700::/32', 'afi': u'6'}
  165. app = <noc.ip.apps.ipam.views.IPAMAppplication object at 0x808e6ff50>
  166. ------------------------------------------------------------------------
  167. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement