Sha256: 537e74eedb634c0ca89733298fb76e3567cf29d387752ab8df1b183c726738d4

Contents?: true

Size: 850 Bytes

Versions: 10

Compression:

Stored size: 850 Bytes

Contents

module OpenStack
  module Compute
    class Flavor
      attr_reader :id
      attr_reader :name
      attr_reader :ram
      attr_reader :disk
      attr_reader :vcpus
      attr_reader :disabled

      # This class provides an object for the "Flavor" of a server.  The Flavor can generally be taken as the server specification,
      # providing information on things like memory and disk space.
      #
      # The disk attribute is an integer representing the disk space in GB.  The memory attribute is an integer representing the RAM in MB.
      def initialize(flavor_info = {})
        @id = flavor_info['id']
        @name = flavor_info['name']
        @ram = flavor_info['ram']
        @disk = flavor_info['disk']
        @vcpus = flavor_info['vcpus']
        @disabled = flavor_info['OS-FLV-DISABLED:disabled']
       end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
openstack-3.3.21 lib/openstack/compute/flavor.rb
openstack-3.3.20 lib/openstack/compute/flavor.rb
openstack-3.3.19 lib/openstack/compute/flavor.rb
openstack-3.3.18 lib/openstack/compute/flavor.rb
openstack-3.3.17 lib/openstack/compute/flavor.rb
openstack-3.3.16 lib/openstack/compute/flavor.rb
openstack-3.3.15 lib/openstack/compute/flavor.rb
openstack-3.3.14 lib/openstack/compute/flavor.rb
openstack-3.3.13 lib/openstack/compute/flavor.rb
openstack-3.3.12 lib/openstack/compute/flavor.rb