Project

General

Profile

Actions

Feature #35000

closed

API should return simple results to understand if the repositories for hosts are enabled or not.

Added by Ian Ballou over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1830968

Description of problem:
  1. curl -k -u admin:password https://myforeman.org/api/hosts/4/subscriptions/product_content | python -m json.tool

The output will be like below:
~~~ {
"error": null,
"page": 1,
"per_page": 6,
"results": [ {
"content": {
"content_type": "yum",
"content_url": "/content/dist/rhel/server/7/7Server/$basearch/ansible/2.6/os",
"gpg_url": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
"id": 9918,
"label": "rhel-7-server-ansible-2.6-rpms",
"name": "Red Hat Ansible Engine 2.6 RPMs for Red Hat Enterprise Linux 7 Server",
"vendor": "Red Hat"
},
"enabled": false,
"enabled_content_override": null,
"enabled_override": "default",
"override": "default",
"overrides": [],
"product": {
"id": 446,
"name": "Red Hat Ansible Engine"
}
}, {
"content": {
"content_type": "kickstart",
"content_url": "/content/dist/rhel/server/7/$releasever/$basearch/kickstart",
"gpg_url": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
"id": 7469,
"label": "rhel-7-server-kickstart",
"name": "Red Hat Enterprise Linux 7 Server (Kickstart)",
"vendor": "Red Hat"
},
"enabled": false,
"enabled_content_override": false,
"enabled_override": "0",
"override": "0",
"overrides": [ {
"name": "enabled",
"value": false
}
],
"product": {
"id": 387,
"name": "Red Hat Enterprise Linux Server"
}
}, {
"content": {
"content_type": "yum",
"content_url": "/content/dist/rhel/server/7/$releasever/$basearch/os",
"gpg_url": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
"id": 7468,
"label": "rhel-7-server-rpms",
"name": "Red Hat Enterprise Linux 7 Server (RPMs)",
"vendor": "Red Hat"
},
"enabled": true,
"enabled_content_override": null,
"enabled_override": "default",
"override": "default",
"overrides": [],
"product": {
"id": 387,
"name": "Red Hat Enterprise Linux Server"
}
}, {
"content": {
"content_type": "yum",
"content_url": "/content/dist/rhel/server/7/7Server/$basearch/sat-maintenance/6/os",
"gpg_url": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
"id": 7578,
"label": "rhel-7-server-satellite-maintenance-6-rpms",
"name": "Red Hat Satellite Maintenance 6 (for RHEL 7 Server) (RPMs)",
"vendor": "Red Hat"
},
"enabled": false,
"enabled_content_override": null,
"enabled_override": "default",
"override": "default",
"overrides": [],
"product": {
"id": 387,
"name": "Red Hat Enterprise Linux Server"
}
}, {
"content": {
"content_type": "yum",
"content_url": "/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.5/os",
"gpg_url": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
"id": 7741,
"label": "rhel-7-server-satellite-tools-6.5-rpms",
"name": "Red Hat Satellite Tools 6.5 (for RHEL 7 Server) (RPMs)",
"vendor": "Red Hat"
},
"enabled": false,
"enabled_content_override": null,
"enabled_override": "default",
"override": "default",
"overrides": [],
"product": {
"id": 387,
"name": "Red Hat Enterprise Linux Server"
}
}, {
"content": {
"content_type": "yum",
"content_url": "/content/dist/rhel/server/7/$releasever/$basearch/rhscl/1/os",
"gpg_url": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
"id": 10429,
"label": "rhel-server-rhscl-7-rpms",
"name": "Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server",
"vendor": "Red Hat"
},
"enabled": false,
"enabled_content_override": null,
"enabled_override": "default",
"override": "default",
"overrides": [],
"product": {
"id": 481,
"name": "Red Hat Software Collections for RHEL Server"
}
}
],
"search": null,
"sort": {
"by": null,
"order": null
},
"subtotal": 6,
"total": 6
}

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload Upload Total Spent Left Speed
100 3111 0 3111 0 0 232 0 --:--:-- 0:00:13 --:--:-- 664

~~~

In this output it is really difficult to identify if the repository is enabled or not.

Version-Release number of selected component (if applicable):
All versions

How reproducible:
As per the above command and the output.

Actual results:
Output is difficult to understand unlike Satellite 5.

Expected results:
Easily readable output.


Related issues 1 (0 open1 closed)

Related to Katello - Feature #35141: Hammer support for /hosts/:id/subscriptions/enabled_repositoriesClosedChris RobertsActions
Actions #1

Updated by Ian Ballou over 2 years ago

  • Subject changed from API should return simple results to understand if the repositories for hosts are enabled or not. to API should return simple results to understand if the repositories for hosts are enabled or not.
  • Assignee set to Ian Ballou
  • Priority changed from High to Normal
  • Target version set to Katello 4.6.0
Actions #2

Updated by The Foreman Bot over 2 years ago

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

Updated by Samir Jha over 2 years ago

  • Triaged changed from No to Yes
Actions #4

Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases Katello 4.5.1 added
Actions #5

Updated by Anonymous over 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Ian Ballou over 2 years ago

  • Related to Feature #35141: Hammer support for /hosts/:id/subscriptions/enabled_repositories added
Actions

Also available in: Atom PDF