Package com.dtolabs.rundeck.core.utils

Examples of com.dtolabs.rundeck.core.utils.NodeSet.createInclude()


    public void testMultipleNodes() throws Exception{

        {
            //test jobref item
            final NodeSet nodeset = new NodeSet();
            nodeset.createInclude().setName(".*");
            final ArrayList<StepExecutionItem> commands = new ArrayList<StepExecutionItem>();
            final testWorkflowCmdItem item = new testWorkflowCmdItem();
            item.type = "my-type";
            commands.add(item);
            final WorkflowImpl workflow = new WorkflowImpl(commands, 1, false,
View Full Code Here


    public void testMultipleNodesExtFile() throws Exception{

        {
            //test jobref item
            final NodeSet nodeset = new NodeSet();
            nodeset.createInclude().setName(".*");
            final ArrayList<StepExecutionItem> commands = new ArrayList<StepExecutionItem>();
            final testWorkflowCmdItem item = new testWorkflowCmdItem();
            item.type = "my-type";
            commands.add(item);
            final WorkflowImpl workflow = new WorkflowImpl(commands, 1, false,
View Full Code Here

        final WorkflowImpl workflow = new WorkflowImpl(commands, 1, false,
            WorkflowStrategy.NODE_FIRST);
        final WorkflowExecutionItemImpl executionItem = new WorkflowExecutionItemImpl(workflow);
        final NodeFirstWorkflowStrategy strategy = new NodeFirstWorkflowStrategy(testFramework);
        final NodeSet nodeset = new NodeSet();
        nodeset.createInclude().setName(".*");
        final ExecutionContextImpl.Builder builder = new ExecutionContextImpl.Builder();
        if(null!=nodeRankOrderAscending){
            builder.nodeRankOrderAscending(nodeRankOrderAscending); //rank order
        }
        builder.nodeRankAttribute(rankAttribute); //rank attribute
View Full Code Here

    public void testMultipleItemsAndNodes() throws Exception{

        {
            //test jobref item
            final NodeSet nodeset = new NodeSet();
            nodeset.createInclude().setName(".*");
            final ArrayList<StepExecutionItem> commands = new ArrayList<StepExecutionItem>();
            final testWorkflowCmdItem item = new testWorkflowCmdItem();
            item.flag = 0;
            item.type = "my-type";
            commands.add(item);
View Full Code Here

    public void testMultipleNodes() throws Exception{

        {
            //test jobref item
            final NodeSet nodeset = new NodeSet();
            nodeset.createInclude().setName(".*");
            final ArrayList<StepExecutionItem> commands = new ArrayList<StepExecutionItem>();
            final testWorkflowCmdItem item = new testWorkflowCmdItem();
            item.type = "my-type";
            commands.add(item);
            final WorkflowImpl workflow = new WorkflowImpl(commands, 1, false,
View Full Code Here

    public void testMultipleItemsAndNodes() throws Exception{

        {
            //test jobref item
            final NodeSet nodeset = new NodeSet();
            nodeset.createInclude().setName(".*");
            final ArrayList<StepExecutionItem> commands = new ArrayList<StepExecutionItem>();
            final testWorkflowCmdItem item = new testWorkflowCmdItem();
            item.flag=0;
            item.type = "my-type";
            commands.add(item);
View Full Code Here

        final Framework frameworkInstance = getFrameworkInstance();
        final NodeDispatcherService service = NodeDispatcherService.getInstanceForFramework(
            frameworkInstance);
        {
            final NodeSet nodeSet = new NodeSet();
            nodeSet.createInclude().setName(".*");
            nodeSet.setThreadCount(2);
            //get node dispatcher for a context.  nodeset>1 and threadcount>1 returns parallel provider
            final ExecutionContext context = ExecutionContextImpl.builder()
                .frameworkProject(PROJ_NAME)
                .framework(frameworkInstance)
View Full Code Here

        }

        {   //get node dispatcher for a context.  nodeset>1 and threadcount<2 returns sequential provider

            final NodeSet nodeSet = new NodeSet();
            nodeSet.createInclude().setName(".*");
            nodeSet.setThreadCount(1);
            final ExecutionContext context = ExecutionContextImpl.builder()
                .frameworkProject(PROJ_NAME)
                .framework(frameworkInstance)
                .user("blah")
View Full Code Here

        final Framework frameworkInstance = getFrameworkInstance();
        final NodeDispatcherService service = NodeDispatcherService.getInstanceForFramework(
            frameworkInstance);
        {   //use test-1 file
            final NodeSet nodeSet = new NodeSet();
            nodeSet.createInclude().setTags("priority1"); //matches single nodes in test1 file
            nodeSet.setThreadCount(2);
            //get node dispatcher for a context.  nodeset<2 and threadcount>1 returns sequential provider
            final ExecutionContext context = ExecutionContextImpl.builder()
                .frameworkProject(PROJ_NAME)
                .framework(frameworkInstance)
View Full Code Here

            assertNotNull(nodeDispatcher);
            assertTrue(nodeDispatcher instanceof SequentialNodeDispatcher);
        }
        {
            final NodeSet nodeSet = new NodeSet();
            nodeSet.createInclude().setTags("priority1"); //matches two nodes in external file
            nodeSet.setThreadCount(2);
            //get node dispatcher for a context.  nodeset>1 and threadcount>1 returns parallel provider
            final ExecutionContext context = ExecutionContextImpl.builder()
                .frameworkProject(PROJ_NAME)
                .framework(frameworkInstance)
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.