mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
vcloud tasks can optionaly contain a link for cancel it and an error element
This commit is contained in:
parent
9907d4ed59
commit
ec9c43cc9e
2 changed files with 8 additions and 1 deletions
|
@ -12,7 +12,7 @@ module Fog
|
|||
def start_element(name, attributes)
|
||||
super
|
||||
case name
|
||||
when 'Owner', 'Result'
|
||||
when 'Owner', 'Result', 'Link', 'Error'
|
||||
data = {}
|
||||
until attributes.empty?
|
||||
data[attributes.shift] = attributes.shift
|
||||
|
|
|
@ -13,15 +13,22 @@ module Fog
|
|||
attribute :result, 'Result'
|
||||
attribute :start_time, 'startTime'
|
||||
attribute :status
|
||||
attribute :link 'Link'
|
||||
attribute :error 'Error'
|
||||
|
||||
def initialize(attributes = {})
|
||||
new_owner = attributes.delete('Owner')
|
||||
new_result = attributes.delete('Result')
|
||||
new_error = attributes.delete('Error')
|
||||
new_cancel_link = attributes.delete('Link')
|
||||
|
||||
super
|
||||
@owner = connection.parse(new_owner)
|
||||
if new_result
|
||||
@result = connection.parse(new_result)
|
||||
end
|
||||
@error = connection.parse(new_error) if new_error
|
||||
@cancel_link = connection.parse(new_cancel_link) if new_cancel_link
|
||||
end
|
||||
|
||||
def ready?
|
||||
|
|
Loading…
Add table
Reference in a new issue