diff --git a/internal/blueprint/blueprint.go b/internal/blueprint/blueprint.go index 7b588eda5..973fd6d10 100644 --- a/internal/blueprint/blueprint.go +++ b/internal/blueprint/blueprint.go @@ -292,14 +292,7 @@ func Convert(bp Blueprint) iblueprint.Blueprint { ikernel := iblueprint.KernelCustomization(*kernel) customizations.Kernel = &ikernel } - if sshkeys := c.SSHKey; sshkeys != nil { - isshkeys := make([]iblueprint.SSHKeyCustomization, len(sshkeys)) - for idx := range sshkeys { - isshkeys[idx] = iblueprint.SSHKeyCustomization(sshkeys[idx]) - } - customizations.SSHKey = isshkeys - } - if users := c.User; users != nil { + if users := c.GetUsers(); users != nil { // contains both user customizations and converted sshkey customizations iusers := make([]iblueprint.UserCustomization, len(users)) for idx := range users { iusers[idx] = iblueprint.UserCustomization(users[idx]) diff --git a/internal/blueprint/blueprint_convert_test.go b/internal/blueprint/blueprint_convert_test.go index 39a725d3b..41d91c8d1 100644 --- a/internal/blueprint/blueprint_convert_test.go +++ b/internal/blueprint/blueprint_convert_test.go @@ -236,13 +236,11 @@ func TestConvert(t *testing.T) { Name: "kernel-name", Append: "kernel-append", }, - SSHKey: []iblueprint.SSHKeyCustomization{ - { - User: "ssh-user", - Key: "ssh-key", - }, - }, User: []iblueprint.UserCustomization{ + { + Name: "ssh-user", // converted from sshkey + Key: common.ToPtr("ssh-key"), + }, { Name: "user-name", Description: common.ToPtr("user-desc"),