summaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorLiang Ding <liang.ding@intel.com>2019-04-15 00:05:05 -0700
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-10-30 07:56:21 +0000
commit8ff60789e080dd99c604d31a6e754be164fba11e (patch)
treebae4286ab2b19a0d0a3a6ebedd57e17aa42dceea /catalog-model/src
parentc42c9f75adb72f80e57694b5bf67db7c94f33a89 (diff)
add artifacts support in TOSCA exported yml file
Change-Id: I56f8a6a1ce758876e83a7ee8318b79644ae7d5cb Issue-ID: SDC-1952 Signed-off-by: Liang Ding <liang.ding@intel.com>
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadArtifactInfo.java39
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfo.java77
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArtifactsOperations.java2
3 files changed, 45 insertions, 73 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadArtifactInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadArtifactInfo.java
new file mode 100644
index 0000000000..7f742258cb
--- /dev/null
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadArtifactInfo.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 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;
+
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class UploadArtifactInfo extends UploadInfo {
+ /**
+ * specify the node type(Optional by tosca)
+ */
+ private List<String> validSourceTypes;
+
+ private String file;
+ private String type;
+
+}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfo.java
index 7b672acc97..8daf492a62 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfo.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfo.java
@@ -24,86 +24,21 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
public class UploadComponentInstanceInfo {
private String name;
private String type;
private Map<String, List<UploadCapInfo>> capabilities;
private Map<String, List<UploadReqInfo>> requirements;
+ private Map<String, Map<String, UploadArtifactInfo>> artifacts;
private Map<String, List<UploadPropInfo>> properties;
private Map<String, String> capabilitiesNamesToUpdate;
private Map<String, String> requirementsNamesToUpdate;
private Collection<String> directives;
private UploadNodeFilterInfo uploadNodeFilterInfo;
- public Map<String, List<UploadPropInfo>> getProperties() {
- return properties;
- }
-
- public void setProperties(Map<String, List<UploadPropInfo>> properties) {
- this.properties = properties;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public Map<String, List<UploadCapInfo>> getCapabilities() {
- return capabilities;
- }
-
- public void setCapabilities(Map<String, List<UploadCapInfo>> capabilities) {
- this.capabilities = capabilities;
- }
-
- public Map<String, List<UploadReqInfo>> getRequirements() {
- return requirements;
- }
-
- public void setRequirements(Map<String, List<UploadReqInfo>> requirements) {
- this.requirements = requirements;
- }
-
- public Map<String, String> getCapabilitiesNamesToUpdate() {
- return capabilitiesNamesToUpdate;
- }
-
- public void setCapabilitiesNamesToUpdate(Map<String, String> capabilitiesNamesToUpdate) {
- this.capabilitiesNamesToUpdate = capabilitiesNamesToUpdate;
- }
-
- public Map<String, String> getRequirementsNamesToUpdate() {
- return requirementsNamesToUpdate;
- }
-
- public void setRequirementsNamesToUpdate(Map<String, String> requirementsNamesToUpdate) {
- this.requirementsNamesToUpdate = requirementsNamesToUpdate;
- }
-
- public Collection<String> getDirectives() {
- return directives;
- }
-
- public void setDirectives(Collection<String> directives) {
- this.directives = directives;
- }
-
- public UploadNodeFilterInfo getUploadNodeFilterInfo() {
- return uploadNodeFilterInfo;
- }
-
- public void setUploadNodeFilterInfo(UploadNodeFilterInfo uploadNodeFilterInfo) {
- this.uploadNodeFilterInfo = uploadNodeFilterInfo;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArtifactsOperations.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArtifactsOperations.java
index ecbbc69e5e..72fa71356e 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArtifactsOperations.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArtifactsOperations.java
@@ -263,9 +263,7 @@ public class ArtifactsOperations extends BaseOperation {
foundArtifact = getArtifactByLabel(parentId, null, EdgeLabelEnum.TOSCA_ARTIFACTS);
if (foundArtifact.isLeft()) {
resMap.putAll(foundArtifact.left().value());
-
}
-
return Either.left(resMap);
}