From fee0f29212b10c940ec4b19fc8f4794d06964eee Mon Sep 17 00:00:00 2001 From: vasraz Date: Thu, 18 Feb 2021 13:13:50 +0000 Subject: Implement Attributes/Outputs BE (part 1) This commit includes support for: - import VFC with attributes - add VFC to VF/Service - show attributes in VF/Service Change-Id: I2cda966ab878ae7aee4bcfecf266c5c251c91164 Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3448 Signed-off-by: JulienBe --- .../elements/AttributeDataDefinition.java | 9 ++++ .../elements/GetOutputValueDataDefinition.java | 60 ++++++++++++++++++++++ .../be/datatypes/enums/ComponentFieldsEnum.java | 1 + 3 files changed, 70 insertions(+) create mode 100644 common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetOutputValueDataDefinition.java (limited to 'common-be') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java index 27bd6635fb..f1ca2167f6 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java @@ -20,12 +20,21 @@ package org.openecomp.sdc.be.datatypes.elements; import java.io.Serializable; +import java.util.List; +import lombok.Getter; +import lombok.Setter; import org.onap.sdc.tosca.datatypes.model.EntrySchema; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; +@Getter +@Setter public class AttributeDataDefinition extends ToscaDataDefinition implements Serializable { + private List getOutputValues; + private String outputId; + private String value; + public AttributeDataDefinition() { } diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetOutputValueDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetOutputValueDataDefinition.java new file mode 100644 index 0000000000..8bb7f7e153 --- /dev/null +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetOutputValueDataDefinition.java @@ -0,0 +1,60 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2021, Nordix Foundation. 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.datatypes.elements; + +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; + +@Getter +@Setter +@EqualsAndHashCode +@ToString +public class GetOutputValueDataDefinition extends ToscaDataDefinition { + + private String attribName; + private String inputName; + private String inputId; + private Integer indexValue; + private GetOutputValueDataDefinition getOutputIndex; + private boolean isList = false; + + public GetOutputValueDataDefinition() { + super(); + } + + public GetOutputValueDataDefinition(Map pr) { + super(pr); + } + + public GetOutputValueDataDefinition(GetOutputValueDataDefinition p) { + this.setAttribName(p.getAttribName()); + this.setInputName(p.getInputName()); + this.setInputId(p.getInputId()); + this.setIndexValue(p.getIndexValue()); + this.setGetOutputIndex(p.getGetOutputIndex()); + this.setList(p.isList()); + } + +} diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java index 643c03fbe1..91c956d613 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java @@ -24,6 +24,7 @@ public enum ComponentFieldsEnum { PROPERTIES("properties"), INPUTS("inputs"), + OUTPUTS("outputs"), USERS("users"), GROUPS("groups"), NON_EXCLUDED_GROUPS("nonExcludedGroups"), -- cgit 1.2.3-korg