Attempting to populate the CMDB via a script that pulls data from one MDR, generates the CI using SDM's SOAP API, and then generates the MDR button using a second call.
My powershell script is as follows.
Function SDMCreateMDRs {
$emptyArray = @();
[ref]$cret="";
[ref]$handle="";
for ($i=1; $i -lt $foundServers.Count; $i++){
$Vals=@('delete_flag','0','mdr_provider_id','400001','federated_asset_id',"$($variablename)",'cmdb_asset_id',"$($fServerIDs)");$SDResults=$SDMProxy.createObject($sid, 'ci_mdr_idmap', $Vals, $emptyArray, $cret, $handle);
}
}
The response is this.
Exception calling "createObject" with "6" argument(s): "INVALID AHD07131:sync_fetch error AHD03049:Bad input parameter"
Able to target the ci_mdr_idmap object using a doSelect call, but the createObject call for some reason fails for ci_md_idmap. Can run the createObject call with the NR object just fine.
Release : 17.3 or higher
Component : SDM - Configuration
In the code, it's referencing "$($variablename)", but the variable expects a list.
SDM is expecting a single string, so the code needed to be "$(($variablename)[$i])" instead.
The above is an example specific to Powershell scripting. Broadcom is not permitted to assist in developing or debugging custom code or porting any existing code samples.