blob: 7dfb6f9398056384e91fedf2f08a0678d3fc436d [file] [log] [blame]
{%- from "ceilometer/map.jinja" import server with context %}
{%- from "ceilometer/map.jinja" import agent with context %}
{%- if server.get('enabled', False) %}
{%- set publisher = server.get('publisher', {}) %}
{%- else %}
{%- set publisher = agent.get('publisher', {}) %}
{%- endif %}
{%- set publisher_lst = [] %}
{%- if publisher %}
{%- for k, v in publisher.items() %}
{%- if v.get('enabled', False) and v.get('publish_event', False) %}
{%- if k == 'default' %}
{%- do publisher_lst.append( 'direct://' ) %}
{%- else %}
{%- do publisher_lst.append( v.url ) %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- else %}
{%- do publisher_lst.append( 'notifier://' ) %}
{%- endif %}
{# #}
{%- set extra_event_sources_list = server.get("extra_event_sources_list",[]) %}
{%- set extra_event_sinks_list = server.get("extra_event_sinks_list",[]) %}
---
sources:
- name: event_source
events:
- "*"
sinks:
- event_sink
{%- if extra_event_sources_list %}
{{ extra_event_sources_list|yaml(False)|indent(4) }}
{%- endif %}
sinks:
- name: event_sink
transformers:
publishers:
{{ publisher_lst|yaml(False)|indent(10) }}
{%- if extra_event_sinks_list %}
{{ extra_event_sinks_list|yaml(False)|indent(4) }}
{%- endif %}