Viewing The Cid; Getting The Sgid; Sample Api Script - Red Hat NETWORK 4.1.0 Reference Manual

Hide thumbs Also See for NETWORK 4.1.0:
Table of Contents

Advertisement

212
use the
list_user_systems
available to the user that contains the associated
B.4. Viewing the cid
Like servers, channels have their own IDs. This value, the
for some methods, including
the
, the
can be obtained through the RHN website. Just click on the name of a
sid
cid
channel and view the end of the URL. It follows the "=" symbol, as part of a string that
resembles the following: "details.pxt?cid=54".
B.5. Getting the sgid
System groups also have their own IDs. This value, the
for the
set_group_membership
can be obtained through the RHN website. Just click on the name of a system group
and view the end of the URL. It follows the "=" symbol, as part of a string that resem-
bles the following: "details.pxt?sgid=334958". Note that the member parameter within the
set_group_membership
tion.
B.6. Sample API Script
The following sample script depicts how to construct an RHN API client. Review the
comments and links for a full discussion of the calls made.
#!/usr/bin/perl -w
use strict;
use Frontier::Client;
use Data::Dumper;
############################################################################
# This is a sample script for use of the experimental RHN Management APIs. #
# The API is currently available using XMLRPC only, which is described in
# depth at:
#
# http://www.xmlrpc.com/
#
# We use the Frontier modules, available from:
#
# http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?dist=Frontier-RPC
#
############################################################################
method within the system class to obtain a list of systems
set_base_channel
method, for instance. Like the
method requires only
Appendix B. RHN API Access
s.
sid
, is a required parameter
cid
and
set_child_channels
, is a required parameter
sgid
sid
or
as input to make the associa-
yes
no
. Also like
and
, the
cid
sgid
#
#
#
#
#
#
#
#
#

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents