The pyars python module allows developers to use the ARSystem (ARS) API functions as well as Atrium CMDB API functions to talk to and remote control any ARSystem or Atrium CMDB server, allowing e.g. for extremely quick prototyping, data corrections, integrations with other systems, etc.
remote control your ARSystem and Atrium CMDB
pyARS does not require compilation (easy to install and maintain)
use python’s interactive shell to interactively research and manipulate ARSystem data structures (forms, filters, activelinks, entries, etc.).
a wrapper object takes care of session handling and adapts itself to the ARSystem version available: the different API versions are automagically mapped to different wrapper classes that only expose the appropriate functions; a separate wrapper is available to support the CMDB (originally AROS) api and adapts itself to the CMDB version used.
all(!) data structures are available as python classes
memory management for Python objects is semi-automatic; the pythonic level pyars.erars tries to automate it as much as possible, including some caching. However, the lower level pyars.ars cannot handle the memory management. But with pyars, there is only one function to worry about: ARFree; just hand over any ARS data structure that you would like to be freed, and it will call the corresponding ARFree function(s).
Comfort structures: pyars.erARS defines a couple of its own structures, that bring together all detail information about the object in one single place: ARActiveLinkStruct, ARActiveLinkList, ARContainerStruct, AREscalationStruct, ARFilterStruct, ARMenuStruct, and others (see file details for details).
similarly to ARSPerl some convenience functions are provided: Login, Logoff, schemaExists and others. Login provides an additional feature: if you define the server name as “server:port” (as internet URLs usually do), you can define the port number for the communication. You can use an even tighter syntax: when creating a session instance, hand over the login information:
ars = ARS('server:port', 'user', 'password')
supports detailed logging (to switch on, use:
import logging
ars.logger.setLevel(logging.DEBUG)
(default is: INFO).
mapping dictionaries are provided (although not complete yet) that translate ARS constants to usable strings, e.g.:
ars_const['AR_DATA_TYPE']= {
AR_DATA_TYPE_NULL: 'NULL',
AR_DATA_TYPE_KEYWORD: 'KEYWORD',
AR_DATA_TYPE_INTEGER: 'INTEGER',
AR_DATA_TYPE_REAL: 'REAL',
...}
pyARS offers two levels of access to both, standard ARSystem as well as BMC Atrium functionality: one is the low level C API access, the second is with a more pythonic approach, using standard Python data structures instead of C types.
supported plattforms: currently Windows, Solaris and cygwin. Linux support is experimental currently, and I have no access to AIX to test it there.
The following is a list of issues where you could lend a helping hand: