_images/btnDownload.png _images/btnDocs.png _images/btnChanges.png

pyARS - the swiss knife for the Remedy developer and admin

News

  • 2011-12-05: Version 1.6.0 has been released.
  • 2010-12-20: Version 1.5.0 comes with experimental Linux support. Please contact me if you are planning to use that as it currently requires patching the python interpreter.
  • 2010-02-24: Version 1.4.5 has been released! It brings many enhancements for the CMDB users, and a bugfix for erARS.GetAllFieldNames. See the Changelog for details.
  • 2010-01-29: Version 1.4.0 has been released! This release brings many comfort enhancements (albeit backwards incompatible changes) in the erars layer!
  • 2010-01-08: Release 1.3.5 has been released! This release brings more support for Atrium CMDB V2.1!
  • 2009-12-22: Release 1.3.0 has been released! ....
  • 2009-03-09: pyars now has a blog as well.
  • ...

Features of pyARS

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.).

  • 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.

  • a wrapper object takes care of session handling and adapts itself to the ARSystem version available (currently, versions 5.1 - 7.5 are supported): 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 (version 1.0 - 7.6).

  • 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',
    ...}
  • supported plattforms: currently Windows and Solaris. Linux support is experimental currenlty, and I have no access to AIX to test it there.

How can you contribute?

The following is a list of issues where you could lend a helping hand:

  • try to get pyARS to run under AIX
  • send in success stories (e.g. migration from C, ARSperl...) and example code
  • enhance the test coverage
  • enhance doc strings
  • help implementing outstanding functions (CMDB and ARS)
  • ...