Refactoring OpenStack CR page

Hello,

tenant field presence when creating OpenStack REST API request via Fog indicates if V3 or V2 should be used, however Foreman loads tenants from OpenStack itself via the Load button. This is a chicken and egg problem. Therefore I propose to refactor the page a bit, tenant will be a free text from now on, also few new fields will be added for much better flexibility of specifying connection options because I’ve seen various combinations of project/tenant, user domain, project domain/id in the RC file and I am only able to test this with pair of instances (v10 and v13).

For more info see GitHub - fog/fog-openstack: Fog for OpenStack Platform

I am working on a patch, need to do tests and API part of it. Opinions?

Hello,
actually you don’t have to give the tenant as a parameter. When the connection between Foreman and Openstack work, Foreman will give you back all available Tenants as a drop down menu, to which you are authorized. You should feed up your Compute Resource with the right information and every thing will work well. As a Url either v2 or v3 => http://Domainname:5000/v3/auth/tokens . Moreover you should give the right user domain name. Under this Domain stands your username. It is usualy “Default”, when the same department or person all user and groups manage. When you are not sure from your input , you should ask the person, who has the Openstack configured. I use Openstack as a Compute Resource and it works well.

Have you tried this with V3 only API and Foreman 1.22? It does not work for us, we upgraded Fog recently and something changed behavior.

The patches are up: https://github.com/theforeman/foreman/pull/6706