Project

General

Profile

Actions

Bug #28869

closed

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

Added by Shira Maximov about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
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
Actions #1

Updated by Shira Maximov about 4 years ago

  • Project changed from Foreman to Hammer CLI
Actions #2

Updated by Shira Maximov about 4 years ago

  • Assignee set to Shira Maximov
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot about 4 years ago

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

Updated by Shira Maximov about 4 years 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.

Actions #5

Updated by The Foreman Bot about 4 years ago

  • Fixed in Releases hammer-cli-foreman-0.20.0 added
Actions #6

Updated by Shira Maximov about 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF