Skip to content

Commit

Permalink
chore: adjust help text based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
danxmoran committed Nov 18, 2020
1 parent d5becff commit 4541ab9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/influx/v1_dbrp.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func v1DBRPFindCmd(f *globalFlags, opt genericCLIOpts) *cobra.Command {
Use: "list",
Short: "List database and retention policy mappings",
RunE: checkSetupRunEMiddleware(&flags)(v1DBRPFindF),
Args: cobra.NoArgs,
}

f.registerFlags(opt.viper, cmd)
Expand Down Expand Up @@ -142,8 +143,8 @@ func v1DBRPCreateCmd(f *globalFlags, opt genericCLIOpts) *cobra.Command {
_ = cmd.MarkFlagRequired("bucket-id")
cmd.Flags().StringVar(&v1DBRPCreateFlags.DB, "db", "", "The name of the database")
_ = cmd.MarkFlagRequired("db")
cmd.Flags().BoolVar(&v1DBRPCreateFlags.Default, "default", false, "Identify this mapping as the default retention policy")
cmd.Flags().StringVar(&v1DBRPCreateFlags.RP, "rp", "", "Name of the retention policy")
cmd.Flags().BoolVar(&v1DBRPCreateFlags.Default, "default", false, "Identify this retention policy as the default for the database")
cmd.Flags().StringVar(&v1DBRPCreateFlags.RP, "rp", "", "The name of the retention policy")
_ = cmd.MarkFlagRequired("rp")
return cmd
}
Expand Down Expand Up @@ -302,14 +303,16 @@ func v1DBRPUpdateCmd(f *globalFlags, opt genericCLIOpts) *cobra.Command {
Use: "update",
Short: "Update a database and retention policy mapping",
RunE: checkSetupRunEMiddleware(&flags)(v1DBRPUpdateF),
Args: cobra.NoArgs,
}
f.registerFlags(opt.viper, cmd)
registerPrintOptions(opt.viper, cmd, &v1DBRPCRUDFlags.hideHeaders, &v1DBRPCRUDFlags.json)
v1DBRPUpdateFlags.Org.register(opt.viper, cmd, false)
cli.IDVar(cmd.Flags(), &v1DBRPUpdateFlags.ID, "id", 0, "The ID of the mapping to be updated")
_ = cmd.MarkFlagRequired("id")
// note for update we only care about update flags that the user set
cmd.Flags().StringVar(&v1DBRPUpdateFlags.RP, "rp", "", "The updated name of the retention policy")
cmd.Flags().Bool("default", false, "Set this as the default mapping for the associated database name") // note for update we only care about update flags that the user set
cmd.Flags().Bool("default", false, "Set this mapping's retention policy as the default for the mapping's database")
return cmd
}

Expand Down

0 comments on commit 4541ab9

Please sign in to comment.