java/buildconf/apidoc/singlepage/api_index_ftr.txt | 5 +
java/buildconf/apidoc/singlepage/api_index_hdr.txt | 10 +++
java/buildconf/apidoc/singlepage/apiindex.txt | 7 ++
java/buildconf/apidoc/singlepage/faqs.txt | 20 +++++++
java/buildconf/apidoc/singlepage/scripts.txt | 60 +++++++++++++++++++++
5 files changed, 102 insertions(+)
New commits:
commit b646e6f7af384093fac786b5d04fa4a9e51c1ae1
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Jul 31 14:46:35 2009 -0400
adding singlepage apidoc templates that were never merged to VADER
diff --git a/java/buildconf/apidoc/singlepage/api_index_ftr.txt
b/java/buildconf/apidoc/singlepage/api_index_ftr.txt
new file mode 100644
index 0000000..0274132
--- /dev/null
+++ b/java/buildconf/apidoc/singlepage/api_index_ftr.txt
@@ -0,0 +1,5 @@
+ </ul>
+</body>
+
+Generated on: $current_date
+</html>
diff --git a/java/buildconf/apidoc/singlepage/api_index_hdr.txt
b/java/buildconf/apidoc/singlepage/api_index_hdr.txt
new file mode 100644
index 0000000..4221b55
--- /dev/null
+++ b/java/buildconf/apidoc/singlepage/api_index_hdr.txt
@@ -0,0 +1,10 @@
+<html>
+<head>
+ <meta http-equiv="cache-control" content="no-cache" />
+
+</head>
+<body>
+<h3><img src="../img/rhn-icon-api.gif" /><a
href="index.html">API Overview</a></h3>
+Welcome to the RHN Satellite API. By using the included API calls, you can more easily
automate many of the tasks you perform everyday. All API calls are grouped by common
functionality. <a href="faqs.html">Faqs</a> and <a
href="scripts.html">example scripts</a> are available.
+<h2>Namespaces</h2>
+ <ul class="apidoc">
diff --git a/java/buildconf/apidoc/singlepage/apiindex.txt
b/java/buildconf/apidoc/singlepage/apiindex.txt
new file mode 100644
index 0000000..cca8bbd
--- /dev/null
+++ b/java/buildconf/apidoc/singlepage/apiindex.txt
@@ -0,0 +1,7 @@
+<a name="#top">Red Hat Satellite API Documentation</a>
+<ul>
+#foreach( $handler in $handlers )
+ <li><a
href="#${handler.name}">$handler.name</a></li>
+#end
+</ul>
+<hr>
diff --git a/java/buildconf/apidoc/singlepage/faqs.txt
b/java/buildconf/apidoc/singlepage/faqs.txt
new file mode 100644
index 0000000..6d2661d
--- /dev/null
+++ b/java/buildconf/apidoc/singlepage/faqs.txt
@@ -0,0 +1,20 @@
+<html>
+<head>
+ <meta http-equiv="cache-control" content="no-cache" />
+
+</head>
+<body>
+<h1><img src="../img/rhn-icon-api.gif" alt="application program
interface" /><a href="faqs.html">Frequently Asked
Questions</a></h1>
+<p />
+<ul>
+ <dt>What programming languages are supported by the Satellite's
api?</dt>
+ <dd>Any language that provides an XMLRPC client interface will work with the
Satellite's API. While Perl and Python are two of the most commonly used, an XMLRPC
client implementation is available in most every common language. </dd>
+ <br />
+ <dt>When trying to call a specific function, the error "Fault returned from
XML RPC Server, fault code -1: Could not find method METHOD in class..." is given.
What is wrong?</dt>
+ <dd>Typically this is seen when either a function name is being called that
doesn't exist, the number of parameters for a particular function is incorrect, or the
type of a passed parameter is incorrect (Such as an array is expected, but a String is
passed). Check all of these things.</dd>
+ <br />
+ <dt>Should I call an API method using the naming scheme "methodName" or
"method_name"?</dt>
+ <dd>Both of these are valid names for the same method, so use whichever you
prefer.</dd>
+</ul>
+</body>
+</html>
diff --git a/java/buildconf/apidoc/singlepage/scripts.txt
b/java/buildconf/apidoc/singlepage/scripts.txt
new file mode 100644
index 0000000..23c0126
--- /dev/null
+++ b/java/buildconf/apidoc/singlepage/scripts.txt
@@ -0,0 +1,60 @@
+<html>
+<head>
+ <meta http-equiv="cache-control" content="no-cache" />
+
+</head>
+<body>
+<h1><img src="./img/rhn-icon-api.gif" alt="application program
interface" /><a href="../scripts.html">Sample
Scripts</a></h1>
+<h2>Sample Scripts</h2>
+<h3>Perl example:</h3><BR>
+This Perl example shows the system.listUserSystems call being used to get a list of
systems a user has access to. In the example below, the name of each system will be
printed.
+The Frontier::Client Perl module can be found in the "perl-Frontier-RPC" rpm
contained in the newest Satellite channel on
http://rhn.redhat.com.
+<p />
+
+<code>
+#!/usr/bin/perl<br/>
+use Frontier::Client;<br />
+<br />
+my $HOST = 'satellite.example.com';<br />
+my $user = 'username';<br />
+my $pass = 'password';<br />
+<br />
+my $client = new Frontier::Client(url => "http://$HOST/rpc/api");<br
/>
+my $session = $client->call('auth.login',$user, $pass);<br />
+<br />
+my $systems = $client->call('system.listUserSystems', $session);<br />
+foreach my $system (@$systems) {<br />
+ print $system->{'name'}."\n";<br
/>
+}<br />
+$client->call('auth.logout', $session);</br>
+</code>
+<hr />
+<p />
+<h3>Python example:</h3><br />
+Below is an example of the user.listAdministeredSystemGroups call being used. Only the
name of each group is printed.
+<p />
+
+<code>
+#!/usr/bin/python<br />
+import xmlrpclib<br />
+<br />
+SATELLITE_URL = "http://satellite.example.com/rpc/api"<br />
+SATELLITE_LOGIN = "username"<br />
+SATELLITE_PASSWORD = "password"<br />
+<br />
+client = xmlrpclib.Server(SATELLITE_URL, verbose=0)<br />
+<br />
+key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)<br />
+list = client.user.list_users(key, 'admin')<br />
+for user in list:<br />
+ print user.get('login')<br />
+<br />
+client.auth.logout(key)<br />
+</code>
+<hr />
+
+For more examples visit the <a
href="https://fedorahosted.org/spacewalk/">Spacewalk community
page</a>.
+
+<p />
+</body><p />
+</html><p />