summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2011-09-21 03:55:28 +0000
committerRick Harris <rconradharris@gmail.com>2011-09-21 03:55:28 +0000
commit275f58c5649653632b8c28b66b59ff19d2cdf366 (patch)
tree123df9ab4644719256ee7b5d6d7d260084b5be8b
parent9e1f1f91c3c66febcb2d624d32d2a3639f0d0598 (diff)
downloadnova-275f58c5649653632b8c28b66b59ff19d2cdf366.tar.gz
nova-275f58c5649653632b8c28b66b59ff19d2cdf366.tar.xz
nova-275f58c5649653632b8c28b66b59ff19d2cdf366.zip
Pep8 fixes
-rw-r--r--nova/db/sqlalchemy/api.py2
-rw-r--r--nova/tests/api/openstack/test_flavors.py1
-rw-r--r--nova/tests/test_instance_types_extra_specs.py4
3 files changed, 4 insertions, 3 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 447dbec22..a42ee8616 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -3333,7 +3333,7 @@ def instance_type_get_all(context, inactive=False):
partial = partial.filter_by(deleted=False)
inst_types = partial.order_by("name").all()
-
+
return [_dict_with_extra_specs(i) for i in inst_types]
diff --git a/nova/tests/api/openstack/test_flavors.py b/nova/tests/api/openstack/test_flavors.py
index 86e956519..27fef63b9 100644
--- a/nova/tests/api/openstack/test_flavors.py
+++ b/nova/tests/api/openstack/test_flavors.py
@@ -47,6 +47,7 @@ FAKE_FLAVORS = {
},
}
+
def return_instance_type_by_flavor_id(context, flavorid):
return FAKE_FLAVORS['flavor %s' % flavorid]
diff --git a/nova/tests/test_instance_types_extra_specs.py b/nova/tests/test_instance_types_extra_specs.py
index 4e0667149..b4b642944 100644
--- a/nova/tests/test_instance_types_extra_specs.py
+++ b/nova/tests/test_instance_types_extra_specs.py
@@ -160,11 +160,11 @@ class InstanceTypeExtraSpecsTestCase(test.TestCase):
xpu_model="Tesla 2050")
types = db.api.instance_type_get_all(self.context)
-
+
name2specs = {}
for instance_type in types:
name = instance_type['name']
name2specs[name] = instance_type['extra_specs']
-
+
self.assertEquals(name2specs['cg1.4xlarge'], specs)
self.assertEquals(name2specs['m1.small'], {})