Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cpu + mem allocation to vm.change command #916

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

dougm
Copy link
Member

@dougm dougm commented Nov 9, 2017

Refactored resource pool related flags and simulator so we can use the same logic
for VirtualMachine resource allocation.

@dougm
Copy link
Member Author

dougm commented Nov 9, 2017

@embano1 added resource allocation flags to the vm.change command, but left vm.create as-is for now. Does that work for your case?

@dougm dougm requested a review from anfernee November 9, 2017 22:35
func NewResourceAllocationFlag(cpu, mem *types.ResourceAllocationInfo) *ResourceAllocationFlag {
return &ResourceAllocationFlag{cpu, mem}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just smart.

if r.Reservation != nil {
return
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we care ExpandableReservation here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. It seems ExpandableReservation cannot be set to true for the VM fields. I'll see about just excluding the {cpu,mem}.expandable flags from the vm.change command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please exclude, bc it´s a resource pool flag.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok done.

Refactored resource pool related flags and simulator so we can use the same logic
for VirtualMachine resource allocation.
@embano1
Copy link
Contributor

embano1 commented Nov 10, 2017

@dougm
vm.change would work for now. we would just run it after the VM has been successfully created, e.g. by another provisioning tool (customer uses Foreman).

thx a ton!

@dougm dougm merged commit 46c79c9 into vmware:master Nov 10, 2017
@dougm dougm deleted the vm-change-allocation branch November 10, 2017 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants