Skip to content

Commit 4389648

Browse files
authored
fix(instance): image create additional volumes field (#3410)
1 parent c4bde53 commit 4389648

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

cmd/scw/testdata/test-all-usage-instance-image-create-usage.golden

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ EXAMPLES:
1010
scw instance server image create name=foobar snapshot-id=11111111-1111-1111-1111-111111111111 arch=x86_64
1111

1212
ARGS:
13-
[name=<generated>] Name of the image
14-
snapshot-id UUID of the snapshot that will be used as root volume in the image
15-
arch Architecture of the image (x86_64 | arm | arm64)
16-
[additional-snapshots.{index}.id] UUID of the snapshot to add
17-
[additional-snapshots.{index}.name] Name of the additional snapshot
18-
[additional-snapshots.{index}.size] Size of the additional snapshot
19-
[additional-snapshots.{index}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd | unified | scratch | sbs_volume)
20-
[additional-snapshots.{index}.project-id] Project ID that own the additional snapshot
21-
[project-id] Project ID to use. If none is passed the default project ID will be used
22-
[tags.{index}] Tags of the image
23-
[public] True to create a public image
24-
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
25-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
13+
[name=<generated>] Name of the image
14+
snapshot-id UUID of the snapshot that will be used as root volume in the image
15+
arch Architecture of the image (x86_64 | arm | arm64)
16+
[additional-volumes.{index}.id] UUID of the snapshot to add
17+
[additional-volumes.{index}.name] Name of the additional snapshot
18+
[additional-volumes.{index}.size] Size of the additional snapshot
19+
[additional-volumes.{index}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd | unified | scratch | sbs_volume)
20+
[additional-volumes.{index}.project-id] Project ID that own the additional snapshot
21+
[project-id] Project ID to use. If none is passed the default project ID will be used
22+
[tags.{index}] Tags of the image
23+
[public] True to create a public image
24+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
25+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
2626

2727
DEPRECATED ARGS:
28-
[default-bootscript] Default bootscript of the image
29-
[additional-snapshots.{index}.organization-id] Organization ID that own the additional snapshot
28+
[default-bootscript] Default bootscript of the image
29+
[additional-volumes.{index}.organization-id] Organization ID that own the additional snapshot
3030

3131
FLAGS:
3232
-h, --help help for create

docs/commands/instance.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ scw instance image create [arg=value ...]
129129
| snapshot-id | Required | UUID of the snapshot that will be used as root volume in the image |
130130
| arch | Required<br />One of: `x86_64`, `arm`, `arm64` | Architecture of the image |
131131
| ~~default-bootscript~~ | Deprecated | Default bootscript of the image |
132-
| additional-snapshots.{index}.id | | UUID of the snapshot to add |
133-
| additional-snapshots.{index}.name | | Name of the additional snapshot |
134-
| additional-snapshots.{index}.size | | Size of the additional snapshot |
135-
| additional-snapshots.{index}.volume-type | One of: `l_ssd`, `b_ssd`, `unified`, `scratch`, `sbs_volume` | Underlying volume type of the additional snapshot |
136-
| additional-snapshots.{index}.project-id | | Project ID that own the additional snapshot |
137-
| ~~additional-snapshots.{index}.organization-id~~ | Deprecated | Organization ID that own the additional snapshot |
132+
| additional-volumes.{index}.id | | UUID of the snapshot to add |
133+
| additional-volumes.{index}.name | | Name of the additional snapshot |
134+
| additional-volumes.{index}.size | | Size of the additional snapshot |
135+
| additional-volumes.{index}.volume-type | One of: `l_ssd`, `b_ssd`, `unified`, `scratch`, `sbs_volume` | Underlying volume type of the additional snapshot |
136+
| additional-volumes.{index}.project-id | | Project ID that own the additional snapshot |
137+
| ~~additional-volumes.{index}.organization-id~~ | Deprecated | Organization ID that own the additional snapshot |
138138
| project-id | | Project ID to use. If none is passed the default project ID will be used |
139139
| tags.{index} | | Tags of the image |
140140
| public | | True to create a public image |

internal/namespaces/instance/v1/custom_image.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,22 @@ func imageCreateBuilder(c *core.Command) *core.Command {
104104
}
105105

106106
c.ArgSpecs.GetByName("extra-volumes.{key}.id").Short = "UUID of the snapshot to add"
107-
c.ArgSpecs.GetByName("extra-volumes.{key}.id").Name = "additional-snapshots.{index}.id"
107+
c.ArgSpecs.GetByName("extra-volumes.{key}.id").Name = "additional-volumes.{index}.id"
108108

109109
c.ArgSpecs.GetByName("extra-volumes.{key}.name").Short = "Name of the additional snapshot"
110-
c.ArgSpecs.GetByName("extra-volumes.{key}.name").Name = "additional-snapshots.{index}.name"
110+
c.ArgSpecs.GetByName("extra-volumes.{key}.name").Name = "additional-volumes.{index}.name"
111111

112112
c.ArgSpecs.GetByName("extra-volumes.{key}.size").Short = "Size of the additional snapshot"
113-
c.ArgSpecs.GetByName("extra-volumes.{key}.size").Name = "additional-snapshots.{index}.size"
113+
c.ArgSpecs.GetByName("extra-volumes.{key}.size").Name = "additional-volumes.{index}.size"
114114

115115
c.ArgSpecs.GetByName("extra-volumes.{key}.volume-type").Short = "Underlying volume type of the additional snapshot"
116-
c.ArgSpecs.GetByName("extra-volumes.{key}.volume-type").Name = "additional-snapshots.{index}.volume-type"
116+
c.ArgSpecs.GetByName("extra-volumes.{key}.volume-type").Name = "additional-volumes.{index}.volume-type"
117117

118118
c.ArgSpecs.GetByName("extra-volumes.{key}.organization").Short = "Organization ID that own the additional snapshot"
119-
c.ArgSpecs.GetByName("extra-volumes.{key}.organization").Name = "additional-snapshots.{index}.organization-id"
119+
c.ArgSpecs.GetByName("extra-volumes.{key}.organization").Name = "additional-volumes.{index}.organization-id"
120120

121121
c.ArgSpecs.GetByName("extra-volumes.{key}.project").Short = "Project ID that own the additional snapshot"
122-
c.ArgSpecs.GetByName("extra-volumes.{key}.project").Name = "additional-snapshots.{index}.project-id"
122+
c.ArgSpecs.GetByName("extra-volumes.{key}.project").Name = "additional-volumes.{index}.project-id"
123123

124124
c.ArgSpecs.GetByName("root-volume").Short = "UUID of the snapshot that will be used as root volume in the image"
125125
c.ArgSpecs.GetByName("root-volume").Name = "snapshot-id"

0 commit comments

Comments
 (0)