1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/cloudstack/models/compute/job.rb
2012-05-21 16:53:53 -07:00

25 lines
893 B
Ruby

module Fog
module Compute
class Cloudstack
class Job < Fog::Model
identity :id, :aliases => 'jobid'
attribute :user_id, :aliases => 'userid'
attribute :account_id, :aliases => 'accountid'
attribute :cmd
attribute :job_status, :aliases => 'jobstatus'
attribute :job_result_type, :aliases => 'jobresulttype'
attribute :job_result_code, :aliases => 'jobresultcode'
attribute :job_proc_status, :aliases => 'jobprocstatus'
attribute :created_at, :aliases => 'created', :type => :time
attribute :job_result, :aliases => 'jobresult'
def reload
requires :id
merge_attributes(connection.query_async_job_result('jobid' => self.id)['queryasyncjobresultresponse'])
end
end # Job
end # Cloudstack
end # Compute
end # Fog