Python-foreman and lifecycle_environments

Hi there,

I’m trying to manage lifecycle environments with python-foreman but I’m not able to, see
Just asking here in case someone has an idea?


I would recommend taking a look at apypie which is maintained by Foreman developers who need it for foreman-ansible-modules.

Thanks for the heads up, but I really need to use this python-foreman for contribution to

If i had to guess, that library hasn’t implemented the api calls for lifecycle environment. it looks like it was last updated two years ago, and from a quick glance doesn’t seem to have support for any katello api endpoints.

Actually this library is built dynamically from the apidoc of the running foreman instance, see here It works fine for all other katello objects, so I’m wondering if it could be a conflict between puppet env and lifecycle env…

Looking at foreman-yml, I wonder if foreman-ansible-modules isn’t already a fully replacement for that. It tries to achieve the same goal.

There are also patches applied in foreman-ansible-module to work around issues:

My initial need is to:
1- Dump a running foreman instance in yaml format to track changes through gitlab diff
2- Provision a new foreman instance based on same files for DR or testing purpose
3- Optionally update or create objects through git merge requests
Is it something that could be achieved with foreman-ansible-modules?
If yes I will check it out!

After a quick look to foreman-ansible-modules, I think I will miss the dump feature :slight_smile: