Sha256: 21609bcc19713be9fcfe763c227ce063ff3024cd83489e0b3fc858fa9fce4d71
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
module Fog module Network class AzureRM # Real class for Network Request class Real def list_network_interfaces(resource_group) Fog::Logger.debug "Getting list of NetworkInterfaces from Resource Group #{resource_group}." begin promise = @network_client.network_interfaces.list(resource_group) response = promise.value! result = response.body.value return result rescue MsRestAzure::AzureOperationError => e msg = "Exception listing Network Interfaces from Resource Group '#{resource_group}'. #{e.body['error']['message']}." raise msg end end end # Mock class for Network Request class Mock def list_network_interfaces(_resource_group) nic = Azure::ARM::Network::Models::NetworkInterface.new nic.name = 'fogtestnetworkinterface' nic.location = 'West US' nic.properties = Azure::ARM::Network::Models::NetworkInterfacePropertiesFormat.new [nic] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.1 | lib/fog/azurerm/requests/network/list_network_interfaces.rb |
fog-azure-rm-0.0.0 | lib/fog/azurerm/requests/network/list_network_interfaces.rb |