david-caro / python-foreman

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

Problem to connect with foreman version > 2 #99

Open renatocmaia opened 4 years ago

renatocmaia commented 4 years ago

When I try to connect with the Foreman version superior of 2. I get a error:

There is a conflict trying to redefine method (remove_content): apipie_resource: repositories new_api: <resource:repositories, name:remove_content> new_url: /katello/api/repositories/:id/remove_docker_manifests old_api: <resource:repositories, name:remove_content> old_url: /katello/api/repositories/:id/remove_packages

If I specify a version less then 2 its works.

Maybe the problem is related in functions: parse_version or get_foreman_version

antevens commented 3 years ago

It's because of the async keyword being added to modern python versions, I made a quick fix over here https://github.com/antevens/python-foreman