Bug 1805789

Summary: Not able to expand vm networks and nics from API
Product: Red Hat CloudForms Management Engine Reporter: Adam Grare <agrare>
Component: APIAssignee: Adam Grare <agrare>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.0CC: dmetzger, obarenbo
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1805923 (view as bug list) Environment:
Last Closed: 2020-10-26 16:25:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Feature
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1805923    

Description Adam Grare 2020-02-21 14:47:41 UTC
Description of problem:
Using the API I am unable to list networks and nics for all vms with a single API call.  These collections are off of the vm.hardware association and can be added to the base vm_or_template model to allow this.

Version-Release number of selected component (if applicable):
master

How reproducible:
100%

Steps to Reproduce:
1. curl --user admin:smartvm 'http://localhost:3000/api/vms?expand=resources&attributes=name,networks,nics,disks,lans'

Actual results:
{
    "error": {
        "kind": "bad_request",
        "klass": "Api::BadRequestError",
        "message": "Invalid attributes specified: networks,nics"
    }
}

Expected results:
returns networks and nics with the vm data

Additional info:

Comment 2 Adam Grare 2020-02-21 14:48:43 UTC
https://github.com/ManageIQ/manageiq/pull/19861