From d11b99b853a25721b3916e5d296c2d8c23ab106f Mon Sep 17 00:00:00 2001 From: xuegao Date: Mon, 14 Sep 2020 08:57:26 +0200 Subject: Fix VSP updating issue Fix the issue during the VSP updating. Issue-ID: SDC-3104 Signed-off-by: xuegao Change-Id: If58aa1a7f1846b0269a7f759b47c7f00f834ae1f --- .../jsonjanusgraph/operations/ToscaElementLifecycleOperation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'catalog-model/src') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java index bf899631aa..b7cc2c8bd6 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java @@ -442,6 +442,8 @@ public class ToscaElementLifecycleOperation extends BaseOperation { lastCertifiedV.setVertex((JanusGraphVertex) lastCertifiedVertex); lastCertifiedV.setUniqueId((String) janusGraphDao .getProperty((JanusGraphVertex) lastCertifiedVertex, GraphPropertyEnum.UNIQUE_ID.getProperty())); + lastCertifiedV.addMetadataProperty(GraphPropertyEnum.IS_ABSTRACT, + (Boolean) janusGraphDao.getProperty((JanusGraphVertex) lastCertifiedVertex, GraphPropertyEnum.IS_ABSTRACT.getProperty())); StorageOperationStatus res = updateEdgeToCatalogRoot(null, lastCertifiedV); if (res != StorageOperationStatus.OK) { return res; @@ -1264,7 +1266,7 @@ public class ToscaElementLifecycleOperation extends BaseOperation { Boolean isAbstract = (Boolean) newVersionV.getMetadataProperty(GraphPropertyEnum.IS_ABSTRACT); if ( isAbstract == null || !isAbstract ) { - // no new vertex, only delete previous + // create new vertex JanusGraphOperationStatus result = janusGraphDao .createEdge(catalogV, newVersionV, EdgeLabelEnum.CATALOG_ELEMENT, null); -- cgit 1.2.3-korg