MRPHS-4262: Update CreateVMs call to use round-robin strategy for placements of vm on available hosts in cluster#79
Open
avnish30jn wants to merge 1 commit intoapporbit:masterfrom
Open
Conversation
632cb86 to
d3dcf94
Compare
nirav1007
reviewed
Jan 25, 2018
virtualmachine/vsphere/vm.go
Outdated
| err = vm.collector.Retrieve(vm.ctx, filteredHosts, []string{ | ||
| "name"}, &hsMos) | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
Empty hosts list should also be returned.
virtualmachine/vsphere/vm.go
Outdated
| } | ||
|
|
||
| // GetFilteredHosts: Lists the hosts compatible with the network and datastores | ||
| func GetFilteredHosts(vm *VM) ([]string, error) { |
There was a problem hiding this comment.
It is understood that we are using filterHosts method at core and thus named it GetFilteredHosts, but will renaming it to compatibleHosts & GetCompatibleHosts make more sense?
d3dcf94 to
20ea969
Compare
…cements of vm on available hosts in cluster
20ea969 to
1c1909d
Compare
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.
Jira-id
MRPHS-4262
Problem
Create vms in halo should use round-robin strategy to place the vms on hosts for which we need a list of hosts filtered on the basis of the networks to be assigned to the vm.
Resolution
Implemented a method to return the list of filtered hosts based on the networks to be assigned to the vm.
Testing
In progress