Plan,Secret- updating cmd files for documentation

The description and examples are updated for the airshipctl
commands, which will be inturn used for generating documentation.
Please ignore the .md file changes in this PS. They are added for zuul
gates to pass. Here is the PS with generated documention
files https://review.opendev.org/c/airship/airshipctl/+/789250

Relates-To: #280
Change-Id: I5d46bd361088cc1e4aff79a3009cd43a73ca1252
This commit is contained in:
Sirisha Gopigiri
2021-05-06 15:17:54 +05:30
parent 4c3140be93
commit 14ef1f8680
22 changed files with 157 additions and 119 deletions

View File

@@ -23,17 +23,18 @@ import (
const (
listLong = `
List life-cycle plans which were defined in document model.
List plans defined in site manifest.
`
listExample = `
#list plan
airshipctl plan list
List plan
# airshipctl plan list
#list plan(yaml output format)
airshipctl plan list -o yaml
List plan(yaml output format)
# airshipctl plan list -o yaml
#list plan(table output format)
airshipctl plan list -o table`
List plan(table output format)
# airshipctl plan list -o table`
)
// NewListCommand creates a command which prints available phase plans
@@ -42,7 +43,7 @@ func NewListCommand(cfgFactory config.Factory) *cobra.Command {
listCmd := &cobra.Command{
Use: "list",
Short: "List plans",
Short: "Airshipctl command to list plans",
Long: listLong[1:],
Example: listExample,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -51,9 +52,7 @@ func NewListCommand(cfgFactory config.Factory) *cobra.Command {
},
}
flags := listCmd.Flags()
flags.StringVarP(&p.Options.FormatType,
"output", "o", "table", "'table' "+
"and 'yaml' are available "+
"output formats")
flags.StringVarP(&p.Options.FormatType, "output", "o", "table",
"output format. Supported formats are 'table' and 'yaml'")
return listCmd
}