Class: Fog::Parsers::AWS::Elasticache::EngineDefaultsParser
- Inherits:
-
Base
- Object
- Base
- Base
- Fog::Parsers::AWS::Elasticache::EngineDefaultsParser
show all
- Defined in:
- lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb
Instance Method Summary
collapse
Instance Method Details
#end_element(name) ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb', line 33
def end_element(name)
case name
when 'CacheParameterGroupFamily'
@engine_defaults[name] = value
when 'CacheNodeTypeSpecificParameter', 'Parameter'
if not @parameter.empty?
@engine_defaults["#{name}s"] << @parameter
end
when 'AllowedValues', 'DataType', 'Description', 'IsModifiable',
'MinimumEngineVersion', 'ParameterName', 'ParameterValue', 'Source'
@parameter[name] = value
when 'CacheNodeType', 'Value'
@node_specific_value[name] = value
when 'CacheNodeTypeSpecificValue'
if not @node_specific_value.empty?
@parameter["#{name}s"] << @node_specific_value
end
else
super
end
end
|
#reset ⇒ Object
8
9
10
11
|
# File 'lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb', line 8
def reset
super
reset_engine_defaults
end
|
#reset_engine_defaults ⇒ Object
13
14
15
16
17
18
|
# File 'lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb', line 13
def reset_engine_defaults
@engine_defaults = {
'CacheNodeTypeSpecificParameters' => [],
'Parameters' => [],
}
end
|
#start_element(name, attrs = []) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb', line 20
def start_element(name, attrs = [])
case name
when 'CacheNodeTypeSpecificParameter', 'Parameter'
@parameter = {}
when 'CacheNodeTypeSpecificValues'
@parameter[name] = []
when 'CacheNodeTypeSpecificValue'
@node_specific_value = {}
else
super
end
end
|