Class: RhnSatellite::Systemgroup

Inherits:
Connection::Base show all
Defined in:
lib/rhn_satellite/systemgroup.rb

Class Method Summary collapse

Methods inherited from Connection::Base

reset

Class Method Details

.active_systems(group_name) ⇒ Object



14
15
16
# File 'lib/rhn_satellite/systemgroup.rb', line 14

def active_systems(group_name)
  base.default_call('systemgroup.listActiveSystemsInGroup',group_name)
end

.add_systems(group_name, system_ids) ⇒ Object



41
42
43
# File 'lib/rhn_satellite/systemgroup.rb', line 41

def add_systems(group_name,system_ids)
  base.default_call('systemgroup.addOrRemoveSystems',group_name,system_ids,true)
end

.create(group_name, description) ⇒ Object



10
11
12
# File 'lib/rhn_satellite/systemgroup.rb', line 10

def create(group_name, description)
  base.default_call('systemgroup.create',group_name,description)
end

.delete(group_name) ⇒ Object



6
7
8
# File 'lib/rhn_satellite/systemgroup.rb', line 6

def delete(group_name)
  base.default_call('systemgroup.delete',group_name)
end

.inactive_systems(group_name, days = nil) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/rhn_satellite/systemgroup.rb', line 18

def inactive_systems(group_name,days=nil)
  if days
    base.default_call('systemgroup.listInactiveSystemsInGroup',group_name,days.to_i)
  else
    base.default_call('systemgroup.listInactiveSystemsInGroup',group_name)
  end
end

.remove_systems(group_name, system_ids) ⇒ Object



37
38
39
# File 'lib/rhn_satellite/systemgroup.rb', line 37

def remove_systems(group_name,system_ids)
  base.default_call('systemgroup.addOrRemoveSystems',group_name,system_ids,false)
end

.systems(group_name) ⇒ Object



26
27
28
# File 'lib/rhn_satellite/systemgroup.rb', line 26

def systems(group_name)
  base.default_call('systemgroup.listSystems',group_name)
end

.systems_safe(group_name) ⇒ Object

if group is not valid an XMLRPC::FaultException is raised



31
32
33
34
35
# File 'lib/rhn_satellite/systemgroup.rb', line 31

def systems_safe(group_name)
  systems(group_name)
rescue XMLRPC::FaultException
  []
end