Bug 1683723
| Summary: | unable to create or edit a service from the api with "Picture expected, got Hash" error | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Felix Dewaleyne <fdewaley> | |
| Component: | API | Assignee: | drew uhlmann <duhlmann> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Parthvi Vala <pvala> | |
| Severity: | low | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | |
| Priority: | low | |||
| Version: | 5.9.7 | CC: | dmetzger, fdewaley, mshriver, obarenbo, simaishi, yrudman | |
| Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
| Target Release: | 5.11.0 | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | 5.11.0.2 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1702479 (view as bug list) | Environment: | ||
| Last Closed: | 2019-12-13 15:00:45 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | Bug | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | CFME Core | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1702479 | |||
|
Description
Felix Dewaleyne
2019-02-27 16:14:52 UTC
@Mike Sure, I can modify the method to include a picture.
@Felix I passed `picture` while creating a service template, and got an error similar to yours, can you confirm if the query looks okay?
POST /api/service_templates
Query: {
"name": "item_EfN40",
"prov_type": "generic",
"service_template_catalog_id": "7",
"config_info": {
"retirement": {
"fqname": "/Service/Retirement/StateMachines/ServiceRetirement/Default",
"dialog_id": "8"
},
"provision": {
"fqname": "/Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogItemInitialization",
"dialog_id": "8"
}
},
"service_type": "atomic",
"display": true,
"description": "mycatalogEfN40",
"picture": {
"content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAADUlEQVQIHWNgYGCwBQAAQgA+3N0+xQAAAABJRU5ErkJggg==",
"extension": "jpg"
}
}
Response: {
"error": {
"kind": "bad_request",
"message": "Could not create Service Template - Picture(#124586900) expected, got Hash(#15233320)",
"klass": "Api::BadRequestError"
}
}
yes, that looks correct - the content being a base64 encoded picture. FIXED. Verified on 5.11.0.2.20190430174828_0e34dea. |