Project

General

Profile

Actions

Bug #12539

open

Discovery plug-in requires api/v2 to be specified even though v2 is the default in Foreman now

Added by Konstantin Orekhov over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I noticed in 1.10-rcX - even though APIv2 is a default one these days, discovered_hosts does not work unless "v2" is explicitly specified:

[root@centos7 ~]# curl -kSs -u admin:<pass> https://localhost/api/v2/discovered_hosts | jq '.total'
2

[root@centos7 ~]# curl -kSs -u admin:<pass> https://localhost/api/discovered_hosts | jq '.total'
parse error: Invalid numeric literal at line 1, column 10

[root@centos7 ~]# curl -kSs -u admin:<pass> https://localhost/api/discovered_hosts

<!DOCTYPE html>
<html>
<head>
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>

<body>

<div class="dialog">
<h1>The page you were looking for doesn't exist.</h1>
<p>You may have mistyped the address or the page may have moved.</p>
</div>
</body>
</html>
[root@centos7 ~]#

Actions

Also available in: Atom PDF