Examples of BundleDeployment


Examples of org.rhq.core.domain.bundle.BundleDeployment

        BundleType bundleType = new BundleType("bundleTypeName", im.bundleHandlerType);
        Bundle bundle = new Bundle("bundleName", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bundleVersionName", "1.0", bundle, "");
        BundleDestination destination = new BundleDestination(bundle, "destName", null,
            MockInventoryManager.BUNDLE_CONFIG_NAME_RC, "relative/path/rc");
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverRC);
        BundleScheduleRequest request = new BundleScheduleRequest(resourceDeployment);

        mockBundleManager.absolutePathToAssert = BUNDLE_CONFIG_LOCATION_RC + "/relative/path/rc";
        BundleScheduleResponse response = mockBundleManager.schedule(request);
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

        BundleType bundleType = new BundleType("bundleTypeName", im.bundleHandlerType);
        Bundle bundle = new Bundle("bundleName", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bundleVersionName", "1.0", bundle, "");
        BundleDestination destination = new BundleDestination(bundle, "destName", null,
            MockInventoryManager.BUNDLE_CONFIG_NAME_MT, "relative/path/mt");
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverMT);
        BundleScheduleRequest request = new BundleScheduleRequest(resourceDeployment);

        mockBundleManager.absolutePathToAssert = BUNDLE_CONFIG_LOCATION_MT + "/relative/path/mt";
        BundleScheduleResponse response = mockBundleManager.schedule(request);
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

        BundleType bundleType = new BundleType("bundleTypeName", im.bundleHandlerType);
        Bundle bundle = new Bundle("bundleName", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bundleVersionName", "1.0", bundle, "");
        BundleDestination destination = new BundleDestination(bundle, "destName", null,
            MockInventoryManager.BUNDLE_CONFIG_NAME_FS, getPath("/tmp/dest")); // ABSOLUTE PATH
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverFS);
        BundleScheduleRequest request = new BundleScheduleRequest(resourceDeployment);

        mockBundleManager.absolutePathToAssert = "/should_fail_to_match"; // this will not match the /tmp/dest that we set the destination to
        BundleScheduleResponse response = mockBundleManager.schedule(request);
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

                            public void onSuccess(PageList<BundleDeployment> result) {
                                radioGroupValues.put(LATEST_VERSION,
                                    MSG.view_bundle_deployWizard_selectVersion_latest(latestVersion.getVersion()));

                                if (!result.isEmpty()) {
                                    BundleDeployment liveDeployment = result.get(0);
                                    // make sure the liveDeployment record has a bundleversion with configdef loaded
                                    BundleVersion liveBundleVersion = liveDeployment.getBundleVersion();
                                    int i = bundleVersions.indexOf(liveBundleVersion);
                                    liveDeployment.setBundleVersion(bundleVersions.get(i));
                                    wizard.setLiveDeployment(liveDeployment);
                                    liveVersion = liveDeployment.getBundleVersion();
                                    radioGroupValues.put(LIVE_VERSION,
                                        MSG.view_bundle_deployWizard_selectVersion_live(liveVersion.getVersion()));
                                }

                                radioGroupValues.put(SELECT_VERSION,
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

        return layout;
    }

    private void setLayout() {

        final BundleDeployment live = this.wizard.getLiveDeployment();
        final BundleDeployment prev = this.wizard.getPreviousDeployment();

        DynamicForm liveForm = new DynamicForm();
        liveForm.setNumCols(2);
        liveForm.setIsGroup(true);
        liveForm.setGroupTitle("<b>" + MSG.view_bundle_revertWizard_confirmStep_liveDeployment() + "<b>");

        StaticTextItem liveNameItem = new StaticTextItem("liveName", MSG.common_title_name());
        liveNameItem.setTitleAlign(Alignment.LEFT);
        liveNameItem.setAlign(Alignment.LEFT);
        liveNameItem.setWrap(false);
        liveNameItem.setWrapTitle(false);
        liveNameItem.setValue(live.getName());
        liveNameItem.setLeft(20);

        StaticTextItem liveDescItem = new StaticTextItem("liveDesc", MSG.common_title_description());
        liveDescItem.setTitleAlign(Alignment.LEFT);
        liveDescItem.setAlign(Alignment.LEFT);
        liveDescItem.setWrap(true);
        liveDescItem.setWrapTitle(false);
        liveDescItem.setVAlign(VerticalAlignment.TOP);
        liveDescItem.setTitleVAlign(VerticalAlignment.TOP);
        liveDescItem.setValue((null != live.getDescription()) ? live.getDescription() : MSG.common_val_none());

        StaticTextItem liveVersionItem = new StaticTextItem("liveVersion", MSG.view_bundle_bundleVersion());
        liveVersionItem.setTitleAlign(Alignment.LEFT);
        liveVersionItem.setAlign(Alignment.LEFT);
        liveVersionItem.setWrap(false);
        liveVersionItem.setWrapTitle(false);
        liveVersionItem.setValue(live.getBundleVersion().getVersion());

        liveForm.setItems(liveNameItem, liveVersionItem, liveDescItem);
        layout.addMember(liveForm);

        if (prev != null) {
            final DynamicForm prevForm = new DynamicForm();
            prevForm.setNumCols(2);
            prevForm.setIsGroup(true);
            prevForm.setGroupTitle("<b>" + MSG.view_bundle_revertWizard_confirmStep_prevDeployment() + "<b>");

            StaticTextItem prevNameItem = new StaticTextItem("prevName", MSG.common_title_name());
            prevNameItem.setTitleAlign(Alignment.LEFT);
            prevNameItem.setAlign(Alignment.LEFT);
            prevNameItem.setWrap(false);
            prevNameItem.setWrapTitle(false);
            prevNameItem.setValue(prev.getName());

            StaticTextItem prevDescItem = new StaticTextItem("prevDesc", MSG.common_title_description());
            prevDescItem.setTitleAlign(Alignment.LEFT);
            prevDescItem.setAlign(Alignment.LEFT);
            prevDescItem.setWrap(true);
            prevDescItem.setWrapTitle(false);
            prevDescItem.setTitleVAlign(VerticalAlignment.TOP);
            prevDescItem.setVAlign(VerticalAlignment.TOP);
            prevDescItem.setValue((null != prev.getDescription()) ? prev.getDescription() : MSG.common_val_none());

            final StaticTextItem prevVersionItem = new StaticTextItem("prevVersion", MSG.view_bundle_bundleVersion());
            prevVersionItem.setTitleAlign(Alignment.LEFT);
            prevVersionItem.setAlign(Alignment.LEFT);
            prevVersionItem.setWrap(false);
            prevVersionItem.setWrapTitle(false);
            if (prev.getBundleVersion().getVersion() == null) {
                BundleVersionCriteria c = new BundleVersionCriteria();
                c.addFilterId(prev.getBundleVersion().getId());
                bundleServer.findBundleVersionsByCriteria(c, new AsyncCallback<PageList<BundleVersion>>() {

                    @Override
                    public void onSuccess(PageList<BundleVersion> result) {
                        if (result != null && result.size() == 1) {
                            prevVersionItem.setValue(result.get(0).getVersion());
                            prevForm.markForRedraw();
                        }
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        prevVersionItem.setValue("?");
                        prevForm.markForRedraw();
                    }
                });
            } else {
                prevVersionItem.setValue(prev.getBundleVersion().getVersion());
            }

            prevForm.setItems(prevNameItem, prevVersionItem, prevDescItem);
            layout.addMember(prevForm);
        }
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

        // If user wanted to override the value in recipe, allow it
        Property discoveryDelayProperty = wizard.getNewDeploymentConfig().get("org.rhq.discoveryDelay");

        if(discoveryDelayProperty == null) {
            // If there was no recipe value, assume the current value is the default one and check live-deployment
            BundleDeployment liveDeployment = wizard.getLiveDeployment();

            // If previous deployment had modified deploymentDelay, use it
            if(liveDeployment != null) {
                Integer previousDeploymentDelay = liveDeployment.getDiscoveryDelay();
                if(previousDeploymentDelay != null) {
                    rValue = previousDeploymentDelay;
                }
            }
        }
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

        String name = "name";
        String destBaseDirName = "destBaseDirName";
        String installDir = "installDir";
        BundleDestination bundleDestination = new BundleDestination(bundle, "destName", new ResourceGroup("groupName"),
            destBaseDirName, installDir);
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, bundleDestination, name);
        BundleResourceDeployment deployment = new BundleResourceDeployment(bundleDeployment, resource);

        ProcessingRecipeContext context = new ProcessingRecipeContext(getRecipe(), packageVersionFiles, sysinfo, cwd,
            deployment, new DummyBundleManagerProvider());
        return context;
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

            node.setID(parentID + '_' + version.getId());
            node.setName(version.getVersion());
            sortValue = NumberFormat.getFormat("000000").format(version.getVersionOrder());

        } else if (from instanceof BundleDeployment) {
            BundleDeployment deployment = (BundleDeployment) from;
            node.setIsFolder(false);
            node.setIcon("subsystems/bundle/BundleDeployment_16.png");
            parentID = bundleGroupId.toString() + "_" + bundleId + "_destinations_" + deployment.getDestination().getId();
            node.setParentID(parentID);
            node.setID(bundleGroupId.toString() + "_" + bundleId + "_deployments_" + deployment.getId());
            String name = StringUtility.escapeHtml(deployment.getName());
            if (deployment.isLive()) {
                node.setName("<span style=\"color: green; font-weight: bold\">(live)</span> " + name);
            } else {
                node.setName(name);
            }
            sortValue = deployment.getName();

        } else if (from instanceof BundleDestination) {
            BundleDestination destination = (BundleDestination) from;
            node.setIsFolder(true);
            node.setIcon("subsystems/bundle/BundleDestination_16.png");
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

            c.fetchResourceDeployments(true);
            bundleServer.findBundleDeploymentsByCriteria(c, //
                new AsyncCallback<PageList<BundleDeployment>>() {
                    public void onSuccess(PageList<BundleDeployment> newDeploymentList) {
                        if (!newDeploymentList.isEmpty()) {
                            BundleDeployment newDeployment = newDeploymentList.get(0);
                            boolean isFailedToLaunch = BundleDeploymentStatus.FAILURE.equals(newDeployment.getStatus())
                                || BundleDeploymentStatus.PENDING.equals(newDeployment.getStatus());
                            boolean hasNoResourceDeployments = ((null == newDeployment.getResourceDeployments()) || newDeployment
                                .getResourceDeployments().isEmpty());

                            // go ahead and delete it if it hasn't really done anything but get created.
                            // otherwise, let folks inspect via the ui and take further action.
                            // if the deployment can't be deleted then don't try to delete the destination,
                            // it's now in use by the deployment
                            if (isFailedToLaunch && hasNoResourceDeployments) {
                                BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
                                bundleServer.deleteBundleDeployment(newDeployment.getId(), //
                                    new AsyncCallback<Void>() {
                                        public void onSuccess(Void voidReturn) {
                                            deleteNewDestination();
                                        }
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleDeployment

                getErrorHandler().handleError(MSG.view_bundle_deploy_loadFailure(), caught);
            }

            @Override
            public void onSuccess(PageList<BundleDeployment> result) {
                final BundleDeployment deployment = result.get(0);
                BundleCriteria bundleCriteria = new BundleCriteria();
                bundleCriteria.addFilterId(deployment.getBundleVersion().getBundle().getId());
                bundleService.findBundlesByCriteria(bundleCriteria, new AsyncCallback<PageList<Bundle>>() {
                    @Override
                    public void onFailure(Throwable caught) {
                        getErrorHandler().handleError(MSG.view_bundle_deploy_loadBundleFailure(), caught);
                    }

                    @Override
                    public void onSuccess(PageList<Bundle> result) {
                        final Bundle bundle = result.get(0);
                        deployment.getBundleVersion().setBundle(bundle);
                        BundleResourceDeploymentCriteria criteria = new BundleResourceDeploymentCriteria();
                        criteria.addFilterBundleDeploymentId(deployment.getId());
                        criteria.fetchResource(true);
                        criteria.fetchBundleDeployment(true);
                        bundleService.findBundleResourceDeploymentsByCriteria(criteria,
                            new AsyncCallback<PageList<BundleResourceDeployment>>() {
                                @Override
                                public void onFailure(Throwable caught) {
                                    getErrorHandler().handleError(MSG.view_bundle_deploy_loadFailure(), caught);
                                }

                                @Override
                                public void onSuccess(PageList<BundleResourceDeployment> result) {
                                    deployment.setResourceDeployments(result);
                                    viewBundleDeployment(deployment);
                                }
                            });
                    }
                });
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.