engine: fix NPE from fwd-merge 562a7db8dfd923c986f231a42c15669922574a7c

This fixes NPE caused due to merge conflict fix from the forward merge
commit 562a7db8dfd923c986f231a42c15669922574a7c and fixes travis test
regression:

    === TestName: test_01_reset_vm_on_reboot | Status : SUCCESS ===

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-08-07 15:05:34 +05:30
parent 29fb74538b
commit 7707d3fd92

View File

@ -1332,6 +1332,9 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
}
private void logBootModeParameters(Map<VirtualMachineProfile.Param, Object> params) {
if (params == null) {
return;
}
StringBuffer msgBuf = new StringBuffer("Uefi params ");
boolean log = false;
if (params.get(VirtualMachineProfile.Param.UefiFlag) != null) {
@ -3323,7 +3326,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
}
private void checkAndSetEnterSetupMode(VirtualMachineTO vmTo, Map<VirtualMachineProfile.Param, Object> params) {
Boolean enterSetup = (Boolean)params.get(VirtualMachineProfile.Param.BootIntoSetup);
Boolean enterSetup = null;
if (params != null) {
enterSetup = (Boolean) params.get(VirtualMachineProfile.Param.BootIntoSetup);
}
if (s_logger.isTraceEnabled()) {
s_logger.trace(String.format("orchestrating VM reboot for '%s' %s set to %s", vmTo.getName(), VirtualMachineProfile.Param.BootIntoSetup, enterSetup));
}