adding WAREWULF_OCI vars to wwctl
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
@@ -15,13 +15,16 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
}
|
||||
|
||||
cip := &wwapiv1.ContainerImportParameter{
|
||||
Source: args[0],
|
||||
Name: name,
|
||||
Force: SetForce,
|
||||
Update: SetUpdate,
|
||||
Build: SetBuild,
|
||||
Default: SetDefault,
|
||||
SyncUser: SyncUser,
|
||||
Source: args[0],
|
||||
Name: name,
|
||||
Force: SetForce,
|
||||
Update: SetUpdate,
|
||||
Build: SetBuild,
|
||||
Default: SetDefault,
|
||||
SyncUser: SyncUser,
|
||||
OciNoHttps: OciNoHttps,
|
||||
OciUsername: OciUsername,
|
||||
OciPassword: OciPassword,
|
||||
}
|
||||
|
||||
_, err = apicontainer.ContainerImport(cip)
|
||||
|
||||
@@ -29,11 +29,14 @@ Imported containers are used to create bootable VNFS images.`,
|
||||
}
|
||||
},
|
||||
}
|
||||
SetForce bool
|
||||
SetUpdate bool
|
||||
SetBuild bool
|
||||
SetDefault bool
|
||||
SyncUser bool
|
||||
SetForce bool
|
||||
SetUpdate bool
|
||||
SetBuild bool
|
||||
SetDefault bool
|
||||
SyncUser bool
|
||||
OciNoHttps bool
|
||||
OciUsername string
|
||||
OciPassword string
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -42,6 +45,9 @@ func init() {
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetBuild, "build", "b", false, "Build container when after pulling")
|
||||
baseCmd.PersistentFlags().BoolVar(&SetDefault, "setdefault", false, "Set this container for the default profile")
|
||||
baseCmd.PersistentFlags().BoolVar(&SyncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to container")
|
||||
baseCmd.PersistentFlags().BoolVar(&OciNoHttps, "nohttps", false, "Ignore wrong TLS certificates, superseedes env WAREWULF_OCI_NOHTTPS")
|
||||
baseCmd.PersistentFlags().StringVar(&OciUsername, "username", "", "Set username for the access to the registry, superseedes env WAREWULF_OCI_USERNAME")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "passwd", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
|
||||
}
|
||||
|
||||
// GetRootCommand returns the root cobra.Command for the application.
|
||||
|
||||
Reference in New Issue
Block a user