Sha256: 4251b3979a837bb43d24a930710afd5b4468973f4993659e7b5bf962b5a10c5a

Contents?: true

Size: 995 Bytes

Versions: 31

Compression:

Stored size: 995 Bytes

Contents

module Fog
  module SharedFileSystem
    class OpenStack
      class Real
        def grant_share_access(share_id, access_to = '0.0.0.0/0', access_type = 'ip', access_level = 'rw')
          action = {
            "#{action_prefix}allow_access" => {
              'access_to'    => access_to,
              'access_type'  => access_type,
              'access_level' => access_level
            }
          }
          share_action(share_id, action, 200)
        end
      end

      class Mock
        def grant_share_access(share_id, access_to, access_type, access_level)
          response = Excon::Response.new
          response.status = 200

          access                = data[:access_rules].first
          access[:share_id]     = share_id
          access[:access_level] = access_level
          access[:access_type]  = access_type
          access[:access_to]    = access_to

          response.body = {'access' => access}
          response
        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/requests/grant_share_access.rb
fog-openstack-0.3.10 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.1.30 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.1.29 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.9 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.1.28 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.8 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.7 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.6 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.5 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.4 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.3 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.2 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.3.0 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.2.4 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.2.3 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.2.2 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.2.1 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-openstack-0.2.0 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb
fog-zj-0.1.28 lib/fog/shared_file_system/openstack/requests/grant_share_access.rb