Project

General

Profile

« Previous | Next » 

Revision d4449f45

Added by Tomer Brisker over 6 years ago

Fixes #11389 - Remove API v1

API v1 has been deprecated since Foreman 1.9 - over 2 years ago.
This is more then enough time for anyone needing to migrate to v2.
Even though the original issue requests extraction to a plugin, I do not
see any point in investing the time and effort to maintain a long
deprecated API.

View differences:

config/routes/puppet/api/v2.rb
Foreman::Application.routes.draw do
namespace :api, :defaults => {:format => 'json'} do
# new v2 routes that point to v2
scope "(:apiv)", :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
scope "(:apiv)", :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
constraints(:id => /[^\/]+/) do
resources :hosts, :except => [:new, :edit] do
put :puppetrun, :on => :member, :to => 'puppet_hosts#puppetrun'

Also available in: Unified diff