This commit brings basic API functionality to the Zerotier plugin. It allows
the user to retrieve "Global" Zerotier information, peers that are talking
with this node and details on configured (and enabled) networks.
This version of the plugin provides a space for the Zerotier API key to be
input and saved, but it is not used for Basic API functionality. The
zerotier-cli client is used directly to query for global, peers and network
information.
If the API functionality is extended to allow for creating and modifying
Zerotier information from this plugin, then the API key will be required at
that point. It is introduced here for the sake of convenience for later down
the line.
Various other small changes include general code cleanups, renaming of some UI
facing labels and improved layout design.
-=david=-
Fixes: #260
According to the Zerotier documentation:
https://www.zerotier.com/manual.shtml#4_2 - Local Configuration Options
Zerotier will honour specific settings contained within a local.conf file in
the Zerotier home directory. Having the ability to write out this file will
allow for flexibility for users to fine-tune their Zerotier installation
according to their specific needs.
Fixes#284
-=david=-
https://github.com/opnsense/plugins/issues/247
This commit improves upon the way that Zerotier starts and stops and how
networks are added/removed and activated/deactivated. There is now a "Global"
tab on the Zerotier page that enables or disables the service which is
honoured between reboots. Additionally, the service needs to be active in
order for networks to be added and removed. If the service is not active, then
the tab "Networks" will be disabled and the user will not be able to
add/remove or activate/deactivate Zerotier networks.
This should fix the observed problems raised in the issue.
The "Global" tab will be extended later to include further information and
actions, especially when Zerotier API usage is developed.
-=david=-
* Introduce Zerotier
* Add in services configuration.
* Add in Save callback to restart Zerotier Service
* Ensure interface is removed when deleting network.