mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fix for stacks that have capabilities. Without this the parser misinterprets stacks with capabilities set.
This commit is contained in:
parent
131259f0a5
commit
8c3721ff13
1 changed files with 12 additions and 3 deletions
|
@ -6,7 +6,7 @@ module Fog
|
|||
class DescribeStacks < Fog::Parsers::Base
|
||||
|
||||
def reset
|
||||
@stack = { 'Outputs' => [], 'Parameters' => [] }
|
||||
@stack = { 'Outputs' => [], 'Parameters' => [], 'Capabilities' => [] }
|
||||
@output = {}
|
||||
@parameter = {}
|
||||
@response = { 'Stacks' => [] }
|
||||
|
@ -19,7 +19,9 @@ module Fog
|
|||
@in_outputs = true
|
||||
when 'Parameters'
|
||||
@in_parameters = true
|
||||
end
|
||||
when 'Capabilities'
|
||||
@in_capabilities = true
|
||||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
@ -43,11 +45,18 @@ module Fog
|
|||
when 'Parameters'
|
||||
@in_parameters = false
|
||||
end
|
||||
elsif @in_capabilities
|
||||
case name
|
||||
when 'member'
|
||||
@stack['Capabilities'] << value
|
||||
when 'Capabilities'
|
||||
@in_capabilities = false
|
||||
end
|
||||
else
|
||||
case name
|
||||
when 'member'
|
||||
@response['Stacks'] << @stack
|
||||
@stack = { 'Outputs' => [], 'Parameters' => [] }
|
||||
@stack = { 'Outputs' => [], 'Parameters' => [], 'Capabilities' => []}
|
||||
when 'RequestId'
|
||||
@response[name] = value
|
||||
when 'CreationTime'
|
||||
|
|
Loading…
Reference in a new issue