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

Add IntOrString custom type for VM IDs #5

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

Starttoaster
Copy link
Owner

When this library was written, PVE 8.1.4 was the latest release. In that release, the API field for an LXC's "VMID" returned a string. Today the latest PVE version is 8.2.4, and this same field is now an integer. In the library it would be ideal to support both versions, so I wrote a custom type that parses down into a string regardless of the type from the API.

Also added some new tests to help with testing this functionality, and bring the overall test coverage up.

There were also several struct fields that were named with inconsistent casing, which were brought in line, which is maybe less than ideal for this PR to include those but here we are.

@Starttoaster Starttoaster merged commit 8689574 into main Aug 8, 2024
1 check passed
@Starttoaster Starttoaster deleted the intorstring branch August 8, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant