Sha256: 5eb36842170f0cfc46cc0b6f3c73294056d467e3a935655ac714b2491fa26dd5

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 Bytes

Contents

module Fog
  module Sql
    class AzureRM
      # Sql Server Collection for Server Service
      class SqlServers < Fog::Collection
        attribute :resource_group
        model SqlServer

        def all
          requires :resource_group

          servers = []
          service.list_sql_servers(resource_group).each do |server|
            servers << SqlServer.parse(server)
          end
          load(servers)
        end

        def get(resource_group, server_name)
          server = service.get_sql_server(resource_group, server_name)
          server_obj = SqlServer.new(service: service)
          server_obj.merge_attributes(SqlServer.parse(server))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.0 lib/fog/azurerm/models/sql/sql_servers.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/models/sql/sql_servers.rb