VMware: Fix exception messages

Currently some of the exceptions defined in the VMware driver
emit unformatted error messages. This is because they are
not overriding the correct message format variable. This
patch fixes the issue by overriding the correct variable
defined in the exception super class.

Closes-Bug: #1491834
Change-Id: I1c66d60ab2ea402dd944587b3d8b6d7c293c4d85
This commit is contained in:
Vipin Balachandran 2015-08-25 14:36:51 +05:30
parent 6dba657a29
commit d8143fe77b

View File

@ -44,14 +44,14 @@ class ProfileNotFoundException(exceptions.VMwareDriverException):
class NoValidDatastoreException(exceptions.VMwareDriverException):
"""Thrown when there are no valid datastores."""
message = _("There are no valid datastores.")
msg_fmt = _("There are no valid datastores.")
class ClusterNotFoundException(exceptions.VMwareDriverException):
"""Thrown when the given cluster cannot be found."""
message = _("Compute cluster: %(cluster)s not found.")
msg_fmt = _("Compute cluster: %(cluster)s not found.")
class NoValidHostException(exceptions.VMwareDriverException):
"""Thrown when there are no valid ESX hosts."""
message = _("There are no valid ESX hosts.")
msg_fmt = _("There are no valid ESX hosts.")