Class: Fog::Sql::AzureRM::SqlServers
- Inherits:
-
Collection
- Object
- Collection
- Fog::Sql::AzureRM::SqlServers
- Defined in:
- lib/fog/azurerm/models/sql/sql_servers.rb
Overview
Sql Server Collection for Server Service
Instance Method Summary collapse
- #all ⇒ Object
- #check_sql_server_exists(resource_group, server_name) ⇒ Object
- #get(resource_group, server_name) ⇒ Object
Instance Method Details
#all ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/fog/azurerm/models/sql/sql_servers.rb', line 9 def all requires :resource_group servers = [] service.list_sql_servers(resource_group).each do |server| servers << Fog::Sql::AzureRM::SqlServer.parse(server) end load(servers) end |
#check_sql_server_exists(resource_group, server_name) ⇒ Object
25 26 27 |
# File 'lib/fog/azurerm/models/sql/sql_servers.rb', line 25 def check_sql_server_exists(resource_group, server_name) service.check_sql_server_exists(resource_group, server_name) end |
#get(resource_group, server_name) ⇒ Object
19 20 21 22 23 |
# File 'lib/fog/azurerm/models/sql/sql_servers.rb', line 19 def get(resource_group, server_name) server = service.get_sql_server(resource_group, server_name) server_fog = Fog::Sql::AzureRM::SqlServer.new(service: service) server_fog.merge_attributes(Fog::Sql::AzureRM::SqlServer.parse(server)) end |