Sha256: 12c3587fb0361fe1a0d33c7c8979a5f34055fa93323942d8611c8dff3bd46a95
Contents?: true
Size: 1001 Bytes
Versions: 21
Compression:
Stored size: 1001 Bytes
Contents
module Fog module Network class AzureRM # This class provides the actual implementation for service calls. class Real def check_load_balancer_exists(resource_group_name, load_balancer_name) msg = "Checking Load Balancer #{load_balancer_name}" Fog::Logger.debug msg begin @network_client.load_balancers.get(resource_group_name, load_balancer_name) Fog::Logger.debug "Load Balancer #{load_balancer_name} exists." true rescue MsRestAzure::AzureOperationError => e if resource_not_found?(e) Fog::Logger.debug "Load Balancer #{load_balancer_name} doesn't exist." false else raise_azure_exception(e, msg) end end end end # This class provides the mock implementation for unit tests. class Mock def check_load_balancer_exists(*) true end end end end end
Version data entries
21 entries across 21 versions & 3 rubygems