Passing an array as property with pywsman

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Passing an array as property with pywsman

Imre Farkas
Hi,

I would like to pass an array as property like this:
options = pywsman.ClientOptions()
options.add_property('source', ['HardDisk', 'Network'])
doc = client.invoke(options, resource_uri, 'ChangeBootOrderByInstanceID')

which should result in something similar:
<n1:ChangeBootOrderByInstanceID_INPUT>
   <n1:source>HardDisk</n1:source>
   <n1:source>Network</n1:source>
</n1:ChangeBootOrderByInstanceID_INPUT>

This solution fails because the value parameter of the add_property
function is not a string:
TypeError: in method 'ClientOptions_add_property', argument 3 of type
'char const *'

How to pass an array correctly?

Thanks,
Imre Farkas

------------------------------------------------------------------------------
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Loading...