Class: Fog::SharedFileSystem::OpenStack::Share
Instance Attribute Summary
#project
Instance Method Summary
collapse
#create, #initialize
Instance Method Details
#destroy ⇒ Object
51
52
53
54
55
|
# File 'lib/fog/shared_file_system/openstack/models/share.rb', line 51
def destroy
requires :id
service.delete_share(id)
true
end
|
#ready? ⇒ Boolean
57
58
59
|
# File 'lib/fog/shared_file_system/openstack/models/share.rb', line 57
def ready?
status == 'available'
end
|
#save ⇒ Object
38
39
40
41
42
43
|
# File 'lib/fog/shared_file_system/openstack/models/share.rb', line 38
def save
raise Fog::Errors::Error, 'Resaving an existing object may create a duplicate' if persisted?
requires :size, :share_proto
merge_attributes(service.create_share(share_proto, size, attributes).body['share'])
true
end
|
#update(options = nil) ⇒ Object
45
46
47
48
49
|
# File 'lib/fog/shared_file_system/openstack/models/share.rb', line 45
def update(options = nil)
requires :id
merge_attributes(service.update_share(id, options || attributes).body['share'])
self
end
|