1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #842 from atlantacs/patch-1

Add Capabilities to describe_stacks parser
This commit is contained in:
Wesley Beary 2012-04-09 17:34:25 -07:00
commit 23f3f811c2

View file

@ -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,6 +19,8 @@ module Fog
@in_outputs = true
when 'Parameters'
@in_parameters = true
when 'Capabilities'
@in_capabilities = true
end
end
@ -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'