Merge "Move default parameters to system level"
diff --git a/README.rst b/README.rst
index bf4fe01..829e827 100644
--- a/README.rst
+++ b/README.rst
@@ -1533,6 +1533,22 @@
         nodemgr: 10
       ....
 
+Define aging time for flow-records in seconds
+---------------------------------------------
+
+Flows are aged out based on inactivity for a specific period of time. By default,
+the timeout value is 180 seconds. This can be modified by configuring flow_cache_timeout for
+contrail-vrouter-agent service:
+
+.. code-block:: yaml
+
+    opencontrail:
+      ....
+      compute
+        ....
+        flow_cache_timeout: 180
+        ....
+
 Usage
 =====
 
diff --git a/opencontrail/files/3.0/contrail-tor-agent.conf b/opencontrail/files/3.0/contrail-tor-agent.conf
index bb19a6c..e4c9439 100644
--- a/opencontrail/files/3.0/contrail-tor-agent.conf
+++ b/opencontrail/files/3.0/contrail-tor-agent.conf
@@ -25,6 +25,9 @@
 
 # Aging time for flow-records in seconds
 # flow_cache_timeout=0
+{%- if compute.flow_cache_timeout is defined %}
+flow_cache_timeout={{ compute.flow_cache_timeout }}
+{%- endif %}
 
 # Hostname of compute-node. If this is not configured value from `hostname`
 # will be taken
diff --git a/opencontrail/files/3.0/contrail-vrouter-agent.conf b/opencontrail/files/3.0/contrail-vrouter-agent.conf
index 29fce04..f057de4 100644
--- a/opencontrail/files/3.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-agent.conf
@@ -34,6 +34,9 @@
 
 # Aging time for flow-records in seconds
 # flow_cache_timeout=0
+{%- if compute.flow_cache_timeout is defined %}
+flow_cache_timeout={{ compute.flow_cache_timeout }}
+{%- endif %}
 
 {%- if compute.dpdk.enabled %}
 
diff --git a/opencontrail/files/4.0/contrail-vrouter-agent.conf b/opencontrail/files/4.0/contrail-vrouter-agent.conf
index 397c35d..7bc2fd8 100644
--- a/opencontrail/files/4.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/4.0/contrail-vrouter-agent.conf
@@ -26,6 +26,9 @@
 
 # Aging time for flow-records in seconds
 # flow_cache_timeout=0
+{%- if compute.flow_cache_timeout is defined %}
+flow_cache_timeout={{ compute.flow_cache_timeout }}
+{%- endif %}
 
 {%- if compute.dpdk.enabled %}