Hi Oliver,

On Fri, Oct 18, 2019 at 6:56 AM Oliver Kraitschy <[email protected]> wrote:

> Hello everyone,
>
> I'd like to propose and discuss additional possibilities to further
> control the configuration update process with OpenWISP.
>
> Right now the configuration for a device can be defined (AFAIK):
>
> - directly in the device config
> - in templates which are enabled in the device config
> - in templates which contain a tag included in the client config on the
> device
> - in templates enabled by default
>
> Nevertheless I'd like to have some more control over the update process:
>
> - defining the order in which those templates are applied (for example to
> first upload a file to the device and then use it in the configuration)
>

By dragging templates up or down you can define the order in which they are
merged to generate the final configuration.

Do you mean the order to apply it on the device?


> - have some logic to define a set of devices the templates are applied to:
>   - only apply a template to a specific device model (hardware)
>   - only apply a template to devices who run a specific firmware version
> (field operating system)
>   - only apply a template to devices which have a serial number within a
> certain range
>   - only apply a template to devices which are within a certain ip range
>   - only apply a template to devices which fulfill the opposite of a
> condition
>
> I'd be happy to hear your thoughts and opinions on this.
>

At the moment I think the best thing is to implement this with django
signals.
You could tag templates with something like "firmware2.1" or
"ip-192.168.255.255", then connect a signal to the post_save of the Device
model, you check the information you're interested in, for example, ip
range, and then you look for templates tagged with that range and you
assign them to the Device if necessary.

This kind of implementation does not need to change the core of OpenWISP
and if we find out that more people need this and in the future we may
design something that is already included.

What do you think?

Federico

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAERYH6X1G-yT6wXoxGU3YaoZLSXoONsKa%3DR3Vk_tebR0gm4%2BFw%40mail.gmail.com.

Reply via email to