← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1676701] Re: failing unit tests: mokc object has no attribute _get_collection

 

** Also affects: neutron
   Importance: Undecided
       Status: New

** Changed in: bgpvpn
   Importance: Undecided => High

** Summary changed:

- failing unit tests: mokc object has no attribute _get_collection
+ failing unit tests: Quota / mock object has no attribute _get_collection

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1676701

Title:
  failing unit tests: Quota / mock object has no attribute
  _get_collection

Status in networking-bgpvpn:
  New
Status in neutron:
  New

Bug description:
  Traceback (most recent call last):
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/api/v2/resource.py", line 79, in resource
      result = method(request=request, **args)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/api/v2/base.py", line 436, in create
      return self._create(request, body, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 92, in wrapped
      setattr(e, '_RETRY_EXCEEDED', True)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 88, in wrapped
      return f(*args, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
      ectxt.value = e.inner_exc
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
      return f(*args, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 127, in wrapped
      LOG.debug("Retry wrapper got retriable exception: %s", e)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 123, in wrapped
      return f(*dup_args, **dup_kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/api/v2/base.py", line 480, in _create
      self._plugin)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/quota/__init__.py", line 234, in make_reservation
      plugin)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 162, in wrapped
      return method(*args, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 92, in wrapped
      setattr(e, '_RETRY_EXCEEDED', True)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 88, in wrapped
      return f(*args, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
      ectxt.value = e.inner_exc
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
      return f(*args, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 127, in wrapped
      LOG.debug("Retry wrapper got retriable exception: %s", e)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 123, in wrapped
      return f(*dup_args, **dup_kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/quota/driver.py", line 176, in make_reservation
      context, resources, tenant_id)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/api.py", line 162, in wrapped
      return method(*args, **kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/db/quota/driver.py", line 68, in get_tenant_quotas
      quota_objs = quota_obj.Quota.get_objects(context, project_id=tenant_id)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/objects/base.py", line 449, in get_objects
      **cls.modify_fields_to_db(kwargs)
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/objects/db/api.py", line 49, in get_objects
      return plugin._get_collection(
    File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 698, in __getattr__
      raise AttributeError("Mock object has no attribute %r" % name)
  AttributeError: Mock object has no attribute '_get_collection'
  {0} networking_bgpvpn.tests.unit.extensions.test_bgpvpn.BgpvpnExtensionTestCase.test_bgpvpn_create_with_valid_route_targets [0.174501s] ... FAILED

  ==============================
  Failed 1 tests - output below:
  ==============================

  networking_bgpvpn.tests.unit.extensions.test_bgpvpn.BgpvpnExtensionTestCase.test_bgpvpn_create_with_valid_route_targets
  -----------------------------------------------------------------------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "/home/teom7365/prog/openstack/networking-bgpvpn/.tmp/tmp.FxNzLbmRqx/openstack/neutron/neutron/tests/base.py", line 116, in func
          return f(self, *args, **kwargs)
        File "networking_bgpvpn/tests/unit/extensions/test_bgpvpn.py", line 164, in test_bgpvpn_create_with_valid_route_targets
          self._test_valid_field('route_targets')
        File "networking_bgpvpn/tests/unit/extensions/test_bgpvpn.py", line 155, in _test_valid_field
          expect_errors=False)
        File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 378, in post
          content_type=content_type)
        File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 747, in _gen_request
          expect_errors=expect_errors)
        File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 643, in do_request
          self._check_status(status, res)
        File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 675, in _check_status
          res)
      webtest.app.AppError: Bad response: 500 Internal Server Error (not 200 OK or 3xx redirect for http://localhost/bgpvpn/bgpvpns.json)
      '{"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "detail": "", "type": "HTTPInternalServerError"}}'
      

  
  http://logs.openstack.org/33/425933/5/gate/gate-networking-bgpvpn-python27-ubuntu-xenial/8851bb0/console.html#_2017-03-28_01_35_34_059511

To manage notifications about this bug go to:
https://bugs.launchpad.net/bgpvpn/+bug/1676701/+subscriptions