Using Python API scripts with Sun Connection


Did you know that you can use Python API scripts to automate Sun Connection tasks?

There's a new article in BigAdmin, Getting Started With the Sun Connection Satellite Python API,
which describes how to install and configure the Sun Connection Python
API software. It also includes a pointer to sample API scripts for both
the Solaris OS and Linux.

To find more API documentation, including  classes, use the pydoc script. The
pydoc module is bundled with Python and the pydoc script is usually
installed at the same place where the python interpreter is located:

$ cat /usr/sfw/bin/pydoc
#!/usr/sfw/bin/python

import pydoc
pydoc.cli()

Use the pydoc command to get the information that you want.

For Solaris OS

$ pydoc /opt/SUNWuce/api/python/lib/PyOsApi/OsApi.py
$ pydoc /opt/SUNWuce/api/python/lib/PyOsApi/OsApiConstants.py
$ pydoc /opt/SUNWuce/api/python/lib/PyOsApi/OsApiExceptions.py
$ pydoc /opt/SUNWuce/api/python/lib/PyOsApi/DataStructures/OsApiDataStructures.py

For Linux OS

$ pydoc /opt/local/uce/api/python/lib/PyOsApi/OsApi.py
$ pydoc /opt/local/uce/api/python/lib/PyOsApi/OsApiConstants.py
$ pydoc /opt/local/uce/api/python/lib/PyOsApi/OsApiExceptions.py
$ pydoc /opt/local/uce/api/python/lib/PyOsApi/DataStructures/OsApiDataStructures.py

Example
For example, use this command to find the available API classes for the Solaris OS: 
# pydoc /opt/SUNWuce/api/python/lib/PyOsApi/OsApi.py

Comments:

Hi All

I kinda like what I read. But they is a great deal more that I would like to see on
This page more examples of report extractions and job automation. The article
Is a bit like the product crypticall. It leaves to many unanswered questions

Please, More examples

Posted by Daniel Asselin on June 02, 2009 at 07:03 AM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

sunconnection

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today