Package org.jboss.as.cli.operation

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


                candidates.addAll(Util.getServerGroups(ctx.getModelControllerClient()));
                return originalLine.length() - bufferIndex;
            }
            return buffer.length();
        }
        final ParsedOperationRequestHeader lastHeader = parsedOp.getLastHeader();
        if(!(lastHeader instanceof ParsedRolloutPlanHeader)) {
            throw new IllegalStateException("Expected " + ParsedRolloutPlanHeader.class + " but got " + lastHeader.getName() + " of " + lastHeader);
        }
        final ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) lastHeader;

        if(rollout.endsOnPlanIdValueSeparator()) {
            candidates.addAll(Util.getNodeNames(ctx.getModelControllerClient(), address, Util.ROLLOUT_PLAN));
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();

        assertEquals("name", header.getName());
        final ModelNode node = new ModelNode();
        node.get("name").set("value");

        final ModelNode headersNode = new ModelNode();
        header.addTo(ctx, headersNode);
        assertEquals(node, headersNode);
    }
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();

        assertEquals("name", header.getName());
        final ModelNode node = new ModelNode();
        node.get("name").set("value");

        final ModelNode headersNode = new ModelNode();
        header.addTo(ctx, headersNode);
        assertEquals(node, headersNode);

        assertTrue(handler.endsOnHeaderSeparator());
    }
View Full Code Here

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(2, headers.size());

        final Iterator<ParsedOperationRequestHeader> i = headers.iterator();
        ParsedOperationRequestHeader header = i.next();
        assertEquals("name1", header.getName());
        ModelNode node = new ModelNode();
        node.get("name1").set("value1");

        ModelNode headersNode = new ModelNode();
        header.addTo(ctx, headersNode);
        assertEquals(node, headersNode);

        header = i.next();
        assertEquals("name2", header.getName());
        node = new ModelNode();
        node.get("name2").set("value2");

        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 ModelNode node = new ModelNode();
        final ModelNode inSeries = node.get(Util.ROLLOUT_PLAN).get(Util.IN_SERIES);
        final ModelNode groupA = new ModelNode();
        groupA.get("groupA");
        inSeries.add().get(Util.SERVER_GROUP).set(groupA);

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

        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);
        ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        final SingleRolloutPlanGroup group = rollout.getLastGroup();
        assertNotNull(group);
View Full Code Here

        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);
        ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        final SingleRolloutPlanGroup group = rollout.getLastGroup();
        assertNotNull(group);
View Full Code Here

        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);
        ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        final SingleRolloutPlanGroup group = rollout.getLastGroup();
        assertNotNull(group);
View Full Code Here

        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);
        ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        final SingleRolloutPlanGroup group = rollout.getLastGroup();
        assertNotNull(group);
View Full Code Here

        assertTrue(handler.hasHeaders());

        final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
        assertEquals(1, headers.size());
        final ParsedOperationRequestHeader header = headers.iterator().next();
        assertTrue(header instanceof ParsedRolloutPlanHeader);
        ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
        final SingleRolloutPlanGroup group = rollout.getLastGroup();
        assertNotNull(group);
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.