Skip to content

Commit 423b740

Browse files
Updating help text of some commands to better fit with auto documentation
1 parent 6df550d commit 423b740

3 files changed

Lines changed: 20 additions & 26 deletions

File tree

plugin/commands/subnet/create.go

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
package subnet
22

33
import (
4-
"strconv"
5-
4+
"fmt"
65
"github.com/spf13/cobra"
76
"github.ibm.com/SoftLayer/softlayer-cli/plugin/errors"
87
slErr "github.ibm.com/SoftLayer/softlayer-cli/plugin/errors"
98
. "github.ibm.com/SoftLayer/softlayer-cli/plugin/i18n"
109
"github.ibm.com/SoftLayer/softlayer-cli/plugin/managers"
1110
"github.ibm.com/SoftLayer/softlayer-cli/plugin/metadata"
1211
"github.ibm.com/SoftLayer/softlayer-cli/plugin/utils"
12+
"strconv"
13+
"strings"
14+
1315
)
1416

1517
type CreateCommand struct {
@@ -22,27 +24,22 @@ type CreateCommand struct {
2224
}
2325

2426
func NewCreateCommand(sl *metadata.SoftlayerCommand) *CreateCommand {
25-
thisCmd := &CreateCommand{
27+
thisCmd := &CreateCommand{
2628
SoftlayerCommand: sl,
2729
NetworkManager: managers.NewNetworkManager(sl.Session),
2830
}
2931
cobraCmd := &cobra.Command{
30-
Use: "create",
32+
Use: "create" + strings.ToUpper(fmt.Sprintf(" %s %s %s", T("Network"), T("Quantity"), T("VLAN"))),
3133
Short: T("Add a new subnet to your account"),
32-
Long: T(`${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONS]
33-
34-
Add a new subnet to your account. Valid quantities vary by type.
35-
36-
Type - Valid Quantities (IPv4)
37-
public - 4, 8, 16, 32
38-
private - 4, 8, 16, 32, 64
34+
Long: T(`Valid quantities vary by type.
3935
40-
Type - Valid Quantities (IPv6)
41-
public - 64
36+
- public IPv4: 4, 8, 16, 32
37+
- private IPv4: 4, 8, 16, 32, 64
38+
- public IPv6: 64
4239
4340
EXAMPLE:
44-
${COMMAND_NAME} sl subnet create public 16 567
45-
This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.`),
41+
${COMMAND_NAME} sl subnet create public 16 567
42+
This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.`),
4643
Args: metadata.ThreeArgs,
4744
RunE: func(cmd *cobra.Command, args []string) error {
4845
return thisCmd.Run(args)

plugin/commands/user/edit_notifications.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ func NewEditNotificationsCommand(sl *metadata.SoftlayerCommand) (cmd *EditNotifi
2929
cobraCmd := &cobra.Command{
3030
Use: "edit-notifications",
3131
Short: T("Enable or Disable specific notifications for the active user."),
32-
Long: T(`${COMMAND_NAME} sl user edit-notifications [OPTIONS] NOTIFICATIONS
33-
34-
Notification names should be enclosed in quotation marks. Examples:
35-
slcli user edit-notifications --enable 'Order Approved'
36-
slcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'`),
32+
Long: T(`Notification names should be enclosed in quotation marks.
33+
EXAMPLE:
34+
slcli user edit-notifications --enable 'Order Approved'
35+
slcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'`),
3736
RunE: func(cmd *cobra.Command, args []string) error {
3837
return thisCmd.Run(args)
3938
},

plugin/commands/virtual/upgrade.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ func NewUpgradeCommand(sl *metadata.SoftlayerCommand) (cmd *UpgradeCommand) {
3535
cobraCmd := &cobra.Command{
3636
Use: "upgrade " + T("IDENTIFIER"),
3737
Short: T("Upgrade a virtual server instance"),
38-
Long: T(`${COMMAND_NAME} sl vs upgrade IDENTIFIER [OPTIONS]
39-
Note: Classic infrastructure service automatically reboots the instance once upgrade request is
40-
placed. The instance is halted until the upgrade transaction is completed.
41-
However for Network, no reboot is required.
38+
Long: T(`Note: This virtual server will be rebooted once the upgrade order is placed.
39+
The instance is halted until the upgrade transaction is completed. However for Network, no reboot is required.
4240
4341
EXAMPLE:
44-
${COMMAND_NAME} sl vs upgrade 12345678 -c 8 -m 8192 --network 1000
45-
This commands upgrades virtual server instance with ID 12345678 and set number of CPU cores to 8, memory to 8192M, network port speed to 1000 Mbps.`),
42+
${COMMAND_NAME} sl vs upgrade 12345678 -c 8 -m 8192 --network 1000
43+
This commands upgrades virtual server instance with ID 12345678 and set number of CPU cores to 8, memory to 8192M, network port speed to 1000 Mbps.`),
4644
Args: metadata.OneArgs,
4745
RunE: func(cmd *cobra.Command, args []string) error {
4846
return thisCmd.Run(args)

0 commit comments

Comments
 (0)