Enable telemetry on ovs based virt envs

Change-Id: I9965f9990e0aea53add4959dbcaa200e24d650ec
diff --git a/tcp_tests/managers/envmanager_heat.py b/tcp_tests/managers/envmanager_heat.py
index d6d7e90..c8872ec 100644
--- a/tcp_tests/managers/envmanager_heat.py
+++ b/tcp_tests/managers/envmanager_heat.py
@@ -524,11 +524,10 @@
 
         if env_files_list:
             fields['environment_files'] = env_files_list
-
         self.__stacks.create(**fields)
         self.wait_of_stack_status(EXPECTED_STACK_STATUS, tries=140)
-        LOG.info("Stack '{0}' created"
-                 .format(self.__config.hardware.heat_stack_name))
+        LOG.info("Stack '{0}' created".format(
+            self.__config.hardware.heat_stack_name))
 
     def stop(self):
         """Stop environment"""
diff --git a/tcp_tests/templates/_heat_environments/eu-cloud.env b/tcp_tests/templates/_heat_environments/eu-cloud.env
index e053283..7f670c5 100644
--- a/tcp_tests/templates/_heat_environments/eu-cloud.env
+++ b/tcp_tests/templates/_heat_environments/eu-cloud.env
@@ -19,6 +19,7 @@
   dbs_flavor: system.compact.openstack.database
   msg_flavor: system.compact.openstack.message_queue
   mon_flavor: system.compact.stacklight.server
+  mdb_flavor: system.compact.openstack.telemetry
   log_flavor: system.compact.stacklight.log
   mtr_flavor: system.compact.stacklight.telemetry
   cmp_flavor: system.virtual.openstack.compute
diff --git a/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml b/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml
index bfd6ea7..6a62598 100644
--- a/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml
+++ b/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml
@@ -250,7 +250,7 @@
   tenant_network_gateway: 10.167.6.1
   tenant_network_netmask: 255.255.255.0
   tenant_network_subnet: 10.167.6.0/24
-  tenant_telemetry_enabled: 'False'
+  tenant_telemetry_enabled: 'True'
   tenant_vlan: '20'
   upstream_proxy_enabled: 'False'
   use_default_network_scheme: 'True'
diff --git a/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-environment.yaml b/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-environment.yaml
index 76c4cf1..6d85007 100644
--- a/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-environment.yaml
+++ b/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-environment.yaml
@@ -499,3 +499,35 @@
         ens4:
           role: single_ctl
 
+    mdb01:
+      reclass_storage_name: openstack_telemetry_node01
+      roles:
+      - linux_system_codename_xenial
+      - openstack_telemetry
+      interfaces:
+        ens2:
+          role: single_dhcp
+        ens3:
+          role: single_ctl
+
+    mdb02:
+      reclass_storage_name: openstack_telemetry_node02
+      roles:
+      - linux_system_codename_xenial
+      - openstack_telemetry
+      interfaces:
+        ens2:
+          role: single_dhcp
+        ens3:
+          role: single_ctl
+
+    mdb03:
+      reclass_storage_name: openstack_telemetry_node03
+      roles:
+      - linux_system_codename_xenial
+      - openstack_telemetry
+      interfaces:
+        ens2:
+          role: single_dhcp
+        ens3:
+          role: single_ctl
diff --git a/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay.hot b/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay.hot
index be3f68b..ea0cb7a 100644
--- a/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay.hot
+++ b/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay.hot
@@ -64,6 +64,8 @@
     type: string
   prx_flavor:
     type: string
+  mdb_flavor:
+    type: string
 
   net_public:
     type: string
@@ -959,6 +961,58 @@
 
       instance_config_host: { get_attr: [cfg01_node, instance_address] }
 
