Class: Katello::Resources::Discovery::Yum
- Inherits:
-
Katello::RepoDiscovery
- Object
- Katello::RepoDiscovery
- Katello::Resources::Discovery::Yum
- Defined in:
- app/lib/katello/resources/discovery/yum.rb
Instance Attribute Summary collapse
-
#crawled ⇒ Object
readonly
Returns the value of attribute crawled.
-
#found ⇒ Object
readonly
Returns the value of attribute found.
-
#to_follow ⇒ Object
readonly
Returns the value of attribute to_follow.
Instance Method Summary collapse
-
#initialize(url, crawled = [], found = [], to_follow = [], upstream_credentials_and_search = { upstream_username: nil, upstream_password: nil, }) ⇒ Yum
constructor
rubocop:disable Metrics/ParameterLists.
- #run(resume_point) ⇒ Object
Methods inherited from Katello::RepoDiscovery
Methods included from Util::HttpProxy
#proxy, #proxy_host, #proxy_port, #proxy_scheme, #proxy_uri
Constructor Details
#initialize(url, crawled = [], found = [], to_follow = [], upstream_credentials_and_search = { upstream_username: nil, upstream_password: nil, }) ⇒ Yum
rubocop:disable Metrics/ParameterLists
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/lib/katello/resources/discovery/yum.rb', line 10 def initialize(url, crawled = [], found = [], to_follow = [], upstream_credentials_and_search = { upstream_username: nil, upstream_password: nil, }) @uri = uri(url) @upstream_username = upstream_credentials_and_search[:upstream_username].presence @upstream_password = upstream_credentials_and_search[:upstream_password].presence @found = found @crawled = crawled @to_follow = to_follow end |
Instance Attribute Details
#crawled ⇒ Object (readonly)
Returns the value of attribute crawled.
7 8 9 |
# File 'app/lib/katello/resources/discovery/yum.rb', line 7 def crawled @crawled end |
#found ⇒ Object (readonly)
Returns the value of attribute found.
7 8 9 |
# File 'app/lib/katello/resources/discovery/yum.rb', line 7 def found @found end |
#to_follow ⇒ Object (readonly)
Returns the value of attribute to_follow.
7 8 9 |
# File 'app/lib/katello/resources/discovery/yum.rb', line 7 def to_follow @to_follow end |
Instance Method Details
#run(resume_point) ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/lib/katello/resources/discovery/yum.rb', line 23 def run(resume_point) if @uri.scheme == 'file' crawl_file_path(uri(resume_point)) elsif %w(http https).include?(@uri.scheme) spidr_crawl_pages(uri(resume_point)) end end |