Micro Focus Expert
Micro Focus Expert

(UCMDB) Support Tip - Best Practices for deploying new Content Packs

What are some best practices for developing new functionalities / fixing code in OOTB discovery patterns which enable customer to deploy new Content Packs with minimum risk of losing the developments?

It is presently recommends to develop the code into new py files and to encapsulate them in functions. In that way, you have only to include few lines in original (OOTB) scripts, but sometimes it’s not so easy. Usually, it is suggested to put a comment in py files before the change and before installing a new content pack, perform a backup (export) of the packages. With this action we can search for customizations.

Any suggestions ???

Alternatively, it is suggested to put code in new modules (python modules) to minimize the change of the OOTB script.

Another approach would be to wrap a function (python decorators) to have full control of input parameters and return values. It enables you to pre and post process the original attend of a function. You can also decorate class methods and even classes. Still you are changing the OOTB script. You could also replace the module with the discovery main function with your own module in the adapter. Again you are able to pre and post process, but also to change inner logic by replacing functions or classes with your own version. You do not change the OOTB script, but now an OOTB adapter.

If refer to documents feature of the UCMDB called content data validation, it enables you to post process the object result vector of a job run. So you can add/filter/manipulate object state holder. You need to write a script containing a ValidateData function, which is called if you add your script to dataValidationLibs.xml. So you are able to post process the result vector by changing an OOTB configuration file.

MICRO FOCUS Software Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please hit the Kudo botton, if you find this post useful.
Labels (2)
Tags (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.