@utils.arg('host', metavar='<hostname>', help=_('Name of host.'))
@utils.arg('--action', metavar='<action>', dest='action', choices=['startup', 'shutdown', 'reboot'], help=_('A power action: startup, reboot, or shutdown.'))
def do_host_action(cs, args):
 result = cs.hosts.host_action(args.host, args.action)
 utils.print_list([result], ['HOST', 'power_action'])

@ utils . arg ( 'host' , metavar = '<hostname>' , help = _ ( 'Name of host.' ) ) @ utils . arg ( '--action' , metavar = '<action>' , dest = 'action' , choices = [ 'startup' , 'shutdown' , 'reboot' ] , help = _ ( 'A power action: startup, reboot, or shutdown.' ) ) def do_host_action ( cs , args ) : result = cs . hosts . host_action ( args . host , args . action ) utils . print_list ( [ result ] , [ 'HOST' , 'power_action' ] )
perform a power action on a host .