Project

General

Profile

Actions

Bug #9318

closed

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

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
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 1 (0 open1 closed)

Has duplicate Hammer CLI - Bug #6975: Hammer does not work with nested hostgroups with same nameDuplicate08/07/2014Actions
Actions #1

Updated by Corey Osman over 9 years ago

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

Actions #2

Updated by The Foreman Bot over 9 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 ()
Actions #3

Updated by Corey Osman over 9 years ago

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

Actions #4

Updated by Tomáš Strachota over 9 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Tomáš Strachota over 9 years ago

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

Updated by Bryan Kearney over 9 years ago

  • Bugzilla link set to 1127572
Actions

Also available in: Atom PDF