added CPU config and clne vm along with CPU reconfig#694
Open
ArpitSharma2800 wants to merge 4 commits into
Open
added CPU config and clne vm along with CPU reconfig#694ArpitSharma2800 wants to merge 4 commits into
ArpitSharma2800 wants to merge 4 commits into
Conversation
kumahesh
suggested changes
Feb 11, 2022
| help='Version/release CPUs of the Virtual machine CPUs') | ||
|
|
||
| parser.add_custom_argument('--memory', required=False, action='store', default=None, | ||
| help='Version/release memory of the Virtual machine memories') |
Contributor
There was a problem hiding this comment.
Mention the unit of memory (MB ) in the help of "--memory"
| parser.add_custom_argument('--cpu', required=False, action='store', default=None, | ||
| help='Version/release CPUs of the Virtual machine CPUs') | ||
|
|
||
| parser.add_custom_argument('--memory', required=False, action='store', default=None, |
Contributor
There was a problem hiding this comment.
provide default value for both cpu and memory so, you can remove line 23-27
| # Powering off VM for CPU change | ||
| if format(vm.runtime.powerState) == "poweredOn": | ||
| print("Attempting to power off {0}".format(vm.name)) | ||
| TASK = vm.PowerOffVM_Task() |
Contributor
There was a problem hiding this comment.
No caps for the "TASK". Make it "task"
| from pyVmomi import vim | ||
| from tools import cli, service_instance, pchelper, tasks | ||
| from pyVim.task import WaitForTasks | ||
|
|
Contributor
There was a problem hiding this comment.
Run both the samples in python 2 and 3
Author
|
Python 2 support is deprecated |
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.
reconfigure_CPU_vm: command line interface to upgrade number of CPU.
clone_vm_CPU_reconfig: command line interface to clone VM template and reconfigure it.