Skip to content

Commit 219cc6e

Browse files
committed
feat: integrated review hints
1 parent 861140d commit 219cc6e

File tree

1 file changed

+14
-18
lines changed
  • internal/cmd/beta/quota/list

1 file changed

+14
-18
lines changed

internal/cmd/beta/quota/list/list.go

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
2727
cmd := &cobra.Command{
2828
Use: "list",
2929
Short: "Lists quotas",
30-
Long: "Lists server quotas.",
30+
Long: "Lists project quotas.",
3131
Args: args.NoArgs,
3232
Example: examples.Build(
3333
examples.NewExample(
@@ -74,13 +74,9 @@ func NewCmd(p *print.Printer) *cobra.Command {
7474
},
7575
}
7676

77-
configureFlags(cmd)
7877
return cmd
7978
}
8079

81-
func configureFlags(_ *cobra.Command) {
82-
}
83-
8480
func parseInput(p *print.Printer, cmd *cobra.Command) (*inputModel, error) {
8581
globalFlags := globalflags.Parse(p, cmd)
8682
if globalFlags.ProjectId == "" {
@@ -130,42 +126,42 @@ func outputResult(p *print.Printer, outputFormat string, quotas *iaas.QuotaList)
130126

131127
default:
132128
table := tables.NewTable()
133-
table.SetHeader("NAME", "LIMIT", "USAGE", "PERCENT")
129+
table.SetHeader("NAME", "LIMIT", "CURRENT USAGE", "PERCENT")
134130
if val := quotas.BackupGigabytes; val != nil {
135-
table.AddRow("Backup Gigabytes", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
131+
table.AddRow("Total size in GiB of backups [GiB]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
136132
}
137133
if val := quotas.Backups; val != nil {
138-
table.AddRow("Backups", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
134+
table.AddRow("Number of backups [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
139135
}
140136
if val := quotas.Gigabytes; val != nil {
141-
table.AddRow("Gigabytes", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
137+
table.AddRow("Total size in GiB of volumes and snapshots [GiB]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
142138
}
143139
if val := quotas.Networks; val != nil {
144-
table.AddRow("Networks", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
140+
table.AddRow("Number of networks [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
145141
}
146142
if val := quotas.Nics; val != nil {
147-
table.AddRow("Nics", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
143+
table.AddRow("Number of network interfaces (nics) [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
148144
}
149145
if val := quotas.PublicIps; val != nil {
150-
table.AddRow("Public Ips", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
146+
table.AddRow("Number of public IP addresses [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
151147
}
152148
if val := quotas.Ram; val != nil {
153-
table.AddRow("Ram", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
149+
table.AddRow("Amount of server RAM in MiB [MiB]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
154150
}
155151
if val := quotas.SecurityGroupRules; val != nil {
156-
table.AddRow("Security Group Rules", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
152+
table.AddRow("Number of security group rules [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
157153
}
158154
if val := quotas.SecurityGroups; val != nil {
159-
table.AddRow("Security Groups", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
155+
table.AddRow("Number of security groups [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
160156
}
161157
if val := quotas.Snapshots; val != nil {
162-
table.AddRow("Snapshots", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
158+
table.AddRow("Number of snapshots [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
163159
}
164160
if val := quotas.Vcpu; val != nil {
165-
table.AddRow("Vcpu", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
161+
table.AddRow("Number of server cores (vcpu) [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
166162
}
167163
if val := quotas.Volumes; val != nil {
168-
table.AddRow("Volumes", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
164+
table.AddRow("Number of volumes [Count]", conv(val.GetLimit()), conv(val.GetUsage()), percentage(val))
169165
}
170166
err := table.Display(p)
171167
if err != nil {

0 commit comments

Comments
 (0)