def _reset_syslog_config_params(host, username, password, cmd, resets, valid_resets, protocol=None, port=None, esxi_host=None):
 ret_dict = {}
 all_success = True
 if (not isinstance(resets, list)):
  resets = [resets]
 for reset_param in resets:
  if (reset_param in valid_resets):
   ret = salt.utils.vmware.esxcli(host, username, password, (cmd + reset_param), protocol=protocol, port=port, esxi_host=esxi_host)
   ret_dict[reset_param] = {}
   ret_dict[reset_param]['success'] = (ret['retcode'] == 0)
   if (ret['retcode'] != 0):
    all_success = False
    ret_dict[reset_param]['message'] = ret['stdout']
  else:
   all_success = False
   ret_dict[reset_param] = {}
   ret_dict[reset_param]['success'] = False
   ret_dict[reset_param]['message'] = 'Invalid syslog configuration parameter'
 ret_dict['success'] = all_success
 return ret_dict

def _reset_syslog_config_params ( host , username , password , cmd , resets , valid_resets , protocol = None , port = None , esxi_host = None ) : ret_dict = { } all_success = True if ( not isinstance ( resets , list ) ) : resets = [ resets ] for reset_param in resets : if ( reset_param in valid_resets ) : ret = salt . utils . vmware . esxcli ( host , username , password , ( cmd + reset_param ) , protocol = protocol , port = port , esxi_host = esxi_host ) ret_dict [ reset_param ] = { } ret_dict [ reset_param ] [ 'success' ] = ( ret [ 'retcode' ] == 0 ) if ( ret [ 'retcode' ] != 0 ) : all_success = False ret_dict [ reset_param ] [ 'message' ] = ret [ 'stdout' ] else : all_success = False ret_dict [ reset_param ] = { } ret_dict [ reset_param ] [ 'success' ] = False ret_dict [ reset_param ] [ 'message' ] = 'Invalid syslog configuration parameter' ret_dict [ 'success' ] = all_success return ret_dict
helper function for reset_syslog_config that resets the config and populates the return dictionary .