Sha256: e4bb9fbb6452775ecb6c9f37e373c20af2c685178458d28b8f4774c99f4d1a7b
Contents?: true
Size: 1008 Bytes
Versions: 18
Compression:
Stored size: 1008 Bytes
Contents
module Fog module Network class AzureRM # Mock class for Network Request class Real def check_virtual_network_exists(resource_group, name) msg = "Checking Virtual Network #{name}" Fog::Logger.debug msg begin @network_client.virtual_networks.get(resource_group, name) Fog::Logger.debug "Virtual Network #{name} exists." true rescue MsRestAzure::AzureOperationError => e if e.error_code == 'ResourceNotFound' Fog::Logger.debug "Virtual Network #{name} doesn't exist." false else raise_azure_exception(e, msg) end end end end # Mock class for Network Request class Mock def check_virtual_network_exists(resource_group, name) Fog::Logger.debug "Virtual Network #{name} from Resource group #{resource_group} is available." true end end end end end
Version data entries
18 entries across 18 versions & 3 rubygems