Skip to content
Snippets Groups Projects
Commit 69b0d82a authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Fix a validation issue


We want to validate the result only if the iallocation run was a
success.

Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
parent e91b297c
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ class IARequestBase(objectutils.ValidatedSlots):
@raises ResultValidationError: If validation fails
"""
if not (ia.success and self.REQ_RESULT(result)):
if ia.success and not self.REQ_RESULT(result):
raise errors.ResultValidationError("iallocator returned invalid result,"
" expected %s, got %s" %
(self.REQ_RESULT, result))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment