Bug 1932186
| Summary: | The nic href in the response of getting template nics is wrong | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Qin Yuan <qiyuan> |
| Component: | RestAPI | Assignee: | Ori Liel <oliel> |
| Status: | CLOSED DUPLICATE | QA Contact: | Guilherme Santos <gdeolive> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.4.5.6 | CC: | bugs, mperina |
| Target Milestone: | --- | Keywords: | Automation |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-03-01 09:30:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
*** This bug has been marked as a duplicate of bug 1932188 *** |
Description of problem: Request to get template nics after a nic is added to the template gets wrong nic href in the response occasionally. 2021-02-22 02:30:47,623 - MainThread - nics - DEBUG - CREATE request content is -- url:/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics body:<nic> <name>template_nic</name> <vnic_profile href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c" id="ef311433-8459-42b3-b65e-6ae01e77201c"> <name>ovirtmgmt</name> <link href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c/permissions" rel="permissions"/> <pass_through> <mode>disabled</mode> </pass_through> <port_mirroring>false</port_mirroring> <network href="/ovirt-engine/api/networks/4e2ef15d-07ae-4894-acec-4a5426bf2028" id="4e2ef15d-07ae-4894-acec-4a5426bf2028"/> <network_filter href="/ovirt-engine/api/networkfilters/d2370ab4-fee3-11e9-a310-8c1645ce738e" id="d2370ab4-fee3-11e9-a310-8c1645ce738e"/> </vnic_profile> </nic> 2021-02-22 02:30:47,723 - MainThread - nics - DEBUG - Response body for CREATE request is: <nic href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da" id="da832111-c541-468d-927c-ac03335216da"> <actions> <link href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/activate" rel="activate"/> <link href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/deactivate" rel="deactivate"/> </actions> <name>template_nic</name> <template href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <vm href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <interface>virtio</interface> <linked>true</linked> <plugged>true</plugged> <vnic_profile href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c" id="ef311433-8459-42b3-b65e-6ae01e77201c"/> </nic> 2021-02-22 02:30:47,803 - MainThread - templates - DEBUG - GET request content is -- url:/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics 2021-02-22 02:30:47,823 - MainThread - templates - DEBUG - Response body for GET request is: <nics> <nic href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da" id="da832111-c541-468d-927c-ac03335216da"> <actions> <link href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/activate" rel="activate"/> <link href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/deactivate" rel="deactivate"/> </actions> <name>template_nic</name> <template href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <vm href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <interface>virtio</interface> <linked>true</linked> <plugged>true</plugged> <vnic_profile href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c" id="ef311433-8459-42b3-b65e-6ae01e77201c"/> </nic> </nics> As you can see in the get response, the nic href is "/ovirt-engine/api/vms/...", but it should be "/ovirt-engine/api/templates/..." Version-Release number of selected component (if applicable): ovirt-engine-4.4.5.6-0.11.el8ev.noarch How reproducible: Occurred occasionally in automation tests. Steps to Reproduce: 1. Create a new template 2. Add a nic to the template 3. Get template nics Actual results: 1. The nic href is wrong in the get response as above Expected results: 1. The nic href in get response should be "/ovirt-engine/api/templates/..." Additional info: