Added Global VRouter config to OC client
Change-Id: I3f207b7c27624cafc08e0f70c1e12008cdd4ec21
diff --git a/README.rst b/README.rst
index 0f958dc..901848d 100644
--- a/README.rst
+++ b/README.rst
@@ -877,6 +877,22 @@
ip_address: 172.16.0.12
dpdk_enabled: True
+Enforcing global vrouter config
+
+.. code-block:: yaml
+
+ opencontrail:
+ client:
+ ...
+ global_vrouter_config:
+ name: global-vrouter-config
+ parent_type: global-system-config
+ encap_priority: "MPLSoUDP,MPLSoGRE"
+ vxlan_vn_id_mode: automatic
+ fq_names:
+ - 'default-global-system-config'
+ - 'default-global-vrouter-config'
+
Enforcing control nodes
.. code-block:: yaml
diff --git a/opencontrail/client.sls b/opencontrail/client.sls
index e467c27..7069077 100644
--- a/opencontrail/client.sls
+++ b/opencontrail/client.sls
@@ -16,6 +16,16 @@
{%- endif %}
{%- endif %}
+{%- if client.global_vrouter_config is defined %}
+global_vrouter_config_create:
+ contrail.global_vrouter_config_present:
+ - name: {{ client.global_vrouter_config.get('name', 'global-vrouter-config') }}
+ - parent_type: {{ client.global_vrouter_config.get('parent_type', 'global-system-config') }}
+ - encap_priority: {{ client.global_vrouter_config.get('encap_priority', 'MPLSoUDP,MPLSoGRE') }}
+ - vxlan_vn_id_mode: {{ client.global_vrouter_config.get('vxlan_vn_id_mode', 'automatic') }}
+ - fq_names: {{ client.global_vrouter_config.get('fq_names', ['default-global-system-config','default-global-vrouter-config']) }}
+{%- endif %}
+
{%- for virtual_router_name, virtual_router in client.get('virtual_router', {}).items() %}
opencontrail_client_virtual_router_{{ virtual_router_name }}: