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 cluster.group and cluster.rule commands #928

Merged
merged 1 commit into from
Nov 21, 2017
Merged

Conversation

dougm
Copy link
Member

@dougm dougm commented Nov 21, 2017

No description provided.

@dougm
Copy link
Member Author

dougm commented Nov 21, 2017

@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.

Copy link
Contributor

@anfernee anfernee left a 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.
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

f.RegisterOnce(func() {
f.DatacenterFlag.Register(ctx, fs)

env := "GOVC_CLUSTER"
Copy link
Contributor

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?

Copy link
Member Author

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"

@embano1
Copy link
Contributor

embano1 commented Nov 21, 2017

AWESOME! THX A TON!!!!

@dougm dougm merged commit 3be5f1d into vmware:master Nov 21, 2017
@dougm dougm deleted the govc-cluster branch November 21, 2017 20:59
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