Sha256: 2eeb4e0cec60eb78ef02ae64eda61e20c8d305e3c5c62bbc3493b95fc53ff2ef
Contents?: true
Size: 1000 Bytes
Versions: 7
Compression:
Stored size: 1000 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.response.status == '404' 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
7 entries across 7 versions & 1 rubygems