github.com/openshift/installer@v1.4.17/pkg/infrastructure/provider.go (about) 1 package infrastructure 2 3 import ( 4 "context" 5 6 "github.com/openshift/installer/pkg/asset" 7 "github.com/openshift/installer/pkg/types" 8 ) 9 10 // Provider defines the interface to be used for provisioning 11 // and working with cloud infrastructure. 12 type Provider interface { 13 // Provision creates the infrastructure resources for the stage. 14 // ctx: parent context 15 // dir: the path of the install dir 16 // parents: the parent assets, which can be used to obtain any cluser asset dependencies 17 // returns a slice of File assets, which will be appended to the cluster asset file list. 18 Provision(ctx context.Context, dir string, parents asset.Parents) ([]*asset.File, error) 19 20 // DestroyBootstrap destroys the temporary bootstrap resources. 21 DestroyBootstrap(ctx context.Context, dir string) error 22 23 // ExtractHostAddresses extracts the IPs of the bootstrap and control plane machines. 24 ExtractHostAddresses(dir string, config *types.InstallConfig, ha *HostAddresses) error 25 } 26 27 // HostAddresses contains the node addresses & ports to be 28 // used for gather bootsrap debug logs. 29 type HostAddresses struct { 30 Bootstrap string 31 Masters []string 32 Port int 33 }