Sha256: 00861acf4bfa0ceb8b436fe1318b14e4fcc7498795614ee41500b1db2a0fab40
Contents?: true
Size: 847 Bytes
Versions: 6
Compression:
Stored size: 847 Bytes
Contents
module Fog module Network class AzureRM # Mock class for Network Request class Real def check_for_public_ip(resource_group, name) begin @network_client.public_ipaddresses.get(resource_group, name) return true rescue MsRestAzure::AzureOperationError => e raise_azure_exception(e, "Checking Public IP #{name}") if e.body['error']['code'] == 'ResourceGroupNotFound' return false if e.body['error']['code'] == 'ResourceNotFound' end end end # Mock class for Network Request class Mock def check_for_public_ip(resource_group, name) Fog::Logger.debug "Public IP #{name} from Resource group #{resource_group} is available." true end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems