Update existing VMs in virt.running - #48736
Merged
Merged
Conversation
Contributor
Author
|
@rallytime @gtmanfred yet another feature (+ cleanup) PR for the virt modules that you surely want to look into. |
gtmanfred
reviewed
Jul 25, 2018
gtmanfred
left a comment
Contributor
There was a problem hiding this comment.
Looks like some tests are failing
https://jenkinsci.saltstack.com/job/pr-kitchen-centos7-py2/job/PR-48736/2/
Contributor
Author
|
@gtmanfred oops... Two of the failures are indeed mine and I'll fix them, but the 3 others ones are completely unrelated to this PR. |
Contributor
Author
|
The two unit tests are now fixed, thanks for the heads up |
gtmanfred
approved these changes
Jul 26, 2018
Contributor
Author
|
fixed a remaining lint error and rebased on the develop branch |
The target element is not mandatory, introduce a test that we properly handle this situation
ElementTree provides a more convenient API than minidom. Switching to ElementTree will reduce the number of dependencies for the virt module and simplify the code a little.
Graphics type 'none' will help to distinguish between no graphics data and removal of graphics device in a future virt.update function.
User need to be able to update an existing virtual machine definition. This function changes the definition for the next start of the VM and tries hard to live update the virtual machine.
So far virt.running does nothing if the corresponding domain is already defined. Use the new virt.update function to change the domain configuration.
Modules test files are named after the module itself, the state virt module needs to comply with that rule too.
rallytime
approved these changes
Jul 27, 2018
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.
What does this PR do?
This PR makes
virt.runningable to update existing VMs, running or not. If the VM is already running, the new definition will be applied for the next start and as many live updates as possible will be attempted.A new
virt.updatefunction has been introduced in the virt execution module.The PR also removes the use of minidom in the virt execution module for more consistency... and ElementTree helps removing some XML helper functions.
What issues does this PR fix or reference?
None
Previous Behavior
virt.runningon a running VM did nothingvirt.runningon a defined, but stopped VM started itNew Behavior
Tests written?
Yes
Commits signed with GPG?
Yes