airshipctl/cmd/bootstrap/bootstrap_isogen.go
Dmitry Ukov 1f2e20e106 [AIR-137] Add isogen subcommand for bootstrap
This is just a frame for command that will execute docker container
with ISO builder scripts

Change-Id: I59a5c494785af3cbcffd3b9f6a488d93f73f4878
2019-09-26 13:51:18 +04:00

25 lines
677 B
Go

package bootstrap
import (
"github.com/spf13/cobra"
"opendev.org/airship/airshipctl/pkg/bootstrap/isogen"
"opendev.org/airship/airshipctl/pkg/environment"
)
// NewISOGenCommand creates a new command for ISO image creation
func NewISOGenCommand(parent *cobra.Command, rootSettings *environment.AirshipCTLSettings) *cobra.Command {
settings := &isogen.Settings{AirshipCTLSettings: rootSettings}
imageGen := &cobra.Command{
Use: "isogen",
Short: "Generate bootstrap ISO image",
RunE: func(cmd *cobra.Command, args []string) error {
return isogen.GenerateBootstrapIso(settings, args, cmd.OutOrStdout())
},
}
settings.InitFlags(imageGen)
return imageGen
}