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

Fixes #34889 - host collection update correctly handles unlimited-host #10100

Merged
merged 1 commit into from May 11, 2022

Conversation

parthaa
Copy link
Contributor

@parthaa parthaa commented May 10, 2022

What are the changes introduced in this pull request?

The host collection update call was not updating the unlimited_hosts attribute to false if max_hosts param was provided.

This PR fixes that and works in conjunction with -> Katello/hammer-cli-katello#846

What are the testing steps for this pull request?

$ hammer host-collection create --name=great --organization-id=1  --unlimited-hosts
$ hammer host-collection info --name=great --organization-id=1 | grep Limit
Limit:       None

$ hammer  host-collection update --name=great --max-hosts=100 --organization-id=1
Host collection updated.

$ hammer host-collection info --name=great --organization-id=1 |grep Limit
Limit:       None
  • No change in the Limit even though we set Max hosts param.
  • Checkout the PR
  • Try
$ hammer  host-collection update --name=great --max-hosts=100 --organization-id=1
Host collection updated.

$ hammer host-collection info --name=great --organization-id=1 |grep Limit
Limit:       100

@theforeman-bot
Copy link

Issues: #34889

@parthaa parthaa changed the title Fixes #34889 - host collection update correctly handles unlimited-hhost Fixes #34889 - host collection update correctly handles unlimited-host May 10, 2022
Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

ACK, works great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants