Pass docker hostname and domain as different params for testNode function

Pass docker hostname and domain as two different params for testNode
CC model testing function to avoid problem with setting docker hostname
to long as it now contains fqdn.

Change-Id: I94af398f695029be2478e41023bc2687fb828529
Related-Prod: PROD-27622 (PROD:27622)
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index 6f07593..1fc38b3 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -36,10 +36,6 @@
             return true
         }
     }
-    if ("${context['salt_master_hostname']}.${context['cluster_domain']}".length() > 64) {
-        common.errorMsg("Cluster domain has too long name. Make ${context['cluster_domain']} shorter than 58 symbols.")
-        error('Invalid context provided')
-    }
     // Use mcpVersion git tag if not specified branch for cookiecutter-templates
     if (!context.get('cookiecutter_template_branch')) {
         context['cookiecutter_template_branch'] = gitGuessedVersion ?: context['mcp_version']
@@ -183,7 +179,8 @@
                     common.infoMsg("Attempt to run test against distribRevision: ${distribRevision}")
                     try {
                         def config = [
-                            'dockerHostname'     : "${context['salt_master_hostname']}.${context['cluster_domain']}",
+                            'dockerHostname'     : "${context['salt_master_hostname']}",
+                            'domain'             : "${context['cluster_domain']}",
                             'reclassEnv'         : testEnv,
                             'distribRevision'    : distribRevision,
                             'dockerContainerName': DockerCName,
diff --git a/test-cookiecutter-reclass-chunk.groovy b/test-cookiecutter-reclass-chunk.groovy
index 15634bd..8fe0a2b 100644
--- a/test-cookiecutter-reclass-chunk.groovy
+++ b/test-cookiecutter-reclass-chunk.groovy
@@ -27,7 +27,8 @@
                 def content = readFile(file: extraVars.modelFile)
                 def templateContext = readYaml text: content
                 def config = [
-                    'dockerHostname': "cfg01.${templateContext.default_context.cluster_domain}",
+                    'dockerHostname': "cfg01",
+                    'domain': "${templateContext.default_context.cluster_domain}",
                     'clusterName': templateContext.default_context.cluster_name,
                     'reclassEnv': extraVars.testReclassEnv,
                     'distribRevision': extraVars.DISTRIB_REVISION,
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index 27e0909..b9c0356 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -64,8 +64,11 @@
             common.infoMsg("Running salt model test for node ${NODE_TARGET} in cluster ${CLUSTER_NAME}")
 
             def DockerCName = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
+            def dockerHostname = NODE_TARGET.tokenize('.')[0]
+            def domain = NODE_TARGET - "${dockerHostname}."
             def config = [
-              'dockerHostname': NODE_TARGET,
+              'dockerHostname': dockerHostname,
+              'domain': domain,
               'clusterName': CLUSTER_NAME,
               'reclassEnv': workspace,
               'distribRevision': distribRevision,