fix: discovery problems solved
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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?
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user