Discovery of HMC servers fail with error: Running pre sensor script- Handle Model and Manufacturer for HMC failed due to: TypeError: Cannot convert null to an object


Description

We are trying to discover HMC servers and discovery fails with error message: Discovery of HMC servers fail with error: Running pre sensor script- Handle Model and Manufacturer for HMC failed due to: TypeError: Cannot convert null to an object

See attached error:

handle_model_and_manu_for_HMC_error.PNG

Steps to Reproduce

Download from store: 'Discovery and Service Mapping Patterns' v1.0.59
Run discovery of HMC server

Workaround

Attached "sa_pattern_prepost_script_01eb698edb890010988e5295dc9619ff (3).xml" to import to fix the issue.

The fix is changing the scope of the pre sensor script "Handle Model and Manufacturer for HMC" from "Discovery and Service Mapping Patterns" to "global". Script include "CI" and "MakeAndModelJS" which are being invoked in pre sensor script are in global scope, due to this difference in scope the pre sensor script could not invoke script include and resulted in step failure.


Related Problem: PRB1385164