Bug 836018
| Summary: | ovirt-engine-restapi: Bad error message when trying to remove built in group everyone [TEXT] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> |
| Component: | ovirt-engine-restapi | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED NOTABUG | QA Contact: | Oded Ramraz <oramraz> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.1.0 | CC: | dyasny, ecohen, iheim, mpastern, Rhev-m-bugs, ykaul |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | infra | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-29 17:25:32 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Oded Ramraz
2012-06-27 20:57:28 UTC
This is general problem , it will occur whenever Rest gets quotes in error messages:
<fault>
<reason>Operation Failed</reason>
<detail>[Data Center name must be formed of alphanumeric characters, numbers or "-_"]</detail>
</fault>
<fault>
<reason>Operation Failed</reason>
<detail>[Storage Domain name must be formed of "a-z0-9A-Z" or "-_"]</detail>
</fault>
I don't see this as a bug, " is a valid way to represent a double quote in a XML document. Try any program that handles XML and you will see that " is correctly translated. For example, save the the fault XML to a fault.xml file and then run this:
xmllint fault.xml
Or in python:
#!/usr/bin/python
import lxml.etree
doc = lxml.etree.parse("fault.xml")
msg = doc.xpath("/fault/detail")[0].text
print(msg)
Both will print this:
[Storage Domain name must be formed of "a-z0-9A-Z" or "-_"]
|