Description of problem: A GET on api/hosts/host:id/nics/nic:id should return a HostNic struct. One of the attributes of this struct is virtual_functions_configuration of type HostNicVirtualFunctionsConfiguration. However, this is not returned, even if the NIC is SR-IOV capable or already configured with several VFs: # curl -X GET -H "Accept: application/xml" -u admin@internal:redhat --cacert /etc/pki/ovirt-engine/apache-ca.pem https://FQDN/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d/nics/8fdbac61-7c14-443a-94e5-1a90a223c535 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <host_nic href="/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d/nics/8fdbac61-7c14-443a-94e5-1a90a223c535" id="8fdbac61-7c14-443a-94e5-1a90a223c535"> <actions/> <name>eno3</name> <link href="/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d/nics/8fdbac61-7c14-443a-94e5-1a90a223c535/networklabels" rel="networklabels"/> <link href="/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d/nics/8fdbac61-7c14-443a-94e5-1a90a223c535/networkattachments" rel="networkattachments"/> <link href="/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d/nics/8fdbac61-7c14-443a-94e5-1a90a223c535/linklayerdiscoveryprotocolelements" rel="linklayerdiscoveryprotocolelements"/> <link href="/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d/nics/8fdbac61-7c14-443a-94e5-1a90a223c535/statistics" rel="statistics"/> <boot_protocol>none</boot_protocol> <bridged>false</bridged> <ip> <address></address> <netmask></netmask> <version>v4</version> </ip> <ipv6_boot_protocol>autoconf</ipv6_boot_protocol> <mac> <address>40:f2:e9:08:96:d4</address> </mac> <mtu>1500</mtu> <status>down</status> <host href="/ovirt-engine/api/hosts/878c17db-b9b3-4bb7-8569-f6249159e74d" id="878c17db-b9b3-4bb7-8569-f6249159e74d"/> </host_nic> I might be wrong, but it looks like that to include vdsConfig this the GET on HostNic would need to call lookupNic[1] with the second parameter as `true`, so that it runs doPopulate which apparently makes it include vfsConfig[2]. [1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicResource.java#L44 [2] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicsResource.java#L174 Version-Release number of selected component (if applicable): rhvm-4.2.8.7-0.1.el7ev.noarch (don't see a related code change on 4.3 or master) How reproducible: Always Steps to Reproduce: 1. curl -X GET -H "Accept: application/xml" https://<FQDN>/ovirt-engine/api/hosts/host:id/nics/nic:id Actual results: Missing virtual_functions_configuration Expected results: With virtual_functions_configuration Additional info: HostNic struct: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html/rest_api_guide/types#types-host_nic
We need to add this to module documentation. It should be populated in case you send header 'All-content: true'.
Actually I see customer reported it on SDK, usually if it defined in model, and documented, you can use all_content as follows: my_service.list(search='name=myentity', all_content=True) but it's not for the host nics service. So you can workaround it using: my_service.list(search='name=myentity', headers={'All-content': True})
Hi Ondra, Thanks for the quick response, the workaround works for the customer. Cheers, Amar
(In reply to Ondra Machacek from comment #3) > but it's not for the host nics service. So you can workaround it using: > > my_service.list(search='name=myentity', headers={'All-content': True}) Its only for vms_service() right? I did try on nics_service and it indeed is not implemented there. I think you had a few bugs from me where the problem is all_content. Maybe we should review everything that might be missing it? Thanks
(In reply to Germano Veit Michel from comment #5) > > Maybe we should review everything that might be missing it? > Yeah, in order to not have similar bugs in future, it would be good to review all places and fix them if needed.
Dominik, is this a bug in REST-API or in SDK?
(In reply to Dominik Holler from comment #7) > Dominik, is this a bug in REST-API or in SDK? REST-API. If this bug is fixed, the virtual_functions_configuration will be included, if the HTTP request contains the header "All-Content: True". Please note that the query string ?all_content=true is ignored because of bug 1383746.
Michael, can you please formally ack the bug?
sync2jira
Closing low severity bugs, based on QE capacity, if you would like to still verify this issue please reopen.
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days