openwisp / openwisp/openwisp-controller
[gsoc21] Setting management IP: validation and interactions with other parts
@purhan is already working on this.
Since Aug 15, 2021.
- Dominant language
- Python
- Stars
- 773
- Forks
- 315
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Description
Follow up to: https://github.com/openwisp/openwisp-controller/pull/496#pullrequestreview-730140216.
There are mainly two possible ways in which OpenWISP can be used:
A) every organization has its own management tunnel
B) all organizations share the same management tunnel
In case A) we have to ensure there cannot be 2 devices having the same management IP in an organization.
In case B) we have to ensure there cannot be 2 devices having the same management IP in the whole system.
The error message can be _('this management IP is already used by another device').
This behavior can be controlled with a setting (which has to be documented), which can default to use case B) which is the most common case for most users having small systems.
There's another important thing to take into account: the controller views already manage the management IP automatically, see the code below:
It looks to me that adding this validation would break that code. Maybe we can change the code to remove the duplicate before saving the new management IP to the device?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.