Parent

Class/Module Index [+]

Quicksearch

Fog::Compute::OpenStack::Volume

Public Class Methods

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

Public Instance Methods

attach(server_id, name) click to toggle source
# File lib/fog/openstack/models/compute/volume.rb, line 42
def attach(server_id, name)
  requires :id
  data = service.attach_volume(id, server_id, name)
  merge_attributes(:attachments => attachments << data.body['volumeAttachment'])
  true
end
destroy() click to toggle source
# File lib/fog/openstack/models/compute/volume.rb, line 36
def destroy
  requires :id
  service.delete_volume(id)
  true
end
detach(server_id, attachment_id) click to toggle source
# File lib/fog/openstack/models/compute/volume.rb, line 49
def detach(server_id, attachment_id)
  requires :id
  service.detach_volume(server_id, attachment_id)
  true
end
save() click to toggle source
# File lib/fog/openstack/models/compute/volume.rb, line 29
def save
  requires :name, :description, :size
  data = service.create_volume(name, description, size, attributes)
  merge_attributes(data.body['volume'])
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.