def reboot(name, path=None):
 ret = {'result': True, 'changes': {}, 'comment': '{0} rebooted'.format(name)}
 does_exist = exists(name, path=path)
 if (does_exist and (state(name, path=path) == 'running')):
  try:
   stop(name, path=path)
  except (SaltInvocationError, CommandExecutionError) as exc:
   ret['comment'] = 'Unable to stop container: {0}'.format(exc)
   ret['result'] = False
   return ret
 if (does_exist and (state(name, path=path) != 'running')):
  try:
   start(name, path=path)
  except (SaltInvocationError, CommandExecutionError) as exc:
   ret['comment'] = 'Unable to stop container: {0}'.format(exc)
   ret['result'] = False
   return ret
 ret['changes'][name] = 'rebooted'
 return ret

def reboot ( name , path = None ) : ret = { 'result' : True , 'changes' : { } , 'comment' : '{0} rebooted' . format ( name ) } does_exist = exists ( name , path = path ) if ( does_exist and ( state ( name , path = path ) == 'running' ) ) : try : stop ( name , path = path ) except ( SaltInvocationError , CommandExecutionError ) as exc : ret [ 'comment' ] = 'Unable to stop container: {0}' . format ( exc ) ret [ 'result' ] = False return ret if ( does_exist and ( state ( name , path = path ) != 'running' ) ) : try : start ( name , path = path ) except ( SaltInvocationError , CommandExecutionError ) as exc : ret [ 'comment' ] = 'Unable to stop container: {0}' . format ( exc ) ret [ 'result' ] = False return ret ret [ 'changes' ] [ name ] = 'rebooted' return ret
reboot a domain via acpi request cli example: .