Hide Forgot
Description of problem: Searching for hosts via hammer CLI returns all registered hosts. From the Web UI using the filter ("location = <location_name>") filtering works just fine. Version-Release number of selected component (if applicable): 6.2.2 How reproducible: Every time Steps to Reproduce: 1. Create a Location (Let's say it's UK) 2. Create a few child locations (eg London, Leeds, Reading). 3. Locations have the UK as a parent Register some hosts in UK, some in London etc. hammer host list --location UK returns ALL hosts hammer host list --location London, correctly, returns only the hosts with location "UK/London". Actual results: hammer host list --location UK returns ALL hosts Expected results: A list of hosts not assigned to other locations should be returned Additional info: It's the same behaviour even if we use the --location-id with the id of the parent location. From the Web UI, navigate to Hosts --> All Hosts In the filter box write "location = UK", press Search. It displays only the hosts in the specified location.
Thanks for the report. I think this is desired behavior. Hammer --location parameter is equivalent to choosing the location in top-left corner. Could you please try selecting UK location there and visiting the hosts page? It should display all hosts that are assigned to UK or any nested location (London, Leeds, Reading). When searching is used, it only finds hosts assigned explicitly to the location. The same results should be observed when you search for hosts with hammer using > hammer host list --search 'location = UK' If you created top-level location Germany with sublocations Munchen and Berlin, it should not list any UK children records as it's separate tree, but it would display all hosts from Berlin and Munchen. Please let us know, whether you can confirm described behavior.
That makes a lot of sense. However, I don't see a way to find hosts assigned only in the parent location, which is the point of my bug report. If this is not supported, then we should change the bug report to an RFE, in my opinion.
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.