Package org.jboss.as.cli.operation

Examples of org.jboss.as.cli.operation.ParsedOperationRequestHeader


        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);

        final ModelNode node = new ModelNode();
        final ModelNode inSeries = node.get(Util.ROLLOUT_PLAN).get(Util.IN_SERIES);

        ModelNode concurrent = new ModelNode();
        ModelNode cg = concurrent.get(Util.CONCURRENT_GROUPS);

        ModelNode group = cg.get("groupA");
        group.get("rolling-to-servers").set("true");
        group.get("max-failure-percentage").set("20");

        group = cg.get("groupB");

        inSeries.add().set(concurrent);

        ModelNode sg = new ModelNode();
        group = sg.get(Util.SERVER_GROUP);
        group.get("groupC");
        inSeries.add().set(sg);

        concurrent = new ModelNode();
        cg = concurrent.get(Util.CONCURRENT_GROUPS);

        group = cg.get("groupD");
        group.get("rolling-to-servers").set("true");
        group.get("max-failed-servers").set("1");

        group = cg.get("groupE");

        inSeries.add().set(concurrent);

        final ModelNode headersNode = new ModelNode();
        header.addTo(ctx, headersNode);
        assertEquals(node, headersNode);
    }
View Full Code Here


        assertTrue(handler.isRequestComplete());
        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);

        final ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        assertEquals("myplan", rollout.getPlanRef());
        assertEquals(18, rollout.getLastChunkIndex());
View Full Code Here

        assertFalse(handler.isRequestComplete());
        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);

        final ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        assertNull(rollout.getPlanRef());
        assertFalse(rollout.hasProperties());
View Full Code Here

TOP

Related Classes of org.jboss.as.cli.operation.ParsedOperationRequestHeader

Copyright © 2018 www.massapicom. 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.