[PR #244] [MERGED] Update VNet Tag type to uint32 and add max VNet Tag test case #246

Closed
opened 2026-03-03 15:30:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/244
Author: @kernel-sanders
Created: 2/18/2026
Status: Merged
Merged: 2/18/2026
Merged by: @luthermonson

Base: mainHead: fix-vnet-int-size


📝 Commits (1)

  • aac3786 Update VNet Tag type to uint32 and add max VNet Tag test case

📊 Changes

5 files changed (+29 additions, -2 deletions)

View changed files

📝 cluster_test.go (+7 -1)
📝 tests/mocks/pve7x/cluster.go (+7 -0)
📝 tests/mocks/pve8x/cluster.go (+7 -0)
📝 tests/mocks/pve9x/cluster.go (+7 -0)
📝 types.go (+1 -1)

📄 Description

Tag values for VNets can be in the range 1 - 16777215. They were previously stored in a uint16 which has as max value of 65535. This caused an error when running cluster.SDNVNet(ctx, "maxTagVnet") on a VNet with a tag value > 65535: json: cannot unmarshal number 16777215 into Go struct field VNet.tag of type uint16.

This pull request changes the VNet Tag value to a uint32 which has a max value of 4294967295 and can hold any possible VNet tag value, and adds a test for a VNet with a tag value of 16777215 to catch any regression.

Documentation: https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/sdn/vnets/{vnet}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/luthermonson/go-proxmox/pull/244 **Author:** [@kernel-sanders](https://github.com/kernel-sanders) **Created:** 2/18/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `main` ← **Head:** `fix-vnet-int-size` --- ### 📝 Commits (1) - [`aac3786`](https://github.com/luthermonson/go-proxmox/commit/aac37866e3d0fda8314022fee5933cbbdb394897) Update VNet Tag type to uint32 and add max VNet Tag test case ### 📊 Changes **5 files changed** (+29 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `cluster_test.go` (+7 -1) 📝 `tests/mocks/pve7x/cluster.go` (+7 -0) 📝 `tests/mocks/pve8x/cluster.go` (+7 -0) 📝 `tests/mocks/pve9x/cluster.go` (+7 -0) 📝 `types.go` (+1 -1) </details> ### 📄 Description Tag values for VNets can be in the range `1 - 16777215`. They were previously stored in a `uint16` which has as max value of `65535`. This caused an error when running `cluster.SDNVNet(ctx, "maxTagVnet")` on a VNet with a tag value > 65535: `json: cannot unmarshal number 16777215 into Go struct field VNet.tag of type uint16`. This pull request changes the VNet Tag value to a `uint32` which has a max value of `4294967295` and can hold any possible VNet tag value, and adds a test for a VNet with a tag value of `16777215` to catch any regression. Documentation: https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/sdn/vnets/{vnet} --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:30:54 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-proxmox#246
No description provided.