Bug #15177
closedAdding puppet module to Content View by API does not set version, and therefor exclude it in publishing the module
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1337497
Description of problem:
Adding puppet module to Content View by the API does not set version. This is a regression over Sat6.0/6.1:
[crash] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/puppet_modules/799 | hoi-json - --get ALL --format=json
{
"tag_list": [
],
"checksums": [
],
"uuid": "4855cf13-64dc-487d-b10c-dce7d119cadd",
"project_page": null,
"summary": null,
"dependencies": [
],
"source": "",
"description": null,
"name": "mgt_sysstat",
"id": 799,
"author": "hilti",
"version": "7.2.0-99-B201605131544-G254af72",
"license": "Proprietary"
}
[crash] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"content_view_puppet_module\":{\"uuid\":\"799\"}}" https://localhost/katello/api/v2/content_views/43/content_view_puppet_modules | hoi-json - --get ALL --format=json
{
"id": 852,
"uuid": "799",
"name": "mgt_sysstat",
"author": "hilti"
}
[crash] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/content_views/43/content_view_puppet_modules | hoi-json - --get 'results/name=mgt_sysstat' --format=json
[
{
"name": "mgt_sysstat",
"author": "hilti",
"uuid": "799",
"updated_at": "2016-05-19 10:19:02 UTC",
"created_at": "2016-05-19 10:19:02 UTC",
"id": 852,
"computed_version": null
}
]
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Use API to add puppet module by id to content view, see example above
2. Use API to list puppet module in content view
3. Use UI to list puppet module in content view
Actual results:
In step 2 the compute_version is not set
In step 3 the UI shows 'Unable to determine version'
Expected results:
Additional info: