Module: Cobbler::Connection::Common::ClassMethods
- Defined in:
- lib/cobbler/connection/common.rb
Instance Method Summary collapse
-
#event_log(event_id) ⇒ Object
get the log for a certain event.
-
#events(for_user = '') ⇒ Object
get all events (for a certain user).
-
#import(path, name, arch, additional_options = {}) ⇒ Object
import a tree into cobbler.
-
#reposync(repos = [], tries = 3) ⇒ Object
start syncing the following repositories.
-
#sync ⇒ Object
start a sync on the cobbler server.
-
#test_connection ⇒ Object
tests a connections.
Instance Method Details
#event_log(event_id) ⇒ Object
get the log for a certain event
57 58 59 60 61 |
# 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 = '') ⇒ Object
get all events (for a certain user)
50 51 52 53 54 |
# 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 = {}) ⇒ Object
import a tree into cobbler
64 65 66 67 68 |
# File 'lib/cobbler/connection/common.rb', line 64 def import(path,name,arch,={}) in_transaction(true) do |token| make_call('background_import',{'path' => path ,'name' => name , 'arch' => arch}.merge(),token) end end |
#reposync(repos = [], tries = 3) ⇒ Object
start syncing the following repositories.
71 72 73 74 75 |
# 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 ⇒ Object
start a sync on the cobbler server
43 44 45 46 47 |
# File 'lib/cobbler/connection/common.rb', line 43 def sync in_transaction(true) do |token| make_call('sync',token) end end |
#test_connection ⇒ Object
tests a connections
34 35 36 37 38 39 40 |
# File 'lib/cobbler/connection/common.rb', line 34 def test_connection !in_transaction do result = login logout if result result end.nil? end |