-
Notifications
You must be signed in to change notification settings - Fork 911
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 cluster.group and cluster.rule commands #928
Conversation
@embano1 with these commands, govc can create/update/remove cluster DRS rules. tl;dr is in the USAGE.md updates, I can also provide pointers on how to convert UI steps to govc commands if needed. |
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.
It looks really good. I have only 2 questions.
|
||
With '-affinity' or '-anti-affinity', at least 2 vm NAME arguments must be specified. | ||
|
||
With '-vm-host', use the '-vm-group' flag combined with the '-host-affine-group' and/or '-host-anti-affine-group' flags. |
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.
affine
and anti-affine
, are they typo?
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.
I just used the same names as the fields: http://pubs.vmware.com/vsphere-6-5/index.jsp#com.vmware.wssdk.apiref.doc/vim.cluster.VmHostRuleInfo.html
f.RegisterOnce(func() { | ||
f.DatacenterFlag.Register(ctx, fs) | ||
|
||
env := "GOVC_CLUSTER" |
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.
define it as a const here: govc/flags/client.go
?
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.
The client const's are referenced in more than 1 func. GOVC_CLUSTER is only referenced within this func, you'll see the same pattern in other flags:
% git --no-pager grep -n -e env\ \:\=\ \"GOVC_ --
govc/flags/datacenter.go:61: env := "GOVC_DATACENTER"
govc/flags/datastore.go:63: env := "GOVC_DATASTORE"
govc/flags/debug.go:51: env := "GOVC_DEBUG"
govc/flags/folder.go:54: env := "GOVC_FOLDER"
govc/flags/host_system.go:61: env := "GOVC_HOST"
govc/flags/network.go:58: env := "GOVC_NETWORK"
govc/flags/resource_pool.go:54: env := "GOVC_RESOURCE_POOL"
govc/flags/storage_pod.go:39: env := "GOVC_DATASTORE_CLUSTER"
govc/flags/virtual_app.go:57: env := "GOVC_VAPP"
govc/flags/virtual_machine.go:60: env := "GOVC_VM"
govc/vm/guest/auth.go:54: env := "GOVC_GUEST_LOGIN"
AWESOME! THX A TON!!!! |
No description provided.