| Summary: | [Rest API] messages element for domain resource have a different architecture with other resource | ||
|---|---|---|---|
| Product: | OKD | Reporter: | Johnny Liu <jialiu> |
| Component: | Pod | Assignee: | Krishna Raman <kraman> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 1.x | CC: | lnader, mfisher, mpatel, rmillner |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-04-27 20:46:27 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
And user resource also has the same issue. Even in the example shown the data element is not a child of messages. It is always a sibling. Verified this bug on devenv_1735, and PASS. |
Description of problem: Create domain: $ curl -k -X POST -H 'Accept: application/xml' -H 'Content-type: application/json' -d '{'\''namespace'\'':jialiu}' --user jialiu:214214 https://ec2-23-20-46-167.compute-1.amazonaws.com/broker/rest/domains <?xml version="1.0" encoding="UTF-8"?> <response> <status>created</status> <version>1.0</version> <type>domain</type> <data> <domain> ..... ..... ..... </domain> </data> <messages/> </response> Create app: $ curl -k -X POST -H 'Accept: application/xml' -d name=myapp -d cartridge=php-5.3 --user jialiu:214214 https://ec2-23-20-46-167.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications <?xml version="1.0" encoding="UTF-8"?> <response> <status>created</status> <version>1.0</version> <type>application</type> <data> <application> ..... ..... ..... </application> </data> <messages> <message> <text>Application myapp was created.</text> <severity>info</severity> <exit-code nil="true"></exit-code> <field nil="true"></field> </message> </messages> </response> Compare two xml response, found that: when create domain, <data> element is children of <messages> element. when create app, <data> element is sibling to <messages> element. Having a consistent messages element across all types of responses makes the parsing easier. And message element is missing in the messages when creating domain. Version-Release number of selected component (if applicable): devenv_1679 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: