From 30ff812c65389f5ca4c91d9774d425e81ef62049 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Wed, 13 Apr 2022 11:21:15 +0100 Subject: Check if VLM is used before deleting Checks if the VLM is in use by any VSP before allowing to delete it. Add unit tests for the delete method, considering the restriction. Applies minor refactors with related code. Change-Id: I4ff6ddf3959a4ca92ab68b29c8913fc6f0ebdb3c Issue-ID: SDC-3966 Signed-off-by: andre.schmid --- .../openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src') diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java index 62ea84b48b..eecb597ab2 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java @@ -19,6 +19,10 @@ */ package org.openecomp.sdc.vendorlicense.errors; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; + +@NoArgsConstructor(access = AccessLevel.PRIVATE) public class VendorLicenseErrorCodes { public static final String VENDOR_LICENSE_MODEL_NOT_FOUND = "VENDOR_LICENSE_MODEL_NOT_FOUND"; @@ -30,4 +34,6 @@ public class VendorLicenseErrorCodes { public static final String LIMIT_INVALID_TIME = "LIMIT_INVALID_TIME"; public static final String DUPLICATE_LIMIT_NAME_NOT_ALLOWED = "DUPLICATE_LIMIT_NAME_NOT_ALLOWED"; public static final String DATE_RANGE_INVALID = "DATE_RANGE_INVALID"; + public static final String VLM_IS_IN_USE_DELETE_ERROR = "VLM_IS_IN_USE_DELETE_ERROR"; + public static final String VLM_IS_CERTIFIED_DELETE_ERROR = "VLM_IS_CERTIFIED_DELETE_ERROR"; } -- cgit 1.2.3-korg