From cea494370afa9feb589d1f813850fbdabc1df578 Mon Sep 17 00:00:00 2001 From: vasraz Date: Fri, 24 Apr 2020 13:57:10 +0100 Subject: Support functions in TOSCA Simple Profile in YAML This commit aim to generalize usage of ToscaFunctions enum Change-Id: Iab3529e101f75db5f856778334a852afb532cdb6 Signed-off-by: Vasyl Razinkov Issue-ID: SDC-2982 --- .../sdc/be/model/tosca/ToscaFunctions.java | 42 ---------------------- .../tosca/converters/ToscaConverterUtils.java | 2 +- .../tosca/converters/ToscaMapValueConverter.java | 2 +- 3 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaFunctions.java (limited to 'catalog-model/src/main/java') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaFunctions.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaFunctions.java deleted file mode 100644 index eb84335463..0000000000 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaFunctions.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.be.model.tosca; - -/** - * tosca functions supported by sdc - */ -public enum ToscaFunctions { - - GET_INPUT("get_input"), - GET_PROPERTY("get_property"), - GET_OPERATION_OUTPUT("get_operation_output"), - GET_POLICY("get_policy"); - - private String functionName; - - ToscaFunctions(String functionName) { - this.functionName = functionName; - } - - public String getFunctionName() { - return functionName; - } -} diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaConverterUtils.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaConverterUtils.java index c70eefacae..7ce9103f8a 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaConverterUtils.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaConverterUtils.java @@ -21,7 +21,7 @@ package org.openecomp.sdc.be.model.tosca.converters; import com.google.gson.JsonObject; -import org.openecomp.sdc.be.model.tosca.ToscaFunctions; +import org.openecomp.sdc.tosca.datatypes.ToscaFunctions; public class ToscaConverterUtils { diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java index 163d59a57c..9e3d371581 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java @@ -37,7 +37,7 @@ import java.util.Set; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.model.DataTypeDefinition; import org.openecomp.sdc.be.model.PropertyDefinition; -import org.openecomp.sdc.be.model.tosca.ToscaFunctions; +import org.openecomp.sdc.tosca.datatypes.ToscaFunctions; import org.openecomp.sdc.be.model.tosca.ToscaPropertyType; import org.openecomp.sdc.common.log.wrappers.Logger; -- cgit 1.2.3-korg