lib/yao/resources/image.rb in yao-0.13.4 vs lib/yao/resources/image.rb in yao-0.14.0
- old
+ new
@@ -3,9 +3,11 @@
class Image < Base
friendly_attributes :name, :status, :progress, :metadata
map_attribute_to_attribute minDisk: :min_disk
map_attribute_to_attribute minRam: :min_ram
+ # @param unit [String]
+ # @return [Integer]
def size(unit=nil)
size = self["OS-EXT-IMG-SIZE:size"]
case unit
when 'K'
size / 1024.0