Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] manage proxmox network interfaces through proxmox cloud module #19

Open
I3urny opened this issue Sep 19, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@I3urny
Copy link
Contributor

I3urny commented Sep 19, 2023

Copy of issue saltstack/salt#51708

Is your feature request related to a problem? Please describe.

Using salt 2018.3.3, and looking at the source code on master, it seems that there is no way to put arbitrary options with the network state, for example I would like to be able to specify the bridge-vlan-aware and bridge-vids options to put on the bridge interfaces of proxmox hosts, but I have not found any way to do that other than writing the interfaces files manually

Describe the solution you'd like
Network interfaces should also be manageable through the proxmox cloud module by using a separate function.

Describe alternatives you've considered
The only solution at the moment is creating the required interface through Proxmox itself (Web UI or CLI)

Additional context
This feature requires implementing the network endpoint as described in the Proxmox API: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/network

@scornelissen85
Copy link

scornelissen85 commented Nov 8, 2023

Proxmox VE has several items you could/would want to manage by Salt. Think about the users, network interfaces, storage paths, etc. I was a time ago working to get the network states working. I've created a pve_network state, with the methods present and absent, available on https://github.com/scornelissen85/saltext-proxmox/blob/main/src/saltext/proxmox/states/pve_network.py. This is in no way working right now (it's just raw code copied from earlier experimentation without testing). I also created a pve_network module, which is required by the proxmox_ve-state. It also has a dependency on proxmoxer, which is not used in current proxmox-cloud code.

Maybe when I have some spare time I will try to fix the code I currently have and maybe it will be usable some day. However, you asked in this issue to manage it from within salt-cloud. Is that even possible?

@I3urny
Copy link
Contributor Author

I3urny commented Nov 8, 2023

All of proxmox could be managed by cloud-modules but I think the cost of implementing all of it currently outweighs the benefit.
I'd personally opt for a YAGNI (You Ain't Gonna Need It) approach where we only support the options the community actively wants to use. If there's a simple way to implement all features by utilizing a wrapper like proxmoxer I'm all for it but I don't see how that would be possible right now.

The original author's request is certainly possible but would require a lot of code on the salt-cloud module which will probably break very easily as soon as other feature requests come along. The previous version of the module looked like Frankenstein's monster where contributors stitched their implemented features together and lived with whatever came out.
I'd like to keep that code clean if possible and differentiate between managing configuration on Proxmox VE and managing (provisioning) the hosts.

Functionality can always be implemented as cloud module functions to be used with salt-cloud -f or even as normal states, or modules. I'm not sure how other cloud providers do this but the Azure Resource Manager Salt Extension is usually a good place to check. Even more so since it's the same maintainer. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants