unioslo / zabbix-cli

Command-line interface for Zabbix
https://unioslo.github.io/zabbix-cli/
GNU General Public License v3.0
208 stars 104 forks source link

Prompt for Zabbix URL if missing from config #237

Closed pederhan closed 3 weeks ago

pederhan commented 3 weeks ago

This PR adds prompting for URL if missing. Also refactors ZabbixAPI client setup by moving it into the Authenticator class, which makes more sense when calling auth.login from different places, all of which might not have a client instance ready. Furthermore, it allows us to control the instantiation of the client from within the login flow, granting us more control over the configuration of the client there.