Sha256: de27dcfb574cad305b656703bd6b00dad91e18b6f3be0ed4dc376f8409340117

Contents?: true

Size: 517 Bytes

Versions: 36

Compression:

Stored size: 517 Bytes

Contents

module Yao::Resources
  class Flavor < Base
    friendly_attributes :name, :vcpus, :disk, :swap
    map_attribute_to_attribute "os-flavor-access:is_public" => :public?
    map_attribute_to_attribute "OS-FLV-DISABLED:disabled"   => :disabled?

    def ram(unit='M')
      case unit
      when 'M'
        self["ram"]
      when 'G'
        self["ram"] / 1024.0
      end
    end
    alias memory ram

    self.service        = "compute"
    self.resource_name  = "flavor"
    self.resources_name = "flavors"
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
yao-0.5.0 lib/yao/resources/flavor.rb
yao-0.4.3 lib/yao/resources/flavor.rb
yao-0.4.2 lib/yao/resources/flavor.rb
yao-0.4.1 lib/yao/resources/flavor.rb
yao-0.4.0 lib/yao/resources/flavor.rb
yao-0.3.8 lib/yao/resources/flavor.rb
yao-0.3.7 lib/yao/resources/flavor.rb
yao-0.3.6 lib/yao/resources/flavor.rb
yao-0.3.5 lib/yao/resources/flavor.rb
yao-0.3.4 lib/yao/resources/flavor.rb
yao-0.3.3 lib/yao/resources/flavor.rb
yao-0.3.2 lib/yao/resources/flavor.rb
yao-0.3.1 lib/yao/resources/flavor.rb
yao-0.3.0 lib/yao/resources/flavor.rb
yao-0.2.13 lib/yao/resources/flavor.rb
yao-0.2.12 lib/yao/resources/flavor.rb
yao-0.2.11 lib/yao/resources/flavor.rb
yao-0.2.10 lib/yao/resources/flavor.rb
yao-0.2.9 lib/yao/resources/flavor.rb
yao-0.2.8 lib/yao/resources/flavor.rb