From fbb1e44c2e189569bffdc23504b643257808397d Mon Sep 17 00:00:00 2001 From: talig Date: Sun, 8 Jul 2018 14:43:18 +0300 Subject: Add commands to clean zusammen data Expose REST to clean item version data of specific user. Add 2 commands to zusammen tool: 1. clean item data of specific user 2. delete public version Change-Id: I8630142bf34846359153eacc1556b10acecefa05 Issue-ID: SDC-1444 Signed-off-by: talig --- .../org/openecomp/sdcrests/item/rest/services/VersionsImpl.java | 6 ++++-- .../main/java/org/openecomp/sdcrests/item/types/VersionAction.java | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'openecomp-be/api') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java index e2d987233e..496db14e53 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java @@ -165,9 +165,11 @@ public class VersionsImpl implements Versions { case Revert: revert(request.getRevisionRequest(), itemId, versionId); break; - case Reset: - throw new UnsupportedOperationException("Action reset not supported."); + case Clean: + versioningManager.clean(itemId, version); + break; default: + throw new UnsupportedOperationException(String.format("Action %s not supported.", request.getAction())); } return Response.ok().build(); } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionAction.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionAction.java index c9d6f4e293..1dba03cedc 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionAction.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionAction.java @@ -24,5 +24,6 @@ public enum VersionAction { Sync, Commit, Revert, - Reset + Reset, + Clean } -- cgit 1.2.3-korg