Moti Asayag has uploaded a new change for review.

Change subject: engine: Adding VnicProfileName to exported OVF
......................................................................

engine: Adding VnicProfileName to exported OVF

The patch adds the vnic profile name for each vnic (vm or template).
The vnic profile name will be kept on OtherResourceType field.

Change-Id: Icec2002238f446503403b1ef936f26543d188bc2
Signed-off-by: Moti Asayag <[email protected]>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateWriter.java
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
2 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/38/17438/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateWriter.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateWriter.java
index b4dfd40..b8f55cc 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateWriter.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateWriter.java
@@ -2,6 +2,7 @@
 
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.ovirt.engine.core.common.businessentities.DiskImage;
 import org.ovirt.engine.core.common.businessentities.VmTemplate;
 import org.ovirt.engine.core.common.businessentities.network.VmInterfaceType;
@@ -179,6 +180,13 @@
             _writer.WriteStartElement(RASD_URI, "ResourceType");
             _writer.WriteRaw(OvfHardware.Network);
             _writer.WriteEndElement();
+
+            _writer.WriteStartElement(RASD_URI, "OtherResourceType");
+            if (StringUtils.isNotEmpty(iface.getVnicProfileName())) {
+                _writer.WriteRaw(iface.getVnicProfileName());
+            }
+            _writer.WriteEndElement();
+
             _writer.WriteStartElement(RASD_URI, "ResourceSubType");
             if (iface.getType() != null) {
                 _writer.WriteRaw(iface.getType().toString());
diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
index 50e72fa..52f9112 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
@@ -251,6 +251,13 @@
             _writer.WriteStartElement(RASD_URI, "ResourceType");
             _writer.WriteRaw(OvfHardware.Network);
             _writer.WriteEndElement();
+
+            _writer.WriteStartElement(RASD_URI, "OtherResourceType");
+            if (StringUtils.isNotEmpty(iface.getVnicProfileName())) {
+                _writer.WriteRaw(iface.getVnicProfileName());
+            }
+            _writer.WriteEndElement();
+
             _writer.WriteStartElement(RASD_URI, "ResourceSubType");
             if (iface.getType() != null) {
                 _writer.WriteRaw(iface.getType().toString());


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icec2002238f446503403b1ef936f26543d188bc2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to