Bug 485123
| Summary: | API: system.getCustomValues fails if system has a value containing null | ||
|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Brad Buckingham <bbuckingham> |
| Component: | API | Assignee: | Brad Buckingham <bbuckingham> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jesus M. Rodriguez <jesusr> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 0.5 | CC: | bperkins |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-09-17 07:10:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 456553 | ||
git commit: 95c6226e5f639fb905aaff27b8001dd81dde1533 Updated API so that if a system had a custom value of null, that it would return that value as "". Chose this as opposed to skipping that value or throwing an exception because the UI allows a user to create a value with null for a system and in that case, it still allows the user to access those values. Spacewalk 0.5 released. Spacewalk 0.5 has been released for long time ago. |
Description of problem: If user defines a custom value for a system and the value is null, executing the the system.getCustomValues API will generate an error. Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. create a custom system info key... Systems->CustomSystemInfo->Create New Key 2. associate a value with the key for a system currently registered... Systems->System->Custom Info->create new value... during the "create new value" do not provide a "Value:" (i.e. leave it blank) and click create/update. 3. execute the system.getCustomValues(sessionKey, systemId) for the system used in 2 Actual results: Traceback (most recent call last): File "1883030-custom-field.py", line 9, in <module> result = sc.system.getCustomValues(key,1000010001) File "/usr/lib/python2.5/xmlrpclib.py", line 1150, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.5/xmlrpclib.py", line 1440, in __request verbose=self.__verbose File "/usr/lib/python2.5/xmlrpclib.py", line 1204, in request return self._parse_response(h.getfile(), sock) File "/usr/lib/python2.5/xmlrpclib.py", line 1338, in _parse_response p.feed(response) File "/usr/lib/python2.5/xmlrpclib.py", line 547, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 192 Expected results: receive a valid result such as {'key': ''} Additional info: