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 #18076 - Can set OSTree repo depth #184

Merged
merged 1 commit into from Feb 10, 2017
Merged

Conversation

parthaa
Copy link
Contributor

@parthaa parthaa commented Feb 1, 2017

Enables one to set the importer depth value for the ostree repo.
look at http://projects.theforeman.org/issues/18076 for more info.

Enables one to set the importer depth value for the ostree repo.
look at http://projects.theforeman.org/issues/18076 for more info.
@@ -4,7 +4,7 @@ class OstreeImporter < Importer
ID = 'ostree_web_importer'.freeze
REPO_TYPE = 'OSTREE'.freeze

attr_accessor 'branches'
attr_accessor 'branches', 'depth'
Copy link
Member

Choose a reason for hiding this comment

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

should depth have a default value? or is nil okay and what does nil signify? everything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jlsherrill good question. I guess on the katlelo side I am setting it to 0 by default so never noticed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jlsherrill found the answer

> Runcible::Models::OstreeImporter.new(:depth => 10).config
=> {"depth"=>10}
> Runcible::Models::OstreeImporter.new(:feed => "http://ostree-house.org").config
=> {"feed"=>"http://ostree-house.org"}

> gg=Runcible::Models::OstreeImporter.new()
=> #<Runcible::Models::OstreeImporter:0x00000001403b88>
> gg.depth = 1
=> 1
gg.config
=> {"depth"=>1}
> gg.depth=nil
=> nil
> gg.config
=> {"depth"=>nil}

In short unless you forcibly set depth to nil, its going to work ok. Pulp will not get set the depth value if you don't provide the importer one. So imo no defaults are needed here.

@jlsherrill
Copy link
Member

ACK

@parthaa parthaa merged commit f1014d9 into Katello:master Feb 10, 2017
@parthaa parthaa deleted the depth branch February 10, 2017 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants