Sha256: 9d78e4ff5e1f21ce98a4f2d17d07ac182a253b073325acaf5c1eebdb47107fec

Contents?: true

Size: 1.4 KB

Versions: 46

Compression:

Stored size: 1.4 KB

Contents

module Fog
  module TrafficManager
    class AzureRM
      # Traffic Manager End Point Collection for TrafficManager Service
      class TrafficManagerEndPoints < Fog::Collection
        attribute :resource_group
        attribute :traffic_manager_profile_name
        model Fog::TrafficManager::AzureRM::TrafficManagerEndPoint

        def all
          requires :resource_group, :traffic_manager_profile_name

          end_points = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name).endpoints
          traffic_manager_endpoints = end_points.map { |endpoint| Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint) }
          load(traffic_manager_endpoints)
        end

        def get(resource_group, traffic_manager_profile_name, end_point_name, type)
          endpoint = service.get_traffic_manager_end_point(resource_group, traffic_manager_profile_name, end_point_name, type)
          endpoint_fog = Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new(service: service)
          endpoint_fog.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint))
        end

        def check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type)
          service.check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.1 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-temp-0.0.2 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-temp-0.0.1 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.2 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-downgraded-0.3.1 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.1 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-downgraded-0.3.0 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.3.0 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.2.7 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb
fog-azure-rm-0.2.6 lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb