Created attachment 585267 [details] engine log Unable to update clusters/id/networks/id <usages> collection. existing: <usages><usage>DISPLAY</usage><usage>VM</usage></usages> sending: <usages><usage>VM</usage></usages> the purpose is to remove DISPLAY by not sending it in the collection using PUT /api/clusters/id/networks/id received 200 but without removing the DISPLAY <usages><usage>DISPLAY</usage><usage>VM</usage></usages> the only way i can remove the DISPLAY usage is to update the old property <display>true</display> moving from true to false and send with PUT will return: <display>false</display> <usages> <usage>VM</usage> </usages>
it is true also for adding DISPLAY. working only when using the old property <display>
Seems related to this commit: 6c3a4563be178fe9ec178ff18f4b4730fde80349 By that logic, <display> tag takes precedence over the <usages> tag. If you only use <usages> tag, is there still a bug?
Two scenarios: 1. unset Cluster Network display: PUT http://<rhevm address>/api/clusters/<id>/networks/<id> <network> <name>sw1</name> <usages> <usage>VM</usage> </usages> </network> Response: 200 PUT <network ...> <name>sw1</name> <data_center ...\> <cluster .../> <stp>false</stp> <status> <state>non_operational</state> </status> <display>true</display> <mtu>0</mtu> <usages> <usage>DISPLAY</usage> <usage>VM</usage> </usages> <required>true</required> </network> ========================== 2. set cluster as display: PUT http://<rhevm address>/api/clusters/<id>/networks/<id> <network> <name>sw1</name> <usages> <usage>VM</usage> <usage>DISPLAY</usage> </usages> </network> Response: 200 PUT <network ...> <name>sw1</name> <data_center ...\> <cluster .../> <stp>false</stp> <status> <state>non_operational</state> </status> <display>false</display> <mtu>0</mtu> <usages> <usage>VM</usage> </usages> <required>true</required> </network> Note: the problem is that the old <display></display> element takes over usages collection settings and in order to configure display we must set the <display> element.
http://gerrit.ovirt.org/#/c/5513
http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=12493e6bdc1427da81610a31639c35a165faf7d7
Verify on SI19 - PASS i was able to set and unset display network only by using <usages> collection set display: <network> <usages> <usage>DISPLAY</usage> </usages> </network> unset display: <network> <usages> <usage>VM</usage> </usages> </network> BTW, is automatically configure <display> attribute which is great.
*** Bug 815855 has been marked as a duplicate of this bug. ***