summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-05-17 21:06:07 +0000
committerGerrit Code Review <review@openstack.org>2013-05-17 21:06:07 +0000
commitac7e8dbbe054af5ed9c9b77ecf2d34f0ad1b8864 (patch)
tree27d2fb204ac5bb46cf6def0652ee3769abffc2ea
parent505af894f3401b2427f09f0c3ef0dd12ba35311f (diff)
parent186c49409c841bd2bba50ea8629ec214a7fb9627 (diff)
downloadnova-ac7e8dbbe054af5ed9c9b77ecf2d34f0ad1b8864.tar.gz
nova-ac7e8dbbe054af5ed9c9b77ecf2d34f0ad1b8864.tar.xz
nova-ac7e8dbbe054af5ed9c9b77ecf2d34f0ad1b8864.zip
Merge "Fix flake8 errors in anticipation of flake8."
-rw-r--r--nova/api/openstack/compute/contrib/floating_ips.py2
-rw-r--r--nova/cmd/spicehtml5proxy.py8
-rw-r--r--nova/tests/compute/test_compute.py6
-rw-r--r--nova/tests/compute/test_multiple_nodes.py2
-rw-r--r--nova/tests/integrated/test_api_samples.py4
-rw-r--r--nova/tests/test_db_api.py4
-rw-r--r--nova/tests/test_libvirt.py8
7 files changed, 17 insertions, 17 deletions
diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py
index d2cf99431..a698e049c 100644
--- a/nova/api/openstack/compute/contrib/floating_ips.py
+++ b/nova/api/openstack/compute/contrib/floating_ips.py
@@ -244,7 +244,7 @@ class FloatingIPActionController(wsgi.Controller):
if not fixed_address:
fixed_address = fixed_ips[0]['address']
- if len(fixed_ips) > 1:
+ if len(fixed_ips) > 1:
msg = _('multiple fixed_ips exist, using the first: %s')
LOG.warning(msg, fixed_address)
diff --git a/nova/cmd/spicehtml5proxy.py b/nova/cmd/spicehtml5proxy.py
index 8e005bcad..c6f2be53d 100644
--- a/nova/cmd/spicehtml5proxy.py
+++ b/nova/cmd/spicehtml5proxy.py
@@ -59,13 +59,13 @@ opts = [
help='Port on which to listen for incoming requests'),
]
-CONF = cfg.CONF
-CONF.register_cli_opts(opts)
-CONF.import_opt('debug', 'nova.openstack.common.log')
-
def main():
# Setup flags
+
+ CONF = cfg.CONF
+ CONF.register_cli_opts(opts)
+ CONF.import_opt('debug', 'nova.openstack.common.log')
config.parse_args(sys.argv)
if CONF.ssl_only and not os.path.exists(CONF.cert):
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index 764bfed46..094b348a2 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -135,7 +135,7 @@ class BaseTestCase(test.TestCase):
'memory_mb': 131072,
'current_workload': 0,
'vcpus': 16,
- 'cpu_info':'ppc64,powervm,3940',
+ 'cpu_info': 'ppc64,powervm,3940',
'running_vms': 0,
'free_disk_gb': 259,
'service_id': 7,
@@ -5706,7 +5706,7 @@ class ComputeAPITestCase(BaseTestCase):
def fake_get_instance_bdms(*args, **kwargs):
return [{'device_name': '/dev/vda',
- 'volume_id':'bf0b6b00-a20c-11e2-9e96-0800200c9a66'}]
+ 'volume_id': 'bf0b6b00-a20c-11e2-9e96-0800200c9a66'}]
self.stubs.Set(self.compute_api, 'get_instance_bdms',
fake_get_instance_bdms)
@@ -6964,7 +6964,7 @@ class ComputeAPITestCase(BaseTestCase):
def fake_get_instance_bdms(*args, **kwargs):
return [{'device_name': '/dev/vda',
- 'volume_id':'bf0b6b00-a20c-11e2-9e96-0800200c9a66'}]
+ 'volume_id': 'bf0b6b00-a20c-11e2-9e96-0800200c9a66'}]
self.stubs.Set(self.compute_api, 'get_instance_bdms',
fake_get_instance_bdms)
diff --git a/nova/tests/compute/test_multiple_nodes.py b/nova/tests/compute/test_multiple_nodes.py
index c44d9974e..b9a17cefe 100644
--- a/nova/tests/compute/test_multiple_nodes.py
+++ b/nova/tests/compute/test_multiple_nodes.py
@@ -97,7 +97,7 @@ class MultiNodeComputeTestCase(BaseTestCase):
'memory_mb': 131072,
'current_workload': 0,
'vcpus': 16,
- 'cpu_info':'ppc64,powervm,3940',
+ 'cpu_info': 'ppc64,powervm,3940',
'running_vms': 0,
'free_disk_gb': 259,
'service_id': 7,
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index e24f24189..6979a7510 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -1110,8 +1110,8 @@ class SecurityGroupsSampleJsonTest(ServersSampleBase):
subs = {
'group_name': 'test'
}
- return self._do_post('servers/%s/action' % uuid,
- 'security-group-add-post-req', subs)
+ return self._do_post('servers/%s/action' % uuid,
+ 'security-group-add-post-req', subs)
def test_security_group_create(self):
response = self._create_security_group()
diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py
index 1239c4627..4afefdfc8 100644
--- a/nova/tests/test_db_api.py
+++ b/nova/tests/test_db_api.py
@@ -3744,8 +3744,8 @@ class VirtualInterfaceTestCase(test.TestCase, ModelsObjectComparatorMixin):
self._create_virt_interface, {"uuid": vif['uuid']})
def test_virtual_interface_get(self):
- vifs = [self._create_virt_interface({'address':'a'}),
- self._create_virt_interface({'address':'b'})]
+ vifs = [self._create_virt_interface({'address': 'a'}),
+ self._create_virt_interface({'address': 'b'})]
for vif in vifs:
real_vif = db.virtual_interface_get(self.ctxt, vif['id'])
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
index 6d8332769..338a1559f 100644
--- a/nova/tests/test_libvirt.py
+++ b/nova/tests/test_libvirt.py
@@ -3175,13 +3175,13 @@ class LibvirtConnTestCase(test.TestCase):
fake_disks = {'fake1': [{'type': 'qcow2', 'path': '/somepath/disk1',
'virt_disk_size': '10737418240',
'backing_file': '/somepath/disk1',
- 'disk_size':'83886080',
- 'over_committed_disk_size':'10653532160'}],
+ 'disk_size': '83886080',
+ 'over_committed_disk_size': '10653532160'}],
'fake2': [{'type': 'raw', 'path': '/somepath/disk2',
'virt_disk_size': '0',
'backing_file': '/somepath/disk2',
- 'disk_size':'10737418240',
- 'over_committed_disk_size':'0'}]}
+ 'disk_size': '10737418240',
+ 'over_committed_disk_size': '0'}]}
def get_info(instance_name):
return jsonutils.dumps(fake_disks.get(instance_name))