Sha256: 0d7f2e5f38e4e655c4a9ce5f0b1bf808cd562f2b9a3347f5cfe48f65479888a5
Contents?: true
Size: 709 Bytes
Versions: 45
Compression:
Stored size: 709 Bytes
Contents
class Job < CloudstackCli::Base desc 'list', 'list async jobs' def list jobs = client.list_jobs() if jobs.size < 1 say "No jobs found." else table = [["Command", "Created", "Status", "ID", "User ID"]] jobs.each do |job| table << [job['cmd'].split('.')[-1], job['created'], job['jobstatus'], job['jobid'], job['userid']] end print_table table end end desc 'query ID', 'query async job' def query(id) job = client.query_job(id) job.each do |key, value| say "#{key} : " if value.is_a?(Hash) value.each {|subkey, subvalue| say " #{subkey} : #{subvalue}"} else say(value) end end end end
Version data entries
45 entries across 45 versions & 1 rubygems