Sha256: 69336eb26d4518620c891ab5350cd654547ed52758e5d78b2780015c6e48c5a4

Contents?: true

Size: 1.15 KB

Versions: 46

Compression:

Stored size: 1.15 KB

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

        def check_traffic_manager_profile_exists(resource_group, traffic_manager_profile_name)
          service.check_traffic_manager_profile_exists(resource_group, traffic_manager_profile_name)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.2.5 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb
fog-azure-rm-0.2.4 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb
fog-azure-rm-0.2.3 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb
fog-azure-rm-0.2.2 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb
fog-azure-rm-0.2.1 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb
fog-azure-rm-0.2.0 lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb