Class: Katello::Resources::Discovery::Container

Inherits:
Katello::RepoDiscovery show all
Defined in:
app/lib/katello/resources/discovery/container.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Katello::RepoDiscovery

class_for, #uri

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, search: '*', }) ⇒ Container

rubocop:disable Metrics/ParameterLists



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/lib/katello/resources/discovery/container.rb', line 8

def initialize(url, crawled = [], found = [], to_follow = [],
               upstream_credentials_and_search = {
                 upstream_username: nil,
                 upstream_password: nil,
                 search: '*',
               })
  @uri = uri(url)
  @upstream_username = upstream_credentials_and_search[:upstream_username].presence
  @upstream_password = upstream_credentials_and_search[:upstream_password].presence
  @search = upstream_credentials_and_search.fetch(:search, '*')
  @found = found
  @crawled = crawled
  @to_follow = to_follow
end

Instance Attribute Details

#crawledObject (readonly)

Returns the value of attribute crawled.



5
6
7
# File 'app/lib/katello/resources/discovery/container.rb', line 5

def crawled
  @crawled
end

#foundObject (readonly)

Returns the value of attribute found.



5
6
7
# File 'app/lib/katello/resources/discovery/container.rb', line 5

def found
  @found
end

#to_followObject (readonly)

Returns the value of attribute to_follow.



5
6
7
# File 'app/lib/katello/resources/discovery/container.rb', line 5

def to_follow
  @to_follow
end

Instance Method Details

#run(_resume_point) ⇒ Object



23
24
25
# File 'app/lib/katello/resources/discovery/container.rb', line 23

def run(_resume_point)
  docker_search
end