200
B.3. Determining the sid
Several methods require a value for the
different from the
system_id
ways. First, you can log into the RHN website, click the name of a system, and view
the
at the end of the URL in the location bar. It follows the "=" symbol and is part
sid
of a string that resembles the following: "index.pxt?sid=1003486534". Second, you may
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:
#
, or server ID, parameter. Note that this is
sid
. You may determine the
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
of a machine in two different
sid
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
#
#
#
Need help?
Do you have a question about the NETWORK 4.0.5 and is the answer not in the manual?
Questions and answers