Class: Fog::Storage::StormOnDemand::Volume
- Defined in:
- lib/fog/storm_on_demand/models/storage/volume.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #attach_to(server_id) ⇒ Object
- #destroy ⇒ Object
- #detach_from(server_id) ⇒ Object
-
#initialize(attributes = {}) ⇒ Volume
constructor
A new instance of Volume.
- #resize(new_size) ⇒ Object
- #update(options = {}) ⇒ Object
Methods inherited from Model
#inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
#initialize(attributes = {}) ⇒ Volume
Returns a new instance of Volume.
17 18 19 |
# File 'lib/fog/storm_on_demand/models/storage/volume.rb', line 17 def initialize(attributes={}) super end |
Instance Method Details
#attach_to(server_id) ⇒ Object
21 22 23 24 25 |
# File 'lib/fog/storm_on_demand/models/storage/volume.rb', line 21 def attach_to(server_id) requires :identity service.attach_volume_to_server(:uniq_id => identity, :to => server_id).body end |
#destroy ⇒ Object
27 28 29 30 31 |
# File 'lib/fog/storm_on_demand/models/storage/volume.rb', line 27 def destroy requires :identity service.delete_volume(:uniq_id => identity) true end |
#detach_from(server_id) ⇒ Object
33 34 35 36 37 |
# File 'lib/fog/storm_on_demand/models/storage/volume.rb', line 33 def detach_from(server_id) requires :identity service.detach_volume_from_server(:uniq_id => identity, :detach_from => server_id).body end |
#resize(new_size) ⇒ Object
39 40 41 42 43 |
# File 'lib/fog/storm_on_demand/models/storage/volume.rb', line 39 def resize(new_size) requires :identity service.resize_volume(:uniq_id => identity, :new_size => new_size).body end |
#update(options = {}) ⇒ Object
45 46 47 48 |
# File 'lib/fog/storm_on_demand/models/storage/volume.rb', line 45 def update(={}) requires :identity service.update_volume({:uniq_id => identity}.merge!()) end |