Sha256: 6028836e54080125c8fd132d82a9735db05b055e7f432b2438f54589363e64a1

Contents?: true

Size: 850 Bytes

Versions: 101

Compression:

Stored size: 850 Bytes

Contents

module Fog
  module Parsers
    module Terremark
      module Shared

        class GetNodeServices < Fog::Parsers::Base

          def reset
            @node_service = {}
            @response = { 'NodeServices' => [] }
          end

          def end_element(name)
            case name
            when 'Description', 'Href', 'Name', 'IpAddress'
              @node_service[name] = @value
            when 'Enabled'
              if @value == 'true'
                @node_service[name] = true
              else
                @node_service[name] = false
              end
            when 'Id', 'Port'
              @node_service[name] = @value.to_i
            when 'NodeService'
              @response['NodeServices'] << @node_service
              @node_service = {}
            end
          end

        end

      end
    end
  end
end

Version data entries

101 entries across 101 versions & 4 rubygems

Version Path
fog-0.7.2 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.7.1 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.7.0 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.6.0 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.5.3 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.5.2 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.5.1 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.5.0 lib/fog/terremark/parsers/shared/get_node_services.rb
phpfog-fog-0.4.1.3 lib/fog/terremark/parsers/shared/get_node_services.rb
phpfog-fog-0.4.1.2 lib/fog/terremark/parsers/shared/get_node_services.rb
phpfog-fog-0.4.1.1 lib/fog/terremark/parsers/shared/get_node_services.rb
phpfog-fog-0.4.1 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.4.1 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.4.0 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.3.34 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.3.33 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.3.32 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.3.31 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.3.30 lib/fog/terremark/parsers/shared/get_node_services.rb
fog-0.3.29 lib/fog/terremark/parsers/shared/get_node_services.rb