'Shutdown EBS-backed instance and put it in the \'stopped\' state.
Only works if this node is EBS-backed, raises
exception.InvalidOperation otherwise.
NOTE: The EBS root device will *not* be deleted and the instance can
be \'started\' later on.'

def stop(self):

    if self.is_spot():
        raise exception.InvalidOperation('spot    instances    can    not    be    stopped')
    elif (not self.is_ebs_backed()):
        raise exception.InvalidOperation('Only    EBS-backed    instances    can    be    stopped')
    if (not self.is_stopped()):
        log.info(('Stopping    node:    %s    (%s)' % (self.alias, self.id)))
        return self.instance.stop()
    else:
        log.info(("Node    '%s'    is    already    stopped" % self.alias))
