blob: cc8c05d13fba149908355712a932fe21f4da47fe [file] [log] [blame]
{%- from "opencontrail/map.jinja" import compute with context %}
{%- set agent = salt['pillar.get']('opencontrail:compute:tor:agent:'+agent_name) %}
{%- set port = compute.tor.bind.port + agent.id %}
# Vnswad configuration options
#
[CONTROL-NODE]
# IP address to be used to connect to control-node. Maximum of 2 IP addresses
# (separated by a space) can be provided. If no IP is configured then the
# value provided by discovery service will be used. (optional)
# server=10.0.0.1 10.0.0.2
[DEFAULT]
agent_name={{ pillar.linux.system.name }}-{{ agent.id }}
# Everything in this section is optional
# IP address and port to be used to connect to collector. If these are not
# configured, value provided by discovery service will be used. Multiple
# IP:port strings separated by space can be provided
# collectors=127.0.0.1:8086
# Enable/disable debug logging. Possible values are 0 (disable) and 1 (enable)
# debug=0
# Aging time for flow-records in seconds
# flow_cache_timeout=0
# Hostname of compute-node. If this is not configured value from `hostname`
# will be taken
# hostname=
# Category for logging. Default value is '*'
# log_category=
# Local log file name
log_file=/var/log/contrail/contrail-tor-agent-{{ agent.id }}.log
# Log severity levels. Possible values are SYS_EMERG, SYS_ALERT, SYS_CRIT,
# SYS_ERR, SYS_WARN, SYS_NOTICE, SYS_INFO and SYS_DEBUG. Default is SYS_DEBUG
# log_level=SYS_DEBUG
# Enable/Disable local file logging. Possible values are 0 (disable) and 1 (enable)
# log_local=0
# Enable/Disable local flow message logging. Possible values are 0 (disable) and 1 (enable)
# log_flow=0
# Encapsulation type for tunnel. Possible values are MPLSoGRE, MPLSoUDP, VXLAN
# tunnel_type=
# Enable/Disable headless mode for agent. In headless mode agent retains last
# known good configuration from control node when all control nodes are lost.
# Possible values are true(enable) and false(disable)
# headless_mode=
# Define agent mode. Only supported value is "tor"
agent_mode=tor
# Http server port for inspecting vnswad state (useful for debugging)
# http_server_port=8085
http_server_port={{ port }}
[DNS]
# IP address to be used to connect to dns-node. Maximum of 2 IP addresses
# (separated by a space) can be provided. If no IP is configured then the
# value provided by discovery service will be used. (Optional)
# server=10.0.0.1 10.0.0.2
[NETWORKS]
# control-channel IP address used by WEB-UI to connect to vnswad to fetch
# required information (Optional)
{%- if compute.bind is defined %}
control_network_ip={{ compute.bind.address }}
{%- else %}
control_network_ip={{ compute.interface.address }}
{%- endif %}
[TOR]
{%- if agent.ssl is not defined %}
# IP address of the TOR to manage
tor_ip={{ agent.host }}
{%- endif %}
# Identifier for ToR. Agent will subscribe to ifmap-configuration by this name
tor_id={{ agent.id }}
# ToR management scheme is based on this type. Only supported value is "ovs"
tor_type=ovs
# OVS server port number on the ToR
tor_ovs_port={{ agent.get('port', 6632) }}
# IP-Transport protocol used to connect to tor. Only supported value is "tcp"
{%- if agent.ssl is defined %}
tor_ovs_protocol=pssl
{%- else %}
tor_ovs_protocol=tcp
{%- endif %}
tsn_ip={{ compute.interface.address }}
tor_keepalive_interval={{ agent.get('tor_keepalive_interval', 10000) }}
{%- if agent.ssl is defined %}
ssl_cert={{ agent.ssl.get('cert', '/etc/contrail/ssl/certs/tor.crt') }}
ssl_privkey={{ agent.ssl.get('key', '/etc/contrail/ssl/certs/tor.key') }}
ssl_cacert={{ agent.ssl.get('ca', '/etc/contrail/ssl/certs/ca.crt') }}
{%- endif %}