Lior Vernia has uploaded a new change for review. Change subject: core: Added provided object types to ProviderType ......................................................................
core: Added provided object types to ProviderType Each ProviderType now reports what types of object it provides. This would facilitate many frontend operations. Change-Id: I8d30a98f0879fa8d7d291815ac603a979ceb91a3 Signed-off-by: Lior Vernia <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ProviderType.java 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/15368/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ProviderType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ProviderType.java index f96f263..3b23676 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ProviderType.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ProviderType.java @@ -1,20 +1,34 @@ package org.ovirt.engine.core.common.businessentities; +import java.util.HashSet; +import java.util.Set; + +import org.ovirt.engine.core.common.VdcObjectType; + /** * The provider type determines what external provider is used. */ public enum ProviderType implements Identifiable { - OPENSTACK_NETWORK(0), - FOREMAN(1); + OPENSTACK_NETWORK(0, VdcObjectType.Network), + FOREMAN(1, VdcObjectType.VDS); private int value; + private Set<VdcObjectType> providedTypes; - private ProviderType(int value) { + private ProviderType(int value, VdcObjectType... providedTypes) { this.value = value; + this.providedTypes = new HashSet<VdcObjectType>(); + for (VdcObjectType providedType : providedTypes) { + this.providedTypes.add(providedType); + } } @Override public int getValue() { return value; } + + public Set<VdcObjectType> getProvidedTypes() { + return providedTypes; + } } -- To view, visit http://gerrit.ovirt.org/15368 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d30a98f0879fa8d7d291815ac603a979ceb91a3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
