Project

General

Profile

Feature #1211

allow both id and fqdn as an id

Added by Gustavo Soares almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When interacting with the rest api, some resources return the host id. Sometimes, it is useful to retrieve the host information from that particular id.

Here is the patch (provided by Ohad at the #theforeman irc channel)

https://github.com/gustavosoares/foreman/commit/5bafd62b2467aaf5389538fcda937639bdde5750

Associated revisions

Revision d1d29d08 (diff)
Added by Ohad Levy almost 8 years ago

fixes #1211 allow both id and name as an id

Revision 297fca24 (diff)
Added by Ohad Levy almost 8 years ago

refs #1211 - ENC url is name, not id.

Revision 137f08b9 (diff)
Added by Ohad Levy almost 8 years ago

fixed broken test - refs #1211

History

#1 Updated by Ohad Levy almost 8 years ago

  • Category set to API
  • Assignee set to Ohad Levy
  • Target version set to 0.4

#2 Updated by Ohad Levy almost 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#3 Updated by Gustavo Soares almost 8 years ago

Ohad,

After running some more tests I noticed that the external nodes script was (always) receiving NOT FOUND.

Error retrieving node abc.globoi.com: Net::HTTPNotFound

Should the filter find_by_name be applied to the action externalNodes in app/controller/hosts_controller.rb?

#4 Updated by Ohad Levy almost 8 years ago

Gustavo Soares wrote:

Ohad,

After running some more tests I noticed that the external nodes script was (always) receiving NOT FOUND.

Error retrieving node abc.globoi.com: Net::HTTPNotFound

Should the filter find_by_name be applied to the action externalNodes in app/controller/hosts_controller.rb?

yes, I've noticed it already, and afair it has been fixed already.
there was a ui related issue too (when clicking on the yaml link) and that should be already solved in the newui branch.

Also available in: Atom PDF