Merge "Revert "Add ability to test model against Reclass source code""
diff --git a/src/com/mirantis/mk/Python.groovy b/src/com/mirantis/mk/Python.groovy
index c3b2c97..11f9e2a 100644
--- a/src/com/mirantis/mk/Python.groovy
+++ b/src/com/mirantis/mk/Python.groovy
@@ -302,8 +302,9 @@
productDir = "stacklight2"
templateDir = "${templateEnvDir}/cluster_product/${productDir}"
}
- if (product == "infra" || (templateContext.default_context["${product}_enabled"]
- && templateContext.default_context["${product}_enabled"].toBoolean())) {
+ // generate infra unless its explicitly disabled
+ if ((product == "infra" && templateContext.default_context.get("infra_enabled", "True").toBoolean())
+ || templateContext.default_context.get("${product}_enabled", "False").toBoolean()) {
common.infoMsg("Generating product " + product + " from " + templateDir + " to " + templateOutputDir)