Class: Fog::Parsers::Redshift::AWS::DescribeResize

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/redshift/describe_resize.rb

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #initialize, #start_element_namespace, #value

Constructor Details

This class inherits a constructor from Fog::Parsers::Base

Instance Method Details

#end_element(name) ⇒ Object



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
# File 'lib/fog/aws/parsers/redshift/describe_resize.rb', line 31

def end_element(name) 
  super           
  case name
  when 'TargetNodeType', 'TargetClusterType', 'Status'
    @response[name] = value
  when 'TargetNumberOfNodes'
    @response[name] = value.to_i
  when 'ImportTablesCompleted'
    @in_import_tables_completed = false
  when 'ImportTablesInProgress'
    @in_import_tables_in_progress = false
  when 'ImportTablesNotStarted'
    @in_import_tables_not_started = false
  when 'member'
    if @in_import_tables_completed
      @response['ImportTablesCompleted'] << value
    end
    if @in_import_tables_not_started
      @response['ImportTablesNotStarted'] << value
    end
    if @in_import_tables_in_progress
      @response['ImportTablesInProgress'] << value
    end
  end
end

#resetObject

:target_node_type - (String) :target_number_of_nodes - (Integer) :target_cluster_type - (String) :status - (String) :import_tables_completed - (Array) :import_tables_in_progress - (Array) :import_tables_not_started - (Array)



14
15
16
# File 'lib/fog/aws/parsers/redshift/describe_resize.rb', line 14

def reset
  @response = { 'ImportTablesCompleted' => [], 'ImportTablesInProgress' => [], 'ImportTablesNotStarted' => []}
end

#start_element(name, attrs = []) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/aws/parsers/redshift/describe_resize.rb', line 19

def start_element(name, attrs = [])
  super
  case name
  when 'ImportTablesCompleted'
    @in_import_tables_completed = true
  when 'ImportTablesInProgress'
    @in_import_tables_in_progress = true
  when 'ImportTablesNotStarted'
    @in_import_tables_not_started = true
  end
end