Project

General

Profile

Bug #15177

Adding puppet module to Content View by API does not set version, and therefor exclude it in publishing the module

Added by Andrew Kofink about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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:

Associated revisions

Revision 849f26b6 (diff)
Added by Andrew Kofink about 3 years ago

Fixes #15177 - Add validation to content view (#6093)

puppet module to make sure a valid content view with that same uuid
or name/author combination exists. In addition, the user may use the
puppet_module id, which will set the uuid of the
content_view_puppet_module to the same as the puppet_module.

If a content view is specified, the puppet module must belong to a
repository that belongs to the same organization as the content view.

An edge case: If two puppet modules with identical names and authors but
two different organizations are used to validate a content view puppet
module whose content view organization is one of the two organizations,
validation should pass.

History

#1 Updated by Eric Helms about 3 years ago

  • Legacy Backlogs Release (now unused) set to 143

#2 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6093 added

#3 Updated by Anonymous about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF