github.com/openshift/installer@v1.4.17/pkg/asset/agent/workflow/agentworkflowaddnodes.go (about)

     1  package workflow
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/openshift/installer/pkg/asset"
     7  )
     8  
     9  // AgentWorkflowAddNodes is meant just to define
    10  // the add nodes workflow.
    11  type AgentWorkflowAddNodes struct {
    12  	AgentWorkflow
    13  }
    14  
    15  var _ asset.WritableAsset = (*AgentWorkflowAddNodes)(nil)
    16  
    17  // Name returns a human friendly name for the asset.
    18  func (*AgentWorkflowAddNodes) Name() string {
    19  	return "Agent Workflow Add Nodes"
    20  }
    21  
    22  // Generate generates the AgentWorkflow asset.
    23  func (a *AgentWorkflowAddNodes) Generate(_ context.Context, dependencies asset.Parents) error {
    24  	a.Workflow = AgentWorkflowTypeAddNodes
    25  	a.File = &asset.File{
    26  		Filename: agentWorkflowFilename,
    27  		Data:     []byte(a.Workflow),
    28  	}
    29  
    30  	return nil
    31  }