Sha256: ed0e227d46a0ffb83c69066147568eef7460e25b150a2b385cb4b518d12befb2
Contents?: true
Size: 1020 Bytes
Versions: 5
Compression:
Stored size: 1020 Bytes
Contents
require 'fog/core/collection' require 'fog/azurerm/models/network/network_interface' module Fog module Network class AzureRM # NetworkInterfaces collection class for Network Service class NetworkInterfaces < Fog::Collection model Fog::Network::AzureRM::NetworkInterface attribute :resource_group def all requires :resource_group network_interfaces = [] service.list_network_interfaces(resource_group).each do |nic| network_interfaces << Fog::Network::AzureRM::NetworkInterface.parse(nic) end load(network_interfaces) end def get(resource_group_name, name) nic = service.get_network_interface(resource_group_name, name) network_interface_card = Fog::Network::AzureRM::NetworkInterface.new(service: service) network_interface_card.merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic)) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems