I ended up using the API to roll my own. Its not perfect or even pretty, but it seems to do what I wanted.
The only bit Im confused about is that the ‘system.listLatestUpgradablePackages’ returned several of the same packages for the kernel packages confusing one of my counters. I had to wrap it some logic to ensure it was counted only once. Im not sure why I got several of the same packages from the api though.
[CODE]
#!/usr/bin/perl -w
use Frontier::Client;
use Term::ReadKey;
use List::MoreUtils ‘first_index’;
my $user = ‘USERNAME’;
my $pass = ‘PASSWORD’;
(1) quit unless we have the correct number of command-line args
$num_args = $#ARGV + 1;
if ($num_args != 1) {
print "
Usage: $0 system_group
";
exit;
}
my $grp=$ARGV[0];
my $HOST = ‘SUSEMANAGER-HOST’;
my $client = new Frontier::Client(url => “http://$HOST/rpc/api”);
my $session = $client->call(‘auth.login’,$user, $pass);
my $systems = $client->call(‘systemgroup.listSystemsMinimal’, $session, $grp);
my $syscount = scalar(@$systems) ;
print "
Upgradeable packages for group: $grp
";
print "
$syscount Systems in group
";
#foreach my $syst (@$systems) {
print $syst->{‘name’}."\
";
#}
foreach my $system (@$systems) {
my $upgpkgs = $client->call(‘system.listLatestUpgradablePackages’, $session, $system->{‘id’});
my $last_pkgname = ‘’;
foreach my $upgpkg (@$upgpkgs) {
my $pkgname = $upgpkg->{‘name’}.".".$upgpkg->{‘to_version’}."-".$upgpkg->{‘to_release’}.’ '.$upgpkg->{‘arch’};
if ($pkgname ne $last_pkgname ) {
$pkglist{"$pkgname"} ++;
}
$last_pkgname = $pkgname;
}
}
$pkgcount = scalar(keys(%pkglist));
print "
$pkgcount Upgradable Packages
";
print "Systems\tName.Version-Release Arch
";
print "=======\t=======================================
";
foreach (sort keys %pkglist) {
print "$pkglist{$}\t$
";
}
$client->call(‘auth.logout’, $session);
[/FONT][/CODE]