Merge "[feat][core]  child-offline trigger"
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 3c52917..d30f361 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -73,8 +73,8 @@
 
     // optional demo deployment customization
     def awsOnDemandDemo = env.ALLOW_AWS_ON_DEMAND ? env.ALLOW_AWS_ON_DEMAND.toBoolean() : false
-    def vsphereOnDemandDemo = env.ALLOW_VSPHERE_ON_DEMAND ? env.ALLOW_VSPHERE_ON_DEMAND.toBoolean() : false
-    def equinixOnAwsDemo = false
+    def equinixOnAwsDemo = env.EQUNIX_ON_AWS_DEMO ? env.EQUNIX_ON_AWS_DEMO.toBoolean() : false
+    def enableVsphereDemo = true
     def enableOSDemo = true
     def enableBMDemo = true
 
@@ -130,10 +130,6 @@
             common.warningMsg('Forced running additional kaas deployment with AWS provider, due applied trigger cross dependencies, follow docs to clarify info')
         }
     }
-    if (commitMsg ==~ /(?s).*\[vsphere-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*vsphere-demo.*/) {
-        vsphereOnDemandDemo = true
-        common.warningMsg('Forced running additional kaas deployment with VSPHERE provider, triggered on patchset using custom keyword: \'[vsphere-demo]\' ')
-    }
     if (commitMsg ==~ /(?s).*\[disable-os-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*disable-os-demo\.*/) {
         enableOSDemo = false
         common.errorMsg('Openstack demo deployment will be aborted, VF -1 will be set')
@@ -144,6 +140,11 @@
         common.errorMsg('BM demo deployment will be aborted, VF -1 will be set')
     }
 
+    if (commitMsg ==~ /(?s).*\[disable-vsphere-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*disable-vsphere-demo\.*/) {
+        enableVsphereDemo = false
+        common.errorMsg('vSphere demo deployment will be aborted, VF -1 will be set')
+    }
+
     // TODO (vnaumov) remove below condition after moving all releases to UCP
     def ucpChildMatches = (commitMsg =~ /(\[child-ucp\s*ucp-.*?\])/)
     if (ucpChildMatches.size() > 0) {
@@ -201,7 +202,7 @@
         Mgmt conformance testing scheduled: ${runMgmtConformance}
         Mgmt UI e2e testing scheduled: ${runUie2e}
         AWS provider deployment scheduled: ${awsOnDemandDemo}
-        VSPHERE provider deployment scheduled: ${vsphereOnDemandDemo}
+        VSPHERE provider deployment scheduled: ${enableVsphereDemo}
         EQUINIX child cluster deployment scheduled: ${equinixOnAwsDemo}
         OS provider deployment scheduled: ${enableOSDemo}
         BM provider deployment scheduled: ${enableBMDemo}
@@ -223,7 +224,8 @@
         runMgmtConformanceEnabled  : runMgmtConformance,
         fetchServiceBinariesEnabled: fetchServiceBinaries,
         awsOnDemandDemoEnabled     : awsOnDemandDemo,
-        vsphereOnDemandDemoEnabled : vsphereOnDemandDemo,
+        vsphereDemoEnabled         : enableVsphereDemo,
+        vsphereOnDemandDemoEnabled : enableVsphereDemo, // TODO: remove after MCC 2.7 is out
         equinixOnAwsDemoEnabled    : equinixOnAwsDemo,
         bmDemoEnabled              : enableBMDemo,
         osDemoEnabled              : enableOSDemo,
@@ -463,7 +465,7 @@
         booleanParam(name: 'UPGRADE_BYO', value: triggers.upgradeBYOEnabled),
         booleanParam(name: 'RUN_CHILD_CFM', value: triggers.runChildConformanceEnabled),
         booleanParam(name: 'ALLOW_AWS_ON_DEMAND', value: triggers.awsOnDemandDemoEnabled),
-        booleanParam(name: 'ALLOW_VSPHERE_ON_DEMAND', value: triggers.vsphereOnDemandDemoEnabled),
+        booleanParam(name: 'EQUINIX_ON_AWS_DEMO', value: triggers.equinixOnAwsDemoEnabled),
     ]
 
     // customize multiregional demo
@@ -481,23 +483,37 @@
     }
 
     def jobResults = []
-    if (triggers.osDemoEnabled) {
-        jobs["kaas-core-openstack-patched-${component}"] = {
-            try {
-                common.infoMsg('Deploy: patched KaaS demo with Openstack provider')
-                os_job_info = build job: "kaas-testing-core-openstack-workflow-${component}", parameters: parameters, wait: true
-                def build_description = os_job_info.getDescription()
-                def build_result = os_job_info.getResult()
-                jobResults.add(build_result)
+    jobs["kaas-core-openstack-patched-${component}"] = {
+        try {
+            common.infoMsg('Deploy: patched KaaS demo with Openstack provider')
+            os_job_info = build job: "kaas-testing-core-openstack-workflow-${component}", parameters: parameters, wait: true
+            def build_description = os_job_info.getDescription()
+            def build_result = os_job_info.getResult()
+            jobResults.add(build_result)
 
-                if (build_description) {
-                    currentBuild.description += build_description
-                }
-            } finally {
-                common.infoMsg('Patched KaaS demo with Openstack provider finished')
+            if (build_description) {
+                currentBuild.description += build_description
             }
+        } finally {
+            common.infoMsg('Patched KaaS demo with Openstack provider finished')
         }
     }
+    jobs["kaas-core-vsphere-patched-${component}"] = {
+        try {
+            common.infoMsg('Deploy: patched KaaS demo with VSPHERE provider')
+            vsphere_job_info = build job: "kaas-testing-core-vsphere-workflow-${component}", parameters: parameters, wait: true
+            def build_description = vsphere_job_info.getDescription()
+            def build_result = vsphere_job_info.getResult()
+            jobResults.add(build_result)
+
+            if (build_description) {
+                currentBuild.description += build_description
+            }
+        } finally {
+            common.infoMsg('Patched KaaS demo with VSPHERE provider finished')
+        }
+    }
+
     if (triggers.awsOnDemandDemoEnabled) {
         common.infoMsg('AWS demo triggered, need to sync artifacts in the public-ci cdn..')
         switch (component) {
@@ -525,23 +541,6 @@
             }
         }
     }
-    if (triggers.vsphereOnDemandDemoEnabled) {
-        jobs["kaas-core-vsphere-patched-${component}"] = {
-            try {
-                common.infoMsg('Deploy: patched KaaS demo with VSPHERE provider')
-                vsphere_job_info = build job: "kaas-testing-core-vsphere-workflow-${component}", parameters: parameters, wait: true
-                def build_description = vsphere_job_info.getDescription()
-                def build_result = vsphere_job_info.getResult()
-                jobResults.add(build_result)
-
-                if (build_description) {
-                    currentBuild.description += build_description
-                }
-            } finally {
-                common.infoMsg('Patched KaaS demo with VSPHERE provider finished')
-            }
-        }
-    }
 
     common.infoMsg('Trigger KaaS demo deployments according to defined provider set')
     if (jobs.size() == 0) {
diff --git a/src/com/mirantis/mk/Openstack.groovy b/src/com/mirantis/mk/Openstack.groovy
index 0785bbe..8f5271b 100644
--- a/src/com/mirantis/mk/Openstack.groovy
+++ b/src/com/mirantis/mk/Openstack.groovy
@@ -66,6 +66,7 @@
         'python-heatclient==1.18.0',
         'docutils==0.16',
         'pyrsistent<0.17.1',
+        'decorator<5.0.0',
     ]
 
     if (version == 'kilo') {