Skip to content

Commit 5f507d3

Browse files
allmightyspiffGitHub Enterprise
authored andcommitted
Merge pull request #876 from SoftLayer/issues733
Updated help message for some block and file commands
2 parents 314f930 + b08cf85 commit 5f507d3

17 files changed

+61
-217
lines changed

plugin/commands/block/volume_modify.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ func NewVolumeModifyCommand(sl *metadata.SoftlayerStorageCommand) *VolumeModifyC
2828
cobraCmd := &cobra.Command{
2929
Use: "volume-modify " + T("IDENTIFIER"),
3030
Short: T("Modify an existing block storage volume"),
31-
Long: T(`${COMMAND_NAME} sl {{.storageType}} volume-modify VOLUME_ID [OPTIONS]
31+
Long: T(`Valid size and iops options can be found here:
32+
https://cloud.ibm.com/docs/BlockStorage/index.html#provisioning-considerations
33+
https://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-orderingBlockStorage&interface=cli
3234
3335
EXAMPLE:
3436
${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 1000 --new-iops 4000
@@ -42,7 +44,7 @@ func NewVolumeModifyCommand(sl *metadata.SoftlayerStorageCommand) *VolumeModifyC
4244
}
4345
cobraCmd.Flags().IntVarP(&thisCmd.NewSize, "new-size", "c", 0, T("New Size of block volume in GB. ***If no size is given, the original size of volume is used.***\n Potential Sizes: [20, 40, 80, 100, 250, 500, 1000, 2000, 4000, 8000, 12000]\n Minimum: [the original size of the volume]"))
4446
cobraCmd.Flags().IntVarP(&thisCmd.NewIops, "new-iops", "i", 0, T("Performance Storage IOPS, between 100 and 6000 in multiples of 100 [only for performance volumes] ***If no IOPS value is specified, the original IOPS value of the volume will be used.***"))
45-
cobraCmd.Flags().Float64VarP(&thisCmd.NewTier, "new-tier", "t", 0, T("Endurance Storage Tier (IOPS per GB) [only for endurance volumes] ***If no tier is specified, the original tier of the volume will be used.***"))
47+
cobraCmd.Flags().Float64VarP(&thisCmd.NewTier, "new-tier", "t", 0, T("Endurance Storage Tier (IOPS per GB) [only for endurance volumes] ***If no tier is specified, the original tier of the volume will be used.***") + "\n" + T("Tiers: [0.25, 2, 4, 10]"))
4648
cobraCmd.Flags().BoolVarP(&thisCmd.Force, "force", "f", false, T("Force operation without confirmation"))
4749
thisCmd.Command = cobraCmd
4850
return thisCmd

plugin/commands/block/volume_options.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ func NewVolumeOptionsCommand(sl *metadata.SoftlayerStorageCommand) *VolumeOption
3131
}
3232
cobraCmd := &cobra.Command{
3333
Use: "volume-options",
34-
Short: T("List all options for ordering a block storage"),
35-
Long: T(`${COMMAND_NAME} sl {{.storageType}} volume-options
36-
37-
EXAMPLE:
38-
${COMMAND_NAME} sl {{.storageType}} volume-options
39-
This command lists all options for creating a block storage volume, including storage type, volume size, OS type, IOPS, tier level, datacenter, and snapshot size.`, sl.StorageI18n),
34+
Short: T("List all options for ordering a block or file storage volume"),
35+
Long: T("List all options for ordering a block or file storage volume") + "\n\n" +
36+
T("See Also:") + "\n" +
37+
"\thttps://cloud.ibm.com/docs/BlockStorage/index.html#provisioning-considerations\n" +
38+
"\thttps://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-orderingBlockStorage&interface=cli\n" ,
4039
Args: metadata.NoArgs,
4140
RunE: func(cmd *cobra.Command, args []string) error {
4241
return thisCmd.Run(args)

plugin/commands/block/volume_order.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ func NewVolumeOrderCommand(sl *metadata.SoftlayerStorageCommand) *VolumeOrderCom
3838
cobraCmd := &cobra.Command{
3939
Use: "volume-order",
4040
Short: T("Order a block storage volume"),
41-
Long: T(`${COMMAND_NAME} sl {{.storageType}} volume-order [OPTIONS]
42-
43-
EXAMPLE:
41+
Long: T(`EXAMPLE:
4442
${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type performance --size 1000 --iops 4000 --os-type LINUX -d dal09
4543
This command orders a performance volume with size is 1000GB, IOPS is 4000, OS type is LINUX, located at dal09.
4644
${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type endurance --size 500 --tier 4 --os-type XEN -d dal09 --snapshot-size 500

plugin/commands/file/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func SetupCobraCommands(sl *metadata.SoftlayerCommand) *cobra.Command {
5252
cobraCmd.AddCommand(block.NewVolumeRefreshCommand(StorageCommand).Command)
5353
cobraCmd.AddCommand(block.NewVolumeConvertCommand(StorageCommand).Command)
5454
cobraCmd.AddCommand(block.NewSnapshotOrderCommand(StorageCommand).Command)
55+
cobraCmd.AddCommand(block.NewVolumeOptionsCommand(StorageCommand).Command)
5556

5657
// Unique File Commands, even these can likely be merged in a later version.
5758
cobraCmd.AddCommand(NewAccessAuthorizeCommand(StorageCommand).Command)
@@ -65,6 +66,5 @@ func SetupCobraCommands(sl *metadata.SoftlayerCommand) *cobra.Command {
6566
cobraCmd.AddCommand(NewVolumeListCommand(StorageCommand).Command)
6667
cobraCmd.AddCommand(NewVolumeOrderCommand(StorageCommand).Command)
6768
cobraCmd.AddCommand(NewVolumeModifyCommand(StorageCommand).Command)
68-
cobraCmd.AddCommand(NewVolumeOptionsCommand(StorageCommand).Command)
6969
return cobraCmd
7070
}

plugin/commands/file/volume_options.go

Lines changed: 0 additions & 90 deletions
This file was deleted.

plugin/commands/file/volume_options_test.go

Lines changed: 0 additions & 69 deletions
This file was deleted.

plugin/commands/file/volume_order.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ func NewVolumeOrderCommand(sl *metadata.SoftlayerStorageCommand) *VolumeOrderCom
3838
cobraCmd := &cobra.Command{
3939
Use: "volume-order",
4040
Short: T("Order a file storage volume"),
41-
Long: T(`${COMMAND_NAME} sl {{.storageType}} volume-order [OPTIONS]
42-
43-
EXAMPLE:
41+
Long: T(`EXAMPLE:
4442
${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type performance --size 1000 --iops 4000 --os-type LINUX -d dal09
4543
This command orders a performance volume with size is 1000GB, IOPS is 4000, OS type is LINUX, located at dal09.
4644
${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type endurance --size 500 --tier 4 --os-type XEN -d dal09 --snapshot-size 500

plugin/i18n/v2Resources/active.de_DE.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@
413413
"${COMMAND_NAME} sl {{.storageType}} volume-list [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl {{.storageType}} volume-list -d dal09 -t endurance --sortby capacity_gb\n This command lists all endurance volumes on current account that are located at dal09, and sorts them by capacity.": {
414414
"other": "${COMMAND_NAME} sl {{.storageType}} volume-list [OPTIONEN]\n \nBEISPIEL:\n ${COMMAND_NAME} sl {{.storageType}} volume-list -d dal09 -t endurance --sortby capacity_gb\n Dieser Befehl listet alle Endurance-Datenträger für das aktuelle Konto in dal09 auf und sortiert sie nach Kapazität."
415415
},
416-
"${COMMAND_NAME} sl {{.storageType}} volume-modify VOLUME_ID [OPTIONS]\n\n EXAMPLE:\n\t ${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 1000 --new-iops 4000 \n\t This command modify a volume 12345678 with size is 1000GB, IOPS is 4000.\n\t ${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 500 --new-tier 4\n\t This command modify a volume 12345678 with size is 500GB, tier level is 4 IOPS per GB.": {
416+
"Valid size and iops options can be found here:\nhttps://cloud.ibm.com/docs/BlockStorage/index.html#provisioning-considerations\nhttps://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-orderingBlockStorage&interface=cli\nEXAMPLE:\n\t ${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 1000 --new-iops 4000 \n\t This command modify a volume 12345678 with size is 1000GB, IOPS is 4000.\n\t ${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 500 --new-tier 4\n\t This command modify a volume 12345678 with size is 500GB, tier level is 4 IOPS per GB.": {
417417
"other": "${COMMAND_NAME} sl {{.storageType}} volume-modify DATENTRÄGER_ID [OPTIONEN]\n\n BEISPIEL:\n ${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 1000 --new-iops 4000 \n Dieser Befehl ändert einen Datenträger 12345678 mit der Größe 1000 GB, E/A-Operationen pro Sekunde sind 4000.\n ${COMMAND_NAME} sl {{.storageType}} volume-modify 12345678 --new-size 500 --new-tier 4\n Dieser Befehl ändert einen Datenträger 12345678 mit einer Größe von 500 GB und einer Tierebene von 4 E/A-Operationen pro Sekunde pro GB."
418418
},
419419
"${COMMAND_NAME} sl {{.storageType}} volume-options\n\t\nEXAMPLE:\n ${COMMAND_NAME} sl {{.storageType}} volume-options\n This command lists all options for creating a block storage volume, including storage type, volume size, OS type, IOPS, tier level, datacenter, and snapshot size.": {
@@ -422,7 +422,7 @@
422422
"${COMMAND_NAME} sl {{.storageType}} volume-options\n\t\nEXAMPLE:\n ${COMMAND_NAME} sl {{.storageType}} volume-options\n This command lists all options for creating a file storage volume, including storage type, volume size, IOPS, tier level, datacenter, and snapshot size.": {
423423
"other": "${COMMAND_NAME} sl {{.storageType}} volume-options\n \nBEISPIEL:\n ${COMMAND_NAME} sl {{.storageType}} volume-options \n Dieser Befehl listet alle Optionen für die Erstellung eines Dateispeicherdatenträgers auf, einschließlich Speichertyp, Datenträgergröße, IOPS, Tierebene, Rechenzentrum und Snapshotgröße."
424424
},
425-
"${COMMAND_NAME} sl {{.storageType}} volume-order [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type performance --size 1000 --iops 4000 --os-type LINUX -d dal09\n This command orders a performance volume with size is 1000GB, IOPS is 4000, OS type is LINUX, located at dal09.\n ${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type endurance --size 500 --tier 4 --os-type XEN -d dal09 --snapshot-size 500\n This command orders a endurance volume with size is 500GB, tier level is 4 IOPS per GB, OS type is XEN, located at dal09, and additional snapshot space size is 500GB.": {
425+
"EXAMPLE:\n ${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type performance --size 1000 --iops 4000 --os-type LINUX -d dal09\n This command orders a performance volume with size is 1000GB, IOPS is 4000, OS type is LINUX, located at dal09.\n ${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type endurance --size 500 --tier 4 --os-type XEN -d dal09 --snapshot-size 500\n This command orders a endurance volume with size is 500GB, tier level is 4 IOPS per GB, OS type is XEN, located at dal09, and additional snapshot space size is 500GB.": {
426426
"other": "${COMMAND_NAME} sl {{.storageType}} volume-order [OPTIONEN]\n\nBEISPIEL:\n ${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type performance --size 1000 --iops 4000 --os-type LINUX -d dal09\n Dieser Befehl bestellt einen Leistungsdatenträger mit der Größe 1000 GB, IOPS 4000, OS LINUX, dal09.\n ${COMMAND_NAME} sl {{.storageType}} volume-order --storage-type endurance --size 500 --tier 4 --os-type XEN -d dal09 --snapshot-size 500\n Dieser Befehl bestellt einen Endurance-Datenträger mit der Größe 500 GB, die Tierebene ist 4 E/A-Operationen pro Sekunde pro GB, der Betriebssystemtyp ist XEN, befindet sich in dal09 und die Größe des zusätzlichen Snapshotbereichs ist 500 GB."
427427
},
428428
"${COMMAND_NAME} sl {{.storageType}} volume-refresh VOLUME_ID SNAPSHOT_ID\n\nEXAMPLE:\n\t${COMMAND_NAME} sl {{.storageType}} volume-refresh VOLUME_ID SNAPSHOT_ID\n\tRefresh a duplicate VOLUME_ID with a snapshot from its parent SNAPSHOT_ID.": {
@@ -4235,7 +4235,7 @@
42354235
"List all images on your account": {
42364236
"other": "Alle Images für eigenes Konto auflisten"
42374237
},
4238-
"List all options for ordering a block storage": {
4238+
"List all options for ordering a block or file storage volume": {
42394239
"other": "Alle Optionen für die Bestellung eines Blockspeichers auflisten"
42404240
},
42414241
"List all options for ordering a file storage": {

0 commit comments

Comments
 (0)