Sha256: 58b2bdbfa394f2dfecff6aabfdecc1985c19e8bcd0a79782448ea031ee2430a3

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

require 'fog/core/collection'
require 'fog/azurerm/models/network/express_route_circuit'

module Fog
  module Network
    class AzureRM
      # ExpressRouteCircuit collection class for Network Service
      class ExpressRouteCircuits < Fog::Collection
        model Fog::Network::AzureRM::ExpressRouteCircuit
        attribute :resource_group

        def all
          requires :resource_group
          express_route_circuits = []
          service.list_express_route_circuits(resource_group).each do |circuit|
            express_route_circuits << Fog::Network::AzureRM::ExpressRouteCircuit.parse(circuit)
          end
          load(express_route_circuits)
        end

        def get(resource_group_name, name)
          circuit = service.get_express_route_circuit(resource_group_name, name)
          express_route_circuit = Fog::Network::AzureRM::ExpressRouteCircuit.new(service: service)
          express_route_circuit.merge_attributes(Fog::Network::AzureRM::ExpressRouteCircuit.parse(circuit))
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.9 lib/fog/azurerm/models/network/express_route_circuits.rb
fog-azure-rm-0.0.8 lib/fog/azurerm/models/network/express_route_circuits.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/models/network/express_route_circuits.rb
fog-azure-rm-0.0.5 lib/fog/azurerm/models/network/express_route_circuits.rb