use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class DisableConfigInheritanceIncludeDefaultConfigModelTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
baseFp = newFpl("base-prod", "1", "1.0");
topFp = newFpl("top-prod", "1", "1.0");
creator.newFeaturePack().setFPID(baseFp.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "base")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specA").setParam("p1", "base2")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "base")).build());
creator.newFeaturePack().setFPID(topFp.getFPID()).addDependency(FeaturePackConfig.builder(baseFp).setInheritConfigs(true).build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayerWithExcludedRequiredLayerDepTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p2", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("main").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "main-prod1").setParam("p2", "main")).addPackageDep("main").build()).newPackage("base").writeContent("base.txt", "base").getFeaturePack().newPackage("main").writeContent("main.txt", "main");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayerWithRequiredLayerDepTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p2", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("main").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "main-prod1").setParam("p2", "main")).addPackageDep("main").build()).newPackage("base").writeContent("base.txt", "base").getFeaturePack().newPackage("main").writeContent("main.txt", "main");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayersSameFeaturePackDepBranchTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
prod2 = newFpl("prod2", "1", "1.0.0.Final");
prod3 = newFpl("prod3", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", true)).addParam(FeatureParameterSpec.create("p3", true)).addParam(FeatureParameterSpec.create("p4", true)).addParam(FeatureParameterSpec.create("p5", true)).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p1", "base-prod1").setParam("p2", "base-prod1")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("ejb").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "ejb-prod1").setParam("p1", "ejb-prod1").setParam("p2", "ejb-prod1")).addPackageDep("ejb").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("undertow").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "undertow-prod1").setParam("p1", "undertow-prod1").setParam("p2", "undertow-prod1").setParam("p3", "undertow-prod1")).addFeature(new FeatureConfig("specA").setParam("id", "undertow-other")).addFeature(new FeatureConfig("specA").setParam("id", "undertow-other2")).addPackageDep("undertow").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("layer-x").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "layer-x-prod1").setParam("p1", "layer-x-prod1")).addPackageDep("layer-x").build()).addConfig(ConfigModel.builder("model1", "name1").includeLayer("ejb").includeLayer("undertow").includeFeature(FeatureId.create("specA", "id", "undertow-prod1"), new FeatureConfig().setParam("p2", "config-prod1").setParam("p3", "config-prod1")).excludeFeature(FeatureId.create("specA", "id", "undertow-other")).addFeature(new FeatureConfig("specA").setParam("id", "prod1")).build()).newPackage("p1", true).writeContent("fp1/p1.txt", "p1 final 1.0.1").getFeaturePack().newPackage("base").addDependency("other", true).addDependency("another", true).writeContent("base.txt", "base").getFeaturePack().newPackage("ejb").writeContent("ejb.txt", "ejb").getFeaturePack().newPackage("undertow").writeContent("undertow.txt", "undertow").getFeaturePack().newPackage("other").writeContent("other.txt", "other").getFeaturePack().newPackage("another").writeContent("another.txt", "another").getFeaturePack().newPackage("layer-x").writeContent("layer-x.txt", "layer x");
creator.newFeaturePack().setFPID(prod2.getFPID()).addDependency(prod1).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("ejb-plus").addFeature(new FeatureConfig("specA").setParam("id", "ejb-plus-prod2")).build());
creator.newFeaturePack().setFPID(prod3.getFPID()).addDependency(prod1).addDependency(prod2).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("id")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").includeFeature(FeatureId.create("specA", "id", "base-prod1"), new FeatureConfig().setParam("p2", "base-prod3")).addFeature(new FeatureConfig("specB").setParam("id", "base-prod3")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("ejb").addLayerDep("ejb-plus").includeFeature(FeatureId.create("specA", "id", "ejb-prod1"), new FeatureConfig().setParam("p2", "ejb-prod3")).addFeature(new FeatureConfig("specB").setParam("id", "ejb-prod3")).addPackageDep("base").build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ExcludeNonExistingConfigLayerIgnoreNotExcludedLayersTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p2", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("layer1").addLayerDep("base", true).addFeature(new FeatureConfig("specA").setParam("id", "base-prod2").setParam("p2", "layer1")).build()).newPackage("base").writeContent("base.txt", "base");
}
Aggregations