def power(name='power_on', wait=300, **kwargs):
 ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
 org = __salt__['ipmi.get_power'](**kwargs)
 state_map = {'off': 'off', 'on': 'on', 'power_off': 'off', 'power_on': 'on', 'shutdown': 'off', 'reset': 'na', 'boot': 'na'}
 if (org == state_map[name]):
  ret['result'] = True
  ret['comment'] = 'system already in this state'
  return ret
 if __opts__['test']:
  ret['comment'] = 'would power: {0} system'.format(name)
  ret['result'] = None
  ret['changes'] = {'old': org, 'new': name}
  return ret
 outdddd = __salt__['ipmi.set_power'](name, wait=wait, **kwargs)
 ret['comment'] = 'changed system power'
 ret['result'] = True
 ret['changes'] = {'old': org, 'new': name}
 return ret

def power ( name = 'power_on' , wait = 300 , ** kwargs ) : ret = { 'name' : name , 'result' : False , 'comment' : '' , 'changes' : { } } org = __salt__ [ 'ipmi.get_power' ] ( ** kwargs ) state_map = { 'off' : 'off' , 'on' : 'on' , 'power_off' : 'off' , 'power_on' : 'on' , 'shutdown' : 'off' , 'reset' : 'na' , 'boot' : 'na' } if ( org == state_map [ name ] ) : ret [ 'result' ] = True ret [ 'comment' ] = 'system already in this state' return ret if __opts__ [ 'test' ] : ret [ 'comment' ] = 'would power: {0} system' . format ( name ) ret [ 'result' ] = None ret [ 'changes' ] = { 'old' : org , 'new' : name } return ret outdddd = __salt__ [ 'ipmi.set_power' ] ( name , wait = wait , ** kwargs ) ret [ 'comment' ] = 'changed system power' ret [ 'result' ] = True ret [ 'changes' ] = { 'old' : org , 'new' : name } return ret
returns the specified power of a graph .