Class: OsCtld::DB::Repositories

Inherits:
PooledList show all
Defined in:
lib/osctld/db/repositories.rb

Instance Attribute Summary

Attributes inherited from List

#objects

Class Method Summary collapse

Methods inherited from PooledList

#contains?, #each_by_ids, #find, #select_by_ids

Methods inherited from List

#add, #contains?, #count, #each, #find, #get, instance, #remove, #sync

Class Method Details

.setup(pool) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/osctld/db/repositories.rb', line 5

def self.setup(pool)
  repo = Repository.new(pool, 'default')
  add(repo)
rescue Errno::ENOENT
  # Commands::Repository::Add.run!(
  #  pool: pool,
  #  name: 'default',
  #  url: 'http://192.168.122.75/repo/'
  # )

  Commands::Repository::Add.run(
    pool:,
    name: 'default',
    url: 'https://images.vpsadminos.org'
  )
end