Sha256: 1d035e6a55b7a9aace2e3251e8d8632470b07521593e864fb7ac35123d8c0fe1

Contents?: true

Size: 799 Bytes

Versions: 61

Compression:

Stored size: 799 Bytes

Contents

module Fog
  module Storage
    class AzureRM
      # This class provides the actual implementation for service calls.
      class Real
        def check_container_exists(name)
          msg = "Checking container #{name}."
          Fog::Logger.debug msg
          begin
            get_container_properties(name)
            Fog::Logger.debug "Container #{name} exists."
            true
          rescue Exception => e
            if e.message.include? 'NotFound'
              Fog::Logger.debug "The specified container #{name} does not exist."
              false
            end
          end
        end
      end

      # This class provides the mock implementation for unit tests.
      class Mock
        def check_container_exists(*)
          true
        end
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 5 rubygems

Version Path
far-gem-0.5.5 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/storage/check_container_exists.rb
far-gem-0.5.4 lib/fog/azurerm/requests/storage/check_container_exists.rb
far-gem-0.5.3 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/storage/check_container_exists.rb
far-gem-0.5.2 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/storage/check_container_exists.rb
far-gem-0.5.1 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.1 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/requests/storage/check_container_exists.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/requests/storage/check_container_exists.rb