Bug 1965234

Summary: Add API support for inventory controller
Product: Red Hat Satellite Reporter: Shimon Shtein <sshtein>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: aruzicka, bbuckingham, jjeffers, mmccune, osousa
Target Milestone: 6.9.4Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_rh_cloud-3.0.23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1976231 (view as bug list) Environment:
Last Closed: 2021-07-29 12:58:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shimon Shtein 2021-05-27 09:04:48 UTC
Currently all inventory actions are available only from the UI.

Comment 3 Mike McCune 2021-07-08 21:45:04 UTC
VERIFIED on 6.9.4 Snap 1

API now shows new available calls:

/inventory	
Download latest report	"/api/organizations/:organization_id/rh_cloud/report"
Start report generation	"/api/organizations/:organization_id/rh_cloud/report"
Start inventory synchronization	"/api/organizations/:organization_id/rh_cloud/inventory_sync"
Enable cloud connector	"/apirh_cloud/enable_connector"


Was able to download the report as well:

 curl -k -u admin:**** https://localhost/api/v2/organizations/1/rh_cloud/report > report.xz


... "source_metadata": {"foreman_rh_cloud_version":"3.0.22"},"report_slices": {"bbf7e070-6159-4f30-82f7-bc90e5479978": {"number_hosts": 4}}}0-6159-4f30-82f7-bc90e5479978.json479978","hosts": [{"fqdn": "dhcp-8-29-137.lab.eng.rdu2.redhat.com","account": "******","subscription_manager_id": "bdce4ee0-e705-4f54-a50f-ee3c24c5ec01","sa....

Comment 8 errata-xmlrpc 2021-07-29 12:58:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.9.4 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2948

Comment 9 errata-xmlrpc 2021-07-29 13:02:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.9.4 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2948