Skip to content

Commit 4981d34

Browse files
committed
feat(sfs): extend resource-pool commands with snapshotPolicyId
relates to STACKITCLI-394
1 parent dffec7b commit 4981d34

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

docs/stackit_beta_sfs_resource-pool_update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ stackit beta sfs resource-pool update [flags]
2929
$ stackit beta sfs resource-pool update xxx --snapshots-visible=false
3030
3131
Update the SFS resource pool with ID "xxx" to set snapshot policy id to "YYY"
32-
$ stackit beta sfs resource-pool update xxx --snapshot-policy-id=YYY
32+
$ stackit beta sfs resource-pool update xxx --snapshot-policy-id YYY
3333
```
3434

3535
### Options

internal/cmd/beta/sfs/resource-pool/list/list.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,20 @@ func outputResult(p *print.Printer, outputFormat, projectLabel string, resourceP
128128
}
129129

130130
table := tables.NewTable()
131-
table.SetHeader("ID", "NAME", "AVAILABILITY ZONE", "STATE", "TOTAL SIZE (GB)", "USED SIZE (GB), SNAPSHOT POLICY ID")
131+
table.SetHeader("ID", "NAME", "AVAILABILITY ZONE", "STATE", "TOTAL SIZE (GB)", "USED SIZE (GB)")
132132
for _, resourcePool := range resourcePools {
133133
totalSizeGigabytes, usedSizeGigabytes := "", ""
134134
if resourcePool.HasSpace() {
135135
totalSizeGigabytes = utils.PtrString(resourcePool.Space.SizeGigabytes)
136136
usedSizeGigabytes = utils.PtrString(resourcePool.Space.UsedGigabytes.Get())
137137
}
138-
var snapshotPolicyId string
139-
if resourcePool.SnapshotPolicy.Get() != nil {
140-
snapshotPolicyId = *resourcePool.SnapshotPolicy.Get().Id
141-
}
142138
table.AddRow(
143139
utils.PtrString(resourcePool.Id),
144140
utils.PtrString(resourcePool.Name),
145141
utils.PtrString(resourcePool.AvailabilityZone),
146142
utils.PtrString(resourcePool.State),
147143
totalSizeGigabytes,
148144
usedSizeGigabytes,
149-
snapshotPolicyId,
150145
)
151146
}
152147
err := table.Display(p)

internal/cmd/beta/sfs/resource-pool/update/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The available performance class values can be obtained by running:
6565
"$ stackit beta sfs resource-pool update xxx --snapshots-visible=false"),
6666
examples.NewExample(
6767
`Update the SFS resource pool with ID "xxx" to set snapshot policy id to "YYY"`,
68-
"$ stackit beta sfs resource-pool update xxx --snapshot-policy-id=YYY"),
68+
"$ stackit beta sfs resource-pool update xxx --snapshot-policy-id YYY"),
6969
),
7070
RunE: func(cmd *cobra.Command, args []string) error {
7171
ctx := context.Background()

0 commit comments

Comments
 (0)