Feature #11732
closed
View / search for nodes matching discovery rules
Added by Alex Balk about 9 years ago.
Updated almost 9 years ago.
Category:
Discovery plugin
|
Description
We would like to be use the discovery rules as a categorisation mechanism for hosts. Consider setting a discovery rule that defines "small" and "medium" host types. How many of my hosts match these rules? how many of them are available in discovery vs how many are provisioned? having the ability to categorise host types for reporting (vs provisioning) would be extremely useful for inventory and accounting purposes.
Related issues
1 (1 open — 0 closed)
- Category set to Discovery plugin
Hello, it is technically easy to add search condition "discovery_rule" in the All Hosts screen. With that, you can search and filter hosts easily. Discovered hosts do not have rules assigned to them, so it is not possible to search them this way, but we could add a link to the Discovered Rules index page that takes you to Discovered Hosts list with search field filled with the statement from the discovery rule. Both these are realatively easy to implement.
The idea is to be able to categorise hosts, so that one could pick out a host of a certain type for provisioning, or check how many hosts of that certain type exist (or are assigned to a project, etc). I think provisioning rules are the closest we currently have to this categorisation, but not necessarily a perfect fit. The end goal I'm looking for is being able to:
- tell what type a host is (both in discovery and provisioned)
- tell how many hosts belong to a certain type (discovery and provisioned)
- provision hosts of a certain type (not necessarily automatically)
- perform various breakdowns that include host type (type AND facts.project AND facts.datacenter)
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_discovery/pull/217 added
- Pull request deleted (
)
- Subject changed from view / search for nodes matching discovery rules to View / search for nodes matching discovery rules
I implemented the searching, try the associated pull request.
- tell what type a host is (both in discovery and provisioned)
Implemented partially via the link.
- tell how many hosts belong to a certain type (discovery and provisioned)
For provisioned hosts we have already counter available, see the "Hosts/limit" column. Not easy to implement for discovered hosts as rules cannot be executed one by one easily. That's expensive operation.
- provision hosts of a certain type (not necessarily automatically)
You can search them now with the button and then auto-provision them all. Unfortunately we don't have Auto Provisioning implemented via mass actions, the button will simply do them all. Filed an issue for this: #11796
- perform various breakdowns that include host type (type AND facts.project AND facts.datacenter)
Not sure what you mean.
Take a look on my patch there and if you still need something else, please specify how you would like to have this implemented. I think my patch fullfils the subject filled for this issue, feel free to request new RFE if you still want something else.
- Related to Feature #11796: Convert Auto Provision All button to mass-action added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF