Sha256: c7ab35c7e42ebf3426035956edfc27988416349596448832a9800ad6ae067de4

Contents?: true

Size: 1.62 KB

Versions: 46

Compression:

Stored size: 1.62 KB

Contents

module ApiStub
  module Requests
    module Sql
      # Mock class for Sql Server
      class SqlServer
        def self.create_sql_server_response(sql_manager_client)
          body = '{
            "location" : "{server-location}",
            "properties" : {
              "version" : "{server-version}",
              "administratorLogin" : "{admin-name}",
              "administratorLoginPassword" : "{admin-password}"
            }
          }'
          server_mapper = Azure::ARM::SQL::Models::Server.mapper
          sql_manager_client.deserialize(server_mapper, Fog::JSON.decode(body), 'result.body')
        end

        def self.list_sql_server_response(sql_manager_client)
          body = '{
            "value": [{
              "name" : "{database-name}",
              "server_name" : "{server-name}",
              "location" : "{database-location}",
              "properties" : {
                "version" : "{server-version}",
                "administratorLogin" : "{admin-name}",
                "administratorLoginPassword" : "{admin-password}"
              }
            }]
          }'
          server_mapper = Azure::ARM::SQL::Models::ServerListResult.mapper
          sql_manager_client.deserialize(server_mapper, Fog::JSON.decode(body), 'result.body')
        end

        def self.sql_server_hash
          {
            resource_group: 'resource_group',
            name: 'name',
            version: 'version',
            location: 'location',
            administrator_login: 'administrator_login',
            administrator_login_password: 'administrator_login_password'
          }
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

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