Project

General

Profile

Actions

Bug #23901

closed

CLI getting 404 on import-templates

Added by Trey Dockendorf over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I think this CLI tool may be using wrong API path? Using Foreman 1.17.1 , foreman_templates 5.0.1 and hammer-cli-foreman-templates 0.1.0:

[root@foreman ~]# hammer import-templates 
[Foreman] Username: tdockendorf
[Foreman] Password for tdockendorf: 
Could not import:
  404 Not Found

Foreman logs:

2018-06-07T15:00:30 13cb275a [app] [I] Started POST "/api/template/import" for 10.20.0.1 at 2018-06-07 15:00:30 -0400
2018-06-07T15:00:30 13cb275a [app] [F]   
2018-06-07T15:00:30 13cb275a [app] [F] ActionController::RoutingError (No route matches [POST] "/api/template/import"):
2018-06-07T15:00:30 13cb275a [app] [F]   
2018-06-07T15:00:30 13cb275a [app] [F] lib/middleware/tagged_logging.rb:18:in `call'

Looking at foreman-rake routes I see /api/templates/import not /api/template/import.

Based on this https://github.com/theforeman/hammer-cli-foreman-templates/issues/3


Related issues 1 (0 open1 closed)

Is duplicate of Templates - Bug #22057: Inconsistency in documentation and APIClosedOleh Fedorenko12/21/2017Actions
Actions

Also available in: Atom PDF