chore: simplify render mode
This commit is contained in:
parent
789497d94c
commit
f6f4e30fb5
8 changed files with 21 additions and 19 deletions
|
|
@ -52,7 +52,7 @@ func (d *DeviceTest) Test() (DeviceTestResult, error) {
|
|||
|
||||
// configure creates a configured device from a template so we can test it
|
||||
func (d *DeviceTest) configure() (interface{}, error) {
|
||||
b, _, err := d.Template.RenderResult(templates.TemplateRenderModeInstance, d.ConfigValues)
|
||||
b, _, err := d.Template.RenderResult(templates.RenderModeInstance, d.ConfigValues)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ func (c *CmdConfigure) processDeviceValues(values map[string]interface{}, templa
|
|||
}
|
||||
}
|
||||
|
||||
b, _, err := templateItem.RenderResult(templates.TemplateRenderModeInstance, values)
|
||||
b, _, err := templateItem.RenderResult(templates.RenderModeInstance, values)
|
||||
if err != nil {
|
||||
c.addedDeviceIndex--
|
||||
return device, err
|
||||
|
|
@ -523,5 +523,5 @@ func (c *CmdConfigure) processModbusConfig(templateItem *templates.Template) {
|
|||
templateItem.ModbusParams(choiceTypes[index], values)
|
||||
|
||||
// update the modbus default values
|
||||
templateItem.ModbusValues(templates.TemplateRenderModeInstance, values)
|
||||
templateItem.ModbusValues(templates.RenderModeInstance, values)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue