Class: IbmPowerHmc::JobResponse
Overview
Constant Summary
collapse
- ATTRS =
{
:id => "JobID",
:status => "Status",
:message => "ResponseException/Message",
:target_uuid => "TargetUuid",
:linear_progress => "Progress/LinearProgress"
}.freeze
Instance Attribute Summary
Attributes inherited from AbstractRest
#content_type, #etag, #href, #published, #uuid
#xml
Instance Method Summary
collapse
#initialize, #to_s
#collection_of, #create_element, #initialize, marshal, #marshal, #singleton, #timestamp, #to_s, #uuid_from_href, #uuids_from_links
Instance Method Details
#completed_at ⇒ Object
69
70
71
|
# File 'lib/ibm_power_hmc/schema/job.rb', line 69
def completed_at
timestamp("TimeCompleted")
end
|
#request ⇒ Object
60
61
62
63
|
# File 'lib/ibm_power_hmc/schema/job.rb', line 60
def request
elem = xml.elements["JobRequestInstance"]
JobRequest.new(elem) unless elem.nil?
end
|
#results ⇒ Object
73
74
75
76
77
78
79
80
81
|
# File 'lib/ibm_power_hmc/schema/job.rb', line 73
def results
results = {}
xml.each_element("Results/JobParameter") do |jobparam|
name = jobparam.elements["ParameterName"]&.text&.strip
value = jobparam.elements["ParameterValue"]&.text&.strip
results[name] = value unless name.nil?
end
results
end
|
#started_at ⇒ Object
65
66
67
|
# File 'lib/ibm_power_hmc/schema/job.rb', line 65
def started_at
timestamp("TimeStarted")
end
|
#url ⇒ Object
56
57
58
|
# File 'lib/ibm_power_hmc/schema/job.rb', line 56
def url
singleton("RequestURL", "href")
end
|