Update generateModel for new model structure

  * Depends-on: https://gerrit.mcp.mirantis.com/#/c/36179/

Prod-related: PROD-26374(PROD:26374)

Change-Id: I2e448b20ee4364cb6a41ab322b198966d2263290
diff --git a/src/com/mirantis/mk/Python.groovy b/src/com/mirantis/mk/Python.groovy
index 6a054bb..c326bf6 100644
--- a/src/com/mirantis/mk/Python.groovy
+++ b/src/com/mirantis/mk/Python.groovy
@@ -290,32 +290,16 @@
     def templateOutputDir = templateBaseDir
     dir(templateEnvDir) {
         if (fileExists(new File(templateEnvDir, 'tox.ini').toString())) {
-            tempContextFile = new File(templateEnvDir, 'tempContext.yaml').toString()
+            def tempContextFile = new File(templateEnvDir, 'tempContext.yaml').toString()
             writeFile file: tempContextFile, text: context
             common.warningMsg('Generating models using context:\n')
             print(context)
             withEnv(["CONFIG_FILE=$tempContextFile",
-                     "OUTPUT_DIR=${generatedModel}/classes/cluster/",
+                     "OUTPUT_DIR=${modelEnv}",
             ]) {
                 print('[Cookiecutter build] Result:\n' +
                     sh(returnStdout: true, script: 'tox -ve generate_auto'))
             }
-            // dropme after impelementation new format
-            sh "mkdir -p ${generatedModel}/nodes/"
-            def nodeFile = "${generatedModel}/nodes/${saltMasterName}.${clusterDomain}.yml"
-            def nodeString = """classes:
-- cluster.${clusterName}.infra.config
-parameters:
-  _param:
-    linux_system_codename: xenial
-    reclass_data_revision: master
-  linux:
-    system:
-      name: ${saltMasterName}
-      domain: ${clusterDomain}
-    """
-            writeFile(file: nodeFile, text: nodeString)
-            //
         } else {
             common.warningMsg("Old format: Generating model from context ${contextName}")
             def productList = ["infra", "cicd", "kdt", "opencontrail", "kubernetes", "openstack", "oss", "stacklight", "ceph"]