Sha256: 2dcf890b20a2b7cb30dbe7693ad85751d5584d0e5492793d37789d9db009da66

Contents?: true

Size: 921 Bytes

Versions: 5

Compression:

Stored size: 921 Bytes

Contents

module Fog
  module Storage
    class AzureRM
      # This class provides the actual implementation for service calls.
      class Real
        def get_container_access_control_list(name, options = {})
          msg = "Get container ACL: #{name}."
          Fog::Logger.debug msg
          begin
            container_acl = @blob_client.get_container_acl(name, options)
          rescue Azure::Core::Http::HTTPError => ex
            raise_azure_exception(ex, msg)
          end
          Fog::Logger.debug "Getting ACL of container #{name} successfully."
          container_acl
        end
      end

      # This class provides the mock implementation for unit tests.
      class Mock
        def get_container_access_control_list(*)
          [{
            'name' => 'testcontainer1',
            'public_access_level' => 'blob'
          }, {}]
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.0 lib/fog/azurerm/requests/storage/get_container_access_control_list.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/requests/storage/get_container_access_control_list.rb
fog-azure-rm-0.0.8 lib/fog/azurerm/requests/storage/get_container_access_control_list.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/requests/storage/get_container_access_control_list.rb
fog-azure-rm-0.0.5 lib/fog/azurerm/requests/storage/get_container_access_control_list.rb