Project

General

Profile

Actions

Bug #14479

closed

Function foreman_url check for tokens

Added by Lukas Zapletal about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Templates
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

In function foreman_url we explicitly check for tokens and I can't find a reason why we do that:

      url = if @template_url && @host.try(:token).present?
              @template_url
            elsif proxy.present? && proxy.has_feature?('Templates') && @host.try(:token).present?
              temp_url = ProxyAPI::Template.new(:url => proxy.url).template_url
              if temp_url.nil?
                logger.warn("unable to obtain template url set by proxy #{proxy.url}. falling back on proxy url.")
                temp_url = proxy.url
              end
              temp_url
            end

This simply blocks provisioning when using Templating Smart Proxy plugin. Not sure about the check on the first line, if that's appropriate or not.


Related issues 2 (0 open2 closed)

Related to Smart Proxy - Bug #10259: Template proxy does not lookup by MAC addressClosedLukas Zapletal04/24/2015Actions
Related to Foreman - Bug #17636: Template preview requires token to be present for template proxyingClosedLukas Zapletal12/12/2016Actions
Actions

Also available in: Atom PDF