Omer Frenkel has uploaded a new change for review. Change subject: add Image and Instance type interfaces ......................................................................
add Image and Instance type interfaces Change-Id: Ia4ef6393038588383a6f110d9743e4412ee97f75 Signed-off-by: Omer Frenkel <[email protected]> --- A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageType.java A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/InstanceType.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java M frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml 4 files changed, 85 insertions(+), 16 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/79/12279/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageType.java new file mode 100644 index 0000000..8123ec3 --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageType.java @@ -0,0 +1,27 @@ +package org.ovirt.engine.core.common.businessentities; + +import org.ovirt.engine.core.compat.Guid; + +public interface ImageType extends BusinessEntity<Guid> { + + String getName(); + void setName(String value); + + String getDescription(); + void setDescription(String value); + + VmOsType getOs(); + void setOs(VmOsType value); + + String getIsoPath(); + void setIsoPath(String value); + + String getKernelUrl(); + void setKernelUrl(String value); + + String getKernelParams(); + void setKernelParams(String value); + + String getInitrdUrl(); + void setInitrdUrl(String value); +} diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/InstanceType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/InstanceType.java new file mode 100644 index 0000000..5d5e0ad --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/InstanceType.java @@ -0,0 +1,54 @@ +package org.ovirt.engine.core.common.businessentities; + +import java.util.List; + +import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; +import org.ovirt.engine.core.compat.Guid; + +public interface InstanceType extends BusinessEntity<Guid> { + + String getName(); + void setName(String value); + + String getDescription(); + void setDescription(String value); + + int getMemSizeMb(); + void setMemSizeMb(int value); + + int getNumOfSockets(); + void setNumOfSockets(int value); + + int getCpuPerSocket(); + void setCpuPerSocket(int value); + + List<VmNetworkInterface> getInterfaces(); + void setInterfaces(List<VmNetworkInterface> value); + + int getNumOfMonitors(); + void setNumOfMonitors(int value); + + UsbPolicy getUsbPolicy(); + void setUsbPolicy(UsbPolicy value); + + boolean isAutoStartup(); + void setAutoStartup(boolean value); + + BootSequence getDefaultBootSequence(); + void setDefaultBootSequence(BootSequence value); + + DisplayType getDefaultDisplayType(); + void setDefaultDisplayType(DisplayType value); + + int getPriority(); + void setPriority(int value); + + // missing: + //userdefined_properties + //predefined_properties + //min_allocated_mem + //smart card device + //payload device + //soundcard device + //ballon device +} 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 9918d27..7f679ff 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 @@ -3,7 +3,6 @@ import java.util.ArrayList; import java.util.Date; import java.util.HashMap; -import java.util.List; import java.util.Map; import javax.validation.constraints.Size; @@ -11,7 +10,6 @@ import org.codehaus.jackson.annotate.JsonIgnore; import org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType; -import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.validation.annotation.ValidI18NName; @@ -21,10 +19,8 @@ import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.compat.NGuid; -public class VmTemplate extends VmBase { +public class VmTemplate extends VmBase implements InstanceType, ImageType { private static final long serialVersionUID = -522552511046744989L; - - private List<VmNetworkInterface> _Interfaces = new ArrayList<VmNetworkInterface>(); private int childCount; @@ -46,7 +42,7 @@ private double actualDiskSize = 0; - private TemplateType templateType; + private TemplateType templateType = TemplateType.TEMPLATE; public VmTemplate() { setAutoSuspend(false); @@ -124,16 +120,6 @@ public void setvds_group_name(String value) { vdsGroupName = value; - } - - @Override - public List<VmNetworkInterface> getInterfaces() { - return _Interfaces; - } - - @Override - public void setInterfaces(List<VmNetworkInterface> value) { - _Interfaces = value; } public NGuid getstorage_pool_id() { diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml index a4cba12..7a57903 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml @@ -158,6 +158,8 @@ <include name="common/businessentities/Identifiable.java" /> <include name="common/businessentities/VmGuestAgentInterface.java" /> <include name="common/businessentities/TemplateType.java" /> + <include name="common/businessentities/InstanceType.java" /> + <include name="common/businessentities/ImageType.java" /> <include name="common/job/*.java" /> <!-- Quota --> -- To view, visit http://gerrit.ovirt.org/12279 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4ef6393038588383a6f110d9743e4412ee97f75 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
