Project

General

Profile

Bug #28869

hammer help --organization-id should be "Set the current location context for the request"

Added by Shira Maximov 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1691436

Description of problem:

- hammer location create do not add location to the specified organization

Version-Release number of selected component (if applicable):

- Satellite 6.4 and 6.5

How reproducible:

- always

Steps to Reproduce:

hammer> location list
---|------------------|------------------|------------
ID | TITLE | NAME | DESCRIPTION
---|------------------|------------------|------------
2 | Default Location | Default Location |
---|------------------|------------------|------------
hammer> organization list
---|----------------------|----------------------|-------------|----------------------|------------
ID | TITLE | NAME | DESCRIPTION | LABEL | DESCRIPTION
---|----------------------|----------------------|-------------|----------------------|------------
1 | Default Organization | Default Organization | | Default_Organization |
---|----------------------|----------------------|-------------|----------------------|------------
hammer> location create --name Test1 --organization-id 1
Location created.

hammer> location list --organization-id 1
---|------------------|------------------|------------
ID | TITLE | NAME | DESCRIPTION
---|------------------|------------------|------------
2 | Default Location | Default Location |
---|------------------|------------------|------------
hammer> location list
---|------------------|------------------|------------
ID | TITLE | NAME | DESCRIPTION
---|------------------|------------------|------------
2 | Default Location | Default Location |
4 | Test1 | Test1 |
---|------------------|------------------|------------

Actual results:

- location is not added in the specified Org 1

Expected results:

- location should be added in the specified Org 1

Additional info:

need to use the below command for now:

  1. hammer location add-organization --name Test1 --organization-id 1

Associated revisions

Revision 69dd905f (diff)
Added by Shira Maximov 4 months ago

Fixes #28869 - change the description of the scoped loc and org (#494)

History

#1 Updated by Shira Maximov 4 months ago

  • Project changed from Foreman to Hammer CLI

#2 Updated by Shira Maximov 4 months ago

  • Triaged changed from No to Yes
  • Assignee set to Shira Maximov

#3 Updated by The Foreman Bot 4 months ago

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

#4 Updated by Shira Maximov 4 months ago

Normally you would expect to set the organization but it's not the case.
organization_id can only set the scope of the request.
like, In the UI, you have those two buttons of the location and organization, and they are setting the scope of all foreman actions...
organization_id will not set the organization just the scope of it.
so, the best approach here is to change the help because it could be a bit confusing.

#5 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases hammer-cli-foreman-0.20.0 added

#6 Updated by Shira Maximov 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF