aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--onap-client/onap_client/sdc/vsp.py26
-rw-r--r--onap-client/setup.py2
2 files changed, 12 insertions, 16 deletions
diff --git a/onap-client/onap_client/sdc/vsp.py b/onap-client/onap_client/sdc/vsp.py
index c958978..cd478e1 100644
--- a/onap-client/onap_client/sdc/vsp.py
+++ b/onap-client/onap_client/sdc/vsp.py
@@ -141,21 +141,17 @@ class VSP(Resource):
).response_data.get("results", [])
requestor_id = self.oc.sdc.vsp.catalog_resources["MODIFY_VSP_OWNER"].get("headers").get("USER_ID")
- for contributer in self.contributers:
- if (
- not user_exists(contributer, vsp_permissions, permission="Contributor")
- and contributer != requestor_id
- ):
- self.oc.sdc.vsp.add_vsp_contributer(
- user_id=contributer, software_product_id=self.software_product_id
- )
-
- if self.owner:
- requestor_id = self.oc.sdc.vsp.catalog_resources["MODIFY_VSP_OWNER"].get("headers").get("USER_ID")
- if (
- user_exists(requestor_id, vsp_permissions, permission="Owner")
- and self.owner != requestor_id
- ):
+ if user_exists(requestor_id, vsp_permissions, permission="Owner"):
+ for contributer in self.contributers:
+ if (
+ not user_exists(contributer, vsp_permissions, permission="Contributor")
+ and contributer != requestor_id
+ ):
+ self.oc.sdc.vsp.add_vsp_contributer(
+ user_id=contributer, software_product_id=self.software_product_id
+ )
+
+ if self.owner and self.owner != requestor_id:
self.oc.sdc.vsp.modify_vsp_owner(
user_id=self.owner, software_product_id=self.software_product_id
)
diff --git a/onap-client/setup.py b/onap-client/setup.py
index 6f16e46..bf1caaa 100644
--- a/onap-client/setup.py
+++ b/onap-client/setup.py
@@ -47,7 +47,7 @@ for file in os.listdir("etc/payloads"):
setuptools.setup(
name="onap-client",
- version="0.7.0",
+ version="0.7.1",
author="Steven Stark",
author_email="steven.stark@att.com",
description="Python API wrapper for ONAP applications",