mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Get_Node_Services...expecting an array back so do we need to add the node service to the end of the array and then reset it ? ( '@node_service = {}' )
i.e. needs a when 'NodeService' in the definition of end_element
This commit is contained in:
parent
09f7f9fc4f
commit
d590ad434c
1 changed files with 13 additions and 10 deletions
|
@ -11,16 +11,19 @@ module Fog
|
||||||
|
|
||||||
def end_element(name)
|
def end_element(name)
|
||||||
case name
|
case name
|
||||||
when 'Description', 'Href', 'Name', 'IpAddress'
|
when 'Description', 'Href', 'Name', 'IpAddress'
|
||||||
@node_service[name] = @value
|
@node_service[name] = @value
|
||||||
when 'Enabled'
|
when 'Enabled'
|
||||||
if @value == 'true'
|
if @value == 'true'
|
||||||
@node_service[name] = true
|
@node_service[name] = true
|
||||||
else
|
else
|
||||||
@node_service[name] = false
|
@node_service[name] = false
|
||||||
end
|
end
|
||||||
when 'Id', 'Port'
|
when 'Id', 'Port'
|
||||||
@node_service[name] = @value.to_i
|
@node_service[name] = @value.to_i
|
||||||
|
when 'NodeService'
|
||||||
|
@response['NodeServices'] << @node_service
|
||||||
|
@node_service = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue