fixed_ips by vif does not raise

It makes more sense if this method returns an 
empty array instead of raising when it finds no
ips. This lets the iteration over that array
handle the 0 case, and we can use a conditional on
the len(of the ips) if really needed. I'm not sure
that log is needed to say "No fixed IPs 
deallocated" or if that is an artifact of needing 
something to put in the exception handler.

Change-Id: Ib9f66affb5360fb11a3ab5f415a0e57602cec886
This commit is contained in:
Aaron Lee
2011-12-09 17:53:15 -06:00
parent 0c6c770029
commit 1e35236519
4 changed files with 13 additions and 21 deletions

View File

@@ -515,10 +515,6 @@ class FixedIpNotFoundForSpecificInstance(FixedIpNotFound):
message = _("Instance %(instance_id)s doesn't have fixed ip '%(ip)s'.")
class FixedIpNotFoundForVirtualInterface(FixedIpNotFound):
message = _("Virtual interface %(vif_id)s has zero associated fixed ips.")
class FixedIpNotFoundForHost(FixedIpNotFound):
message = _("Host %(host)s has zero fixed ips.")