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

     1  package common
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/google/uuid"
     7  
     8  	"github.com/openshift/installer/pkg/asset"
     9  )
    10  
    11  // InfraEnvID is an asset that generates infraEnvID.
    12  type InfraEnvID struct {
    13  	ID string
    14  }
    15  
    16  var _ asset.Asset = (*InfraEnvID)(nil)
    17  
    18  // Dependencies returns the assets on which the InfraEnv asset depends.
    19  func (a *InfraEnvID) Dependencies() []asset.Asset {
    20  	return []asset.Asset{}
    21  }
    22  
    23  // Generate generates the InfraEnvID for agent installer.
    24  func (a *InfraEnvID) Generate(_ context.Context, dependencies asset.Parents) error {
    25  	a.ID = uuid.New().String()
    26  	return nil
    27  }
    28  
    29  // Name returns the human-friendly name of the asset.
    30  func (a *InfraEnvID) Name() string {
    31  	return "Agent Installer InfraEnv ID"
    32  }