aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-02-18 13:13:50 +0000
committervasraz <vasyl.razinkov@est.tech>2021-02-18 13:13:50 +0000
commitfee0f29212b10c940ec4b19fc8f4794d06964eee (patch)
tree794d90ad0c299e85143e1ffee55916078285c4ef /common-be/src
parent26e5029d922779fd7e786c1a31b6b37492132388 (diff)
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 <vasyl.razinkov@est.tech> Issue-ID: SDC-3448 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com>
Diffstat (limited to 'common-be/src')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java9
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetOutputValueDataDefinition.java60
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java1
3 files changed, 70 insertions, 0 deletions
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<GetOutputValueDataDefinition> 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<String, Object> 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"),