Class: Fog::Compute::OracleCloud::StorageAttachment

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/oraclecloud/models/compute/storage_attachment.rb

Instance Method Summary collapse

Instance Method Details

#createObject



23
24
25
26
27
28
29
30
31
# File 'lib/fog/oraclecloud/models/compute/storage_attachment.rb', line 23

def create 
  requires :index, :instance_name, :storage_volume_name
  data = service.create_storage_attachment({
  	:index => index,
    :instance_name => instance_name,
    :storage_volume_name => storage_volume_name,
  })
  merge_attributes(data.body)
end

#destroyObject



33
34
35
36
# File 'lib/fog/oraclecloud/models/compute/storage_attachment.rb', line 33

def destroy
	requires :name
	service.delete_storage_container(name)
end

#saveObject



18
19
20
21
# File 'lib/fog/oraclecloud/models/compute/storage_attachment.rb', line 18

def save
  #identity ? update : create
  create
end