Sha256: dd6900bce1058f25945b3560b715b3fc798588d2028947486546acfca1e3babc

Contents?: true

Size: 745 Bytes

Versions: 3

Compression:

Stored size: 745 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # Traffic Manager Profile Collection for Network Service
      class TrafficManagerProfiles < Fog::Collection
        attribute :resource_group
        model Fog::Network::AzureRM::TrafficManagerProfile

        def all
          requires :resource_group
          traffic_manager_profiles = []
          service.list_traffic_manager_profiles(resource_group).each do |profile|
            traffic_manager_profiles << Fog::Network::AzureRM::TrafficManagerProfile.parse(profile)
          end
          load(traffic_manager_profiles)
        end

        def get(identity)
          all.find { |profile| profile.name == identity }
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.4 lib/fog/azurerm/models/network/traffic_manager_profiles.rb
fog-azure-rm-0.0.3 lib/fog/azurerm/models/network/traffic_manager_profiles.rb
fog-azure-rm-0.0.2 lib/fog/azurerm/models/network/traffic_manager_profiles.rb