@utils.arg('host', metavar='<hostname>', help=_('Name of host.'))
@utils.arg('--status', metavar='<enable|disable>', default=None, dest='status', help=_('Either enable or disable a host.'))
@utils.arg('--maintenance', metavar='<enable|disable>', default=None, dest='maintenance', help=_('Either put or resume host to/from maintenance.'))
def do_host_update(cs, args):
 updates = {}
 columns = ['HOST']
 if args.status:
  updates['status'] = args.status
  columns.append('status')
 if args.maintenance:
  updates['maintenance_mode'] = args.maintenance
  columns.append('maintenance_mode')
 result = cs.hosts.update(args.host, updates)
 utils.print_list([result], columns)

@ utils . arg ( 'host' , metavar = '<hostname>' , help = _ ( 'Name of host.' ) ) @ utils . arg ( '--status' , metavar = '<enable|disable>' , default = None , dest = 'status' , help = _ ( 'Either enable or disable a host.' ) ) @ utils . arg ( '--maintenance' , metavar = '<enable|disable>' , default = None , dest = 'maintenance' , help = _ ( 'Either put or resume host to/from maintenance.' ) ) def do_host_update ( cs , args ) : updates = { } columns = [ 'HOST' ] if args . status : updates [ 'status' ] = args . status columns . append ( 'status' ) if args . maintenance : updates [ 'maintenance_mode' ] = args . maintenance columns . append ( 'maintenance_mode' ) result = cs . hosts . update ( args . host , updates ) utils . print_list ( [ result ] , columns )
update host settings .