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 vm override commands #977

Merged
merged 1 commit into from
Dec 23, 2017
Merged

Add cluster vm override commands #977

merged 1 commit into from
Dec 23, 2017

Conversation

dougm
Copy link
Member

@dougm dougm commented Dec 22, 2017

  • Add cluster.override.change command to set VM DRS and HA overrides

  • Add cluster.override.remove to remove VM overrides

  • Add cluster.override.info to view current VM overrides

  • Add cluster.rule.create '-depends' flag to support VM-to-VM dependency rules

if err != nil {
return err
}

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 need to check cluster here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the cluster flag will never return nil, nil. VirtualMachineFlag is optional in some commands, and can have multiple values in other commands. So it's left to the caller to decide what to do if none are specified.

if err != nil {
return err
}

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto.

run govc cluster.rule.create -cluster DC0_C0 -name my_deps -depend
assert_failure # requires 2 groups

run govc cluster.rule.create -cluster DC0_C0 -name my_deps -depend my_app my_db
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 -depend or -depends?, as well as the 3 cases above this.

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 is -depends, those tests were expected to fail, but they were failing because of an invalid flag name.

@anfernee
Copy link
Contributor

/lgtm

@dougm
Copy link
Member Author

dougm commented Dec 23, 2017

Thinking about the command names, esp. after adding cluster.vm.remove..
Currently we have:

UI label govc command
VM/Host Groups cluster.group.*
VM/Host Rules cluster.rule.*
VM Overrides cluster.vm.*

Thinking cluster.vm.* should be renamed to cluster.override.* in this PR. Thoughts?

- Add cluster.override.change command to set VM DRS and HA overrides

- Add cluster.override.remove to remove VM overrides

- Add cluster.override.info to view current VM overrides

- Add cluster.rule.create '-depends' flag to support VM-to-VM dependency rules
@dougm
Copy link
Member Author

dougm commented Dec 23, 2017

Sticking with the new name, code is unchanged otherwise.

@dougm dougm merged commit 3f8349f into vmware:master Dec 23, 2017
@dougm dougm deleted the vm-cluster branch December 23, 2017 04:56
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.

3 participants