Closed LinfyZhai closed 6 years ago
This is an exist bug from the beginning, we just find it today.
I have tried instance.SetValue('testR32',MI_Real32(0.0))
, it also get the error.
Fails even when a variable is passed as zero.
@c64cosmin , do you mean a = 0
in the code? I tried this works fine.
This issue should be fixed with the above patch:
$ omicli ei root/cimv2 test1
instance of test1
{
[Key] v_Key=1
testR32=0
}
Code:
def test1_EnumerateInstances (
context, nameSpace, className, propertySet, keysOnly):
instance = context.NewInstance ('test1')
instance.SetValue ('v_Key', MI_Uint32(1))
instance.SetValue ('testR32', MI_Real32(float(0)))
context.PostInstance (instance)
context.PostResult (MI_RESULT_OK)
@alinbalutoiu , thanks for fixing it! Eric has added in his PR and I have merged to master. We'll verify all issues after new build come.
Verified on private build.
Build: \\redmond\wsscfs\OSTCData\Builds\omi\develop\1.4.0-37 \\redmond\wsscfs\OSTCData\Builds\omiscriptprovider\develop\1.1.1-35 Reproduce steps:
root@omi64-ubun16-01:/opt/omi/lib# /opt/omi/bin/omigen_py /opt/omi/lib/test1/schema.mof test1 -d /opt/omi/lib/test1/
And add code like following in mi_main.py:root@omi64-ubun16-01:~# cat /var/opt/omi/log/omiagent.root.root.log 2017/11/08 18:54:46 [56144,56144] WARNING: null(0): EventId=30056 Priority=WARNING failed to call library unload: 1:test1 2017/11/08 18:57:25 [56177,56177] WARNING: null(0): EventId=30056 Priority=WARNING failed to call library unload: 1:test1