Manage cassandra jmx port depending on node type

Related-PROD: PROD-21687

Change-Id: I4097cd181cc00b056314a626a1aa0cc0916e0546
diff --git a/opencontrail/meta/prometheus.yml b/opencontrail/meta/prometheus.yml
index 9eadf93..acc522b 100644
--- a/opencontrail/meta/prometheus.yml
+++ b/opencontrail/meta/prometheus.yml
@@ -1,5 +1,5 @@
 {%- if pillar.opencontrail is defined %}
-  {%- from "opencontrail/map.jinja" import control, collector, compute, config, database, web, monitoring with context %}
+  {%- from "opencontrail/map.jinja" import control, collector, compute, config, database, web, monitoring, version with context %}
 
   {%- if database.get('enabled', False) and
          database.get('cassandra', False) and
@@ -25,7 +25,15 @@
         template: opencontrail/files/jmx_exporter_cassandra.conf
         jmx_bind:
           address: localhost
+          {%- if version < 4.0 %}
           port: 7199
+          {%- else %}
+          {%- if database.get('type') == 'control' or database.get('type') == 'cluster' %}
+          port: 7198
+          {%- elif database.get('type') == 'analytics' %}
+          port: 7199
+          {%- endif %}
+          {%- endif %}
         bind:
           address: 0.0.0.0
           port: 9111