Sha256: afd992cade85905c48133b2f741ab91458a75fc217906b4db8e82f1554d7af90
Contents?: true
Size: 807 Bytes
Versions: 32
Compression:
Stored size: 807 Bytes
Contents
module Fog module Parsers module Compute module Slicehost class GetSlices < Fog::Parsers::Base def reset @slice = {} @response = { 'slices' => [] } end def end_element(name) case name when 'address' @slice['addresses'] ||= [] @slice['addresses'] << value when 'backup-id', 'flavor-id', 'id', 'image-id', 'progress' @slice[name] = value.to_i when 'bw-in', 'bw-out' @slice[name] = value.to_f when 'name', 'status' @slice[name] = value when 'slice' @response['slices'] << @slice @slice = {} end end end end end end end
Version data entries
32 entries across 32 versions & 8 rubygems