Martin Mucha has posted comments on this change. Change subject: restapi: Add support for Network Attachements. ......................................................................
Patch Set 23: (1 comment) https://gerrit.ovirt.org/#/c/32775/23/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicNetworkAttachmentsResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicNetworkAttachmentsResource.java: Line 53: Line 54: if (!nicId.equals(hostNicGuid)) { Line 55: //TODO MM: add message. Line 56: return Response.status(Response.Status.BAD_REQUEST).build(); Line 57: } > Ok, understood. I think that having 2 ways for 1 thing in rest can be either error or convenience. I'd say this is convenience ;) we have two ways of listing network attachments; "all for specific host" and "all for specific nic of given host". Having those resources already there for GET it probably made sense to allow post on them too, however, we can drop latter for sake of having only one post method. It may confuse some users though, that he can list network attachment for given nic, but he cannot add them (with nic specified on path) to it. I've contacted testers, who already wrote some tests using this, whether is removal of that method ok for them (I suppose it should be). Otherwise it's up to us (you, me, and probably moti) to decide. I don't have problem with any of these two variants. Line 58: } else { Line 59: HostNIC hostNIC = new HostNIC(); Line 60: hostNIC.setId(nicId.toString()); Line 61: attachment.setHostNic(hostNIC); -- To view, visit https://gerrit.ovirt.org/32775 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id6ac91eea1000f7fdf6105777343a1ac1c77368d Gerrit-PatchSet: 23 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches