Class: Fog::Parsers::Compute::ProfitBricks::GetAllImages

Inherits:
ProfitBricks::Base
  • Object
show all
Defined in:
lib/fog/profitbricks/parsers/compute/get_all_images.rb

Instance Attribute Summary

Attributes inherited from ProfitBricks::Base

#response

Instance Method Summary collapse

Methods inherited from ProfitBricks::Base

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

Constructor Details

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

Instance Method Details

#end_element(name) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fog/profitbricks/parsers/compute/get_all_images.rb', line 11

def end_element(name)
  case name
  when 'imageId', 'imageName', 'imageType', 'writeable',
     'osType', 'serverIds', 'cpuHotPlug', 'description',
     'cpuHotUnPlug', 'ramHotPlug', 'ramHotUnPlug',
     'discVirtioHotPlug', 'discVirtioHotUnPlug', 'public',
     'nicHotPlug', 'nicHotUnPlug', 'bootable', 'location'
     @image[name] = value
  when 'imageSize'
    @image[name] = value.to_i
  when 'return'
    @response['getAllImagesResponse'] << @image
    @image = {}
  end
end

#resetObject



6
7
8
9
# File 'lib/fog/profitbricks/parsers/compute/get_all_images.rb', line 6

def reset
  @image = {}
  @response = { 'getAllImagesResponse' => [] }
end