@utils.arg('host', metavar='<host>', help='Name of host.')
@utils.arg('--target_host', metavar='<target_host>', default=None, help=_('Name of target host. If no host is specified the scheduler will select a target.'))
@utils.arg('--on-shared-storage', dest='on_shared_storage', action='store_true', default=False, help=_('Specifies whether all instances files are on shared storage'), start_version='2.0', end_version='2.13')
@utils.arg('--force', dest='force', action='store_true', default=False, help=_('Force to not verify the scheduler if a host is provided.'), start_version='2.29')
def do_host_evacuate(cs, args):
 hypervisors = cs.hypervisors.search(args.host, servers=True)
 response = []
 for hyper in hypervisors:
  if hasattr(hyper, 'servers'):
   for server in hyper.servers:
    response.append(_server_evacuate(cs, server, args))
 utils.print_list(response, ['Server UUID', 'Evacuate Accepted', 'Error Message'])

@ utils . arg ( 'host' , metavar = '<host>' , help = 'Name of host.' ) @ utils . arg ( '--target_host' , metavar = '<target_host>' , default = None , help = _ ( 'Name of target host. If no host is specified the scheduler will select a target.' ) ) @ utils . arg ( '--on-shared-storage' , dest = 'on_shared_storage' , action = 'store_true' , default = False , help = _ ( 'Specifies whether all instances files are on shared storage' ) , start_version = '2.0' , end_version = '2.13' ) @ utils . arg ( '--force' , dest = 'force' , action = 'store_true' , default = False , help = _ ( 'Force to not verify the scheduler if a host is provided.' ) , start_version = '2.29' ) def do_host_evacuate ( cs , args ) : hypervisors = cs . hypervisors . search ( args . host , servers = True ) response = [ ] for hyper in hypervisors : if hasattr ( hyper , 'servers' ) : for server in hyper . servers : response . append ( _server_evacuate ( cs , server , args ) ) utils . print_list ( response , [ 'Server UUID' , 'Evacuate Accepted' , 'Error Message' ] )
evacuate all instances from failed host .