diff options
author | vasraz <vasyl.razinkov@est.tech> | 2020-04-24 13:57:10 +0100 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-05-07 08:17:37 +0000 |
commit | cea494370afa9feb589d1f813850fbdabc1df578 (patch) | |
tree | 0cf75d812218cf9a9d8bc70183e75b80ddf4c6c5 /catalog-model | |
parent | f8bc4f94da584d5861827df7ee2107c33f514a55 (diff) |
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 <vasyl.razinkov@est.tech>
Issue-ID: SDC-2982
Diffstat (limited to 'catalog-model')
4 files changed, 7 insertions, 44 deletions
diff --git a/catalog-model/pom.xml b/catalog-model/pom.xml index 2ac08a0925..f7d5b34dc0 100644 --- a/catalog-model/pom.xml +++ b/catalog-model/pom.xml @@ -322,6 +322,11 @@ <artifactId>joda-time</artifactId> <version>${joda.time.version}</version> </dependency> + <dependency> + <groupId>org.openecomp.sdc.core</groupId> + <artifactId>openecomp-tosca-lib</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> <build> 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; |