Parent

Methods

Class/Module Index [+]

Quicksearch

Fog::Compute::OpenStack::Flavor

Public Class Methods

new(attributes) click to toggle source
# File lib/fog/openstack/models/compute/flavor.rb, line 20
def initialize(attributes)
  # Old 'connection' is renamed as service and should be used instead
  prepare_service_value(attributes)
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/openstack/models/compute/flavor.rb, line 37
def destroy
  requires :id
  service.delete_flavor(self.id)
  true
end
save() click to toggle source
# File lib/fog/openstack/models/compute/flavor.rb, line 26
def save
  requires :name, :ram, :vcpus, :disk
  attributes[:ephemeral] = self.ephemeral || 0
  attributes[:is_public] = self.is_public || false
  attributes[:disabled] = self.disabled || false
  attributes[:swap] = self.swap || 0
  attributes[:rxtx_factor] = self.rxtx_factor || 1.0
  merge_attributes(service.create_flavor(self.attributes).body['flavor'])
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.