Sha256: 250e1e64c58acdb478474f86148b4161f2c32844f5d61a20c50806a0d66d99d9
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
module Fog module Network class AzureRM # Mock class for Network Request class Real def check_for_public_ip(resource_group, name) begin promise = @network_client.public_ipaddresses.get(resource_group, name) promise.value! return true rescue MsRestAzure::AzureOperationError => e msg = "Exception checking name availability: #{e.body['error']['message']}" raise msg 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) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.1 | lib/fog/azurerm/requests/network/check_for_public_ip.rb |