Sha256: 4cd575780856cc7ec40b384b89b98107012305c28d36bd447b33621063c89708

Contents?: true

Size: 990 Bytes

Versions: 1

Compression:

Stored size: 990 Bytes

Contents

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

        def all
          requires :resource_group
          traffic_manager_profiles = service.list_traffic_manager_profiles(resource_group).map { |profile| Fog::TrafficManager::AzureRM::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_fog = Fog::TrafficManager::AzureRM::TrafficManagerProfile.new(service: service)
          profile_fog.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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