if fixed_ip['instance_uuid'] is None:
msg = _('IP %s leased that is not associated') % address
raise exception.NovaException(msg)
This is called when dnsmasq leases out the IP address. There basically is no way for users to trigger this error and exceptions we throw from this method would just be logged to a log file.
InstanceNotFoundException is not appropriate. Something like FixedIpNotAssociated would be more accurate. But, again, since this is not an error ever seen by users, I think just using NovaException is fine.
The code we're talking about is:
def lease_fixed_ ip(self, context, address): fixed_ip_ get_by_ address( context, address)
fixed_ip = self.db.
if fixed_ip[ 'instance_ uuid'] is None: NovaException( msg)
msg = _('IP %s leased that is not associated') % address
raise exception.
This is called when dnsmasq leases out the IP address. There basically is no way for users to trigger this error and exceptions we throw from this method would just be logged to a log file.
InstanceNotFoun dException is not appropriate. Something like FixedIpNotAssoc iated would be more accurate. But, again, since this is not an error ever seen by users, I think just using NovaException is fine.