Add support for host-managed parameter in LXC networks#530
Open
hradaideh wants to merge 1 commit into
Open
Conversation
- Add HostManaged field to LxcNetwork struct - Parse host-managed parameter from Proxmox API response - Supports OCI containers on Proxmox 9.1+ This parameter is automatically set by Proxmox for OCI-based LXC containers and must be recognized to avoid parsing errors.
b10042a to
999fe15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the
host-managedparameter in LXC network configurations, which was introduced in Proxmox VE 9.1 for OCI-based containers.Problem
When creating LXC containers from OCI images (Docker Hub images) on Proxmox VE 9.1+, the API automatically sets a
host-managed=1parameter on network interfaces. The SDK was not parsing this parameter, which caused the provider to fail with validation errors.Changes
HostManagedfield toLxcNetworkstructGetNetworks()to read thehost-managedparameter from API responsesTechnical Details
The
host-managedparameter is automatically set by Proxmox for OCI-based containers to indicate that the network interface is managed by the host system. This is distinct from traditional LXC containers where this parameter is not present.API response example for OCI container:
Testing
Tested on Proxmox VE 9.1.1 with:
Backward Compatibility
Fully backward compatible. Traditional LXC templates that do not have the
host-managedparameter continue to work as before, with the field defaulting tofalse.Related
This change is required for the corresponding terraform-provider-proxmox PR to support OCI containers on Proxmox 9.1+.