Project

General

Profile

Bug #9318

does not resolve a nested host group to id when updating a host

Added by Corey Osman over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

AFAIK, the foreman hammer cli tries and resolves the host group name to an id before trying to run the update command. This doesn't seem to be happening correctly when using nested host groups.

It appears that the search functionality does not work with nested host groups when using the Web UI. In order to make search work I have to search by label.

https://foreman.corp?utf8=%E2%9C%93&search=label+%3D+oracle%2Ftomcat%2Fone

Given


hammer host update --hostgroup oracle/tomcat/one --name hostname_hidden.com

Started GET "/api/hostgroups?search=name+%3D+%22oracle%2Ftomcat%2Fone%22" for 10.194.168.218 at 2015-02-10 17:33:32 -0800
Processing by Api::V2::HostgroupsController#index as JSON
Parameters: {"search"=>"name = \"oracle/tomcat/one\"", "apiv"=>"v2", "hostgroup"=>{}}
Authorized user go_agent(Go Agent)
Rendered api/v2/hostgroups/index.json.rabl within api/v2/layouts/index_layout (1.8ms)
Completed 200 OK in 143ms (Views: 4.2ms | ActiveRecord: 8.2ms)


Related issues

Has duplicate Hammer CLI - Bug #6975: Hammer does not work with nested hostgroups with same nameDuplicate2014-08-07

Associated revisions

Revision 4d9b9e95 (diff)
Added by Corey Osman over 7 years ago

Fixes #9318 - does not resolve a nested host group to id when updating a host

History

#1 Updated by Corey Osman over 7 years ago

How do I tell the foreman cli to lookup the id using the label parameter?

#2 Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/167 added
  • Pull request deleted ()

#3 Updated by Corey Osman over 7 years ago

Figured out the issue and issued a PR to add lookup by label.

#4 Updated by Tomáš Strachota over 7 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Tomáš Strachota over 7 years ago

  • Has duplicate Bug #6975: Hammer does not work with nested hostgroups with same name added

#6 Updated by Bryan Kearney over 7 years ago

  • Bugzilla link set to 1127572

Also available in: Atom PDF