Project

General

Profile

Actions

Bug #29056

closed

Hammer filter create fails if default organization is set.

Added by Shira Maximov almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:

Hammer filter create does not work if default organization is set.

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

Satellite 6.4

How reproducible:

100%

Steps to Reproduce:

1. Create a role with an organization

  1. hammer role create --name test2 --organization "Default Organization"

2. Set the Default Organization

  1. cat .hammer/defaults.yml
    ---
    :defaults:
    :organization:
    :value: Default Organization
    :organization_id:
    :value: '1'

3. Try to create the filter for this role, It will fail with error

  1. hammer filter create --role test --search 'name = testfilter' --permissions view_organizations

Could not create the permission filter:
Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.

4. Now remove the defaults file then it will work.

  1. mv .hammer/defaults.yml /tmp/
  1. hammer filter create --role test --search 'name = testfilter' --permissions view_organizations
    Permission filter for [Organization] created.

Actual results:

Hammer fails to create the filter if default organization is set.

Expected results:

Hammer should be able to create the filter if default organization is set.

Additional Info:-

Same issue is also reproducible on Satellite 6.6


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #29065: Hammer filter create fails if default location is set.ClosedOndřej PražákActions
Actions

Also available in: Atom PDF