From a8d3e1b8c759c21227690a425552a245da883e97 Mon Sep 17 00:00:00 2001 From: zhaoxiangjun666 Date: Thu, 10 Sep 2020 14:01:50 +0800 Subject: Support for Test Topology Auto Design- Service Import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some test code and use lombok in catalog-model Test Topology Auto Design (NFV Testing Automatic Platform) Delete useless test code and add test code for new function Issue-ID: SDC-3179 Issue-ID: SDC-3085 Signed-off-by: zhaoxiangjun666 Change-Id: I7f555633a00848c273014caa18ea0e30d0b22113 --- .../org/openecomp/sdc/common/api/ArtifactTypeEnum.java | 17 +++++++++++++++++ .../java/org/openecomp/sdc/common/api/Constants.java | 1 + 2 files changed, 18 insertions(+) (limited to 'common-app-api/src/main/java/org') diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java index 91f158a164..766825cdbe 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java @@ -20,6 +20,7 @@ package org.openecomp.sdc.common.api; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; @@ -182,4 +183,20 @@ public enum ArtifactTypeEnum { return new HashSet<>(artifactTypeEnums); } + public static String findType(final String type) { + for (final ArtifactTypeEnum ate : ArtifactTypeEnum.values()) { + if (ate.getType().equalsIgnoreCase(type)) { + return type; + } + } + return null; + } + + public static List getAllTypes() { + final List types = new ArrayList<>(); + for (final ArtifactTypeEnum ate : ArtifactTypeEnum.values()) { + types.add(ate.getType()); + } + return types; + } } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java index d11cc02d86..340b198460 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java @@ -88,6 +88,7 @@ public final class Constants { public static final String TOSCA_META_PATH = "TOSCA-Metadata/TOSCA.meta"; public static final String TOSCA_META_ENTRY_DEFINITIONS = "Entry-Definitions"; public static final String USER_DEFINED_RESOURCE_NAMESPACE_PREFIX = "org.openecomp.resource."; + public static final String USER_DEFINED_SERVICE_NAMESPACE_PREFIX = "org.openecomp.service."; public static final String IS_BASE = "isBase"; public static final String HEAT_FILE_PROPS = "heat_file"; -- cgit 1.2.3-korg