fix: discovery problems solved
Some checks failed
CI / build (push) Failing after 3m34s
CI / lint (push) Failing after 3m15s
CI / pkl-validate (push) Successful in 17s
CI / integration-tests (push) Has been skipped
CI / conformance-tests (latest) (push) Has been skipped

This commit is contained in:
2026-01-31 18:59:03 +01:00
parent bdeb81ffe9
commit e9de9aa036
4 changed files with 4 additions and 6 deletions

View File

@@ -43,8 +43,5 @@ func parseLXCProperties(data json.RawMessage) (*LXCProperties, error) {
if props.Hostname == "" {
return nil, fmt.Errorf("name missing")
}
if props.OSTemplate == "" {
return nil, fmt.Errorf("ostemplate missing")
}
return &props, nil
}

View File

@@ -211,6 +211,7 @@ func (p *Plugin) Read(ctx context.Context, req *resource.ReadRequest) (*resource
VMID: req.NativeID,
Hostname: lxcdata.Hostname,
Description: lxcdata.Description,
OSTemplate: "",
}
propsJSON, err := json.Marshal(properties)

View File

@@ -29,12 +29,12 @@ class LXC extends formae.Resource {
createOnly = true
writeOnly = true
}
ostemplate: String
ostemplate: String?
@formae.FieldHint {}
hostname: String
@formae.FieldHint {}
description: String = "No description"
description: String?
}

View File

@@ -11,7 +11,7 @@ type LXCProperties struct {
VMID string `json:"vmid"`
Hostname string `json:"hostname"`
Description string `json:"description,omitempty"`
OSTemplate string `json:"ostemplate"`
OSTemplate string `json:"ostemplate,omitempty"`
}
type ReadRequest struct {