Merge "Fix more re-definitions and enable F811/F813 in gate"

This commit is contained in:
Jenkins
2014-07-11 14:21:19 +00:00
committed by Gerrit Code Review
6 changed files with 5 additions and 13 deletions

View File

@@ -387,8 +387,8 @@ class API(base_api.NetworkAPI):
# and in later runs will only be what was created that time. Thus, # and in later runs will only be what was created that time. Thus,
# this only affects the attach case, not the original use for this # this only affects the attach case, not the original use for this
# method. # method.
return network_model.NetworkInfo([port for port in nw_info return network_model.NetworkInfo([vif for vif in nw_info
if port['id'] in created_port_ids + if vif['id'] in created_port_ids +
touched_port_ids]) touched_port_ids])
def _refresh_neutron_extensions_cache(self, context): def _refresh_neutron_extensions_cache(self, context):

View File

@@ -102,11 +102,6 @@ class VBDTestCase(stubs.XenAPITestBaseNoDB):
self.session.VBD.plug("vbd_ref", "vm_ref") self.session.VBD.plug("vbd_ref", "vm_ref")
self.session.call_xenapi.assert_called_once_with("VBD.plug", "vbd_ref") self.session.call_xenapi.assert_called_once_with("VBD.plug", "vbd_ref")
@mock.patch.object(utils, 'synchronized')
def test_vbd_plug_check_synchronized(self, mock_synchronized):
self.session.VBD.plug("vbd_ref", "vm_ref")
mock_synchronized.assert_called_once_with("xenapi-vbd-vm_ref")
def test_unplug(self): def test_unplug(self):
self.session.VBD.unplug("vbd_ref", "vm_ref") self.session.VBD.unplug("vbd_ref", "vm_ref")
self.session.call_xenapi.assert_called_once_with("VBD.unplug", self.session.call_xenapi.assert_called_once_with("VBD.unplug",

View File

@@ -236,7 +236,7 @@ class AttachVolumeTestCase(VolumeOpsTestBase):
False) False)
@mock.patch.object(volumeops.VolumeOps, "_attach_volume") @mock.patch.object(volumeops.VolumeOps, "_attach_volume")
def test_attach_volume_default_hotplug(self, mock_attach): def test_attach_volume_default_hotplug_connect_volume(self, mock_attach):
self.ops.connect_volume({}) self.ops.connect_volume({})
mock_attach.assert_called_once_with({}) mock_attach.assert_called_once_with({})

View File

@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import mock
from cinderclient import exceptions as cinder_exception from cinderclient import exceptions as cinder_exception
import mock import mock

View File

@@ -28,7 +28,6 @@ from nova.openstack.common.gettextutils import _LW
from nova.openstack.common import log as logging from nova.openstack.common import log as logging
from nova.openstack.common import processutils from nova.openstack.common import processutils
from nova.openstack.common import units from nova.openstack.common import units
from nova import utils
from nova.virt.libvirt import utils from nova.virt.libvirt import utils

View File

@@ -58,10 +58,10 @@ sitepackages = False
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126 # E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# The rest of the ignores are TODOs # The rest of the ignores are TODOs
# New from hacking 0.9: E129, E131, E265, E713, H407, H405, H904 # New from hacking 0.9: E129, E131, E265, E713, H407, H405, H904
# Stricter in hacking 0.9: F402, F812 # Stricter in hacking 0.9: F402
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301 # E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
ignore = E121,E122,E123,E124,E125,E129,E126,E127,E128,E131,E251,E265,E711,E712,E713,F811,F402,F812,H305,H307,H405,H803,H904 ignore = E121,E122,E123,E124,E125,E129,E126,E127,E128,E131,E251,E265,E711,E712,E713,F402,H305,H307,H405,H803,H904
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
[hacking] [hacking]