Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[feature] Emit a signal when a device operating system changes

Aperta
#1,506 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@kimpasha23-beep ci sta già lavorando.

Dal 11/10/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
django, python
Ambito
backend

Direzione di ricerca

Start with the device_name_changed and management_ip_changed signals in openwisp_controller.config.signals and how AbstractDevice detects those field changes. Add device_os_changed alongside them, track the previous os value the same way, and emit it only after saving an existing device whose os changed. Done means tests show it fires with instance, os and old_os on an OS change and stays silent on create or unchanged saves.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Is your feature request related to a problem? Please describe.

Applications that need to react when a device reports a new operating system version have no dedicated, public integration point.

For example, after a device is upgraded outside OpenWISP, it reconnects and updates its Device.os field through the controller. Downstream applications may need to synchronize derived state based on the newly reported operating system, but listening to the generic post_save signal requires each application to implement its own old-value detection and executes for unrelated device changes.

Describe the solution you'd like

Add a public device_os_changed signal in openwisp_controller.config.signals.

The signal should be emitted only after an existing device has been saved with a changed os value. It should provide:

  • instance: the updated device.
  • os: the new operating system value.
  • old_os: the previous operating system value.

The signal should follow the existing device-change signal pattern, such as device_name_changed and management_ip_changed, by extending AbstractDevice's change detection. It must not be emitted when a device is created or when its operating-system value is unchanged.

This would allow optional applications, including openwisp-firmware-upgrader, to subscribe without creating a controller-to-integration dependency. The firmware upgrader can then asynchronously synchronize its DeviceFirmware association after a device reports a different operating system.

Describe alternatives you've considered

Listening to the generic post_save signal from downstream applications is possible, but it forces each consumer to detect OS changes independently and causes handlers to run for every device save.

Additional context

AbstractDevice already provides field-change detection for device name, group, and management IP. A dedicated OS-change signal would use the same established extension pattern and be reusable by integrations beyond firmware management.

Lingua principale
Python
Stelle
778
Fork
322
Merge medio
2g 19h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openwisp/openwisp-controller

Tutte le issue di openwisp/openwisp-controller

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.