Project

General

Profile

Refactor #191

Query should return all hosts, not just recent.

Added by Bash Shell about 9 years ago. Updated 7 months ago.

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

Description

The "find_hosts" method for query uses this following line of code:

list = Host.recent.with_class(k).send(state).map(&:name)

If a person queries Foreman for certain facts, this will only returns "recent" hosts having those facts.

If a host has no recent reports, it won't be included.

I'm not sure what is the rationale behind this.

Wouldn't it be better if a query returns ALL hosts matching the given facts and classes regardless of recent reports?


Related issues

Has duplicate Foreman - Bug #184: Query 'state' doesn't workClosed
Has duplicate Foreman - Bug #188: Fact, Class, State combined filter doesn't workClosed2010-03-23

Associated revisions

Revision f217c950 (diff)
Added by Ohad Levy about 9 years ago

fixes #191 - Query should return all hosts, not just recent

History

#1 Updated by Ohad Levy about 9 years ago

  • Category set to 19
  • Assignee set to Ohad Levy
  • Target version set to 0.1-5

#2 Updated by Ohad Levy about 9 years ago

  • Status changed from New to Ready For Testing
  • % Done changed from 0 to 100

#3 Updated by Ohad Levy about 9 years ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Tomer Brisker 7 months ago

  • Category changed from 19 to Search

Also available in: Atom PDF