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

New resource: vsphere_drs_vm_override #498

Merged
merged 6 commits into from
May 3, 2018

Conversation

vancluever
Copy link
Contributor

This adds the vsphere_drs_vm_override resource, which can be used to control overrides for DRS and automation levels for virtual machines within DRS (compute) clusters.

This is one of three compute-related VM override resources. The other two, which will be following in future PRs, are:

vsphere_ha_vm_override
vsphere_dpm_host_override

These are separated as they are separate fields in the vSphere API's ClusterConfigSpecEx/ClusterConfigInfoEx. Having them as separate resources simplifies the implementation, allowing us to look up each set of overrides in as a cluster/VM composite key, returning just the involved structure, versus having to consolidate all three and return them all at once. It also facilitates granularity in that if someone wants to provide a DRS override but does not care to supply HA overrides, they don't have to. In addition, vsphere_dpm_host_override, as its title would suggest, involves hosts and not VMs.

This adds the vsphere_drs_vm_override resource, which can be used to
specify a VM override for DRS.

We used the vsphere_storage_drs_vm_override as a skeleton for most of
the work involved here, allowing this resource to be developed pretty
quickly.

Tests and docs are pending.
Tests are done for the resource now and are functional.

Docs are next!
This adds the documentation for vsphere_drs_vm_override, also making a
small schema correction as well.
@vancluever vancluever added enhancement Type: Enhancement new-resource Feature: New Resource labels Apr 30, 2018
@vancluever vancluever requested a review from a team April 30, 2018 21:47
Copy link
Contributor

@bill-rich bill-rich left a comment

Choose a reason for hiding this comment

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

LGTM. Just the one comment on naming/capitalization, but I'm not sure which convention is best to use.

"github.com/vmware/govmomi/vim25/types"
)

const resourceVSphereDrsVMOverrideName = "vsphere_drs_vm_override"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure which convention we're going with, but SDRS has all letters capitalized, while Drs is only doing the first.

Copy link
Contributor Author

@vancluever vancluever May 2, 2018

Choose a reason for hiding this comment

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

Yeah, this is intentional as the camel casing versus full capitalisation helps to distinguish where things are: - resourceVSphereDrsVMOverride versus resourceVSphereDRSVMOverride. This is done in the upcoming HA resource as well.

EDIT: I actually see what you are talking about now. I will make the edits.

vancluever added 2 commits May 2, 2018 17:34
resourceVSphereDrsVMOverride is now resourceVSphereDRSVMOverride to be
consistent with the SDRS VM override.
@vancluever vancluever merged commit fd3259d into master May 3, 2018
@vanniszsu vanniszsu mentioned this pull request May 4, 2018
@bill-rich bill-rich deleted the f-vsphere-drs-vm-override-resource branch August 7, 2018 22:30
@ghost ghost locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement new-resource Feature: New Resource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants