Bug #18499
closedhammer throws error "Uuid can't be blank" while adding groups to a content view filter of content type "Package Group"
Description
hammer throws error "Uuid can't be blank" while adding groups to a content view filter of content type "Package Group"
Version-Release number of selected component (if applicable):
Red Hat Satellite 6.2.7
How reproducible:
100 %
Steps to Reproduce:
- export ORG="RedHat"
- export CV="SOE-RHEL7"
- hammer content-view create --name $CV --description "RHEL7 Content View for SOE" --organization $ORG
- hammer content-view add-repository --organization $ORG --name $CV --repository "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server" --product "Red Hat Enterprise Linux Server"
- hammer content-view filter create --organization $ORG --content-view $CV --name "SOE Package Groups" --description "Package Groups needed for SOE" --inclusion true --type package_group
- hammer content-view filter rule create --organization $ORG --content-view $CV --content-view-filter "SOE Package Groups" --name Core
Could not create the filter rule:
Validation failed: Uuid can't be blank
Note: The base group here in RHEL7 is called Core
Here are the logs captured when adding the package group from the webUI
- grep Core /var/log/foreman/production.log
2015-10-06 16:22:29 [I] Parameters: {"name"=>"Core", "api_version"=>"v2", "content_view_filter_id"=>"1", "content_view_filter_rule"=>{"name"=>"Core"}}
2015-10-06 16:24:27 [I] Parameters: {"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core", "api_version"=>"v2", "content_view_filter_id"=>"1", "content_view_filter_rule"=>{"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core"}}
2015-10-06 16:26:03 [I] Parameters: {"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core", "api_version"=>"v2", "content_view_filter_id"=>"1", "content_view_filter_rule"=>{"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core"}}
- hammer content-view filter rule create --organization $ORG --content-view $CV --content-view-filter "SOE Package Groups" --help
Usage:
hammer content-view filter rule create [OPTIONS]
Options:
--content-view CONTENT_VIEW_NAME Content view name
--content-view-filter CONTENT_VIEW_FILTER_NAME Name to search by
--content-view-filter-id CONTENT_VIEW_FILTER_ID filter identifier
--content-view-id CONTENT_VIEW_ID content view numeric identifier
--end-date END_DATE erratum: end date (YYYY-MM-DD)
--errata-id ERRATA_ID erratum: id
--errata-ids ERRATA_IDS erratum: IDs or a select all object
Comma separated list of values.
--max-version MAX_VERSION package: maximum version
--min-version MIN_VERSION package: minimum version
--name NAME package or package group: name
--organization ORGANIZATION_NAME Organization name to search by
--organization-id ORGANIZATION_ID organization ID
--organization-label ORGANIZATION_LABEL Organization label to search by
--start-date START_DATE erratum: start date (YYYY-MM-DD)
--types TYPES erratum: types (enhancement, bugfix, security)
Comma separated list of values.
--version VERSION package: version
-h, --help print help
As hammer command is expecting a parameter uuid which is not listed in the hammer command help, causing it to fail.
Actual results:
hammer fails as its expecting a UUID to be passed along with the name for package group
Expected results:
Either UUID should enabled in the hammer
Additional info: