Simplify the test to check the resource is in a COMPLETE state
(other than DELETE_COMPLETE), so we don't have to update this for
every new action state which gets added
Change-Id: I91286d3d0464b1a71dafd01ac209ea7ded259875
instances is a non-immediate operation and we want to paralellize
'''
# Don't try to suspend the resource unless it's in a stable state
- if self.state not in ((self.CREATE, self.COMPLETE),
- (self.UPDATE, self.COMPLETE),
- (self.ROLLBACK, self.COMPLETE)):
+ if (self.action == self.DELETE or self.status != self.COMPLETE):
exc = exception.Error('State %s invalid for suspend'
% str(self.state))
raise exception.ResourceFailure(exc)