Sha256: b51de0972a5699e34a19c639da795c6f4b8d7a526d080d455dacf36b82742bb1
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
module Fog module Network class AzureRM # Real class for Network Request class Real def delete_network_interface(resource_group, name) Fog::Logger.debug "Deleting NetworkInterface #{name} from Resource Group #{resource_group}." begin promise = @network_client.network_interfaces.delete(resource_group, name) promise.value! Fog::Logger.debug "NetworkInterface #{name} Deleted Successfully." true rescue MsRestAzure::AzureOperationError => e msg = "Exception deleting Network Interface #{name} in Resource Group: #{resource_group}. #{e.body['error']['message']}" raise msg end end end # Mock class for Network Request class Mock def delete_network_interface(resource_group, name) Fog::Logger.debug "Network Interface #{name} from Resource group #{resource_group} deleted successfully." return true end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.2 | lib/fog/azurerm/requests/network/delete_network_interface.rb |