Sha256: 93204eea82d4d22bcdcae47016e646b9097b3579cac31152c7e2574556497ca8
Contents?: true
Size: 1.24 KB
Versions: 46
Compression:
Stored size: 1.24 KB
Contents
module Fog module Sql class AzureRM # Real class for Sql Server Firewall Rule Request class Real def get_firewall_rule(resource_group, server_name, rule_name) msg = "Getting Sql Server Firewall Rule: #{rule_name} from SQL Server: #{server_name} in Resource Group: #{resource_group}..." Fog::Logger.debug msg begin firewall_rule = @sql_mgmt_client.servers.get_firewall_rule(resource_group, server_name, rule_name) rescue MsRestAzure::AzureOperationError => e raise_azure_exception(e, msg) end Fog::Logger.debug "Sql Server Firewall Rule fetched successfully from Server: #{server_name}, Resource Group: #{resource_group}" firewall_rule end end # Mock class for Sql Server Firewall Rule Request class Mock def get_firewall_rule(*) { 'id' => '{uri-of-firewall-rule}', 'name' => '{rule-name}', 'type' => '{rule-type}', 'location' => '{server-location}', 'properties' => { 'startIpAddress' => '{start-ip-address}', 'endIpAddress' => '{end-ip-address}' } } end end end end end
Version data entries
46 entries across 46 versions & 4 rubygems