Package io.fabric8.api

Examples of io.fabric8.api.ProfileManager.deleteProfile()


        // Verify access to original profile
        profileManager.getRequiredVersion("1.0").getRequiredProfile("prfA");
        profileManager.getRequiredVersion("1.1").getRequiredProfile("prfA");
       
        // Delete the profile/version that were added
        profileManager.deleteProfile(prfA10.getVersion(), prfA10.getId(), true);
        profileManager.deleteVersion(v11.getId());
    }
}
View Full Code Here


        Container current = fabricService.get().getCurrentContainer();
        Version version = current.getVersion();
        String profileId = context.getConfiguration().get(TEMPLATE_PROFILE_PROPERTY_NAME) + "-" + name;
        if (version.hasProfile(profileId)) {
          String versionId = version.getId();
          profileService.deleteProfile(fabricService.get(), versionId, profileId, true);
        }
    }

    @Override
    public synchronized void stopAll() {
View Full Code Here

      // [TODO] Revisit lock in ProfileTemplateWorker
        try {
            if (lock.acquire(60, TimeUnit.SECONDS)) {
                if (profileData.isEmpty()) {
                    if (version.hasProfile(profileId)) {
                        profileService.deleteProfile(fabricService.get(), versionId, profileId, true);
                    }
                    return;
                }
               
                Profile managedProfile;
View Full Code Here

    @Override
    public void deleteProfile(String versionId, String profileId, boolean force) {
        Permit<ProfileService> permit = permitManager.get().aquirePermit(ProfileService.PERMIT, false);
        try {
            ProfileService service = permit.getInstance();
            service.deleteProfile(versionId, profileId, force);
        } finally {
            permit.release();
        }
    }
View Full Code Here

            }
            if (profile != null) {
              String versionId = profile.getVersion();
                String profileId = profile.getId();
                if (force) {
                    profileService.deleteProfile(fabricService, versionId, profileId, force);
                } else {
          throw new IllegalStateException("Profile " + profileId + " already exists. Use --force to recreate the profiles.");
                }
            }
        }
View Full Code Here

        boolean deleted = false;
        for (Profile profile : version.getProfiles()) {
            String versionId = profile.getVersion();
            String profileId = profile.getId();
            if (name.equals(profileId)) {
                profileService.deleteProfile(fabricService, versionId, profileId, force);
                deleted = true;
            }
        }

        if (!deleted) {
View Full Code Here

    public void deleteProfile() {
        FabricService fabricService = getFabricService();
        Objects.notNull(fabricService, "fabricService");
        ProfileService profileService = getProfileService();
        Objects.notNull(profileService, "profileService");
        profileService.deleteProfile(fabricService, profile.getVersion(), profile.getId(), true);
    }


    /**
     * Returns the list of container ID links for this profile
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.