Arik Hadas has uploaded a new change for review.

Change subject: core: add copy constructor to VmTemplate
......................................................................

core: add copy constructor to VmTemplate

Change-Id: I85fcd67ebba67bcae588420f8ce52268d13bca04
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
1 file changed, 52 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/23437/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
index 02b49a5..88a39b2 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
@@ -127,6 +127,58 @@
         setTemplateVersionName(templateVersionName);
     }
 
+    public VmTemplate(VmTemplate template) {
+        this();
+        setChildCount(template.getChildCount());
+        setCreationDate(template.getCreationDate());
+        setDescription(template.getDescription());
+        setMemSizeMb(template.getMemSizeMb());
+        setName(template.getName());
+        setNumOfSockets(template.getNumOfSockets());
+        setCpuPerSocket(template.getCpuPerSocket());
+        setOsId(template.getOsId());
+        setVdsGroupId(template.getVdsGroupId());
+        setId(template.getId());
+        setDomain(template.getDomain());
+        setNumOfMonitors(template.getNumOfMonitors());
+        setSingleQxlPci(template.getSingleQxlPci());
+        setStatus(template.getStatus());
+        setUsbPolicy(template.getUsbPolicy());
+        setTimeZone(template.getTimeZone());
+        setNiceLevel(template.getNiceLevel());
+        setCpuShares(template.getCpuShares());
+        setFailBack(template.isFailBack());
+        setDefaultBootSequence(template.getDefaultBootSequence());
+        setVmType(template.getVmType());
+        setSmartcardEnabled(template.isSmartcardEnabled());
+        setDeleteProtected(template.isDeleteProtected());
+        setSsoMethod(template.getSsoMethod());
+        setTunnelMigration(template.getTunnelMigration());
+        setVncKeyboardLayout(template.getVncKeyboardLayout());
+        setMinAllocatedMem(template.getMinAllocatedMem());
+        setStateless(template.isStateless());
+        setRunAndPause(template.isRunAndPause());
+        setCreatedByUserId(template.getCreatedByUserId());
+        setTemplateType(template.getTemplateType());
+        setAutoStartup(template.isAutoStartup());
+        setPriority(template.getPriority());
+        setDefaultDisplayType(template.getDefaultDisplayType());
+        setInitrdUrl(template.getInitrdUrl());
+        setKernelUrl(template.getKernelUrl());
+        setKernelParams(template.getKernelParams());
+        setQuotaId(template.getQuotaId());
+        setDedicatedVmForVds(template.getDedicatedVmForVds());
+        setMigrationSupport(template.getMigrationSupport());
+        setAllowConsoleReconnect(template.isAllowConsoleReconnect());
+        setIsoPath(template.getIsoPath());
+        setMigrationDowntime(template.getMigrationDowntime());
+        setBaseTemplateId(template.getBaseTemplateId());
+        setTemplateVersionName(template.getTemplateVersionName());
+        setTemplateVersionNumber(template.getTemplateVersionNumber());
+        setComment(template.getComment());
+        setOrigin(template.getOrigin());
+    }
+
     public ArchitectureType getClusterArch() {
         return clusterArch;
     }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85fcd67ebba67bcae588420f8ce52268d13bca04
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to