{%- set default_params = {
    'cacert_file': salt['grains.filter_by']({
        'Debian': '/etc/ssl/certs/ca-certificates.crt',
        'RedHat': '/etc/pki/tls/certs/ca-bundle.crt'
    })}
%}

{% set agent = salt['grains.filter_by']({
    'BaseDefaults': default_params,
    'Debian': {
        'enabled': false,
        'pkgs': ['ceilometer-agent-compute'],
        'services': ['ceilometer-agent-compute'],
        'notification': {
          'topics': 'notifications'
        },
        'logging': {
          'app_name': 'ceilometer',
          'log_appender': false,
          'log_handlers': {
            'watchedfile': {
              'enabled': true
            }
          },
        },
    },
    'RedHat': {
        'enabled': false,
        'pkgs': ['openstack-ceilometer-compute'],
        'services': ['openstack-ceilometer-compute'],
        'notification': {
          'topics': 'notifications'
        },
        'logging': {
          'app_name': 'ceilometer',
          'log_appender': false,
          'log_handlers': {
            'watchedfile': {
              'enabled': true
            }
          },
        },
    },
}, merge=salt['pillar.get']('ceilometer:agent', {}), base='BaseDefaults') %}

# Server initialization

{% set pkgs = salt['grains.filter_by']({
    'Debian': {
        'alarm': ['ceilometer-alarm-evaluator', 'ceilometer-alarm-notifier'],
        'collector': ['ceilometer-collector'],
        'basic': ['ceilometer-agent-central', 'python-ceilometerclient', 'ceilometer-agent-notification'],
        'api': ['ceilometer-api'],
        'db_drivers': ['python-elasticsearch', 'python-influxdb', 'python-pymongo'],
        'opendaylight': ['python-networking-odl'],
    },
    'RedHat': {
        'alarm': ['openstack-ceilometer-alarm-evaluator', 'openstack-ceilometer-alarm-notifier'],
        'basic':[ 'openstack-ceilometer-central', 'python-ceilometerclient'],
        'api': ['openstack-ceilometer-api'],
        'collector':['openstack-ceilometer-collector'],
        'db_drivers': ['python-elasticsearch', 'python-influxdb', 'python-pymongo'],
        'opendaylight': ['python-networking-odl'],
    },
}) %}

{% set services = salt['grains.filter_by']({
    'Debian': {
        'alarm': ['ceilometer-alarm-evaluator', 'ceilometer-alarm-notifier'],
        'collector': ['ceilometer-collector'],
        'basic': ['ceilometer-agent-central', 'ceilometer-agent-notification'],
        'webserved': ['ceilometer-api'],
    },
    'RedHat': {
        'alarm':['openstack-ceilometer-alarm-evaluator', 'openstack-ceilometer-alarm-notifier'],
        'basic':['openstack-ceilometer-central', 'openstack-ceilometer-notification'],
        'collector': ['openstack-ceilometer-collector'],
        'webserved': ['openstack-ceilometer-api'],
    },
}) %}

{%- set server = salt['grains.filter_by']({
    'BaseDefaults': default_params,
    'default': {
        'enabled': false,
        'notification': {
          'topics': 'notifications'
        },
        'logging': {
          'app_name': 'ceilometer',
          'log_appender': false,
          'log_handlers': {
            'watchedfile': {
              'enabled': true
            }
          },
        },
    }
}, merge=salt['pillar.get']('ceilometer:server',{}), base='BaseDefaults') %}

# Mitaka and newer OpenStack releases don't need collector and alarm
# packages/services, because alarming is implemented by Aodh and collector
# stuff is implemented by the ceilometer_collector service.
# The ceilometer api for Ocata and Newton is served by webserver.
# The ceilometer api and db drivers for Pike and newer are deprecated.
{%- if salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['liberty', 'juno', 'kilo'] %}
{%-   do server.update({'pkgs': pkgs.api + pkgs.basic + pkgs.collector + pkgs.alarm}) %}
{%- elif salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['mitaka', 'newton', 'ocata'] %}
{%-   do server.update({'pkgs': pkgs.api + pkgs.basic + pkgs.db_drivers}) %}
{%- else %}
{%-   do server.update({'pkgs': pkgs.basic}) %}
{%- endif %}

{%- do server.pkgs.extend(pkgs.opendaylight) if salt['pillar.get']('ceilometer:server:opendaylight', False) %}

{%- if salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['liberty', 'juno', 'kilo'] %}
{%-   do server.update({'services': services.basic + services.collector + services.alarm + services.webserved}) %}
{%- elif salt['pillar.get']('ceilometer:server:version', 'ocata') == 'mitaka' %}
{%-   do server.update({'services': services.basic + services.webserved}) %}
{%- else %}
{%-   do server.update({'services': services.basic}) %}
{%- endif %}

{%- set upgrade = pillar.get('ceilometer', {}).get('upgrade', {}) %}
