Moti Asayag has uploaded a new change for review. Change subject: core: VM and VDS implement Nameable ......................................................................
core: VM and VDS implement Nameable VM and VDS implements Nameable so they could be referred by the Nameable.getName() property, regardless the concrete class type of the entity. Change-Id: I7c3953e0651f2e9c843d041cdc37090ad37e87e1 Signed-off-by: Moti Asayag <masa...@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java 2 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/10724/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java index 5847e17..0f90290 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java @@ -11,7 +11,7 @@ import org.ovirt.engine.core.compat.RpmVersion; import org.ovirt.engine.core.compat.Version; -public class VDS extends IVdcQueryable implements Serializable, BusinessEntity<Guid>, HasStoragePool<Guid> { +public class VDS extends IVdcQueryable implements Serializable, BusinessEntity<Guid>, HasStoragePool<Guid>, Nameable { private static final long serialVersionUID = -7893976203379789926L; private VdsStatic mVdsStatic; private VdsDynamic mVdsDynamic; @@ -1329,4 +1329,8 @@ return maxSchedulingMemory; } + @Override + public String getName() { + return getvds_name(); + } } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java index a32684f..b4c9c56 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java @@ -16,7 +16,7 @@ import org.ovirt.engine.core.compat.StringHelper; import org.ovirt.engine.core.compat.Version; -public class VM extends IVdcQueryable implements Serializable, BusinessEntity<Guid>, HasStoragePool<Guid> { +public class VM extends IVdcQueryable implements Serializable, BusinessEntity<Guid>, HasStoragePool<Guid>, Nameable { private static final long serialVersionUID = -4078140531074414263L; @Valid private VmStatic vmStatic; @@ -1519,4 +1519,9 @@ public void setOvfVersion(String ovfVersion) { vmStatic.setOvfVersion(ovfVersion); } + + @Override + public String getName() { + return getVmName(); + } } -- To view, visit http://gerrit.ovirt.org/10724 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c3953e0651f2e9c843d041cdc37090ad37e87e1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches