Show Table of Contents
2.2. Perl Example
This example uses the
system.listUserSystems call to retrieve a list of systems a user can access. The example prints the name of each system. The Frontier::Client Perl module is found in the perl-Frontier-RPC RPM file.
#!/usr/bin/perl
use Frontier::Client;
my $HOST = 'satellite.example.com';
my $user = 'username';
my $pass = 'password';
my $client = new Frontier::Client(url => "http://$HOST/rpc/api");
my $session = $client->call('auth.login',$user, $pass);
my $systems = $client->call('system.listUserSystems', $session);
foreach my $system (@$systems) {
print $system->{'name'}."\n";
}
$client->call('auth.logout', $session);

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.