Sha256: f0b649d7829bcb11eb04b50b2ab31b9675a5f673a46b4cdd9df313114b83c134

Contents?: true

Size: 859 Bytes

Versions: 1

Compression:

Stored size: 859 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # LocalNetworkGateways collection class for Network Service
      class LocalNetworkGateways < Fog::Collection
        model LocalNetworkGateway
        attribute :resource_group

        def all
          requires :resource_group
          local_network_gateways = service.list_local_network_gateways(resource_group).map { |gateway| LocalNetworkGateway.parse(gateway) }
          load(local_network_gateways)
        end

        def get(resource_group_name, name)
          local_network_gateway = service.get_local_network_gateway(resource_group_name, name)
          local_network_gateway_obj = LocalNetworkGateway.new(service: service)
          local_network_gateway_obj.merge_attributes(LocalNetworkGateway.parse(local_network_gateway))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.0 lib/fog/azurerm/models/network/local_network_gateways.rb