Sha256: 52d27b5e9831f6ebe250f77ab42bf231081d01c670425cfde89ebbefd8f9c7a7
Contents?: true
Size: 697 Bytes
Versions: 27
Compression:
Stored size: 697 Bytes
Contents
class Job < CloudstackCli::Base desc 'list', 'list async jobs' def list jobs = client.list_async_jobs if jobs.size < 1 say "No jobs found." else table = [%w(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_async_job_result(jobid: id) table = job.map do |key, value| [ set_color("#{key}:", :yellow), "#{value}" ] end print_table table end end
Version data entries
27 entries across 27 versions & 1 rubygems