Updates to API:
Make API docs match current state of API
Don't exclude plugins from git
Minor tweaks to footer to show we're our own project now. :-)
Supply more specific error code when API token is missing or invalid
Increase API token length to allow for future growth
Provide more useful diagnostics when adding a device via the API
Add function to get information about a single device
Order devices by API entry point
Tidy device deletion
Re-implement get_device using existing primitives
Use more accurate HTTP status code for device add
Remove obsolete function (already provided by getidbyname)
keep scrutinizer from complaining about snmpver not being set for all…
… execution paths
Correctly set error code for missing SNMP version
All looks good here.
Two comments though.
You can't have an all numeric hostname. If you try to use one, it treats it as an integer IP address. Try it: add an /etc/hosts entry for something elsewhere with the hostname 2130706433, then ping it. :-)
Never knew that :)
What about the plugin folder being removed from gitignore?
I also need to add urldecode to the ifname variable and update the docs to say the ifname needs to be urlencoded otherwise interface names with / in them cause issue with route parsing.
I'm keen for many of the plugins to become part of the core distribution. Because they can be enabled/disabled at runtime, the only reason not to have them there is if they need to be private for some reason. Perhaps we should provide another git ignored directory which can also be searched for plugins?
I'd have to check back through the code. It's probably do-able although could we not just add Plugins to be ignored but a sub dir of that directory be included. Never tried that in git before?
Rewrite ugly if-else one-liners as ternary operator
Fix Scrutinizer errors
That's what we had before; I'll put it back that way for now. Then when we have an official plugin that we want to be included (hopefully I'll have a couple of new ones ready soon), we can add it to the non-ignored list.
Revert "Don't exclude plugins from git"
This reverts commit a38b2f3.