Arik Hadas has uploaded a new change for review. Change subject: core: set nic name on import template ......................................................................
core: set nic name on import template Fix a regression that was caused by a recently-introduced refactoring to OvfReader: the name for NICs wasn't set in the import template operation, thus caused the import template operation to fail when the template which was about to be imported contained NIC. Change-Id: I19352e715921794840cf4a39d59cdfad4f9221f4 Bug-Url: https://bugzilla.redhat.com/1136895 Signed-off-by: Arik Hadas <[email protected]> --- M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/28/32628/1 diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java index 46a7200..16c1b12 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java @@ -781,6 +781,8 @@ XmlNode linkedNode = node.SelectSingleNode(OvfProperties.VMD_LINKED, _xmlNS); iface.setLinked(linkedNode == null ? true : Boolean.valueOf(linkedNode.innerText)); + iface.setName(node.SelectSingleNode(OvfProperties.VMD_NAME, _xmlNS).innerText); + String resourceSubType = node.SelectSingleNode("rasd:ResourceSubType", _xmlNS).innerText; if (StringUtils.isNotEmpty(resourceSubType)) { iface.setType(Integer.parseInt(resourceSubType)); diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java index 76726d2..ad3e099 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java @@ -102,7 +102,6 @@ @Override protected void updateSingleNic(XmlNode node, VmNetworkInterface iface) { super.updateSingleNic(node, iface); - iface.setName(node.SelectSingleNode(OvfProperties.VMD_NAME, _xmlNS).innerText); iface.setMacAddress((node.SelectSingleNode("rasd:MACAddress", _xmlNS) != null) ? node.SelectSingleNode( "rasd:MACAddress", _xmlNS).innerText : ""); } -- To view, visit http://gerrit.ovirt.org/32628 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19352e715921794840cf4a39d59cdfad4f9221f4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
