Sha256: 51fd15eddf430538b43d2df75e36284ce4dcae22f99b5a659b279f3629a771cf

Contents?: true

Size: 1.08 KB

Versions: 37

Compression:

Stored size: 1.08 KB

Contents

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)
          network_interface_card = service.get_network_interface(resource_group_name, name)
          network_interface_card_fog = Fog::Network::AzureRM::NetworkInterface.new(service: service)
          network_interface_card_fog.merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(network_interface_card))
        end

        def check_network_interface_exists(resource_group_name, name)
          service.check_network_interface_exists(resource_group_name, name)
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.9 lib/fog/azurerm/models/network/network_interfaces.rb
far-gem-0.5.2 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/models/network/network_interfaces.rb
far-gem-0.5.1 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.1 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/models/network/network_interfaces.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/models/network/network_interfaces.rb