Class: Fog::OpenStack::SharedFileSystem::Network
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::SharedFileSystem::Network
show all
- Defined in:
- lib/fog/openstack/shared_file_system/models/network.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#create, #initialize
Instance Method Details
#destroy ⇒ Object
34
35
36
37
38
|
# File 'lib/fog/openstack/shared_file_system/models/network.rb', line 34
def destroy
requires :id
service.delete_share_network(id)
true
end
|
#save ⇒ Object
22
23
24
25
26
|
# File 'lib/fog/openstack/shared_file_system/models/network.rb', line 22
def save
raise Fog::Errors::Error, 'Resaving an existing object may create a duplicate' if persisted?
merge_attributes(service.create_share_network(attributes).body['share_network'])
true
end
|
#update(options = nil) ⇒ Object
28
29
30
31
32
|
# File 'lib/fog/openstack/shared_file_system/models/network.rb', line 28
def update(options = nil)
requires :id
merge_attributes(service.update_share_network(id, options || attributes).body['share_network'])
self
end
|