Package io.fabric8.api

Examples of io.fabric8.api.ProfileBuilder.addAttribute()


        }

        Profile profile = getOrCreateProfile(version, requirements);
        boolean isAbstract = requirements.isAbstractProfile();
        ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
        builder.addAttribute(Profile.ABSTRACT, "" + isAbstract);

        ProjectRequirements oldRequirements = writeRequirementsJson(requirements, profile, builder);
        updateProfileConfiguration(version, profile, requirements, oldRequirements, builder);

        return resolveProfileDeployments(requirements, fabricService.get(), profile, builder);
View Full Code Here


           
            // create new ensemble
            String ensembleProfileId = "fabric-ensemble-" + newClusterId;
            IllegalStateAssertion.assertFalse(profileRegistry.get().hasProfile(versionId, ensembleProfileId), "Profile already exists: " + versionId + "/" + ensembleProfileId);
            ProfileBuilder ensembleProfileBuilder = ProfileBuilder.Factory.create(versionId, ensembleProfileId);
            ensembleProfileBuilder.addAttribute(Profile.ABSTRACT, "true").addAttribute(Profile.HIDDEN, "true");

            int index = 1;
            String connectionUrl = "";
            String realConnectionUrl = "";
            String containerList = "";
View Full Code Here

                // Create ensemble member profile
                String memberProfileId = "fabric-ensemble-" + newClusterId + "-" + index;
                IllegalStateAssertion.assertFalse(profileRegistry.get().hasProfile(versionId, memberProfileId), "Profile already exists: " + versionId + "/" + memberProfileId);
                ProfileBuilder memberProfileBuilder = ProfileBuilder.Factory.create(versionId, memberProfileId);
                memberProfileBuilder.addAttribute(Profile.HIDDEN, "true").addAttribute(Profile.PARENTS, ensembleProfileId);
                memberProfileBuilder.addFileConfiguration(memberPropertiesName, DataStoreUtils.toBytes(memberProperties));
                memberProfiles.add(memberProfileBuilder.getProfile());

                if (connectionUrl.length() > 0) {
                    connectionUrl += ",";
View Full Code Here

    @Override
    public void setProfileAttribute(String versionId, String profileId, String attributeId, String value) {
        Profile profile = profileService.getRequiredProfile(versionId, profileId);
        ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
        builder.addAttribute(attributeId, value);
        profileService.updateProfile(builder.getProfile());
    }

    @Override
    public void setProfileSystemProperties(String versionId, String profileId, Map<String, String> systemProperties) {
View Full Code Here

       
        String versionId = "1.0";
        Assert.assertFalse(profileRegistry.hasProfile(versionId, "prfA"));
       
        ProfileBuilder pbuilder = ProfileBuilder.Factory.create(versionId, "prfA");
        profileRegistry.createProfile(pbuilder.addAttribute("foo", "aaa").getProfile());
        Profile profile = profileRegistry.getRequiredProfile(versionId, "prfA");
        Assert.assertEquals("aaa", profile.getAttributes().get("foo"));

        Assert.assertTrue(remoteProfileExists(versionId, "prfA"));
       
View Full Code Here

       
        checkoutRequiredBranch(versionId);
        RevCommit head = CommitUtils.getHead(git.getRepository());
       
        ProfileBuilder pbuilder = ProfileBuilder.Factory.create(versionId, "prfG");
        profileRegistry.createProfile(pbuilder.addAttribute("foo", "aaa").getProfile());
        Profile profile = profileRegistry.getRequiredProfile(versionId, "prfG");
        Assert.assertEquals("aaa", profile.getAttributes().get("foo"));

        // Remove the last commit from the remote repository
        git.reset().setMode(ResetType.HARD).setRef(head.getName()).call();
View Full Code Here

            targetVersion = profileService.createVersionFrom(sourceId, versionId, attributes);
            System.out.println("Created version: " + versionId + " as copy of: " + sourceId);
        } else {
            VersionBuilder builder = VersionBuilder.Factory.create(versionId);
            if (description != null) {
                builder.addAttribute(Version.DESCRIPTION, description);
            }
            targetVersion = profileService.createVersion(builder.getVersion());
            System.out.println("Create version: " + versionId);
        }
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.