Class: Fog::OpenStack::Volume::Transfer
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Volume::Transfer
show all
- Defined in:
- lib/fog/openstack/volume/models/transfer.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#create, #update
Constructor Details
#initialize(attributes) ⇒ Transfer
Returns a new instance of Transfer.
20
21
22
23
24
|
# File 'lib/fog/openstack/volume/models/transfer.rb', line 20
def initialize(attributes)
prepare_service_value(attributes)
super
end
|
Instance Method Details
#destroy ⇒ Object
14
15
16
17
18
|
# File 'lib/fog/openstack/volume/models/transfer.rb', line 14
def destroy
requires :id
service.delete_transfer(id)
true
end
|
#save ⇒ Object
7
8
9
10
11
12
|
# File 'lib/fog/openstack/volume/models/transfer.rb', line 7
def save
requires :name, :volume_id
data = service.create_transfer(volume_id, :name => name)
merge_attributes(data.body['transfer'])
true
end
|