Try to get all sort of parameters for Server Density server info.

    NOTE: Missing publicDNS and publicIPs parameters. There might be way of
    getting them with salt-cloud.

def _get_salt_params():
    '''
    Try to get all sort of parameters for Server Density server info.

    NOTE: Missing publicDNS and publicIPs parameters. There might be way of
    getting them with salt-cloud.
    '''
    all_stats = __salt__['status.all_status']()
    all_grains = __salt__['grains.items']()
    params = {}
    try:
        params['name'] = all_grains['id']
        params['hostname'] = all_grains['host']
        if all_grains['kernel'] == 'Darwin':
            sd_os = {'code': 'mac', 'name': 'Mac'}
        else:
            sd_os = {'code': all_grains['kernel'].lower(), 'name': all_grains['kernel']}
        params['os'] = salt.utils.json.dumps(sd_os)
        params['cpuCores'] = all_stats['cpuinfo']['cpu cores']
        params['installedRAM'] = six.text_type(int(all_stats['meminfo']['MemTotal']['value']) / 1024)
        params['swapSpace'] = six.text_type(int(all_stats['meminfo']['SwapTotal']['value']) / 1024)
        params['privateIPs'] = salt.utils.json.dumps(all_grains['fqdn_ip4'])
        params['privateDNS'] = salt.utils.json.dumps(all_grains['fqdn'])
    except KeyError:
        pass

    return params