'Reboot a node.
Because Cloudsigma API does not provide native reboot call,
it\'s emulated using stop and start.
@inherits: :class:`NodeDriver.reboot_node`'

def reboot_node(self, node):

    node = self._get_node(node.id)
    state = node.state
    if (state == NodeState.RUNNING):
        stopped = self.ex_stop_node(node)
    else:
        stopped = True
    if (not stopped):
        raise CloudSigmaException(('Could    not    stop    node    with    id    %s' % node.id))
    success = self.ex_start_node(node)
    return success
