-
-
Notifications
You must be signed in to change notification settings - Fork 257
Open
openwisp/openwisp-config
#119Description
We have a template to change the device hostname based on the location where it's in use:
{
"system": [
{
"config_name": "system",
"config_value": "system",
"hostname": "{{ LOCATION_NAME }}"
}
]
}
There's one issue with this, though:
The device name in the device model instance is not updated because:
- it is not sent to the controller by
openwisp-config, for example byupdate_info: https://github.com/openwisp/openwisp-config/blob/master/openwisp-config/files/openwisp.agent#L353 - it's not included in
UPDATABLE_FIELDS:UPDATABLE_FIELDS = ['os', 'model', 'system']
I think it's a valid usecase to update the device hostname with a template and thus have this change reflected in the device model instance.
@nemesisdesign What do you think?
Metadata
Metadata
Assignees
Labels
No labels