Package com.dtolabs.rundeck.core.common

Examples of com.dtolabs.rundeck.core.common.NodeEntryImpl


     */
    public void testAttributeCharsPeriod() throws Exception {
        //test attributes with xml special chars
        final ResourceXMLGenerator gen = new ResourceXMLGenerator(test1);
        //add a node
        final NodeEntryImpl node = new NodeEntryImpl("test1", "test1name");
        node.setDescription("test desc");
        node.setUsername("test user");
        final HashMap<String, String> attributes = new HashMap<String, String>();
        attributes.put("my.attr", "myattrvalue");
        attributes.put("another.attribute", "test value");
        node.setAttributes(attributes);

        gen.addNode(node);
        gen.generate();
        assertTrue(test1.exists());
        assertTrue(test1.isFile());
View Full Code Here


    static NodeSetImpl nodeSetFromNodes(final Nodes nodes) {
        final NodeSetImpl nodeset = new NodeSetImpl();
        for (final Map.Entry<String, Node> entry : nodes.getNodes().entrySet()) {
            final String name = entry.getKey();
            final Node value = entry.getValue();
            final NodeEntryImpl nodeEntry = new NodeEntryImpl();
            if (null != value.getAttributes()) {
                nodeEntry.setAttributes(value.getAttributes());
            }
            if (null != value.getTags()) {
                nodeEntry.setTags(value.getTags());
            }
            nodeEntry.setNodename(name);
            nodeset.putNode(nodeEntry);
        }
        return nodeset;
    }
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.common.NodeEntryImpl

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.