Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
help text for rule creation
Browse files Browse the repository at this point in the history
  • Loading branch information
rusenask committed Mar 30, 2017
1 parent 568d190 commit cb77b62
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cli/command/rule/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package rule
import (
"fmt"

"context"
"github.com/dnephin/cobra"
"github.com/storageos/go-api/types"
"github.com/storageos/go-cli/cli"
"github.com/storageos/go-cli/cli/command"
"github.com/storageos/go-cli/cli/opts"
"context"
)

type createOptions struct {
Expand All @@ -30,9 +30,11 @@ func newCreateCommand(storageosCli *command.StorageOSCli) *cobra.Command {
}

cmd := &cobra.Command{
Use: "create [OPTIONS] [RULE]",
Short: "Create a rule",
Args: cli.RequiresMaxArgs(1),
Use: "create [OPTIONS] [RULE]",
Short: `Creates a rule. To create a rule that configures 2 replicas for volumes with the label env=prod, run:
storageos rule create --namespace default --selector env=prod --operator == --action add --label storageos.feature.replicas=2 replicator
`,
Args: cli.RequiresMaxArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 1 {
if opt.name != "" {
Expand Down

0 comments on commit cb77b62

Please sign in to comment.