| Summary: | Creating rate - should verify chargeback argument | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Taras Lehinevych <tlehinev> |
| Component: | API | Assignee: | Gregg Tanzillo <gtanzill> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Kourim <mkourim> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.6.0 | CC: | dajohnso, gtanzill, jhardy, nachandr, obarenbo, simaishi |
| Target Milestone: | GA | ||
| Target Release: | 5.6.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | c&u:chargeback:rest | ||
| Fixed In Version: | 5.6.0.5 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-01-24 14:28:34 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: | |
|
Description
Taras Lehinevych
2016-04-20 16:23:29 UTC
This was fixed in 5.6.0.5. Please move to CLOSED CURRENTRELEASE if verification passes. Verified that it is no longer possible to create rate with non-existent chargeback_rate_id.
Request with non-existent chargeback_rate_id:
POST /api/rates
{"per_time": "daily", "chargeback_rate_id": 22222, "description": "test_rate_0_GWzpMP5qsYZ", "group": "cpu", "per_unit": "megahertz", "source": "allocated"}
Response:
{
"error": {
"kind": "bad_request",
"message": "Chargeback rate can't be blank",
"klass": "ApiController::BadRequestError"
}
}
Request with existing chargeback_rate_id:
POST /api/rates
{"per_time": "daily", "chargeback_rate_id": 1, "description": "test_rate_0_GWzpMP5qsYZ", "group": "cpu", "per_unit": "megahertz", "source": "allocated"}
Response:
{
"results": [
{
"id": 15,
"enabled": true,
"description": "test_rate_0_GWzpMP5qsYZ",
"group": "cpu",
"source": "allocated",
"per_time": "daily",
"per_unit": "megahertz",
"friendly_rate": "",
"chargeback_rate_id": 2,
"created_on": "2016-10-18T12:30:31Z",
"updated_on": "2016-10-18T12:30:31Z"
}
]
}
|