Sha256: 4527a29c547b28a3341ee8db7d69caef913fc6cd36990813144e2fcb32c4166b

Contents?: true

Size: 1.04 KB

Versions: 46

Compression:

Stored size: 1.04 KB

Contents

module Fog
  module Sql
    class AzureRM
      # Real class for Sql Server Request
      class Real
        def get_sql_server(resource_group, server_name)
          msg = "Getting Sql Server: #{server_name} in Resource Group: #{resource_group}..."
          Fog::Logger.debug msg
          begin
            sql_server = @sql_mgmt_client.servers.get_by_resource_group(resource_group, server_name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Sql Server fetched successfully in Resource Group: #{resource_group}"
          sql_server
        end
      end

      # Mock class for Sql Server Request
      class Mock
        def get_sql_server(*)
          {
            'location' => '{server-location}',
            'properties' => {
              'version' => '{server-version}',
              'administratorLogin' => '{admin-name}',
              'administratorLoginPassword' => '{admin-password}'
            }
          }
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/sql/get_sql_server.rb
far-gem-0.5.6 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/sql/get_sql_server.rb
far-gem-0.5.5 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/sql/get_sql_server.rb
far-gem-0.5.4 lib/fog/azurerm/requests/sql/get_sql_server.rb
far-gem-0.5.3 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/sql/get_sql_server.rb
far-gem-0.5.2 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/sql/get_sql_server.rb
far-gem-0.5.1 lib/fog/azurerm/requests/sql/get_sql_server.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/sql/get_sql_server.rb