Project

General

Profile

Actions

Bug #38182

open

Hammer CLI does not delete multiple locations at once but accepts lists

Added by Maximilian Kolb 23 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Organizations and locations
Target version:
-
Difficulty:
Triaged:
No
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

If you delete a location via Hammer CLI, you can specify a list of IDs but Hammer always only deletes the first element. This behaviour is confusing. To me, it should either accept the list of IDs and delete all of them or return an error that it only accepts a single ID.

Reproducer

$ hammer location list
...
$ hammer location delete --id 8,9,10
Location deleted.
$ echo $?
0
$ hammer location list
...

Reproduced on Foreman/Katelo 3.11 with Hammer CLI 3.11.0-1.el9.

Additional info: the docs only mention one ID for orgs/locs: https://docs.theforeman.org/nightly/Managing_Organizations_and_Locations/index-katello.html#Deleting_an_Organization_managing-organizations-locations and https://docs.theforeman.org/nightly/Managing_Organizations_and_Locations/index-katello.html#Deleting_a_Location_managing-organizations-locations

No data to display

Actions

Also available in: Atom PDF