cloudbase / PyMI

A blazing fast replacement for the Python WMI module
Apache License 2.0
21 stars 14 forks source link

Add custom operation options support #28

Closed petrutlucian94 closed 8 years ago

petrutlucian94 commented 8 years ago

For some operations, such as creating a NIC team, custom operation options must be passed.

This change exposes this functionality. Some methods now accept a 'operation_options' dict that may contain a field 'custom_options'. This needs to be a list of options, defined as dicts containing the option name, option value and a MI value type, allowing the option value to be 'casted' to a MI type.

A sample provided by this patch brings a better overview of this feature.

Note that operation_timeouts are now specified within the operation_options dict. The existing functional tests were updated to reflect this change. Also, one of the tests that was failing due to an expected timeout not being hit was fixed as well.