pollster trap error due to zero floating ip

fixes bug #1056087 when nova doesn't have any
floating ip addresses defined causes a db
exception instead of raising it should be
trapped

Change-Id: Iea441fb8bcd720339b2446525a6202941c33a1ec
This commit is contained in:
John Tran 2012-11-02 16:44:42 +00:00
parent 5a21eee3c6
commit f15892f229

View File

@ -32,6 +32,8 @@ class FloatingIPPollster(plugin.CentralPollster):
def get_counters(self, manager, context):
try:
ips = manager.resources.floating_ip_get_all(context)
except exception.NoFloatingIpsDefined:
pass
except exception.FloatingIpNotFoundForHost:
pass
else: