Class NodeGroup.Builder

java.lang.Object
com.scivicslab.turingworkflow.plugins.inventory.NodeGroup.Builder
Enclosing class:
NodeGroup

public static class NodeGroup.Builder extends Object
Builder for creating NodeGroup instances with fluent API.

This is the recommended way to create NodeGroup instances.

Example:


 NodeGroup nodeGroup = new NodeGroup.Builder()
     .withInventory(new FileInputStream("inventory.ini"))
     .build();
 
Since:
1.0
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withInventory

      public NodeGroup.Builder withInventory(InputStream inventoryStream) throws IOException
      Loads an Ansible inventory file.
      Parameters:
      inventoryStream - the input stream containing the inventory file
      Returns:
      this builder for method chaining
      Throws:
      IOException - if reading the inventory fails
    • build

      public NodeGroup build()
      Builds the NodeGroup instance.
      Returns:
      a new NodeGroup instance with the configured settings