Package com.dtolabs.rundeck.core.common

Examples of com.dtolabs.rundeck.core.common.NodesYamlGenerator.addNode()


        NodesYamlGenerator nodesYamlGenerator = new NodesYamlGenerator(baos);
        final NodeEntryImpl nodeEntry = new NodeEntryImpl();
        nodeEntry.setNodename("test1");
        nodeEntry.setHostname("testhostname");
        nodesYamlGenerator.addNode(nodeEntry);
        nodesYamlGenerator.generate();
        final byte[] bytes = baos.toByteArray();
        assertNotNull(bytes);
        assertTrue(bytes.length > 0);
    }
View Full Code Here


        NodesYamlGenerator nodesYamlGenerator = new NodesYamlGenerator(new OutputStreamWriter(baos));
        final NodeEntryImpl nodeEntry = new NodeEntryImpl();
        nodeEntry.setNodename("test1");
        nodeEntry.setHostname("testhostname");
        nodesYamlGenerator.addNode(nodeEntry);
        nodesYamlGenerator.generate();
        final byte[] bytes = baos.toByteArray();
        assertNotNull(bytes);
        assertTrue(bytes.length > 0);
    }
View Full Code Here

        NodesYamlGenerator nodesYamlGenerator = new NodesYamlGenerator(tempfile);
        final NodeEntryImpl nodeEntry = new NodeEntryImpl();
        nodeEntry.setNodename("test1");
        nodeEntry.setHostname("testhostname");
        nodesYamlGenerator.addNode(nodeEntry);
        nodesYamlGenerator.generate();
        assertTrue(tempfile.length() > 0);
    }
    public void testGenerateShouldFailOnNullOutput() throws Exception{
        NodesYamlGenerator nodesYamlGenerator = new NodesYamlGenerator((File)null);
View Full Code Here

    public void testGenerateShouldFailOnNullOutput() throws Exception{
        NodesYamlGenerator nodesYamlGenerator = new NodesYamlGenerator((File)null);
        final NodeEntryImpl nodeEntry = new NodeEntryImpl();
        nodeEntry.setNodename("test1");
        nodeEntry.setHostname("testhostname");
        nodesYamlGenerator.addNode(nodeEntry);
        try {
            nodesYamlGenerator.generate();
            fail("Should have failed");
        } catch (NullPointerException e) {
            assertNotNull(e);
View Full Code Here

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            NodesYamlGenerator nodesYamlGenerator = new NodesYamlGenerator(baos);
            final NodeEntryImpl nodeEntry = new NodeEntryImpl();
            nodeEntry.setNodename("test1");
            nodeEntry.setHostname("testhostname");
            nodesYamlGenerator.addNode(nodeEntry);

            nodesYamlGenerator.generate();
            final String outputString = baos.toString();
            assertNotNull(outputString);
            //convert via yaml
View Full Code Here

            nodeEntry.setOsName("an os name");
            nodeEntry.setOsVersion("an os vers");
            nodeEntry.setUsername("someUser");
            nodeEntry.setTags(new HashSet());

            nodesYamlGenerator.addNode(nodeEntry);

            nodesYamlGenerator.generate();
            final String outputString = baos.toString();
            assertNotNull(outputString);
            //convert via yaml
View Full Code Here

             editUrl: ""
             remoteUrl: ""
             tags: "rundeck"
             */

            nodesYamlGenerator.addNode(nodeEntry);

            nodesYamlGenerator.generate();
            final String outputString = baos.toString();
            assertNotNull(outputString);
            //convert via yaml
View Full Code Here

        final NodeEntryImpl nodeEntry = new NodeEntryImpl();
        nodeEntry.setNodename("strongbad");
        nodeEntry.setHostname("strongbad");
        nodeEntry.getAttributes().put("editUrl","http://some.com/test/url");

        nodesYamlGenerator.addNode(nodeEntry);

        nodesYamlGenerator.generate();
        final String outputString = baos.toString();
        assertNotNull(outputString);
View Full Code Here

        nodeEntry.setNodename("strongbad");
        nodeEntry.setHostname("strongbad");

        nodeEntry.getAttributes().put("remoteUrl", "http://somez.com/test/other/url");

        nodesYamlGenerator.addNode(nodeEntry);

        nodesYamlGenerator.generate();
        final String outputString = baos.toString();
        assertNotNull(outputString);
        //convert via yaml
View Full Code Here

        nodeEntry.setNodename("strongbad");
        nodeEntry.setHostname("strongbad");
       
        nodeEntry.getAttributes().put("test-attribute", "some value");

        nodesYamlGenerator.addNode(nodeEntry);

        nodesYamlGenerator.generate();
        final String outputString = baos.toString();
        assertNotNull(outputString);
        //convert via yaml
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.