Bug #22180
closed[V2] Regression in content view API
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1522769
In Satellite 6.3, there is an API V2 breakage for content views.
A) components_ids are missing
B) repository_ids are empty (they were likely empty even in 6.2)
Can you guys discuss what would be the best approach for
handling this? I general, we must avoid doing breaking changes in the
API, if we want we can bump version to V3. I think there are two good
options - add the missing _ids back as deprecated options (to be
removed in V3) or waive the change making an upgrade note in our docs
if there is some kind of technical limitation to do the former.
[root@zzzap ~]# curl -sku admin:changeme https://$(hostname
-f):443/katello/api/v2/content_views/4 | json_reformat
{
"content_host_count": 0,
"composite": true,
"repository_ids": [
],
"default": false,
"force_puppet_environment": false,
"version_count": 1,
"latest_version": "1.0",
"id": 4,
"name": "ccv-soe",
"label": "ccv-soe",
"description": null,
"organization": {
"name": "MyOrg",
"label": "MyOrg",
"id": 1
},
"created_at": "2017-12-04 12:10:51 UTC",
"updated_at": "2017-12-04 12:11:06 UTC",
"environments": [
{
"id": 1,
"name": "Library",
"label": "Library",
"permissions": {
"readable": true
}
}
],
"repositories": [
{
"id": 12,
"name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server",
"label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server",
"content_type": "yum"
},
{
"id": 16,
"name": "Red Hat Satellite Tools 6.2 for RHEL 6 Server RPMs x86_64",
"label":
"Red_Hat_Satellite_Tools_6_2_for_RHEL_6_Server_RPMs_x86_64",
"content_type": "yum"
},
{
"id": 14,
"name": "Red Hat Satellite Tools 6.2 for RHEL 7 Server RPMs x86_64",
"label":
"Red_Hat_Satellite_Tools_6_2_for_RHEL_7_Server_RPMs_x86_64",
"content_type": "yum"
}
],
"puppet_modules": [
],
"versions": [
{
"id": 4,
"version": "1.0",
"published": "2017-12-04 12:11:06 UTC",
"environment_ids": [
1
]
}
],
"components": [
{
"id": 2,
"name": "cv-rhel7 1.0",
"content_view_id": 2,
"version": "1.0",
"puppet_module_count": 0,
"environments": [
{
"id": 1,
"name": "Library",
"label": "Library"
}
],
"content_view": {
"id": 2,
"name": "cv-rhel7",
"label": "cv-rhel7",
"description": null,
"next_version": 2,
"latest_version": "1.0"
},
"repositories": [
{
"id": 12,
"name": "Red Hat Enterprise Linux 7 Server RPMs
x86_64 7Server",
"label":
"Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server"
}
]
},
{
"id": 3,
"name": "cv-tools 1.0",
"content_view_id": 3,
"version": "1.0",
"puppet_module_count": 0,
"environments": [
{
"id": 1,
"name": "Library",
"label": "Library"
}
],
"content_view": {
"id": 3,
"name": "cv-tools",
"label": "cv-tools",
"description": null,
"next_version": 2,
"latest_version": "1.0"
},
"repositories": [
{
"id": 16,
"name": "Red Hat Satellite Tools 6.2 for RHEL 6
Server RPMs x86_64",
"label":
"Red_Hat_Satellite_Tools_6_2_for_RHEL_6_Server_RPMs_x86_64"
},
{
"id": 14,
"name": "Red Hat Satellite Tools 6.2 for RHEL 7
Server RPMs x86_64",
"label":
"Red_Hat_Satellite_Tools_6_2_for_RHEL_7_Server_RPMs_x86_64"
}
]
}
],
"content_view_components": [
{
"latest": true,
"id": 1,
"created_at": "2017-12-04 12:10:56 UTC",
"updated_at": "2017-12-04 12:10:56 UTC",
"composite_content_view": {
"id": 4,
"name": "ccv-soe",
"label": "ccv-soe",
"description": null,
"next_version": 2,
"latest_version": "1.0",
"version_count": 1
},
"content_view": {
"id": 2,
"name": "cv-rhel7",
"label": "cv-rhel7",
"description": null,
"next_version": 2,
"latest_version": "1.0",
"version_count": 1
},
"content_view_version": {
"id": 2,
"name": "cv-rhel7 1.0",
"content_view_id": 2,
"version": "1.0",
"puppet_module_count": 0,
"content_view": {
"id": 2,
"name": "cv-rhel7",
"label": "cv-rhel7",
"description": null
},
"environments": [
{
"id": 1,
"name": "Library",
"label": "Library"
}
],
"repositories": [
{
"id": 12,
"name": "Red Hat Enterprise Linux 7 Server
RPMs x86_64 7Server",
"label":
"Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server"
}
]
}
},
{
"latest": true,
"id": 2,
"created_at": "2017-12-04 12:10:56 UTC",
"updated_at": "2017-12-04 12:10:56 UTC",
"composite_content_view": {
"id": 4,
"name": "ccv-soe",
"label": "ccv-soe",
"description": null,
"next_version": 2,
"latest_version": "1.0",
"version_count": 1
},
"content_view": {
"id": 3,
"name": "cv-tools",
"label": "cv-tools",
"description": null,
"next_version": 2,
"latest_version": "1.0",
"version_count": 1
},
"content_view_version": {
"id": 3,
"name": "cv-tools 1.0",
"content_view_id": 3,
"version": "1.0",
"puppet_module_count": 0,
"content_view": {
"id": 3,
"name": "cv-tools",
"label": "cv-tools",
"description": null
},
"environments": [
{
"id": 1,
"name": "Library",
"label": "Library"
}
],
"repositories": [
{
"id": 16,
"name": "Red Hat Satellite Tools 6.2 for RHEL
6 Server RPMs x86_64",
"label":
"Red_Hat_Satellite_Tools_6_2_for_RHEL_6_Server_RPMs_x86_64"
},
{
"id": 14,
"name": "Red Hat Satellite Tools 6.2 for RHEL
7 Server RPMs x86_64",
"label":
"Red_Hat_Satellite_Tools_6_2_for_RHEL_7_Server_RPMs_x86_64"
}
]
}
}
],
"activation_keys": [
],
"next_version": "2.0",
"last_published": "2017-12-04 12:11:06 UTC",
"permissions": {
"view_content_views": true,
"edit_content_views": true,
"destroy_content_views": true,
"publish_content_views": true,
"promote_or_remove_content_views": true
}
}