Sha256: 8adbef501e4b2f85b4572fcf88bce2fd2f47e9f2c7e0c77ea2cc5038cb8ae26c

Contents?: true

Size: 1.5 KB

Versions: 47

Compression:

Stored size: 1.5 KB

Contents

module Fog
  module TrafficManager
    class AzureRM
      # Real class for TrafficManager Request
      class Real
        def get_traffic_manager_end_point(resource_group, traffic_manager_profile_name, traffic_manager_end_point, type)
          msg = "Getting Traffic Manager Endpoint: #{traffic_manager_end_point} in Profile: #{traffic_manager_profile_name}."
          Fog::Logger.debug msg
          begin
            endpoint = @traffic_mgmt_client.endpoints.get(resource_group, traffic_manager_profile_name, type, traffic_manager_end_point)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Traffic Manager Endpoint fetched successfully in Resource Group: #{resource_group}"
          endpoint
        end
      end

      # Mock class for Network Request
      class Mock
        def get_traffic_manager_end_point(*)
          endpoint = {
            'name' => '{endpoint-name}',
            'type' => 'Microsoft.Network/trafficManagerProfiles/externalEndpoints',
            'properties' => {
              'target' => 'myendpoint.contoso.com',
              'endpointStatus' => 'Enabled',
              'weight' => 10,
              'priority' => 5,
              'endpointLocation' => 'northeurope'
            }
          }
          endpoint_mapper = Azure::ARM::TrafficManager::Models::Endpoint.mapper
          @traffic_mgmt_client.deserialize(endpoint_mapper, endpoint, 'result.body')
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 4 rubygems

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