use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class TransitiveDepVersionOverrideWithDisabledConfigsTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1 = newFpl("prod1", "1", "1.0.0");
fp20 = newFpl("prod2", "1", "2.0.0");
fp21 = newFpl("prod2", "1", "2.1.0");
creator.newFeaturePack().setFPID(fp1.getFPID()).addDependency("fp2", FeaturePackConfig.builder(fp20).build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build()).newPackage("p1", true).addDependency("fp2", "p2").writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp20.getFPID()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2").getFeaturePack().newPackage("p2", false).writeContent("fp2/p2.txt", "fp20");
creator.newFeaturePack().setFPID(fp21.getFPID()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "21")).build()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp21").getFeaturePack().newPackage("p2", false).writeContent("fp2/p2.txt", "fp21");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class TransitiveInheritExclusionModelOnlyPackageDepFromTestCase 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(fp2).addDependency(FeaturePackConfig.transitiveBuilder(fp3).excludePackage("p2").includePackage("p3").build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp2.getFPID()).addDependency(FeaturePackConfig.builder(fp3).excludePackage("p4").build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).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", null).addPackageDep("p4", true).addPackageDep("p5", true).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).newPackage("p1", true).addDependency("p2", true).writeContent("fp3/p1.txt", "fp3 100 p1").getFeaturePack().newPackage("p2").writeContent("fp3/p2.txt", "fp3 100 p2").getFeaturePack().newPackage("p3").writeContent("fp3/p3.txt", "fp3 100 p3").getFeaturePack().newPackage("p4").writeContent("fp3/p4.txt", "fp3 100 p4").getFeaturePack().newPackage("p5").writeContent("fp3/p5.txt", "fp3 100 p5");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class NotInstalledLayerExcludedInTransitiveFeaturePackTestCase 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");
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", "layer1-prod1").setParam("p2", "layer1")).build()).addConfig(ConfigModel.builder("model1", "name1").includeLayer("layer1").build()).newPackage("base").writeContent("base.txt", "base");
creator.newFeaturePack().setFPID(prod2.getFPID()).addDependency(FeaturePackConfig.builder(prod1).setInheritPackages(false).setInheritConfigs(false).includeDefaultConfig("model1", "name1").build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("id")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("layer1").addLayerDep("base", true).addFeature(new FeatureConfig("specB").setParam("id", "layer1-prod2")).build()).addConfig(ConfigModel.builder("model1", "name1").excludeLayer("layer1").excludeLayer("base").build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ResetParamConfigLayerTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack(fp1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "fp1")).addParam(FeatureParameterSpec.create("p2", "fp1")).addParam(FeatureParameterSpec.create("p3", false, true, "default_val_fp1")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("p1", "base").setParam("p2", "base").setParam("p3", "base")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("layer1").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("p2", "layer1").resetParam("p3")).build()).addConfig(ConfigModel.builder("model1", "name1").includeLayer("layer1").build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class UnsetParamConfigLayerTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack(fp1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "fp1")).addParam(FeatureParameterSpec.create("p2", "fp1")).addParam(FeatureParameterSpec.create("p3", false, true, "default_val_fp1")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("layer1").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("p1", "layer1").unsetParam("p3")).addFeature(new FeatureConfig("specA").setParam("id", "2").setParam("p1", "layer1").unsetParam("p3")).build()).addConfig(ConfigModel.builder("model1", "name1").includeLayer("layer1").includeFeature(FeatureId.create("specA", "id", "2"), new FeatureConfig().setParam("p3", "config")).build());
}
Aggregations