Sha256: af61b6d37145e33ad6bcbaeabf0cf159dcb72beef00293cf8659a10e215f547b

Contents?: true

Size: 1.1 KB

Versions: 46

Compression:

Stored size: 1.1 KB

Contents

module Fog
  module Network
    class AzureRM
      # VirtualNetworkGateways collection class for Network Service
      class VirtualNetworkGateways < Fog::Collection
        model Fog::Network::AzureRM::VirtualNetworkGateway
        attribute :resource_group

        def all
          requires :resource_group
          network_gateways = []
          service.list_virtual_network_gateways(resource_group).each do |gateway|
            network_gateways << Fog::Network::AzureRM::VirtualNetworkGateway.parse(gateway)
          end
          load(network_gateways)
        end

        def get(resource_group_name, name)
          network_gateway = service.get_virtual_network_gateway(resource_group_name, name)
          virtual_network_gateway = Fog::Network::AzureRM::VirtualNetworkGateway.new(service: service)
          virtual_network_gateway.merge_attributes(Fog::Network::AzureRM::VirtualNetworkGateway.parse(network_gateway))
        end

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

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/network/virtual_network_gateways.rb
far-gem-0.5.6 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/network/virtual_network_gateways.rb
far-gem-0.5.5 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/models/network/virtual_network_gateways.rb
far-gem-0.5.4 lib/fog/azurerm/models/network/virtual_network_gateways.rb
far-gem-0.5.3 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/models/network/virtual_network_gateways.rb
far-gem-0.5.2 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/models/network/virtual_network_gateways.rb
far-gem-0.5.1 lib/fog/azurerm/models/network/virtual_network_gateways.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/models/network/virtual_network_gateways.rb