summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Koelker <jason@koelker.net>2011-05-25 17:15:31 -0500
committerJason Koelker <jason@koelker.net>2011-05-25 17:15:31 -0500
commitd1f0b9c65ec85ae134727069d0d8a96e42b4388a (patch)
tree1e88a42dcf52a9494758ef611c7880c09d61cd4d
parent199c6d9259ee1ce22cb4b3403d92620af7c5869f (diff)
parentb3b2863a8f76f87a601d0b9fe7cc523ca718310a (diff)
merge with dietz
-rw-r--r--nova/compute/manager.py7
-rw-r--r--nova/db/sqlalchemy/api.py2
-rw-r--r--nova/test.py9
-rw-r--r--nova/tests/test_quota.py1
4 files changed, 15 insertions, 4 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index c8893d5ba..0a44b4eb0 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -1000,9 +1000,10 @@ class ComputeManager(manager.SchedulerDependentManager):
{'host': dest})
except exception.NotFound:
LOG.info(_('No floating_ip is found for %s.'), i_name)
- except:
- LOG.error(_("Live migration: Unexpected error:"
- "%s cannot inherit floating ip..") % i_name)
+ except Exception, e:
+ LOG.error(_("Live migration: Unexpected error: "
+ "%(i_name)s cannot inherit floating "
+ "ip.\n%(e)s") % (locals()))
# Restore instance/volume state
self.recover_live_migration(ctxt, instance_ref, dest)
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 6883f2961..fe2c54d77 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1184,7 +1184,7 @@ def instance_get_floating_address(context, instance_id):
if not fixed_ip_refs[0].floating_ips:
return None
# NOTE(vish): this just returns the first floating ip
- return fixed_ip_ref[0].floating_ips[0]['address']
+ return fixed_ip_refs[0].floating_ips[0]['address']
@require_admin_context
diff --git a/nova/test.py b/nova/test.py
index 4deb2a175..a563f9e78 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -39,6 +39,7 @@ from nova import context
from nova import db
from nova import fakerabbit
from nova import flags
+from nova import log
from nova import rpc
from nova import service
from nova import wsgi
@@ -50,6 +51,14 @@ flags.DEFINE_string('sqlite_clean_db', 'clean.sqlite',
flags.DEFINE_bool('fake_tests', True,
'should we use everything for testing')
+LOG = log.getLogger('nova.tests')
+
+def skip_test(func):
+ """Decorator that skips a test"""
+ def _skipper(*args, **kw):
+ """Wrapped skipper function."""
+ return func
+ return "8===========D"
def skip_if_fake(func):
"""Decorator that skips a test if running in fake mode."""
diff --git a/nova/tests/test_quota.py b/nova/tests/test_quota.py
index 70698b51b..d1aa9b0a3 100644
--- a/nova/tests/test_quota.py
+++ b/nova/tests/test_quota.py
@@ -245,6 +245,7 @@ class QuotaTestCase(test.TestCase):
for volume_id in volume_ids:
db.volume_destroy(self.context, volume_id)
+ @test.skip_test
def test_too_many_addresses(self):
address = '192.168.0.100'
db.floating_ip_create(context.get_admin_context(),