diff options
author | franciscovila <javier.paradela.vila@est.tech> | 2022-03-10 11:55:04 +0000 |
---|---|---|
committer | franciscovila <javier.paradela.vila@est.tech> | 2022-03-29 12:47:29 +0100 |
commit | f772969ac32331ce847e8193059cd39dd362c7a6 (patch) | |
tree | 9e4986f2abb174b085f7a83f84bbdf3288e3869b /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/CatalogVspClient.java | |
parent | 28e7f0f13e3d7b75750a449c9bda6c0d4a1986ce (diff) |
Restrict deletion of archived VSPs if used in VF
Verify if a VSP is used in a VF in SDC-BE
before proceeding with the deletion of a VSP
Issue-ID: SDC-3894
Signed-off-by: franciscovila <javier.paradela.vila@est.tech>
Change-Id: I7c8bdd55516a51cf8693cfdb8c109a7c20e7ea84
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/CatalogVspClient.java')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/CatalogVspClient.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/CatalogVspClient.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/CatalogVspClient.java new file mode 100644 index 0000000000..22e9b54099 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/CatalogVspClient.java @@ -0,0 +1,35 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2022 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + * + * + */ + +package org.openecomp.sdcrests.vsp.rest; + +import java.util.Optional; + +public interface CatalogVspClient { + + /** + * Returns the name of a VF which is using the provided VSP + * + * @param vspId the id of the vsp + * @param user the user to perform the action + */ + Optional<String> findNameOfVfUsingVsp(String vspId, String user) throws Exception; +} |