+  openstack_telemetry_cluster:
+    type: MCP::MultipleInstance
+    depends_on: [control_cluster]
+    properties:
+      env_name: { get_param: env_name }
+      mcp_version: { get_param: mcp_version }
+      instance_domain: {get_param: instance_domain}
+      instance01_name: mdb01
+      instance02_name: mdb02
+      instance03_name: mdb03
+      instance_flavor: {get_param: mdb_flavor}
+      network: { get_attr: [networks, network] }
+      underlay_userdata: { get_file: ./underlay-userdata.yaml }
+      instance01_control_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, control_net_prefix] }, '84' ]
+      instance02_control_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, control_net_prefix] }, '85' ]
+      instance03_control_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, control_net_prefix] }, '86' ]
+      instance01_tenant_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, tenant_net_prefix] }, '84' ]
+      instance02_tenant_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, tenant_net_prefix] }, '85' ]
+      instance03_tenant_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, tenant_net_prefix] }, '86' ]
+      instance01_external_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, external_net_prefix] }, '84' ]
+      instance02_external_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, external_net_prefix] }, '85' ]
+      instance03_external_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, external_net_prefix] }, '86' ]
+
+      instance_config_host: { get_attr: [cfg01_node, instance_address] }
+
 outputs:
 
   control_subnet_cidr:
diff --git a/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml b/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml
index 12b4dce..33584ea 100644
--- a/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml
+++ b/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml
@@ -256,6 +256,7 @@
   use_default_network_scheme: 'True'
   version: proposed
   vnf_onboarding_enabled: 'False'
+  tenant_telemetry_enabled: 'True'
   openstack_telemetry_address: 10.167.4.83
   openstack_telemetry_hostname: mdb
   openstack_telemetry_node01_address: 10.167.4.84
diff --git a/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-environment.yaml b/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-environment.yaml
index 6b3ca8e..6d85007 100644
--- a/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-environment.yaml
+++ b/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-environment.yaml
@@ -498,3 +498,36 @@
           role: single_dhcp
         ens4:
           role: single_ctl
+
+    mdb01:
+      reclass_storage_name: openstack_telemetry_node01
+      roles:
+      - linux_system_codename_xenial
+      - openstack_telemetry
+      interfaces:
+        ens2:
+          role: single_dhcp
+        ens3:
+          role: single_ctl
+
+    mdb02:
+      reclass_storage_name: openstack_telemetry_node02
+      roles:
+      - linux_system_codename_xenial
+      - openstack_telemetry
+      interfaces:
+        ens2:
+          role: single_dhcp
+        ens3:
+          role: single_ctl
+
+    mdb03:
+      reclass_storage_name: openstack_telemetry_node03
+      roles:
+      - linux_system_codename_xenial
+      - openstack_telemetry
+      interfaces:
+        ens2:
+          role: single_dhcp
+        ens3:
+          role: single_ctl
diff --git a/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay.hot b/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay.hot
index 7f1602d..f759b3a 100644
--- a/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay.hot
+++ b/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay.hot
@@ -64,6 +64,8 @@
     type: string
   prx_flavor:
     type: string
+  mdb_flavor:
+    type: string
 
   net_public:
     type: string
@@ -959,6 +961,58 @@
 
       instance_config_host: { get_attr: [cfg01_node, instance_address] }
 
+  openstack_telemetry_cluster:
+    type: MCP::MultipleInstance
+    depends_on: [control_cluster]
+    properties:
+      env_name: { get_param: env_name }
+      mcp_version: { get_param: mcp_version }
+      instance_domain: {get_param: instance_domain}
+      instance01_name: mdb01
+      instance02_name: mdb02
+      instance03_name: mdb03
+      instance_flavor: {get_param: mdb_flavor}
+      network: { get_attr: [networks, network] }
+      underlay_userdata: { get_file: ./underlay-userdata.yaml }
+      instance01_control_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, control_net_prefix] }, '84' ]
+      instance02_control_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, control_net_prefix] }, '85' ]
+      instance03_control_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, control_net_prefix] }, '86' ]
+      instance01_tenant_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, tenant_net_prefix] }, '84' ]
+      instance02_tenant_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, tenant_net_prefix] }, '85' ]
+      instance03_tenant_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, tenant_net_prefix] }, '86' ]
+      instance01_external_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, external_net_prefix] }, '84' ]
+      instance02_external_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, external_net_prefix] }, '85' ]
+      instance03_external_net_static_ip:
+        list_join:
+        - '.'
+        - [ { get_attr: [networks, external_net_prefix] }, '86' ]
+
+      instance_config_host: { get_attr: [cfg01_node, instance_address] }
+
 outputs:
 
   control_subnet_cidr: