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 #24263 - Added managed content medium provider #7531

Merged
merged 1 commit into from Jul 26, 2018

Conversation

ShimShtein
Copy link
Contributor

Instead of monkey patching Redhat class, created a medium provider to be used in foreman.

This PR should be merged after theforeman/foreman#5244 is merged. It changes the way medium_uri is obtained for a host.

Instead of monkey patching Redhat class, created a medium provider to be
used in foreman.
@theforeman-bot
Copy link

Issues: #24263

end

def medium_uri(path = "")
kickstart_repo = entity.try(:content_facet).try(:kickstart_repository) || entity.try(:kickstart_repository)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder what happens when the kickstart repository is not set. Where is the mechanism that would fallback to the original Foreman's behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's outside of a specific provider. The providers are chosen based on the result of #validate call.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok

Copy link
Contributor

@lzap lzap left a comment

Choose a reason for hiding this comment

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

Looks nice and clean, haven't tested Katello part but I am going to merge the core patch now, its good time post 1.19 branching.

@lzap
Copy link
Contributor

lzap commented Jul 26, 2018

Hello Katello devs I just merged the core part which will likely break your tests, this PR fixes it! @ShimShtein @iNecas @jlsherrill and perhaps @parthaa ...

@jlsherrill
Copy link
Member

[test katello]

@jlsherrill jlsherrill self-assigned this Jul 26, 2018
Copy link
Member

@jlsherrill jlsherrill left a comment

Choose a reason for hiding this comment

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

Thanks @ShimShtein, works great!

@jlsherrill jlsherrill merged commit d9c0492 into Katello:master Jul 26, 2018
@lzap
Copy link
Contributor

lzap commented Jul 27, 2018

@ShimShtein++ @jlsherrill++ thanks folks! That was smooth.

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