Add self-registered computes functional for other templates

- Added self-registered computes mechanism to virtual-mcp11-k8s-calico
and virtual-mcp11-k8s-contrail templates to support models
like sl-k8s-calico and sl-k8s-contrail.

- Mechanism controlled by os_env.

Change-Id: Ibd474aa3af38d30ae1bd204dcb389177eb1a335b
diff --git a/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml b/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml
index c6e1486..0062db5 100644
--- a/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml
@@ -5,6 +5,10 @@
 {% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
 # Other salt model repository parameters see in shared-salt.yaml
 
+
+{% set ENABLE_COMPUTES_SELF_REGISTER = os_env('ENABLE_COMPUTES_SELF_REGISTER', '') %}
+# Different templates using this mechanism.
+
 {% import 'shared-salt.yaml' as SHARED with context %}
 
 {{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
@@ -19,6 +23,10 @@
 
 {{ SHARED.ADJUST_K8S_OPTS() }}
 
+{%- if ENABLE_COMPUTES_SELF_REGISTER != '' %}
+{{ SHARED.REGISTER_COMPUTE_NODES() }}
+{%- endif %}
+
 {{ SHARED.MACRO_GENERATE_INVENTORY() }}
 
 {{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}