Sha256: 75a11148c02798477cf9d25188af53194549c45dd93daf663dd86c00dba60cd4

Contents?: true

Size: 870 Bytes

Versions: 2

Compression:

Stored size: 870 Bytes

Contents

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

        def all
          requires :resource_group
          traffic_manager_profiles = service.list_traffic_manager_profiles(resource_group).map { |profile| TrafficManagerProfile.parse(profile) }
          load(traffic_manager_profiles)
        end

        def get(resource_group, traffic_manager_profile_name)
          profile = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name)
          profile_obj = TrafficManagerProfile.new(service: service)
          profile_obj.merge_attributes(TrafficManagerProfile.parse(profile))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.0 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb