AttributeError: 'MockClient' object has no attribute 'EXTED_PLURALS'

Bug #1209364 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
python-neutronclient
Fix Released
Critical
Nachi Ueno

Bug Description

Some neutronclient change brokes nova unit test. and breaks also gating.

2013-08-07 17:28:59.861 | Traceback (most recent call last):
2013-08-07 17:28:59.861 | File "/home/jenkins/workspace/gate-nova-python27/nova/tests/api/ec2/test_cloud.py", line 2846, in test_create_delete_security_group
2013-08-07 17:28:59.862 | self.assertTrue(delete(self.context, 'testgrp'))
2013-08-07 17:28:59.862 | File "/home/jenkins/workspace/gate-nova-python27/nova/api/ec2/cloud.py", line 746, in delete_security_group
2013-08-07 17:28:59.862 | group_id)
2013-08-07 17:28:59.863 | File "/home/jenkins/workspace/gate-nova-python27/nova/network/security_group/neutron_driver.py", line 125, in get
2013-08-07 17:28:59.863 | neutron, 'security_group', name)
2013-08-07 17:28:59.863 | File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 46, in find_resourceid_by_name_or_id
2013-08-07 17:28:59.864 | resource_plural = _get_resource_plural(resource, client)
2013-08-07 17:28:59.864 | File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 38, in _get_resource_plural
2013-08-07 17:28:59.864 | plurals = client.EXTED_PLURALS
2013-08-07 17:28:59.864 | AttributeError: 'MockClient' object has no attribute 'EXTED_PLURALS'

https://jenkins01.openstack.org/job/gate-nova-python27/86/console

Tags: testing
Revision history for this message
Nachi Ueno (nati-ueno) wrote :

https://review.openstack.org/#/c/33187/ looks cause of this issue

Changed in neutron:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Nachi Ueno (nati-ueno)
Revision history for this message
Nachi Ueno (nati-ueno) wrote :

This line is the cause.

https://github.com/openstack/python-neutronclient/blob/master/neutronclient/neutron/v2_0/__init__.py#L38

IMO, the code itself looks good, but nova unit test should change the way to mock neutron client.

so The nova UT change should be before neutron client change.
I would like to revert 33187.

Nachi Ueno (nati-ueno)
Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
Mark McClain (markmcclain) wrote :

Long term we need to update the MockClient in Nova, but I think we should clean up a few things in python client first.

Changed in neutron:
status: Fix Committed → Invalid
Changed in python-neutronclient:
importance: Undecided → Critical
no longer affects: neutron
Changed in python-neutronclient:
assignee: nobody → Nachi Ueno (nati-ueno)
milestone: none → 2.2.1
status: New → Fix Committed
Revision history for this message
Russell Bryant (russellb) wrote :

looks like this was fixed and not an issue in nova

tags: added: testing
Changed in nova:
status: New → Invalid
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
status: Fix Committed → Confirmed
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.