module Cobbler::Connection::Common::ClassMethods

Public Instance Methods

event_log(event_id) click to toggle source

get the log for a certain event

# File lib/cobbler/connection/common.rb, line 57
def event_log(event_id)
    in_transaction do
        make_call('get_event_log',event_id)
    end
end
events(for_user='') click to toggle source

get all events (for a certain user)

# File lib/cobbler/connection/common.rb, line 50
def events(for_user='')
    in_transaction do
        make_call('get_events',for_user)
    end
end
import(path,name,arch,additional_options={}) click to toggle source

import a tree into cobbler

# File lib/cobbler/connection/common.rb, line 64
def import(path,name,arch,additional_options={})
    in_transaction(true) do |token|
        make_call('background_import',{'path' => path ,'name' => name , 'arch' => arch}.merge(additional_options),token)
    end
end
reposync(repos=[],tries=3) click to toggle source

start syncing the following repositories.

# File lib/cobbler/connection/common.rb, line 71
def reposync(repos=[],tries=3)
    in_transaction(true) do |token|
        make_call('background_reposync',{'repos' => repos, 'tries' => tries},token)
    end
end
sync() click to toggle source

start a sync on the cobbler server

# File lib/cobbler/connection/common.rb, line 43
def sync
    in_transaction(true) do |token|
        make_call('sync',token)
    end
end
test_connection() click to toggle source

tests a connections

# File lib/cobbler/connection/common.rb, line 34
def test_connection
    !in_transaction do
        result = login
        logout if result
        result
    end.nil?
end