aboutsummaryrefslogtreecommitdiffstats
path: root/onap-client/onap_client/sdc/vsp.py
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2020-04-10 13:58:40 -0700
committerstark, steven <steven.stark@att.com>2020-04-14 08:11:03 -0700
commitd6b3ac08745b099fbd0ea5ff9feec22a0247bf49 (patch)
tree24681e2239d99ca9ce7f73195b15feb46a74c850 /onap-client/onap_client/sdc/vsp.py
parent71a1fd0d98c99692a25f9087ad5edfbd7cf00800 (diff)
[VVP] adding support for updating checked out resources
- also fixing imports of client to skip tests* Issue-ID: VVP-403 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: I0f0bddb04d4de10b9003e4fc6380619539f41ca4
Diffstat (limited to 'onap-client/onap_client/sdc/vsp.py')
-rw-r--r--onap-client/onap_client/sdc/vsp.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/onap-client/onap_client/sdc/vsp.py b/onap-client/onap_client/sdc/vsp.py
index 7e99ece..781f6eb 100644
--- a/onap-client/onap_client/sdc/vsp.py
+++ b/onap-client/onap_client/sdc/vsp.py
@@ -153,11 +153,12 @@ def update_vsp(existing_vsp, vsp_input):
existing_vsp_id = existing_vsp.get("id")
existing_vsp_version_id = existing_vsp.get("version")
- vsp_client.update_software_product(
- software_product_id=existing_vsp_id,
- software_product_version_id=existing_vsp_version_id,
- description=vsp_input.get("description", "New VSP Version")
- ).response_data
+ if get_vsp_version_id(existing_vsp_id, search_key="status") == "Certified":
+ vsp_client.update_software_product(
+ software_product_id=existing_vsp_id,
+ software_product_version_id=existing_vsp_version_id,
+ description=vsp_input.get("description", "New VSP Version")
+ )
vsp_input["software_product_id"] = existing_vsp_id
vsp_input["software_product_version_id"] = get_vsp_version_id(existing_vsp_id)