Kobi Ianko has uploaded a new change for review. Change subject: core: Adding a new Cpu Profile ......................................................................
core: Adding a new Cpu Profile interduce Cpu Profile. With multiple paragraphs if necessary. Change-Id: Idb9432e0ba5cd2e5d089a7e0cb69879e9acf76bd Bug-Url: https://bugzilla.redhat.com/1084930 Signed-off-by: Kobi Ianko <[email protected]> --- A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/CpuProfile.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/ProfileType.java M frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml 3 files changed, 55 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/27716/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/CpuProfile.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/CpuProfile.java new file mode 100644 index 0000000..9cd3a57 --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/CpuProfile.java @@ -0,0 +1,52 @@ +package org.ovirt.engine.core.common.businessentities.profiles; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.ovirt.engine.core.common.utils.ObjectUtils; +import org.ovirt.engine.core.common.validation.group.CreateEntity; +import org.ovirt.engine.core.common.validation.group.UpdateEntity; +import org.ovirt.engine.core.compat.Guid; + +public class CpuProfile extends BaseProfile implements Serializable { + private static final long serialVersionUID = -7873671967250939737L; + + @NotNull(groups = { CreateEntity.class, UpdateEntity.class }) + private Guid storageDomainId; + + public CpuProfile() { + super(ProfileType.CPU); + } + + public Guid getStorageDomainId() { + return storageDomainId; + } + + public void setStorageDomainId(Guid storageDomainId) { + this.storageDomainId = storageDomainId; + } + + @Override + public boolean equalValues(BaseProfile obj) { + if (!(obj instanceof CpuProfile)) { + return false; + } + CpuProfile other = (CpuProfile) obj; + return ObjectUtils.objectsEqual(storageDomainId, other.getStorageDomainId()); + } + + @Override + protected int valuesHashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((storageDomainId == null) ? 0 : storageDomainId.hashCode()); + return result; + } + + @Override + public String toString() { + return super.toString() + ", storage domain id=" + getStorageDomainId() + "}"; + } + +} diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/ProfileType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/ProfileType.java index 34bf7cb..136eba6 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/ProfileType.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/profiles/ProfileType.java @@ -6,7 +6,8 @@ public enum ProfileType implements Identifiable { DISK(0), - VNIC(1); + VNIC(1), + CPU(2); private final int value; private static final HashMap<Integer, ProfileType> valueToStatus = new HashMap<Integer, ProfileType>(); 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 2dc7154..ec529e7 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 @@ -187,6 +187,7 @@ <include name="common/businessentities/profiles/DiskProfile.java" /> <include name="common/businessentities/profiles/BaseProfile.java" /> <include name="common/businessentities/profiles/ProfileType.java" /> + <include name="common/businessentities/profiles/CpuProfile.java" /> <!-- Quota --> <include name="common/businessentities/Quota.java"/> -- To view, visit http://gerrit.ovirt.org/27716 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb9432e0ba5cd2e5d089a7e0cb69879e9acf76bd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Kobi Ianko <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
