Class: Fog::Parsers::AWS::CloudFormation::DescribeStacks
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Fog::Parsers::AWS::CloudFormation::DescribeStacks
show all
- Defined in:
- lib/fog/aws/parsers/cloud_formation/describe_stacks.rb
Instance Attribute Summary
Attributes inherited from Base
#response
Instance Method Summary
collapse
Methods inherited from Base
#attr_value, #characters, #initialize, #value
Instance Method Details
#end_element(name) ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/fog/aws/parsers/cloud_formation/describe_stacks.rb', line 25
def end_element(name)
if @in_outputs
case name
when 'OutputKey', 'OutputValue'
@output[name] = value
when 'member'
@stack['Outputs'] << @output
@output = {}
when 'Outputs'
@in_outputs = false
end
elsif @in_parameters
case name
when 'ParameterKey', 'ParameterValue'
@parameter[name] = value
when 'member'
@stack['Parameters'] << @parameter
@parameter = {}
when 'Parameters'
@in_parameters = false
end
else
case name
when 'member'
@response['Stacks'] << @stack
@stack = { 'Outputs' => [], 'Parameters' => [] }
when 'RequestId'
@response[name] = value
when 'CreationTime'
@stack[name] = Time.parse(value)
when 'DisableRollback'
case value
when 'false'
@stack[name] = false
when 'true'
@stack[name] = true
end
when 'StackName', 'StackId', 'StackStatus'
@stack[name] = value
end
end
end
|
#reset ⇒ Object
8
9
10
11
12
13
|
# File 'lib/fog/aws/parsers/cloud_formation/describe_stacks.rb', line 8
def reset
@stack = { 'Outputs' => [], 'Parameters' => [] }
@output = {}
@parameter = {}
@response = { 'Stacks' => [] }
end
|
#start_element(name, attrs = []) ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/fog/aws/parsers/cloud_formation/describe_stacks.rb', line 15
def start_element(name, attrs = [])
super
case name
when 'Outputs'
@in_outputs = true
when 'Parameters'
@in_parameters = true
end
end
|