[PR #3519/8825ef47 backport][stable-4] LXD inventory: Support virtual machines #3900
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.
This is a backport of PR #3519 as merged into main (8825ef4).
SUMMARY
Adds full compatibility for LXD 4.x. It allows to list containers and VMs
The plugin is already only compatible with LXD 4 (due to a call to
/1.0/networks/{interface}/state
), this PR adds requirement and VM supportISSUE TYPE
COMPONENT NAME
lxd inventory plugin
ADDITIONAL INFORMATION
I renamed "container" to "instance" (sed) and fixed some specific needs: L611, L632, L636, L649
My LXD instances:
Before (containers only):
After (containers and VM):