Closed rogerfachini closed 6 years ago
I just stumbled through the process of getting a dev environment set up (I've never done ruby development before) and I can confirm that changing the type to any_bridge
does allow the OVS bridge to be present in the list. I'll do further testing to verify it works with normal bridges as well, and if that is successful I'll submit a pull request with the fix.
Hello, you are right and your contribution is welcome!
Describe the bug When creating a new host, under the Nic section the dropdown menu for selecting a bridge is empty, even though the Proxmox node has an OpenVirtualSwitch (OVS) bridge in its network config.
To Reproduce Steps to reproduce the behavior:
interfaces
tab is reached.Edit
button for the first interfaceExpected behavior OVS bridges available to the node should be listed in the dropdown menu.
Screenshots
The OVS bridge is not listed under Foreman.
The OVS bridge is listed under Proxmox.
Desktop
Foreman
Proxmox
Additional context I read through the plugin's code, and this issue appears to be caused on line 89 of app/models/foreman_fog_proxmox/proxmox.rb. In this function, only interfaces of type
bridge
are returned, however OVS bridges have the typeOVSBridge
. According to Proxmox's API documentation there also appears to be a type ofany_bridge
, which I assume would return bridges of both types.