Description of problem: Internal Server Error during filtering by flavor name in API. Version-Release number of selected component (if applicable): Red Hat CloudForms 4.6 How reproducible:100% API Query: https://Cloudforms.example.com/api/vms?filter[]=flavor.name="m1.tiny" API Response: { "error": { "kind": "internal_server_error", "message": "undefined method `klass' for nil:NilClass\nDid you mean? class", "klass": "NoMethodError" } } Expected results: It should return 200 status code with flavor information.
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low.
WIP PR https://github.com/ManageIQ/manageiq/pull/17692 Not sure if this is correct, but it stops throwing the error.
Fixed in PR https://github.com/ManageIQ/manageiq/pull/17692 Vm needed to belong to Flavor in the models.
FIXED. Verified on 5.10.0.23.20181106165157_92dd189. Request: GET /api/vms?filter[]=flavor.name="<flavor_name>" Response: { "name": "vms", "count": 14, "subcount": 1, "subquery_count": 1, "pages": 1, "resources": [ { "href": "https://<ip_address>/api/vms/99" } ], "actions": [ ... ], "links": { "self": "https://<ip_address>/api/vms?filter%5B%5D=flavor.name%3D%22Standard_A2%22&offset=0", "first": "https://<ip_address>/api/vms?filter%5B%5D=flavor.name%3D%22Standard_A2%22&offset=0", "last": "https://<ip_address>/api/vms?filter%5B%5D=flavor.name%3D%22Standard_A2%22&offset=0" } }