Sha256: 5fc577432be163a1b6efd15059e97a87ab5b6a2688a6a3885c624fa6edcf99fd
Contents?: true
Size: 989 Bytes
Versions: 21
Compression:
Stored size: 989 Bytes
Contents
module Fog module Compute class AzureRM # Real class for Compute Request class Real def check_managed_disk_exists(resource_group_name, disk_name) msg = "Checking if Managed Disk: #{disk_name} exists" Fog::Logger.debug msg begin @compute_mgmt_client.disks.get(resource_group_name, disk_name) Fog::Logger.debug "Managed Disk #{disk_name} exist." true rescue MsRestAzure::AzureOperationError => e if resource_not_found?(e) Fog::Logger.debug "Managed Disk #{disk_name} doesn't exist." false else raise_azure_exception(e, msg) end end end end # Mock class for Compute Request class Mock def check_managed_disk_exists(*) Fog::Logger.debug 'Managed Disk test-disk from Resource group fog-rg is available.' true end end end end end
Version data entries
21 entries across 21 versions & 3 rubygems