class Fog::Compute::HPV2::VolumeAttachment
Public Class Methods
new(new_attributes = {})
click to toggle source
Calls superclass method
# 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
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
Private Instance Methods
server()
click to toggle source
# File lib/fog/hp/models/compute_v2/volume_attachment.rb, line 35 def server collection.server end