Description of problem: When accessing "cloud_networks", "cloud_subnets" or "security_groups" subcollection on RHEVM provider the request fails with internal server error: { "error": { "kind": "internal_server_error", "message": "undefined method `all' for nil:NilClass", "klass": "NoMethodError" } } Version-Release number of selected component (if applicable): 5.9.0.21 How reproducible: 100% Steps to Reproduce: 1. add RHEVM provider 2. request the "cloud_networks", "cloud_subnets" or "security_groups" subcollection GET /api/providers/:id/cloud_networks GET /api/providers/:id/cloud_subnets GET /api/providers/:id/security_groups
New commit detected on ManageIQ/manageiq-api/master: https://github.com/ManageIQ/manageiq-api/commit/2fd9ee9d9b51918a010a212972268ca0ab6d1a9f commit 2fd9ee9d9b51918a010a212972268ca0ab6d1a9f Author: Jillian Tullo <jtullo> AuthorDate: Fri Feb 16 09:48:01 2018 -0500 Commit: Jillian Tullo <jtullo> CommitDate: Fri Feb 16 09:48:01 2018 -0500 Ensure array is returned for subcollections Some providers return nil for cloud_networks, cloud_subnets, and security_groups, causing an internal server error to be raised. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1546112 .../api/subcollections/cloud_networks.rb | 2 +- .../api/subcollections/cloud_subnets.rb | 2 +- .../api/subcollections/security_groups.rb | 2 +- spec/requests/providers_spec.rb | 32 ++++++++++++++++++++++ 4 files changed, 35 insertions(+), 3 deletions(-)
Verified on 5.10.0.2 using our test automation