Sha256: 3a56479e58eb407e6f945c8f93a9cc174a272fdad4f32e431a87f2edeaaa7a52

Contents?: true

Size: 1.33 KB

Versions: 46

Compression:

Stored size: 1.33 KB

Contents

module Fog
  module Sql
    class AzureRM
      # Real class for Sql Server Request
      class Real
        def list_sql_servers(resource_group)
          msg = "Listing Sql Servers in Resource Group: #{resource_group}."
          Fog::Logger.debug msg
          begin
            servers = @sql_mgmt_client.servers.list_by_resource_group(resource_group)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Sql Servers listed successfully in Resource Group: #{resource_group}"
          servers
        end
      end

      # Mock class for Sql Server Request
      class Mock
        def list_sql_servers(*)
          [
            {
              'location' => '{server-location}',
              'properties' => {
                'version' => '{server-version}',
                'administratorLogin' => '{admin-name}',
                'administratorLoginPassword' => '{admin-password}'
              }
            },
            {
              '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.4.1 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-temp-0.0.2 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-temp-0.0.1 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.2 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-downgraded-0.3.1 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.1 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-downgraded-0.3.0 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.3.0 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.2.7 lib/fog/azurerm/requests/sql/list_sql_servers.rb
fog-azure-rm-0.2.6 lib/fog/azurerm/requests/sql/list_sql_servers.rb