Bug 809366 - REST API: SetupNetworks response body should contain the new host_nics collection
Summary: REST API: SetupNetworks response body should contain the new host_nics collec...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Ori Liel
QA Contact: Yaniv Kaul
URL:
Whiteboard: infra network
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-03 08:17 UTC by Avi Tal
Modified: 2016-04-22 04:59 UTC (History)
14 users (show)

Fixed In Version: si16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 20:02:20 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Avi Tal 2012-04-03 08:17:14 UTC
SetupNetworks response body shouldn't be Empty!
It should contain the new created host_nics collection just like other RESTAPI actions.

Comment 1 Avi Tal 2012-07-14 16:06:12 UTC
This is very important for the REST API tests process.
part of the test is to validate the response code and body after sending action/request which in this case can't be done!

Comment 2 Mike Kolesnik 2012-08-01 07:25:26 UTC
The return value for REST action is the action contents + status of the request, is this what you want to get back?

Comment 3 Avi Tal 2012-08-01 08:11:07 UTC
yes response body should contain action status

Comment 4 Ori Liel 2012-08-07 08:41:49 UTC
posted patch: http://gerrit.ovirt.org/#/c/6968/1

Comment 5 Ori Liel 2012-08-12 12:12:23 UTC
merged, commit 39728d8b9ab74c0604b55d29183bf75a181e82e6

Comment 7 Avi Tal 2012-08-30 16:09:01 UTC
Verify on SI16 - PASS


Response for setupnetworks action:

    <action>
            <host_nics>
                    <actions>
                            <link href="/hosts/1d1683d0-f2a7-11e1-b6f8-001a4a169763/nics/setupnetworks" rel="setupnetworks"/>
                    </actions>
                    <host_nic href="/api/hosts/1d1683d0-f2a7-11e1-b6f8-001a4a169763/nics/52333f8c-3f97-486a-bfa2-d88e379e2ad0" id="52333f8c-3f97-486a-bfa2-d88e379e2ad0">
                            <actions>
                                    <link href="/api/hosts/1d1683d0-f2a7-11e1-b6f8-001a4a169763/nics/52333f8c-3f97-486a-bfa2-d88e379e2ad0/attach" rel="attach"/>
                                    <link href="/api/hosts/1d1683d0-f2a7-11e1-b6f8-001a4a169763/nics/52333f8c-3f97-486a-bfa2-d88e379e2ad0/detach" rel="detach"/>
                            </actions>
                            <name>eth0</name>
                            <link href="/api/hosts/1d1683d0-f2a7-11e1-b6f8-001a4a169763/nics/52333f8c-3f97-486a-bfa2-d88e379e2ad0/statistics" rel="statistics"/>
                            <host href="/api/hosts/1d1683d0-f2a7-11e1-b6f8-001a4a169763" id="1d1683d0-f2a7-11e1-b6f8-001a4a169763"/>
                            <network href="/api/networks/31969310-1452-4d8b-b71f-ffb086fe657a" id="31969310-1452-4d8b-b71f-ffb086fe657a"/>
                            <mac address="00:15:17:A7:6A:4C"/>
                            <ip address="10.35.128.10" netmask="255.255.255.0" gateway="10.35.128.254"/>
                            <boot_protocol>dhcp</boot_protocol>
                            <speed>1000000000</speed>
                            <status>
                                    <state>up</state>
                            </status>
                            <mtu>1500</mtu>
                            <bridged>true</bridged>
                            <custom_configuration>false</custom_configuration>
                    </host_nic>
            </host_nics>
            <status>
                    <state>complete</state>
            </status>
    </action>

Comment 8 Michael Pasternak 2012-09-02 07:20:20 UTC
(In reply to comment #2)
> The return value for REST action is the action contents + status of the
> request, is this what you want to get back?

this is incorrect, you should query for host nics (after the action complited) and return them in response, otherwise it's a fake, QE verify action success based on your response.

Comment 9 Michael Pasternak 2012-09-02 14:52:45 UTC
(In reply to comment #8)
> (In reply to comment #2)
> > The return value for REST action is the action contents + status of the
> > request, is this what you want to get back?
> 
> this is incorrect, you should query for host nics (after the action
> complited) and return them in response, otherwise it's a fake, QE verify
> action success based on your response.

will be addressed in https://bugzilla.redhat.com/show_bug.cgi?id=853739


Note You need to log in before you can comment on or make changes to this bug.