Bug 883041
| Summary: | Cannot return NULL array from get_instance | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan Safranek <jsafrane> | ||||
| Component: | cmpi-bindings | Assignee: | Vitezslav Crhonek <vcrhonek> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 18 | CC: | jsafrane, vcrhonek | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-02-21 05:53:13 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Patch sent upstream: http://sourceforge.net/mailarchive/message.php?msg_id=30250539 cmpi-bindings-0.5.2-3.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/cmpi-bindings-0.5.2-3.fc18 Package cmpi-bindings-0.5.2-3.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing cmpi-bindings-0.5.2-3.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-0570/cmpi-bindings-0.5.2-3.fc18 then log in and leave karma (feedback). cmpi-bindings-0.5.2-3.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. It's still not perfect, additional patch is needed: https://github.com/jsafrane/cmpi-bindings/commit/1bcb2eab54783cec8845a9ed3f81cfa8728503af (the patch was already merged upstream) cmpi-bindings-0.5.2-5.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/cmpi-bindings-0.5.2-5.fc18 Package cmpi-bindings-0.5.2-5.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing cmpi-bindings-0.5.2-5.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-2565/cmpi-bindings-0.5.2-5.fc18 then log in and leave karma (feedback). cmpi-bindings-0.5.2-5.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 656832 [details] Experimental patch Description of problem: I gave a python provider and I want to return an instance with NULL value of string[] (or any other array) property. Therefore I have in my get_instance method: model['MyProperty'] = pywbem.CIMProperty( name='MyProperty', value=None, type='string', array_size=0, is_array=True), But under Pegasus CIMOM I get traceback, because Pegasus pedantically checks property types; File "/usr/lib/python2.7/site-packages/cmpi_pywbem_bindings.py", line 761, in pywbem2cmpi_inst cinst.set_property(str(prop.name), data, ctype) File "/usr/lib/python2.7/site-packages/cmpi.py", line 809, in set_property return _cmpi.CMPIInstance_set_property(self, *args) CIMError: (1, '61') Version-Release number of selected component (if applicable): cmpi-bindings-pywbem-0.5.2-2.fc18.x86_64 Attached patch fixes the problem for me and the above code snippet starts working.