ACI Volume create flags are required

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Guillaume Tardif 2020-09-10 15:08:47 +02:00
parent 099b64935b
commit 07547d7b87
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,7 @@ func ACICommand() *cobra.Command {
func createVolume() *cobra.Command {
aciOpts := aci.VolumeCreateOptions{}
cmd := &cobra.Command{
Use: "create",
Use: "create --storage-account ACCOUNT --fileshare FILESHARE",
Short: "Creates an Azure file share to use as ACI volume.",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
@ -73,6 +73,8 @@ func createVolume() *cobra.Command {
cmd.Flags().StringVar(&aciOpts.Account, "storage-account", "", "Storage account name")
cmd.Flags().StringVar(&aciOpts.Fileshare, "fileshare", "", "Fileshare name")
_ = cmd.MarkFlagRequired("fileshare")
_ = cmd.MarkFlagRequired("storage-account")
return cmd
}