@depends(HAS_ESX_CLI)
def set_coredump_network_config(host, username, password, dump_ip, protocol=None, port=None, host_vnic='vmk0', dump_port=6500, esxi_hosts=None):
 cmd = 'system coredump network set -v {0} -i {1} -o {2}'.format(host_vnic, dump_ip, dump_port)
 ret = {}
 if esxi_hosts:
  if (not isinstance(esxi_hosts, list)):
   raise CommandExecutionError("'esxi_hosts' must be a list.")
  for esxi_host in esxi_hosts:
   response = salt.utils.vmware.esxcli(host, username, password, cmd, protocol=protocol, port=port, esxi_host=esxi_host)
   if (response['retcode'] != 0):
    response['success'] = False
   else:
    response['success'] = True
   ret.update({esxi_host: response})
 else:
  response = salt.utils.vmware.esxcli(host, username, password, cmd, protocol=protocol, port=port)
  if (response['retcode'] != 0):
   response['success'] = False
  else:
   response['success'] = True
  ret.update({host: response})
 return ret

@ depends ( HAS_ESX_CLI ) def set_coredump_network_config ( host , username , password , dump_ip , protocol = None , port = None , host_vnic = 'vmk0' , dump_port = 6500 , esxi_hosts = None ) : cmd = 'system coredump network set -v {0} -i {1} -o {2}' . format ( host_vnic , dump_ip , dump_port ) ret = { } if esxi_hosts : if ( not isinstance ( esxi_hosts , list ) ) : raise CommandExecutionError ( "'esxi_hosts' must be a list." ) for esxi_host in esxi_hosts : response = salt . utils . vmware . esxcli ( host , username , password , cmd , protocol = protocol , port = port , esxi_host = esxi_host ) if ( response [ 'retcode' ] != 0 ) : response [ 'success' ] = False else : response [ 'success' ] = True ret . update ( { esxi_host : response } ) else : response = salt . utils . vmware . esxcli ( host , username , password , cmd , protocol = protocol , port = port ) if ( response [ 'retcode' ] != 0 ) : response [ 'success' ] = False else : response [ 'success' ] = True ret . update ( { host : response } ) return ret
set the network parameters for a network coredump collection .