Class: Fog::Volume::SakuraCloud::Disk
- Inherits:
-
Model
- Object
- Model
- Fog::Volume::SakuraCloud::Disk
- Defined in:
- lib/fog/sakuracloud/models/volume/disk.rb
Instance Method Summary collapse
- #configure(sshkey_id) ⇒ Object
- #delete ⇒ Object (also: #destroy)
- #save ⇒ Object
Instance Method Details
#configure(sshkey_id) ⇒ Object
29 30 31 32 33 |
# File 'lib/fog/sakuracloud/models/volume/disk.rb', line 29 def configure(sshkey_id) requires :id service.configure_disk(@attributes[:id], sshkey_id ) true end |
#delete ⇒ Object Also known as: destroy
16 17 18 19 |
# File 'lib/fog/sakuracloud/models/volume/disk.rb', line 16 def delete service.delete_disk(identity) true end |
#save ⇒ Object
22 23 24 25 26 27 |
# File 'lib/fog/sakuracloud/models/volume/disk.rb', line 22 def save requires :name, :plan, :source_archive data = service.create_disk(@attributes[:name], @attributes[:plan], @attributes[:source_archive]).body["Disk"] merge_attributes(data) true end |