lately at work I’ve been working on patching an annoyance for one of the admins who is using foreman with foreman_discovery; its about automatically populating credentials for BMC interfaces. I managed to achieve working solution for discovered hosts (at the step of provisioning; I just added a few lines in HostConverter Populate default BMC credentials · Marahin/foreman_discovery@2c39e1b · GitHub) however, for manually Creating Hosts its a bit more complicated. In the creation form, there’s a request going out when I change the interface to BMC, and I assume that it gets default values and constructs the interface. It hits the app/controllers/interfaces_controller.rb#new, and I already checked, there is access to some of the host params (e.g. there’s access to host parameters defined by location), however, even though Host Group is selected in the first step of the creation form, the parameters it should provide aren’t visible in the InterfacesController#new action.
My assumption is that probably the form isn’t including the host group information with the request, but I don’t have enough understanding of both admin processes nor foreman project to determine that.
I was hoping someone could point me in the right direction on where to look and how to provide the change so eventually it would be of enough quality to make it to the upstream.