Satellite API get target host for a patch
Does anyone know the API method to use to get the system a patch is targeted to be installed on?
Responses
Afraid I don't know the answer to this one Joseph, but have you checked out the Satellite API guide?
Hi Joseph,
You can get required details in report format with the help of bellow API's
1) system.listSystems will return you list of systems with systemid which you need to pass to next API
Sample Output :
{
'last_checkin' => bless( do{\(my $o = '20131030T05:35:16')}, 'Frontier::RPC2::DateTime::ISO8601' ),
'name' => 'server10.example.com',
'id' => '1000010000'
},
2) system.getRelevantErrata will return errata's applicable to system based on systemid
Sample Output :
{
'advisory_type' => 'Bug Fix Advisory',
'date' => '11/21/13',
'advisory_name' => 'RHBA-2013:1751',
'update_date' => '11/21/13',
'id' => '4440',
'advisory_synopsis' => 'openssl bug fix update'
},
Here you will get Errata type, Errata , Package name.
Hope this helps you.
Regards,
Ashish
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
