Only attempt to update a stack if it is in CREATE_COMPLETE
or UPDATE_COMPLETE state
Fixes #260
Change-Id: If47a628f1602d5d8783b3f0e90fd7e76ccef46ba
Signed-off-by: Steven Hardy <shardy@redhat.com>
Update will fail if it exceeds the specified timeout. The default is
60 minutes, set in the constructor
'''
- self.state_set(self.UPDATE_IN_PROGRESS, 'Stack update started')
+ if self.state not in (self.CREATE_COMPLETE, self.UPDATE_COMPLETE):
+ self.state_set(self.UPDATE_FAILED, 'State invalid for update')
+ return
+ else:
+ self.state_set(self.UPDATE_IN_PROGRESS, 'Stack update started')
# Now make the resources match the new stack definition
failures = []