Parent

Class/Module Index [+]

Quicksearch

Fog::Compute::HPV2::VolumeAttachment

Public Class Methods

new(new_attributes = {}) click to toggle source
# File lib/fog/hp/models/compute_v2/volume_attachment.rb, line 13
def initialize(new_attributes = {})
  super(new_attributes)
  # server_id needs to be the same as the server from the attachments collection
  server_id = server.id if server
  self
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/hp/models/compute_v2/volume_attachment.rb, line 27
def destroy
  requires :server_id, :volume_id
  service.detach_volume(server_id, volume_id)
  true
end
Also aliased as: detach
detach() click to toggle source
Alias for: destroy
save() click to toggle source
# File lib/fog/hp/models/compute_v2/volume_attachment.rb, line 20
def save
  requires :server_id, :volume_id, :device
  data = service.attach_volume(server_id, volume_id, device)
  merge_attributes(data.body['volumeAttachment'])
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.