cloudapi/v2: tweak customizations
Fix verbiage of groups customization, fields which accept an array should be plural. Remove the sshkey customization, sshkeys are merged into user customizations anyway, so users should use the "users" customization instead. Since these customizations aren't in use yet, this edit should be fine. See #3716
This commit is contained in:
parent
1afe7d20c8
commit
bfad6d50e1
4 changed files with 120 additions and 178 deletions
|
|
@ -272,20 +272,9 @@ func (request *ComposeRequest) GetBlueprintWithCustomizations() (blueprint.Bluep
|
|||
bp.Customizations.Kernel = kernel
|
||||
}
|
||||
|
||||
if request.Customizations.Sshkey != nil {
|
||||
keys := []blueprint.SSHKeyCustomization{}
|
||||
for _, key := range *request.Customizations.Sshkey {
|
||||
keys = append(keys, blueprint.SSHKeyCustomization{
|
||||
User: key.User,
|
||||
Key: key.Key,
|
||||
})
|
||||
}
|
||||
bp.Customizations.SSHKey = keys
|
||||
}
|
||||
|
||||
if request.Customizations.Group != nil {
|
||||
if request.Customizations.Groups != nil {
|
||||
groups := []blueprint.GroupCustomization{}
|
||||
for _, group := range *request.Customizations.Group {
|
||||
for _, group := range *request.Customizations.Groups {
|
||||
groups = append(groups, blueprint.GroupCustomization{
|
||||
Name: group.Name,
|
||||
GID: group.Gid,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue