Sha256: f53ae5243d46965750a16c5a8de238fd32a1a85a5d3e7410f1d553a58cbd950a

Contents?: true

Size: 727 Bytes

Versions: 31

Compression:

Stored size: 727 Bytes

Contents

require 'fog/openstack/models/collection'
require 'fog/shared_file_system/openstack/models/share_access_rule'

module Fog
  module SharedFileSystem
    class OpenStack
      class ShareAccessRules < Fog::OpenStack::Collection
        model Fog::SharedFileSystem::OpenStack::ShareAccessRule

        attr_accessor :share

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

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

        alias get find_by_id

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

Version data entries

31 entries across 29 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.10 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.1.30 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.1.29 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.9 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.1.28 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.8 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.7 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.6 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.5 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.4 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.3 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.2 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.3.0 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.2.4 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.2.3 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.2.2 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.2.1 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-openstack-0.2.0 lib/fog/shared_file_system/openstack/models/share_access_rules.rb
fog-zj-0.1.28 lib/fog/shared_file_system/openstack/models/share_access_rules.rb