feat(LXC): add ssh-keys
This commit is contained in:
2
lxc.go
2
lxc.go
@@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/platform-engineering-labs/formae/pkg/plugin/resource"
|
||||
)
|
||||
@@ -73,6 +74,7 @@ func (p *Plugin) CreateLXC(ctx context.Context, req *resource.CreateRequest) (*r
|
||||
"hostname": {props.Hostname},
|
||||
"cores": {strconv.Itoa(props.Cores)},
|
||||
"memory": {strconv.Itoa(props.Memory)},
|
||||
"ssh-public-keys": {strings.Join(props.SSHKeys, "\n")},
|
||||
}
|
||||
if props.Description != "" {
|
||||
urlparams.Add("description", props.Description)
|
||||
|
||||
@@ -46,4 +46,7 @@ class LXC extends formae.Resource {
|
||||
@formae.FieldHint {}
|
||||
onboot: Int = 0
|
||||
|
||||
@formae.FieldHint {}
|
||||
sshkeys: Listing<String>?
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user