Shahar Havivi has posted comments on this change.

Change subject: engine: set default boot-protocol for VmInitNetwork
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/33199/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java:

Line 563:             return 
failCanDoAction(VdcBllMessages.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH);
Line 564:         }
Line 565: 
Line 566:         // Set default boot protocol for VmInit to None if not set
Line 567:         if (vmFromParams.getVmInit() != null && 
vmFromParams.getVmInit().getNetworks() != null) {
> wouldn't it better to put this in the cloudInitHandler? otherwise we need t
Yes and no,
The problem is raise in REST by NPE before running the VM,
You are right that it may be a problem too for running the VM hence needed to 
address in CloudInitHandler as well.
The simple solution will be not letting the VmInitNetwork.BootProtocol to set 
to null - but default to BootProtocol.None.
Line 568:             for (VmInitNetwork net: 
vmFromParams.getVmInit().getNetworks()) {
Line 569:                 if (net.getBootProtocol() == null) {
Line 570:                     net.setBootProtocol(NetworkBootProtocol.NONE);
Line 571:                 }


-- 
To view, visit http://gerrit.ovirt.org/33199
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I21f8a9cf509dd4d3d6e73a83ce9f66b183605161
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shav...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Shahar Havivi <shav...@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

Reply via email to