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

Added support to properly specify anti-affinity policies #73

Merged
merged 4 commits into from
Sep 19, 2019

Conversation

chlam4
Copy link
Contributor

@chlam4 chlam4 commented Sep 16, 2019

Currently I'm setting constraint id, name and display name all the same.

@chlam4 chlam4 changed the base branch from master to 6.4.2 September 17, 2019 16:40
@coveralls
Copy link

coveralls commented Sep 18, 2019

Coverage Status

Coverage decreased (-63.6%) to 0.0% when pulling d334e62 on chlam4:anti-affinity-policy-support into 752eb0c on turbonomic:6.4.2.

@@ -136,6 +137,11 @@ func (doNoPlace *DoNotPlaceTogetherPolicyBuilder) WithBuyers(buyers *BuyerPolicy
return doNoPlace
}

func (doNoPlace *DoNotPlaceTogetherPolicyBuilder) OnSellerType(sellerType proto.EntityDTO_EntityType) *DoNotPlaceTogetherPolicyBuilder {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick, consider changing the method name to OnProvider(...).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have considered, but thought just "Provider" it doesn't reflect the fact that the expected argument is the "type" instead of the "provider" itself. So I think it's more appropriate to keep the word "Type" there.

Also, I chose "Seller" over "Provider" because the entire policy_builder uses "Seller" a lot. I thought it will be more consistent to use "Seller" throughout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chatted with @pallavidn. We're good keeping "OnSellerType". While it's more preferred to switch to Provider/Consumer on user-facing API methods vs. Buyer/Seller which are rather internal, it will be a change throughout the policy/constraint builders. We will leave it as another task in the future.

@ading1977 ading1977 changed the base branch from 6.4.2 to 6.4.3 September 19, 2019 13:55
@chlam4 chlam4 merged commit 7ccd23b into turbonomic:6.4.3 Sep 19, 2019
chlam4 added a commit to chlam4/turbo-go-sdk that referenced this pull request Sep 19, 2019
Added support to properly specify anti-affinity policies
chlam4 added a commit that referenced this pull request Sep 19, 2019
Added support to properly specify anti-affinity policies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants