Class: Fog::SharedFileSystem::OpenStack::ShareAccessRules

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/shared_file_system/openstack/models/share_access_rules.rb

Instance Attribute Summary collapse

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#destroy, #load_response, #summary

Instance Attribute Details

#shareObject

Returns the value of attribute share.



10
11
12
# File 'lib/fog/shared_file_system/openstack/models/share_access_rules.rb', line 10

def share
  @share
end

Instance Method Details

#allObject



12
13
14
15
# File 'lib/fog/shared_file_system/openstack/models/share_access_rules.rb', line 12

def all
  requires :share
  load_response(service.list_share_access_rules(@share.id), 'access_list')
end

#find_by_id(id) ⇒ Object Also known as: get



17
18
19
# File 'lib/fog/shared_file_system/openstack/models/share_access_rules.rb', line 17

def find_by_id(id)
  all.find { |rule| rule.id == id }
end

#new(attributes = {}) ⇒ Object



23
24
25
26
# File 'lib/fog/shared_file_system/openstack/models/share_access_rules.rb', line 23

def new(attributes = {})
  requires :share
  super({:share => @share}.merge!(attributes))
end