Method: Racadm.parse_jobqueue

Defined in:
lib/puppet_x/racadm/racadm.rb

.parse_jobqueue(reply) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/puppet_x/racadm/racadm.rb', line 57

def self.parse_jobqueue(reply)
  parsed = {}
  reply.each_line do |line|
    if line.start_with? 'Reboot JID'
      parsed['reboot_id'] = line.split(' ').last
    elsif line.start_with? 'Commit JID'
      parsed['commit_id'] = line.split(' ').last
    end
  end
  parsed
end