Class: Chef::Knife::RhnSystemgroupList

Inherits:
Chef::Knife show all
Includes:
RhnBase
Defined in:
lib/chef/knife/rhn_systemgroup_list.rb

Instance Method Summary collapse

Methods included from RhnBase

#get_config, #get_satellite_system, included, #set_rhn_connection_options

Instance Method Details

#runObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/chef/knife/rhn_systemgroup_list.rb', line 17

def run
  $stdout.sync = true

  set_rhn_connection_options

  system_groups = RhnSatellite::Systemgroup.all
  system_groups.sort! {|a,b| a['name'] <=> b['name']}
  system_groups.each do |system_group|
    ui.info "#{system_group['name']}"
  end
end