def _osx_platform_data():
 cmd = 'system_profiler SPHardwareDataType'
 hardware = __salt__['cmd.run'](cmd)
 grains = {}
 for line in hardware.splitlines():
  (field_name, _, field_val) = line.partition(': ')
  if (field_name.strip() == 'Model Name'):
   key = 'model_name'
   grains[key] = _clean_value(key, field_val)
  if (field_name.strip() == 'Boot ROM Version'):
   key = 'boot_rom_version'
   grains[key] = _clean_value(key, field_val)
  if (field_name.strip() == 'SMC Version (system)'):
   key = 'smc_version'
   grains[key] = _clean_value(key, field_val)
  if (field_name.strip() == 'Serial Number (system)'):
   key = 'system_serialnumber'
   grains[key] = _clean_value(key, field_val)
 return grains

def _osx_platform_data ( ) : cmd = 'system_profiler SPHardwareDataType' hardware = __salt__ [ 'cmd.run' ] ( cmd ) grains = { } for line in hardware . splitlines ( ) : ( field_name , _ , field_val ) = line . partition ( ': ' ) if ( field_name . strip ( ) == 'Model Name' ) : key = 'model_name' grains [ key ] = _clean_value ( key , field_val ) if ( field_name . strip ( ) == 'Boot ROM Version' ) : key = 'boot_rom_version' grains [ key ] = _clean_value ( key , field_val ) if ( field_name . strip ( ) == 'SMC Version (system)' ) : key = 'smc_version' grains [ key ] = _clean_value ( key , field_val ) if ( field_name . strip ( ) == 'Serial Number (system)' ) : key = 'system_serialnumber' grains [ key ] = _clean_value ( key , field_val ) return grains
additional data for macos systems returns: a dictionary containing values for the following: - model_name - boot_rom_version - smc_version - system_serialnumber .