parameters: (host, salt_data)
return_statement: return info
docstring: salt更新资产添加历史记录
docstring_summary: salt更新资产添加历史记录
docstring_tokens: salt更新资产添加历史记录
function: def salt_record(host, salt_data):
      """ salt更新资产添加历史记录 """
      info = {}
      field_list = ['eth1', 'mac', 'system', 'system_cpuarch', 'server_sn',
                    'system_version', 'cpu', 'core_num', 'hard_disk', 'memory', 'brand']
      host_dic = host.__dict__
      for field in field_list:
          old = host_dic.get(field)
          new = salt_data.get(field)
          if old != new:
              info[field] = [old, new]
      return info
function_tokens: def salt_record ( host , salt_data ) : info = { } field_list = [ 'eth1' , 'mac' , 'system' , 'system_cpuarch' , 'server_sn' , 'system_version' , 'cpu' , 'core_num' , 'hard_disk' , 'memory' , 'brand' ] host_dic = host . __dict__ for field in field_list : old = host_dic . get ( field ) new = salt_data . get ( field ) if old != new : info [ field ] = [ old , new ] return info