aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2018-07-08 14:43:18 +0300
committertalig <talig@amdocs.com>2018-07-08 14:43:18 +0300
commitfbb1e44c2e189569bffdc23504b643257808397d (patch)
tree6dcd81ada2a9c3798d66fdf7794cc16ca22402a9 /openecomp-be/api/openecomp-sdc-rest-webapp
parentc108dee7bd25a976dc4fa88eef3ec859facdf5d2 (diff)
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 <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionAction.java3
2 files changed, 6 insertions, 3 deletions
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
}