Decouple virt-stack-agnostic and Libvirt-specific logic in virt-launcher #32
+418
−356
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.
The proposed changes in this PR decouple the virtualization-stack-agnostic parts of
virt-launcher
's logic from the Libvirt-specific parts.What this PR does
Before this PR: Both the virtstack-agnostic and Libvirt-specific logic lived within the virt-launcher directory.
After this PR:
virt-launcher
directory contains the virtstack-agnostic logic, while a new directoryvirt-launcher-libvirt-qemu
contains the Libvirt/QEMU-specific logic ofvirt-launcher
.The PR contains 3 types of changes:
import
statements in Go files. Previously, these files imported a package in the.../pkg/virt-launcher/...
path, which now needs to be changed to.../pkg/virt-launcher-libvirt-qemu/...
. At times, when a Go file needs to import both the virtstack-agnostic functionality and the Libvirt-specific functionality, a custom package name is given to one of them (e.g.,notifyCommon
to avoid conflicts.virt-launcher
tovirt-launcher-libvirt-qemu
. Such files might contain a small number of changes to update the import statements to point to packages invirt-launcher-libvirt-qemu
instead ofvirt-launcher
.BUILD.bazel
files have been updated to reflect the changes in the directory structure and file locations.