Merge "[SI][CI] Support volumes in machine creation inside SI tests"
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 947044d..dbf0d11 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -105,6 +105,7 @@
     def enableArtifactsBuild = true
     def openstackIMC = env.OPENSTACK_CLOUD_LOCATION ? env.OPENSTACK_CLOUD_LOCATION : 'us'
     def enableVsphereUbuntu = env.VSPHERE_DEPLOY_UBUNTU ? env.VSPHERE_DEPLOY_UBUNTU.toBoolean() : false
+    def childOsBootFromVolume = env.OPENSTACK_BOOT_FROM_VOLUME ? env.OPENSTACK_BOOT_FROM_VOLUME.toBoolean() : false
 
     def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : ''
     if (commitMsg ==~ /(?s).*\[mgmt-proxy\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*mgmt-proxy.*/) {
@@ -275,6 +276,11 @@
         common.errorMsg('artifacts build will be aborted, VF -1 will be set')
     }
 
+    if (commitMsg ==~ /(?s).*\[child-os-boot-from-volume\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-os-boot-from-volume\.*/) {
+        childOsBootFromVolume = true
+        common.warningMsg('OS will be booted from Ceph volumes')
+    }
+
     // TODO (vnaumov) remove below condition after moving all releases to UCP
     def ucpChildMatches = (commitMsg =~ /(\[child-ucp\s*ucp-.*?\])/)
     if (ucpChildMatches.size() > 0) {
@@ -392,6 +398,7 @@
         BM provider deployment scheduled: ${enableBMDemo}
         Ubuntu on vSphere scheduled: ${enableVsphereUbuntu}
         Artifacts build scheduled: ${enableArtifactsBuild}
+        Boot OS child from Ceph volumes: ${childOsBootFromVolume}
         Multiregional configuration: ${multiregionalMappings}
         Service binaries fetching scheduled: ${fetchServiceBinaries}
         Current weight of the demo run: ${demoWeight} (Used to manage lockable resources)
@@ -439,6 +446,7 @@
         osDemoEnabled                        : enableOSDemo,
         vsphereUbuntuEnabled                 : enableVsphereUbuntu,
         artifactsBuildEnabled                : enableArtifactsBuild,
+        childOsBootFromVolume                : childOsBootFromVolume,
         multiregionalConfiguration           : multiregionalMappings,
         demoWeight                           : demoWeight]
 }