Sha256: deefd8ecda51155e9e113f12d82504145cfd0f16cad9f29f4a392284f56869f3

Contents?: true

Size: 1.93 KB

Versions: 97

Compression:

Stored size: 1.93 KB

Contents

module Fog
  module Parsers
    module Redshift
      module AWS
        class DescribeResize < Fog::Parsers::Base
          # :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)
          def reset
            @response = { 'ImportTablesCompleted' => [], 'ImportTablesInProgress' => [], 'ImportTablesNotStarted' => []}
          end

          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

          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
        end
      end
    end
  end
end

Version data entries

97 entries across 95 versions & 6 rubygems

Version Path
fog-aws-3.29.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.28.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.27.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.26.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.25.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.24.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.23.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.22.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.21.1 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.21.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.20.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.19.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.18.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.17.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.16.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.15.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.14.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.13.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.12.0 lib/fog/aws/parsers/redshift/describe_resize.rb
fog-aws-3.11.0 lib/fog/aws/parsers/redshift/describe_resize.rb