Moti Asayag has posted comments on this change.
Change subject: restapi: Don't set bootproto on VLAN attach to NIC
......................................................................
Patch Set 2: (1 inline comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicResource.java
Line 57:
network,
Line 58:
hostInterface);
Line 59: params.setBondingOptions(hostInterface.getBondOptions());
Line 60:
Line 61: if (network == null || network.getVlanId() == null) {
I think that the condition isn't in place - there are 2 ways of getting this
code:
1. Attach - in which case the network must be provided, else the operation
fails.
If there is a network, we won't get this block. if there isn't a network, the
operation will fail.
2. Detach - the network exists, but the nic will loose all of
bootproto/ipaddress/subnet once the network is deleted.
The action on rest is problematic cause it doesn't allow the user to provide
what are the actual network configuration he wishes to set for the new network
and instead it relies on info that is currently configured on the nic itself.
With the assumption that nic,attach() should be followed with nic.update()
action for setting the network properties, i think we can remove this lines in
the context of attach.
Line 62: params.setBootProtocol(hostInterface.getBootProtocol());
Line 63: params.setAddress(hostInterface.getAddress());
Line 64: params.setSubnet(hostInterface.getSubnet());
Line 65: }
--
To view, visit http://gerrit.ovirt.org/17140
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I78b415592e2bc1a9fea901cadb3ee928f2935a14
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches