Fix runtest, add runtest_cfg role for virual contrail

Change-Id: If5ee063886c16a6b5f3513b3dc23ac68d4604e79
diff --git a/tcp_tests/managers/runtestmanager.py b/tcp_tests/managers/runtestmanager.py
index eb646d1..e5b00e8 100644
--- a/tcp_tests/managers/runtestmanager.py
+++ b/tcp_tests/managers/runtestmanager.py
@@ -209,6 +209,14 @@
                             "'{\"external\":true,\"ip_prefix\":\"" +
                             public_network + "\",\"ip_prefix_len\":24," +
                             "\"asn\":64512,\"target\":10000}'")},
+                {
+                    'description': "Create heat network",
+                    'node_name': self.target_name,
+                    'cmd': ("set -ex;" +
+                            "salt -C 'I@opencontrail:control:role:primary' " +
+                            "contrail.virtual_network_create heat-net " +
+                            "'{\"external\":false,\"ip_prefix\":\"" +
+                            "10.20.30.0\",\"ip_prefix_len\":24}'")},
             ]
             commands = contrail_commands + commands
 
diff --git a/tcp_tests/templates/heat-cicd-pike-contrail41-sl/salt-context-environment.yaml b/tcp_tests/templates/heat-cicd-pike-contrail41-sl/salt-context-environment.yaml
index 67e4861..cfda75e 100644
--- a/tcp_tests/templates/heat-cicd-pike-contrail41-sl/salt-context-environment.yaml
+++ b/tcp_tests/templates/heat-cicd-pike-contrail41-sl/salt-context-environment.yaml
@@ -4,6 +4,7 @@
       roles:
       - infra_config
       - linux_system_codename_xenial
+      - features_runtest_cfg
       interfaces:
         ens3:
           role: single_static_mgm
@@ -111,225 +112,225 @@
         ens4:
           role: single_ctl
 
-    msg01:

-      reclass_storage_name: openstack_message_queue_node01

-      roles:

-      - openstack_message_queue

-      - linux_system_codename_xenial

+    msg01:
+      reclass_storage_name: openstack_message_queue_node01
+      roles:
+      - openstack_message_queue
+      - linux_system_codename_xenial
       interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    msg02:

-      reclass_storage_name: openstack_message_queue_node02

-      roles:

-      - openstack_message_queue

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    msg02:
+      reclass_storage_name: openstack_message_queue_node02
+      roles:
+      - openstack_message_queue
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    msg03:

-      reclass_storage_name: openstack_message_queue_node03

-      roles:

-      - openstack_message_queue

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    msg03:
+      reclass_storage_name: openstack_message_queue_node03
+      roles:
+      - openstack_message_queue
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    prx01:

-      reclass_storage_name: openstack_proxy_node01

-      roles:

-      - openstack_proxy

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    prx01:
+      reclass_storage_name: openstack_proxy_node01
+      roles:
+      - openstack_proxy
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    prx02:

-      reclass_storage_name: openstack_proxy_node02

-      roles:

-      - openstack_proxy

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    prx02:
+      reclass_storage_name: openstack_proxy_node02
+      roles:
+      - openstack_proxy
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    mon01:

-      reclass_storage_name: stacklight_server_node01

-      roles:

-      - stacklightv2_server_leader

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    mon01:
+      reclass_storage_name: stacklight_server_node01
+      roles:
+      - stacklightv2_server_leader
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    mon02:

-      reclass_storage_name: stacklight_server_node02

-      roles:

-      - stacklightv2_server

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    mon02:
+      reclass_storage_name: stacklight_server_node02
+      roles:
+      - stacklightv2_server
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    mon03:

-      reclass_storage_name: stacklight_server_node03

-      roles:

-      - stacklightv2_server

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    mon03:
+      reclass_storage_name: stacklight_server_node03
+      roles:
+      - stacklightv2_server
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    nal01:

-      reclass_storage_name: opencontrail_analytics_node01

-      roles:

-      - opencontrail_analytics

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    nal01:
+      reclass_storage_name: opencontrail_analytics_node01
+      roles:
+      - opencontrail_analytics
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    nal02:

-      reclass_storage_name: opencontrail_analytics_node02

-      roles:

-      - opencontrail_analytics

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    nal02:
+      reclass_storage_name: opencontrail_analytics_node02
+      roles:
+      - opencontrail_analytics
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    nal03:

-      reclass_storage_name: opencontrail_analytics_node03

-      roles:

-      - opencontrail_analytics

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    nal03:
+      reclass_storage_name: opencontrail_analytics_node03
+      roles:
+      - opencontrail_analytics
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    ntw01:

-      reclass_storage_name: opencontrail_control_node01

-      roles:

-      - opencontrail_control

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    ntw01:
+      reclass_storage_name: opencontrail_control_node01
+      roles:
+      - opencontrail_control
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    ntw02:

-      reclass_storage_name: opencontrail_control_node02

-      roles:

-      - opencontrail_control

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    ntw02:
+      reclass_storage_name: opencontrail_control_node02
+      roles:
+      - opencontrail_control
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    ntw03:

-      reclass_storage_name: opencontrail_control_node03

-      roles:

-      - opencontrail_control

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    ntw03:
+      reclass_storage_name: opencontrail_control_node03
+      roles:
+      - opencontrail_control
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    mtr01:

-      reclass_storage_name: stacklight_telemetry_node01

-      roles:

-      - stacklight_telemetry

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    mtr01:
+      reclass_storage_name: stacklight_telemetry_node01
+      roles:
+      - stacklight_telemetry
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    mtr02:

-      reclass_storage_name: stacklight_telemetry_node02

-      roles:

-      - stacklight_telemetry

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    mtr02:
+      reclass_storage_name: stacklight_telemetry_node02
+      roles:
+      - stacklight_telemetry
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    mtr03:

-      reclass_storage_name: stacklight_telemetry_node03

-      roles:

-      - stacklight_telemetry

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    mtr03:
+      reclass_storage_name: stacklight_telemetry_node03
+      roles:
+      - stacklight_telemetry
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    log01:

-      reclass_storage_name: stacklight_log_node01

-      roles:

-      - stacklight_log_leader_v2

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    log01:
+      reclass_storage_name: stacklight_log_node01
+      roles:
+      - stacklight_log_leader_v2
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    log02:

-      reclass_storage_name: stacklight_log_node02

-      roles:

-      - stacklight_log

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    log02:
+      reclass_storage_name: stacklight_log_node02
+      roles:
+      - stacklight_log
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

-

-    log03:

-      reclass_storage_name: stacklight_log_node03

-      roles:

-      - stacklight_log

-      - linux_system_codename_xenial

-      interfaces:

+        ens4:
+          role: single_ctl
+
+    log03:
+      reclass_storage_name: stacklight_log_node03
+      roles:
+      - stacklight_log
+      - linux_system_codename_xenial
+      interfaces:
         ens3:
           role: single_dhcp
-        ens4:

-          role: single_ctl

+        ens4:
+          role: single_ctl
 
     kvm01:
       reclass_storage_name: infra_kvm_node01