Merge "Fix name in .kitchen.travis.yml file"
diff --git a/README.rst b/README.rst
index 945aed3..54e9502 100644
--- a/README.rst
+++ b/README.rst
@@ -102,6 +102,7 @@
         members:
         - host: 127.0.0.1
           id: 1
+        rootlogger: "INFO, CONSOLE"
       control:
         version: 2.2
         enabled: true
diff --git a/opencontrail/config.sls b/opencontrail/config.sls
index 84998e7..502d2aa 100644
--- a/opencontrail/config.sls
+++ b/opencontrail/config.sls
@@ -34,6 +34,7 @@
 /etc/ifmap-server/log4j.properties:
   file.managed:
   - source: salt://opencontrail/files/{{ config.version }}/config/log4j.properties
+  - template: jinja
   - require:
     - pkg: opencontrail_config_packages
 
diff --git a/opencontrail/files/2.2/config/log4j.properties b/opencontrail/files/2.2/config/log4j.properties
index 8a1fa76..126e749 100644
--- a/opencontrail/files/2.2/config/log4j.properties
+++ b/opencontrail/files/2.2/config/log4j.properties
@@ -1,6 +1,7 @@
+{%- from "opencontrail/map.jinja" import config with context %}
 
 # Set root logger level to DEBUG and its only appender to CONSOLE
-log4j.rootLogger=TRACE, CONSOLE
+log4j.rootLogger={{ config.get('rootlogger', 'TRACE, CONSOLE') }}
 log4j.error
 
 log4j.logger.de.fhhannover.inform.irond.proc=TRACE, A1, A2
diff --git a/opencontrail/files/3.0/config/log4j.properties b/opencontrail/files/3.0/config/log4j.properties
index 8a1fa76..126e749 100644
--- a/opencontrail/files/3.0/config/log4j.properties
+++ b/opencontrail/files/3.0/config/log4j.properties
@@ -1,6 +1,7 @@
+{%- from "opencontrail/map.jinja" import config with context %}
 
 # Set root logger level to DEBUG and its only appender to CONSOLE
-log4j.rootLogger=TRACE, CONSOLE
+log4j.rootLogger={{ config.get('rootlogger', 'TRACE, CONSOLE') }}
 log4j.error
 
 log4j.logger.de.fhhannover.inform.irond.proc=TRACE, A1, A2
diff --git a/opencontrail/files/3.0/contrail-vrouter-agent.conf b/opencontrail/files/3.0/contrail-vrouter-agent.conf
index 0a66be5..f4b5b8d 100644
--- a/opencontrail/files/3.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-agent.conf
@@ -4,7 +4,7 @@
 #
 
 [CONTROL-NODE]
-# IP address to be used to connect to control-node. Maximum of 2 IP addresses 
+# 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
@@ -19,6 +19,9 @@
 
 # Agent mode : can be vrouter / tsn / tor (default is vrouter)
 # agent_mode=
+{%- if compute.get('tor', {}).get('enabled', False) %}
+agent_mode = tsn
+{%- endif %}
 
 # Enable/disable debug logging. Possible values are 0 (disable) and 1 (enable)
 # debug=0
@@ -55,7 +58,7 @@
 # Local log file name
 log_file=/var/log/contrail/contrail-vrouter-agent.log
 
-# Log severity levels. Possible values are SYS_EMERG, SYS_ALERT, SYS_CRIT, 
+# 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_NOTICE
 
@@ -81,16 +84,13 @@
 # DHCP relay mode (true or false) to determine if a DHCP request in fabric
 # interface with an unconfigured IP should be relayed or not
 # dhcp_relay_mode=
-{%- if compute.get('tor', {}).get('enabled', False) %}
-agent_mode = tsn
-{%- endif %}
 
 {%- if compute.gateway_mode is defined %}
 gateway_mode={{ compute.gateway_mode }}
 {%- endif %}
 
 [DISCOVERY]
-# If COLLECTOR and/or CONTROL-NODE and/or DNS is not specified this section is 
+# If COLLECTOR and/or CONTROL-NODE and/or DNS is not specified this section is
 # mandatory. Else this section is optional
 
 # IP address and port of discovery server
@@ -180,7 +180,7 @@
 # (like metadata...)
 #compute_node_address = 10.204.216.28
 
-# We can have multiple gateway sections with different indices in the 
+# We can have multiple gateway sections with different indices in the
 # following format
 # [GATEWAY-0]
 # Name of the routing_instance for which the gateway is being configured
@@ -190,7 +190,7 @@
 # interface=vgw
 
 # Virtual network ip blocks for which gateway service is required. Each IP
-# block is represented as ip/prefix. Multiple IP blocks are represented by 
+# block is represented as ip/prefix. Multiple IP blocks are represented by
 # separating each with a space
 # ip_blocks=1.1.1.1/24
 
@@ -202,7 +202,7 @@
 # interface=vgw1
 
 # Virtual network ip blocks for which gateway service is required. Each IP
-# block is represented as ip/prefix. Multiple IP blocks are represented by 
+# block is represented as ip/prefix. Multiple IP blocks are represented by
 # separating each with a space
 # ip_blocks=2.2.1.0/24 2.2.2.0/24
 
diff --git a/tests/pillar/control.sls b/tests/pillar/control.sls
index 0ae7584..1800c00 100644
--- a/tests/pillar/control.sls
+++ b/tests/pillar/control.sls
@@ -63,6 +63,7 @@
     - host: 127.0.0.1
       id: 3
     list_optimization_enabled: true
+    rootlogger: "INFO, CONSOLE"
   control:
     version: 3.0
     enabled: true