Allow separate control and vhost0 IPs in contrail-vrouter-agent.conf

Add possibility to separate the control path for XMPP communication
between vrouter and contrail controllers to go over a separate network
from tenant traffic.

Change-Id: If618adcf6a06c2da3089b62d7433adac2c431acd
Closes-bug: PROD-8436
diff --git a/README.rst b/README.rst
index 1e9143d..243234f 100644
--- a/README.rst
+++ b/README.rst
@@ -624,6 +624,19 @@
         engine: kubernetes
       ...
 
+vRouter with separated control plane
+------------------------------------
+
+Separate XMPP traffic from dataplane interface.
+
+.. code-block:: yaml
+
+    opencontrail:
+      compute:
+        bind:
+          address: 172.16.0.50
+      ...
+
 Disable Contrail API authentication
 -----------------------------------
 
diff --git a/opencontrail/files/3.0/contrail-vrouter-agent.conf b/opencontrail/files/3.0/contrail-vrouter-agent.conf
index a9ae4a0..18f66de 100644
--- a/opencontrail/files/3.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-agent.conf
@@ -124,7 +124,11 @@
 [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 %}
 
 [VIRTUAL-HOST-INTERFACE]
 # Everything in this section is mandatory
diff --git a/tests/pillar/vrouter.sls b/tests/pillar/vrouter.sls
index b727821..fa00635 100644
--- a/tests/pillar/vrouter.sls
+++ b/tests/pillar/vrouter.sls
@@ -16,10 +16,12 @@
     enabled: True
     discovery:
       host: 127.0.0.1
+    bind:
+      address: 127.0.0.1
     interface:
       address: 127.0.0.1
       dev: eth0
       gateway: 127.0.0.1
       mask: /24
       dns: 127.0.0.1
-      mtu: 9000
\ No newline at end of file
+      mtu: 9000