david-caro / python-foreman

Small low level python wrapper around Foreman API
GNU General Public License v2.0
57 stars 37 forks source link

Store cached definitions in ~/.python-foreman, lookup there and system-wide #52

Closed pief closed 8 years ago

pief commented 9 years ago

If _get_remote_defs() retrieved the API definitions from the Foreman server, it tried to store them in the "definitions" subdirectory relative to the foreman/client module. In a system-wide installation this would have usually required to run the application using the module at least once with "root" rights.

This makes the module use a "~/.python-foreman/definitions" directory instead while still falling back to the system-wide "definitions" directory as fallback, thereby allowing to continue shipping a set of API defs with python-foreman.

david-caro commented 8 years ago

Thanks a lot, this is quite useful indeed