There's no out of the box solution to this yet. The simplest custom solution I can think of is to hook a signal on device creation which fills the context field accordingly. An even better solution could be to add openwisp-ipam to the instance, creating an ip each time and getting the first available IP using openwisp-ipam, although there's no integration with openwisp-controller yet.
I hope this helps. Federico On Wed, Feb 5, 2020 at 7:33 PM João Henrique Albuquerque < [email protected]> wrote: > Hi I'd like to know if is possible to use and device context to automactic > increment my devices IP address for local area networks (LAN) when device > subscribes to the controller. > > I would like to acheive the following: > > 1) Device subscribes to the controller and get the config from templates > (lan is defined with a generic static address); > > 2) Device Context ip field is updated automatically based on last value > used (update ip filed on a interface); > > 3) Controller sends the AP configuration with context updated IP address ; > > I've seen this is a rather old discussion, but couldn't find anything in > the docs that would help to achieve this without manually update the device > context for each device. > > Any suggestions? > > -- > 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/7c95a5ba-d106-4df1-abed-d6a1228ad887%40googlegroups.com > <https://groups.google.com/d/msgid/openwisp/7c95a5ba-d106-4df1-abed-d6a1228ad887%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAERYH6XqBvEA1PiuR9BHv1BaCQKga3DUHo_ZkgcC8Ew%3DwYLTmQ%40mail.gmail.com.
