Add gateway_mode configuration

Change-Id: I99ffab4ab4ffbfd251cf3604c59c52e6f5911d6c
diff --git a/README.rst b/README.rst
index 561e785..f858209 100644
--- a/README.rst
+++ b/README.rst
@@ -576,6 +576,19 @@
           dns: 127.0.0.1
           mtu: 9000
 
+
+Compute nodes with gateway_mode
+-------------------------------
+
+Gateway mode: can be server/ vcpe (default is none)
+
+.. code-block:: yaml
+
+    opencontrail:
+      compute:
+        gateway_mode: server
+
+
 Keystone v3
 -----------
 
diff --git a/opencontrail/files/3.0/contrail-vrouter-agent.conf b/opencontrail/files/3.0/contrail-vrouter-agent.conf
index 366a59b..c3f94d4 100644
--- a/opencontrail/files/3.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-agent.conf
@@ -85,6 +85,10 @@
 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 
 # mandatory. Else this section is optional
diff --git a/opencontrail/files/4.0/contrail-vrouter-agent.conf b/opencontrail/files/4.0/contrail-vrouter-agent.conf
index 3ad242a..94d170d 100644
--- a/opencontrail/files/4.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/4.0/contrail-vrouter-agent.conf
@@ -100,6 +100,9 @@
 
 # Gateway mode : can be server/ vcpe (default is none)
 # gateway_mode=
+{%- if compute.gateway_mode is defined %}
+gateway_mode={{ compute.gateway_mode }}
+{%- endif %}
 
 [SANDESH]
 # sandesh_ssl_enable=false