Commit b3b485c8 by Őry Máté

vm: fix #200 renew raises error on destroyed machine

parent 1b3f412d
......@@ -708,6 +708,11 @@ class RenewOperation(InstanceOperation):
required_perms = ()
concurrency_check = False
def check_precond(self):
super(RenewOperation, self).check_precond()
if self.instance.status == 'DESTROYED':
raise self.instance.WrongStateError(self.instance)
def _operation(self, lease=None):
self.instance.time_of_delete) = self.instance.get_renew_times(lease)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment