Description of problem: In Hammer CLI, when we create external user-group, the only input parameter available is --auth-source-id. No option available with --auth-source-name as a parameter. #hammer user-group external create --help Usage: hammer user-group external create [OPTIONS] Options: --auth-source-id AUTH_SOURCE_ID ID of linked authentication source --name NAME External user group name --user-group USER_GROUP_NAME Name to search by --user-group-id USER_GROUP_ID -h, --help print help Version-Release number of selected component (if applicable): # rpm -qa|grep -i satellite satellite-6.2.6-2.0.el7sat.noarch # hammer --version hammer (0.5.1.11) How reproducible: # hammer auth-source ldap list ---|----------|--------|------|--------------- ID | NAME | LDAPS? | PORT | SERVER TYPE ---|----------|--------|------|--------------- 3 | AD-AUTH | | 389 | AuthSourceLdap 5 | IPA-AUTH | | 389 | AuthSourceLdap 7 | rhel-idm | | 389 | AuthSourceLdap ---|----------|--------|------|--------------- # hammer user-group list ---|--------- ID | NAME ---|--------- 4 | onlyview ---|--------- # hammer user-group external list --user-group onlyview ---|-------------|------------ ID | NAME | AUTH SOURCE ---|-------------|------------ 2 | view-access | rhel-idm ---|-------------|------------ # hammer user-group external create --auth-source-id 7 --name view-access-1 --user-group onlyview External user group created # # hammer user-group external list --user-group onlyview ---|---------------|------------ ID | NAME | AUTH SOURCE ---|---------------|------------ 2 | view-access | rhel-idm 3 | view-access-1 | rhel-idm ---|---------------|------------ # hammer user-group external create --help Options: --auth-source-id AUTH_SOURCE_ID ID of linked authentication source --name NAME External user group name --user-group USER_GROUP_NAME Name to search by --user-group-id USER_GROUP_ID -h, --help print help From the above we can see there is only one option to create external user-group i.e. --auth-source-id. No option available with --auth-source-name or --auth-source as a input parameter. Expected results: auth-source-name or auth-source must be available as a input parameter. Additional info: This makes scripting the creation of external user-groups difficult as you must first parse the auth source list to find the id.
Created redmine issue http://projects.theforeman.org/issues/18805 from this bug
Upstream bug assigned to dhlavacd
Build:Satellite 6.4.0 snap22 hammer> user-group external create --name foobargroup --user-group-id 1 --auth-source IDM External user group created. hammer> user-group external list --user-group foobargroup ---|-------------|------------ ID | NAME | AUTH SOURCE ---|-------------|------------ 2 | foobargroup | IDM ---|-------------|------------ hammer> auth-source list ---|----------|-------------------- ID | NAME | TYPE OF AUTH SOURCE ---|----------|-------------------- 1 | Internal | AuthSourceInternal 3 | IDM | AuthSourceLdap ---|----------|-------------------- hammer> user-group external create --help Usage: user-group external create [OPTIONS] Options: --auth-source AUTH_SOURCE_NAME Name to search by --auth-source-id AUTH_SOURCE_ID --location LOCATION_NAME Location name --location-id LOCATION_ID --location-title LOCATION_TITLE Location title --name NAME External user group name --organization ORGANIZATION_NAME Organization name --organization-id ORGANIZATION_ID Organization ID --organization-title ORGANIZATION_TITLE Organization title --user-group USER_GROUP_NAME Name to search by --user-group-id USER_GROUP_ID -h, --help Print help
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2927