pyARS Changelog

What's new in pyARS 1.8.2

Mar 9, 2015
  • pyars.ars: Fixed a bug in all versions of ARSetActiveLink (thanks to an anonymous bug reporter)
  • pyars.cars: fixed a bug in the 1.8.1 distribution that contained all asserts for version 8.0 and 8.1.

New in pyARS 1.8.1 (Jul 23, 2014)

  • pyars.ars: Beginning support for 8.0.0 and 8.1.0
  • pyars.erars: Beginning support for 8.0.0 and 8.1.0
  • pyars.ars: It seems that ARGetListImage (when used with a 8.1.0 lib) gives an error. I need to look into this

New in pyARS 1.8.0 (Dec 18, 2012)

  • pyars.cars: experimental support for 64bit (for 7.5 and higher). It works under Solaris and Windows, but crashes under Linux. I also had to change the way how the code detects 64bit mode (for Windows 64/32bit systems).
  • pyars.ars: changed the signature of ARMergeEntry by removing the last (optional) argument entryId.
  • pyars.erars: changed the signature of MergeEntry by removing the last (optional) argument entry.
  • pyars.erars: cleaned up the code and refactored all conversions of ARQualifierStruct into a new method conv2QualifierStruct (affecting GetEntryStatistics, GetListEntry, GetListEntryWithFields, GetListEntryBlocks
  • pyars.erars: ServiceEntry has received automatic conversion of pythonic arguments to C structures.
  • pyars.erars: GetOneEntryWithFields has received automatic conversion of pythonic arguments to C structures.
  • pyars.erars: introduced new conversion method convObjectChangeTimestampList2List. The method GetObjectChangeTimes now returns a pythonic list instead of the C structure.
  • pyars.erars: enhanced the conversion routines (conv2AR...): if they receive already a C structure of this type, they just return it again. This makes it simpler to write the calling functions - they don't have to check for the appropriate type. All conversion routines have appropriate tests as well.
  • pyars.erars: GetFieldTable will raise ARError in case of failures.
  • pyars.erars: GetAllFieldNames will raise ARError in case of failures.
  • pyars.tests: adapted all data structure tests for 64bit

New in pyARS 1.7.2 (Sep 18, 2012)

  • pyars.erars: changed convValueStruct2Value to cope with VIEW fields as well. In addition, if it hits an unknown value type, it will no longer simply return None, but raise an exception.
  • pyars.erars: changed the exception ARError so that it can take an optional parameter message text and message type; if they are set, they will be used for this exception, instead of the API status list.
  • pyars.erars: changed more methods to raise ARError exceptions instead of signalling errors just in errnr: GetListEntry and GetListEntryWithFields will raise ARError exceptions if the qualification cannot be built, the sort list or getlistfields could not be constructed or the search raised an error.
  • pyars.erars: GetEntryBlock and GetListEntryBlocks raise ARError exceptions.
  • pyars.erars: CreateEntry, GetEntry, GetMultipleEntries, MergeEntry, SetEntry, SetGetEntry raise ARError exceptions.
  • pyars.erars: GetListImage raises ARError exceptions.
  • pyars.erars: GetMultipleCharMenus now supports that you hand over a pythonic list of names of schemas to be retrieved.
  • pyars.erars: GetMultipleContainers now supports that you hand over a pythonic list of names of containers to be retrieved.
  • pyars.erars: GetMultipleEscalations now supports that you hand over a pythonic list of names of escalations to be retrieved (patch supplied by Bruno Piaui).
  • pyars.erars: GetMultipleFilters now supports that you hand over a pythonic list of names of filters to be retrieved (patch supplied by Bruno Piaui).
  • pyars.erars: GetMultipleImages now supports that you hand over a pythonic list of names of schemas to be retrieved.
  • pyars.erars: GetMultipleSchemas now supports that you hand over a pythonic list of names of schemas to be retrieved.
  • pyars.cars: enhanced the ars_const dictionary to resolve many more constants in 7.6.3 and 7.6.4.
  • pyars.ars_test: fixed a bug where a test would report a false positive under cygwin.

New in pyARS 1.7.0 (Feb 17, 2012)

  • pyars.cars: support cygwin (based on a patch supplied by Yves Jaeger). As on ordinary Windows systems, you can define the search path for the BMC libraries (the normal windows dlls) using the PATH environment variable; if pyARS should also search for the installation directory of user or admin tool (path information stored in the Windows registry), you need the additional module cygwinreg
  • pyars.cars: support later linux versions where sys.platform is now 'linux3'.
  • pyars.erars: made ARError more robust in case that the status list is empty.
  • pyars.erars: implemented remaining methods from 7.6: CreateActiveLink, CreateCharMenu, CreateEscalation, CreateField, CreateFilter, Export, GetMultipleFields, including undocumented Task functions.
  • pyars.erars.SetServerInfo: made this function more pythonic, based on a patch supplied by Sergey Klevtsov: Added a method named 'conv2ServerInfoList' which converts a pythonic dict/list/tuple into a cars ARServerInfoList struct. Modified erars.erARS.SetServerInfo to call this method before passing the argument on to ars. It is now possible to use it like this:
  • ars.SetServerInfo({cars.AR_SERVER_INFO_DEBUG_MODE: 2,
  • cars.AR_SERVER_INFO_FILTER_LOG_FILE: '/opt/ar/remedy/db/filter.log'})
  • ars.ARGetListImage: does not require a schemaList any more; it will then retrieve a list of all image names
  • erars.GetListImage: has been improved to be more pythonic version: you can now hand over lists, and will receive a list.
  • ars.ARGetImage: fixed a bug that made retrieving images impossible
  • pyars.ars: fixed a bug when printing out the path for non-windows OSes.
  • pyars._cars*.py: moved all of the asserts into their own test files in preparation supporting 64bit. The side effect is that startup of your normal python scripts is faster.
  • ars_test.py: fixed a crash when using 7.0 libs
  • ars_test.py: improved the test coverage
  • ars_test.py: fixed a test to make sure it will run on completely new installs as well.
  • ars_test.py: fixed a couple of places to make sure that it runs with Remedy 5.1 still.
  • pyars.ars: fixed a bug in ARGetSchema to run with Remedy 5.1.
  • pyars.cars: first steps for supporting 64bit libs (only started, does not work yet)
  • pyars.setup: cleaned up the setup file so that the docs and tests are now part of the package. They are now properly distributed in the source distribution (.zip file), but somehow fail to install properly.
  • documentation: Finally I have managed to complete the transition to the rst format and sphinx as the documentation generation tool. Also the template now matches my preferences.

New in pyARS 1.5.0 (Dec 6, 2011)

  • pyars.cmdb: following the documentation of changes in 7.5, I accidentally implemented the CMDB(Get, Set)MultipleInstances functions multiple times. Removed the redundancies. If you are running this against CMDB 7.5 or later, the return type changes from (cars.ARBooleanList, ccmdb.CMDBAttributeValueListList) to (ccmdb.ARBooleanList, ccmdb.CMDBAttributeValueListList).
  • pyars.ars: first step to support ARS 7.6.3
  • pyars.ars: fixed a bug in ARDeleteFilter which would ignore the parameter deleteOption.
  • pyars.ars: changed the signature of ARMergeEntry; you can now define the entryId for this call.
  • pyars.erars: fixed a bug in MergeEntry; also changed the signature of MergeEntry; you can now define the entryId for this call.
  • pyars.erars: fixed a bug in conv2EntryIdList for joins of join forms (discovered by Giulio Galante).
  • pyars.cars: Thanx to a change in naming conventions with AR7.6, I had to change the way, pyars tries to load the shared libs. With this fix, I also changed the loading under Windows: So far, pyars.cars would immediately add the registry information about Remedy installations to the PATH environment variable. Now it first tries to load the different versions with the standard PATH environment, before adding the registry information and doing it all again. With this change, it's now possible to use the PATH environment variable to load a specific DLL (e.g. version 7.1) while you have installed a newer version of the User tool.
  • cmdb.CMDBGetMultipleInstances: datasetId is no longer an optional argument.
  • pyars.ars and pyars.erars: changed a couple of minor bugs identified by pylint
  • pyars.cmdb and pyars.ercmdb: changed a couple of minor bugs identified by pylint
  • erars.conv2EntryIdList: if entryid is a unicode string, try to convert it to plain ascii.
  • pyars.ars_test: fixed a couple of minor test bugs. Included a patch by Giulio Galante.

New in pyARS 1.4.5 (Dec 6, 2011)

  • pyars.cmdb: implemented the new bulk instance functions from Atrium 7.5 (CMDBCreateMultipleInstances, CMDBDeleteMultipleInstances, CMDBGetMultipleInstances, CMDBSetMultipleInstances)
  • pyars.cmdb: implemented the graph query functions from Atrium 7.5: CMDBQueryByPath, CMDBGraphWalkBegin, CMDBGraphWalkNext, CMDBGraphWalkEnd.
  • pyars.cmdb: implemented a couple of undocumented functions from Atrium 7.5: CMDBCreateImpact, CMDBGetImpact, CMDBSetImpact, CMDBDeleteImpact, CMDBSetUserSessionGUID
  • provide many more cmdb.CMDB* functions as ercmdb.* counterparts and update many docstrings in the process
  • ercmdb.GetListClass: now returns a pythonic list of class names
  • cmdb: set default logging.LEVEL to INFO (the same it is in ars)
  • ercmdb.GetListInstance: now returns a very nice and pythonic result: (list of (instance id1, dict1 {attr: value, ...}), (instance id2, dict2), ... numMatches)
  • ercmdb.GetInstance: fixed a bug and changed the return value to a nice pythonic dictionary.
  • erARS.GetAllFieldNames: fixed a bug with a non-bound variable
  • erars_test: added a couple of test cases

New in pyARS 1.4.0 (Dec 6, 2011)

  • erars: introduced APIVersion(), GetControlStructFields(), GetFieldByName(), errstr()
  • erars.GetServerStatistics: changed the return type; it now automatically converts the ARServerInfoList to a dictionary. IF you need the old behaviour, please use ars.ARGetServerStatistics.
  • erars.GetServerInfo: changed the return type of from ARServerInfoList to a pythonic list, with all values already being converted into Python types; in addition, the parameter was made optional; if you don't hand over any specific info items, you will receive the full list.
  • erars.GetListGroup: changed return type from the low level C data structure ARGroupInfoList to python dictionary. If this change affects you, simply use the erars.ARGetListSQL with the same parameters.
  • erars.GetListSchemaWithAlias: changed return type from two lists ((list of schema names), (list of alias names) to a list of ((schema1, alias 1), (schema 2, alias 2), ...)
  • erars.GetListSQL: changed return type from ARValueListList to a pythonic list. If this change affects you, simply use the erars.ARGetListSQL with the same parameters.
  • fixed a bug in erars.GetFieldTable()
  • erars.GetCharMenu: fixed the documentation of the return value
  • erars: The following functions now support that you hand over either None, ARQualifierStruct or a string as a query parameter: GetEntryStatistics, GetListEntry, GetListEntryWithFields, GetListEntryBlocks
  • ars.GetCurrentServer(): renamed to ars.ARGetCurrentServer() and introduced erars.GetCurrentServer() to be more inline with naming conventions.
  • ars.AREncodeARAssignStruct: changed the return type to return the string value directly instead of the c_char_p to the string.
  • ars.AREncodeDiary: changed the return type to return the string value directly instead of the c_char_p to the string.
  • ars.AREncodeStatusHistory: changed the return type to return the string value directly instead of the c_char_p to the string.
  • enhanced the test suite
  • enhanced the tutorial

New in pyARS 1.3.5 (Dec 6, 2011)

  • updated & added all function definitions for CMDB API 2.1
  • changed the definition of the default dataset for Atrium 7.5 and later from BMC_ASSET to BMC.ASSET.
  • pyars.cmdb: CMDBRunQualificationForCI did not have the parameter datasetId in version 2.0 of the API -- was removed there.
  • pyars.cmdb: CMDBExpandParametersForCI did not have the parameter datasetId in version 2.0 of the API -- was removed there.
  • first part to support CMDB API Version 7.5 and 7.6 implemented (the constants, but no changes to functions yet).
  • changed the structure of version checks for constructing the CMDB class heirarchy (brought it inline with how pyars.ars creates the class hierarchy). Did the same in pyars.erars.
  • moved the definition of CMDBClassStruct and CMDBClassList from pyars.cmdb to pyars.ercmdb (finalise the change started in 1.3.0).
  • fixed a bug in CMDBREGetListJobRun and changed the return type in case of failure to be (None, errnr).
  • pyars.ars: fixed a relative import which was not really necessary; but in porting this relative import to p3k, I introduced a syntax that broke compatibility with python 2.3 and 2.4. Fixing this showed another anomaly in ars_test with python 2.3. Instead of fixing this, for now, the support of Python 2.3 is dropped. If this is of concern, please let me know.
  • changed the return type of pyars.ars.ARGetCacheEvent to be (None, errnr) in case of failure.
  • updated the tutorials.

New in pyARS 1.3.0 (Dec 6, 2011)

  • Attention, incompatible change of return type of method erARS.GetListEntry: it used to return a dictionary of {entryid: search_result_string, ..} -- but with this dictionary you loose the order of entries as returned by the server (via pyars.ARGetListEntry). That's why I had to change it to a list ((entryid, search_result_string), ...). In addition, in case of error, you will not receive a single None, but you will get a list (None, -1), so that assigning the result to two variables is simplified. If this change affects you, you only have to use the new list as input parameter to the dict() function -- and you will get the dictionary as you used to.
  • (entryList, numMatches) = ars.GetListEntry('User')
  • if ars.errnr > 1:
  • error handling
  • pass
  • else:
  • entryDict = dict(entryList)
  • Attention, incompatible change of return type of method erARS.GetListEntryWithFields: it used to return a dictionary of {entryid: {fid1 : value1, ...}, ..} -- but with this dictionary you loose the order of entries as returned by the server (via pyars.ARGetListEntryWithFields). That's why I had to change it to a list ((entryid, {fid1 : value1, ...}), ...). In addition, in case of error, you will not receive a single None, but you will get a list (None, -1), so that assigning the result to two variables is simplified. If this change affects you, you only have to use the new list as input parameter to the dict() function -- and you will get the dictionary as you used to.
  • removed some old code from erars (including some functions that were never supported nor published)
  • removed experimental code that raised an exception in ARGetField if the function called returned an error code; this exception is now raised in GetField instead.
  • GetListSchemaWithAlias: changed the return from (ARNameList, ARNameList) to the more pythonic version of (list_of_schema_names, list_of_alias_names) like: ((name1, name2,...), (name1, name2, ...))
  • during __init__ of the ars object, the control struct (ars.context) is now set to None, and only Login will set it to a real ARControlStruct; thus, you can identify if a Login has happend by checking for ars.context being not None.
  • further improve unicode handling in erars.GetEntry.
  • preparation to support IronPython has started, but a couple of more rough edges need to be straightened out (on the IronPython side) before this will work. Turns out, currently IronPython does not support C unions. We have currently two issues open with IronPython (24814 and 25106)
  • improved the erars_test.py unit tests; they should now also run through under Solaris. And you can enforce that it runs with a client library version different from the server version with -f.
  • made the code to identify the used CMDB version more robust and prepared pyars.cmdb for the versions 2.1, 7.5 and 7.6 (no code to support new functionality yet).
  • made the implementation follow the documentation that says the default for the logging.LEVEL is INFO (which so far actually was DEBUG). So, don't be surprised if your code does not spit out any debugging info any more. Please see the tutorial for instructions how to change this.
  • changed the signature of pyars.cmdb.CMDBGetClass to be more inline with the C version -- the output parameters need to be handed over to the python function as well, and there you will find the result. The pyars.ercmdb.GetClass in contrast, still just takes the name of the class and does the rest for you.
  • fixed a couple of bugs in cmdb_test.
  • updated some more docstrings

New in pyARS 1.2.5 (Dec 6, 2011)

  • .5: fixed a bug where the change of constant naming from AR_KEYWORD_FILTER_ERRNO to AR_KEYWORD_ERRNO would stop pyars at import time.
  • .5: fixed a bug in ARActiveLinkStruct (one of the members had a trailing ,)
  • .5: fixed a bug in ARGetActiveLink
  • .5: added an updated version of ARGetMultipleActiveLink to support the 7.5 features
  • .5: added many lookup dictionary entries for 7.5 specific enhancements to cars.py
  • made cars.py more robust against potential constant naming failures in the future
  • erARS can now cope with Unicode chars. pyars.ars always could do this, but erARS tried to convert only normal strings. If you want to see how to cope with Unicode chars, please see the tutorial.
  • extensive updates to the documentation, especially the tutorial.
  • erars.GetFieldTable has now a third parameter fieldType that allows you to specify which type of fields should be used for the dictionary of fieldid : name. The default is cars.AR_FIELD_TYPE_DATA, so that the dictionary maps all data fields to fieldids.
  • erARS.conv2EntryIdList: does not try to pad the entryid any more. If you need this, you have to call ars.padEntryid on the entryid yourself before calling conv2EntryIdList.
  • support for python3k: please note, that work started on this, but it does not work yet...

New in pyARS 1.2.2 (Dec 6, 2011)

  • erARS.conv2ValueStruct: now supports attachment filenames; in other words, you can now also use SetEntry for attachments with the list structure and do not need to rely on the C level API ARSetEntry

New in pyARS 1.2.1 (Dec 6, 2011)

  • implemented wrappers for most of the 7.5 functions (ARWfd* in addition to the AR*Image functions).
  • regenerated the pydoc documentation to include the 7.5 headers
  • updated many docstrings to better show the required ctype of arguments
  • changed the signature of ARCreateActiveLink and CreateActiveLink: now also the parameters controlField, focusField, enable, query, actionList and elseList are optional.
  • changed the signature of ARCreateCharMenu and CreateCharMenu: helpText, owner, changeDiary and objPropList are now optional.
  • changed the signature of ARCreateContainer and CreateContainer: helpText, owner, changeDiary and objPropList are now optional.
  • changed the signature of ARCreateEscalation and CreateEscalation: query, actionlist, elseList, helpText, owner, changeDiary and objPropList are now optional.

New in pyARS 1.2.0 (Dec 6, 2011)

  • added two new members to ARActiveLinkStruct and changed all ARActiveLink related functions (ARCreateActiveLink, ARGetActiveLink, ARSetActiveLink, ARGetActiveLinkFromXML, ARSetActiveLinkToXML)
  • implemented the image related functions (ARCreateImage, ARDeleteImage, ARGetImage, ARGetListImage, ARGetMultipleImages, ARSetImage)
  • implemented other 7.5 functions: ARGetCacheEvent, ARGetListEntryWithMultiSchemaFields, ARGetObjectChangeTimes, ARGetOneEntryWithFields, ARSetDSOPoolToXML
  • still outstanding are all ARWfd... functions

New in pyARS 1.1.0 (Dec 6, 2011)

  • A completely new module on top of pyars, called erars, makes it possible, to work seamlessly with Python data structures. Thus you are not forced to work with Remedy data structures any more. At least, that's the goal; until now we made sure to cover the ARxxxEntry functions.
  • ARExport: Changed the return value to return a python str instead of c_char_p. So, no need to access the value via .value any more.
  • ARExportToFile: changed the parameters to be more inline with ARExport, in other words, apart from the ARStructItemList all other parameters are optional. Unfortunately, the parameter FILE is the last one -- so I could not leave it as non-optional, while the other arguments were changed to optional, so I had to change this parameter to optional as well, setting the default to None. However, this obviously leads to an error, because ARExportToFile does not know where to write to.
  • has been tested with Python 2.6.