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 #1

Updated by Tomáš Strachota over 6 years ago

  • Project changed from Hammer CLI to Templates
  • Subject changed from Getting 404 with import-templates to CLI getting 404 on import-templates

The CLI plugin works with foreman-templates 5.0.2 and higher. There were some server-side changes that the CLI depends on.

Could you re-test this with any later release, please?

Actions #2

Updated by Martin Bacovsky over 6 years ago

  • Is duplicate of Bug #22057: Inconsistency in documentation and API added
Actions #3

Updated by Martin Bacovsky over 6 years ago

  • Translation missing: en.field_release set to 358

This issue is tracked in [1]. The fix [2] will land in Foreman 1.18 with foreman-templates 6.0.1 at latest.

[1] http://projects.theforeman.org/issues/22057
[2] https://github.com/theforeman/foreman_templates/pull/72

Actions #4

Updated by Marek Hulán over 6 years ago

  • Status changed from New to Resolved

the linked PR was merged, 6.0.1 is out, marking as resolved

Actions

Also available in: Atom PDF