-
Notifications
You must be signed in to change notification settings - Fork 455
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
Conversation
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.
There was a problem hiding this 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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
resourceVSphereDrsVMOverride is now resourceVSphereDRSVMOverride to be consistent with the SDRS VM override.
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:
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.