'Return a task to suspend the resource.
Subclasses should provide a handle_suspend() method to implement
suspend.'

def suspend(self):

    action = self.SUSPEND
    if ((self.action == self.DELETE) or ((self.action != self.SUSPEND) and (self.status != self.COMPLETE))):
        exc = exception.Error((_('State    %s    invalid    for    suspend') % six.text_type(self.state)))
        raise exception.ResourceFailure(exc, self, action)
    LOG.info('suspending    %s', self)
    return self._do_action(action)
