Sha256: 29d5b95217b3a550a6578695d8d40a9a83601f177f90706410187d033d2c4034

Contents?: true

Size: 710 Bytes

Versions: 50

Compression:

Stored size: 710 Bytes

Contents

module Fog
  module Parsers
    module Slicehost
      module Compute

        class CreateSlice < Fog::Parsers::Base

          def reset
            @response = {}
          end

          def end_element(name)
            case name
            when 'address'
              @response['addresses'] ||= []
              @response['addresses'] << @value
            when 'backup-id', 'flavor-id', 'id', 'image-id', 'progress'
              @response[name] = @value.to_i
            when 'bw-in', 'bw-out'
              @response[name] = @value.to_f
            when 'name', 'root-password', 'status'
              @response[name] = @value
            end
          end

        end

      end
    end
  end
end

Version data entries

50 entries across 50 versions & 3 rubygems

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