Package org.rhq.modules.plugins.jbossas7.json

Examples of org.rhq.modules.plugins.jbossas7.json.CompositeOperation.addStep()


                runtimeName = runtimeNameProperty.getStringValue();

            CompositeOperation operation = new CompositeOperation();
            for (String theGroup : serverGroups) {
                Operation step = createServerGroupAssignmentStep("add", theGroup, runtimeName, enabled);
                operation.addStep(step);
            }

            Result res = getASConnection().execute(operation, 120); // wait up to 2 minutes
            if (res.isSuccess()) {
                operationResult.setSimpleResult("Successfully deployed to server groups " + serverGroups);
View Full Code Here


                return operationResult;
            }
            CompositeOperation operation = new CompositeOperation();
            for (String theGroup : serverGroups) {
                Operation step = createServerGroupAssignmentStep("redeploy", theGroup, null, false);
                operation.addStep(step);
            }
            Result res = getASConnection().execute(operation, 120); // wait up to 2 minutes
            if (res.isSuccess()) {
                operationResult.setSimpleResult("Successfully restarted in server groups " + serverGroups);
            } else {
View Full Code Here

            String runtimeNew = mapNew.getSimpleValue("runtime-name", null);
            boolean enabledNew = mapNew.getSimple("enabled").getBooleanValue();
            PropertyMap mapCurrent = assignedCurrent.remove(key);
            if (mapCurrent == null) {
                // new assignment was added
                operation.addStep(createServerGroupAssignmentStep("add", key, runtimeNew, enabledNew));
                needDiscovery = true;
            } else {
                boolean enabledCurrent = mapCurrent.getSimple("enabled").getBooleanValue();
                if (enabledCurrent != enabledNew) {
                    // deployment status change
View Full Code Here

                    // deployment status change
                    String action = "undeploy";
                    if (enabledNew) {
                        action = "deploy";
                    }
                    operation.addStep(createServerGroupAssignmentStep(action, key, null, false));
                }
            }
        }
        // detect removals, items left in map (exist in old config, but were not sent in the new one) should be removed
        for (PropertyMap map : assignedCurrent.values()) {
View Full Code Here

                }
            }
        }
        // detect removals, items left in map (exist in old config, but were not sent in the new one) should be removed
        for (PropertyMap map : assignedCurrent.values()) {
            operation.addStep(createServerGroupAssignmentStep("remove", map.getSimpleValue("server-group", null), null,
                false));
        }
        if (operation.numberOfSteps() == 0) {
            report.setStatus(ConfigurationUpdateStatus.NOCHANGE);
            return;
View Full Code Here

                    serverGroupAddress.add("deployment", packageName);
                    Operation step2 = new Operation("add", serverGroupAddress);
                    Operation step3 = new Operation("deploy", serverGroupAddress);

                    CompositeOperation cop = new CompositeOperation();
                    cop.addStep(step1);
                    cop.addStep(step2);
                    cop.addStep(step3);

                    Result result = connection.execute(cop);
                    if (!result.isSuccess()) // TODO get failure message into response
View Full Code Here

                    Operation step2 = new Operation("add", serverGroupAddress);
                    Operation step3 = new Operation("deploy", serverGroupAddress);

                    CompositeOperation cop = new CompositeOperation();
                    cop.addStep(step1);
                    cop.addStep(step2);
                    cop.addStep(step3);

                    Result result = connection.execute(cop);
                    if (!result.isSuccess()) // TODO get failure message into response
                        response.addPackageResponse(new DeployIndividualPackageResponse(details.getKey(),
View Full Code Here

                    Operation step3 = new Operation("deploy", serverGroupAddress);

                    CompositeOperation cop = new CompositeOperation();
                    cop.addStep(step1);
                    cop.addStep(step2);
                    cop.addStep(step3);

                    Result result = connection.execute(cop);
                    if (!result.isSuccess()) // TODO get failure message into response
                        response.addPackageResponse(new DeployIndividualPackageResponse(details.getKey(),
                            ContentResponseResult.FAILURE));
View Full Code Here

        Operation step3a = new Operation("remove", serverGroupAddress);

        Operation step4 = new Operation("remove", deploymentsAddress);

        CompositeOperation cop = new CompositeOperation();
        cop.addStep(step1);
        cop.addStep(step2);
        cop.addStep(step2a);

        ASConnection connection = getDomainControllerASConnection();
        JsonNode ret = connection.executeRaw(cop);
View Full Code Here

        Operation step4 = new Operation("remove", deploymentsAddress);

        CompositeOperation cop = new CompositeOperation();
        cop.addStep(step1);
        cop.addStep(step2);
        cop.addStep(step2a);

        ASConnection connection = getDomainControllerASConnection();
        JsonNode ret = connection.executeRaw(cop);
        System.out.println(ret);
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.