blob: 62645d8ab6255582af3708eb0c33e7378460de76 [file] [log] [blame]
{%- from "opencontrail/map.jinja" import config with context %}
{%- if config.identity.engine == "none" %}
[DEFAULT]
aaa_mode=no-auth
{%- endif %}
[DEFAULTS]
collectors = {% for member in config.analytics.members %}{{ member.host }}:8086 {% endfor %}
cassandra_server_list={% for member in config.database.members %}{{ member.host }}:9161 {% endfor %}
listen_ip_addr=0.0.0.0
listen_port={{ config.bind.get('api_port', '8082') }}
aaa_mode={{ config.get('aaa_mode', 'cloud-admin') }}
cloud_admin_role={{ config.get('cloud_admin_role', 'admin') }}
{%- if config.global_read_only_role is defined %}
global_read_only_role={{ config.global_read_only_role }}
{%- endif %}
log_file=/var/log/contrail/contrail-api.log
log_local=1
log_level=SYS_NOTICE
#zk_server_ip=10.0.102.31:2181,10.0.102.32:2181,10.0.102.33:2181
zk_server_ip={% for member in config.database.members %}{{ member.host }}:2181{% if not loop.last %},{% endif %}{% endfor %}
redis_server_ip=$__contrail_redis_ip__
{%- if config.message_queue.members is defined %}
rabbit_server={{ config.message_queue.members|join(',',attribute='host') }}
rabbit_ha_mode=True
{%- else %}
rabbit_server={{ config.message_queue.host }}
{%- endif %}
rabbit_port={{ config.message_queue.port }}
{%- if config.identity.engine == "keystone" and not config.get('k8s_enabled', False) %}
auth=keystone
{%- endif %}
#rabbit_port=5673
{%- if config.message_queue.virtual_host is defined %}
rabbit_vhost={{config.message_queue.virtual_host}}
{%- endif %}
{%- if config.message_queue.user is defined %}
rabbit_user={{config.message_queue.user}}
{%- endif %}
{%- if config.message_queue.password is defined %}
rabbit_password={{config.message_queue.password}}
{%- endif %}
{% if config.override_rpf_default_by is defined %}
override_rpf_default_by={{ config.override_rpf_default_by | lower }}
{% endif %}
{%- if config.get('list_optimization_enabled', False) %}
list_optimization_enabled=True
{%- endif %}
{%- if config.get('sandesh_send_rate_limits', {}).get('config_api') %}
sandesh_send_rate_limit={{ config.sandesh_send_rate_limits.config_api }}
{%- elif config.get('sandesh_send_rate_limits', {}).get('global') %}
sandesh_send_rate_limit={{ config.sandesh_send_rate_limits.global }}
{%- endif %}
{%- if config.keystone_resync_interval_secs is defined %}
keystone_resync_interval_secs={{ config.keystone_resync_interval_secs }}
{%- endif %}
# (StrOpt) default encoding to use for string resources.
# this is optional variable. Define it if you want to override
# the default encoder returned by sys.getdefaultencoding()
# default_encoding = <encoding name>
# Eg. to set ascii as the encoder
# default_encoding = ascii
# Eg. to set utf-8 as the encoder
# default_encoding = utf-8
[SECURITY]
use_certs=False
keyfile=/etc/contrail/ssl/private_keys/apiserver_key.pem
certfile=/etc/contrail/ssl/certs/apiserver.pem
ca_certs=/etc/contrail/ssl/certs/ca.pem
{% if config.quota is defined %}
[QUOTA]
{%- if config.quota.network is defined %}
virtual_network={{config.quota.network}}
{%- endif %}
{%- if config.quota.subnet is defined %}
subnet={{config.quota.subnet}}
{%- endif %}
{%- if config.quota.floating_ip is defined %}
floating_ip={{config.quota.floating_ip}}
{%- endif %}
{%- if config.quota.router is defined %}
logical_router={{config.quota.router}}
{%- endif %}
{%- if config.quota.secgroup is defined %}
security_group={{config.quota.secgroup}}
{%- endif %}
{%- if config.quota.secgroup_rule is defined %}
security_group_rule={{config.quota.secgroup_rule}}
{%- endif %}
{%- if config.quota.port is defined %}
virtual_machine_interface={{config.quota.port}}
{%- endif %}
{%- if config.quota.pool is defined %}
loadbalancer_pool={{config.quota.pool}}
{%- endif %}
{%- if config.quota.member is defined %}
loadbalancer_member={{config.quota.member}}
{%- endif %}
{%- if config.quota.health_monitor is defined %}
loadbalancer_healthmonitor={{config.quota.health_monitor}}
{%- endif %}
{%- if config.quota.vip is defined %}
virtual_ip={{config.quota.vip}}
{%- endif %}
{%- endif %}
[SANDESH]
#sandesh_ssl_enable=false
#introspect_ssl_enable=false
#sandesh_keyfile=/etc/contrail/ssl/private/server-privkey.pem
#sandesh_certfile=/etc/contrail/ssl/certs/server.pem
#sandesh_ca_cert=/etc/contrail/ssl/certs/ca-cert.pem
[KEYSTONE]
keystone_sync_on_demand={{ config.identity.get('sync_on_demand', 'true') }}