Class: Buzz::Api::System

Inherits:
ApiBase show all
Defined in:
lib/buzz/system_api.rb

Instance Method Summary collapse

Methods inherited from ApiBase

#get_key, #make_call

Constructor Details

#initialize(server, username, password) ⇒ System

Returns a new instance of System.



10
11
12
# File 'lib/buzz/system_api.rb', line 10

def initialize(server, username, password)
  super(server, username, password)
end

Instance Method Details

#delete_systems(system_ids) ⇒ Object



25
26
27
28
29
# File 'lib/buzz/system_api.rb', line 25

def delete_systems(system_ids) 
  system_ids =  system_ids.respond_to?('collect') ? system_ids.collect { |id| id.to_i} : system_ids.to_i
  out = make_call("system.deleteSystems", system_ids)
  out 
end

#listObject



14
15
16
17
# File 'lib/buzz/system_api.rb', line 14

def list
    response = make_call("system.listSystems")
    parse_system_list(response)
end

#list_by_regex(regex) ⇒ Object



19
20
21
22
23
# File 'lib/buzz/system_api.rb', line 19

def list_by_regex(regex)
    response = make_call("system.searchByName", regex)
    parse_system_list(response)

end