use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ReenableDisabledConfigInheritanceForTransitiveDepTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1 = newFpl("prod1", "1", "1.0.0.Final");
fp2 = newFpl("prod2", "1", "1.0.0.Final");
fp3 = newFpl("prod3", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(fp1.getFPID()).addDependency(FeaturePackConfig.builder(fp2).setInheritConfigs(false).setInheritPackages(false).build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build(), false).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specA").setParam("p1", "2")).build(), false).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp2.getFPID()).addDependency(fp3).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specB").setParam("p1", "2")).build()).addConfig(ConfigModel.builder("model1", "name3").addFeature(new FeatureConfig("specB").setParam("p1", "3")).build()).addConfig(ConfigModel.builder("model1", "name4").addFeature(new FeatureConfig("specB").setParam("p1", "4")).build(), false).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
creator.newFeaturePack().setFPID(fp3.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build(), false).addConfig(ConfigModel.builder("model1", "name5").addFeature(new FeatureConfig("specC").setParam("p1", "5")).build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class TransitiveDepExcludeModelTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1Fpl = newFpl("producer1", "1", "1.0.0.Final");
fp2Fpl = newFpl("producer2", "1", "1.0.0.Final");
fp3_100_fpl = newFpl("producer3", "1", "1.0.0.Final");
fp3_101_fpl = newFpl("producer3", "1", "1.0.1.Final");
fp3_102_fpl = newFpl("producer3", "1", "1.0.2.Final");
creator.newFeaturePack().setFPID(fp1Fpl.getFPID()).addDependency(FeaturePackConfig.builder(fp3_100_fpl, false).build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp2Fpl.getFPID()).addDependency(FeaturePackConfig.builder(fp3_101_fpl).build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp3_100_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "100")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp3_101_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "101")).addParam(FeatureParameterSpec.create("p3", "101")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp3_102_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "102")).addParam(FeatureParameterSpec.create("p4", "102")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class TransitiveDepIncludeModelTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1Fpl = newFpl("producer1", "1", "1.0.0.Final");
fp2Fpl = newFpl("producer2", "1", "1.0.0.Final");
fp3_100_fpl = newFpl("producer3", "1", "1.0.0.Final");
fp3_101_fpl = newFpl("producer3", "1", "1.0.1.Final");
fp3_102_fpl = newFpl("producer3", "1", "1.0.2.Final");
creator.newFeaturePack().setFPID(fp1Fpl.getFPID()).addDependency(FeaturePackConfig.builder(fp3_100_fpl, false).build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp2Fpl.getFPID()).addDependency(FeaturePackConfig.builder(fp3_101_fpl).build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp3_100_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "100")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp3_101_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "101")).addParam(FeatureParameterSpec.create("p3", "101")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
creator.newFeaturePack().setFPID(fp3_102_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "102")).addParam(FeatureParameterSpec.create("p4", "102")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class DisableConfigInheritanceIncludeDefaultConfigVariation2TestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
servFp = newFpl("serv-prod", "1", "1.0");
wfFp = newFpl("wf-prod", "1", "1.0");
topFp = newFpl("top-prod", "1", "1.0");
creator.newFeaturePack().setFPID(servFp.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "serv")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specA").setParam("p1", "serv")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "wf")).build());
creator.newFeaturePack().setFPID(wfFp.getFPID()).addDependency(FeaturePackConfig.builder(servFp).setInheritConfigs(false).includeDefaultConfig("model1", "name2").build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "wf")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "wf")).build());
creator.newFeaturePack().setFPID(topFp.getFPID()).addDependency(FeaturePackConfig.builder(wfFp).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 DisableConfigInheritanceIncludeNonDefaultConfigTestCase 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(), false).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build(), false);
}
Aggregations