airshipctl/cmd/bootstrap/bootstrap_isogen.go
Dmitry Ukov 5ae4a37618 Switch isogen command output to log module
Change-Id: I4f23bbe192a2f56a4ebfa0d1417b2271a343ff96
2019-11-14 13:25:49 -06:00

25 lines
658 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)
},
}
settings.InitFlags(imageGen)
return imageGen
}