Omer Frenkel has posted comments on this change. Change subject: Engine: Vm Init - new Feature ......................................................................
Patch Set 17: (4 comments) http://gerrit.ovirt.org/#/c/23020/17/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmAndAttachToPoolCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmAndAttachToPoolCommand.java: Line 32: } else { Line 33: returnValueFromAddVm = addVm(vmStatic); Line 34: } Line 35: Line 36: VmHandler.addVmInitToDB(vmStatic); i thought that you are removing this? Line 37: Line 38: if (returnValueFromAddVm.getSucceeded()) { Line 39: getTaskIdList().addAll(returnValueFromAddVm.getInternalVdsmTaskIdList()); Line 40: addVmToPool(vmStatic); http://gerrit.ovirt.org/#/c/23020/17/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java: Line 521: private void readVmInit(XmlNode content) { Line 522: XmlNode node = content.SelectSingleNode("VmInit"); Line 523: VmInit vmInit = vmBase.getVmInit(); Line 524: vmInit.setId(vmBase.getId()); Line 525: if (vmInitEnabled() && node != null) { i think we should read the info if it exists (node != null) even if version is less than 3.4, i mean, if its there, its ok to read it.. Line 526: if (node.attributes.get("ovf:hostname") != null) { Line 527: vmInit.setHostname(node.attributes.get("ovf:hostname").getValue()); Line 528: } Line 529: if (node.attributes.get("ovf:domain") != null) { Line 552: } Line 553: if (node.attributes.get("ovf:rootPassword") != null) { Line 554: vmInit.setRootPassword(node.attributes.get("ovf:rootPassword").getValue()); Line 555: } Line 556: if (node.attributes.get("ovf:custromScript") != null) { typo should be customScript Line 557: vmInit.setCustromScript(node.attributes.get("ovf:custromScript").getValue()); Line 558: } Line 559: } Line 560: } http://gerrit.ovirt.org/#/c/23020/17/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java: Line 94: _writer.WriteEndElement(); Line 95: } Line 96: Line 97: protected void writeVmInit() { Line 98: if (vmInitEnabled() && vmBase.getVmInit() != null) { same here, always write vmInit (if it is not null..) so when importing we could read it Line 99: VmInit vmInit = vmBase.getVmInit(); Line 100: _writer.WriteStartElement("VmInit"); Line 101: if (vmInit.getHostname() != null) { Line 102: _writer.WriteAttributeString(OVF_URI, "hostname", vmInit.getHostname()); -- To view, visit http://gerrit.ovirt.org/23020 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9383727c42713a0fda6d21782e2de708bfb57e47 Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> 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