david-caro / python-foreman

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

managing host interfaces #72

Closed anderbubble closed 7 years ago

anderbubble commented 7 years ago

I can't tell if it's missing functionality or just missing docs; but I can't figure out how to manage host interfaces using python-foreman.

david-caro commented 7 years ago

python-foreman is just a thin wrapper on top of the foreman api definition, it does not actually define the methods or parameters that are available, that is autogenerated from whichever foreman version that you are using.

You can find the foreman api docs here: https://theforeman.org/api.html

There you can select the foreman version that you use in order to be able to find the methods and parameters that you should pass. You can also try using ipython shell or similar with autocompletion to interactively see the methods that are generated and their parameters and docstrings (those are generated from what foreman provides, if it's not there, it's most probably because foreman did not say so).

Make sure too to use the correct api version (you should usually use api v2), that's different than the foreman version itself, and can be passed to the Foreman class constructor as a parameter. If you pass some extra details on which specific actions you want to do, please reopen and I can try to help you figure out what you should be calling from the api docs.

Cheers