aboutsummaryrefslogtreecommitdiffstats
path: root/onap-client/onap_client/sdc/vsp.py
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2020-05-21 14:36:33 -0700
committerstark, steven <steven.stark@att.com>2020-05-21 14:42:25 -0700
commitae7a1f690808666d0b6b8b79b739e3a865dd93b1 (patch)
tree88b381417f9e4c75fde07622741fe852aeee1984 /onap-client/onap_client/sdc/vsp.py
parentd481ad9918d383c82335e52db4a360964194ef5d (diff)
[VVP] adding VSP owner and VF description
Adding optional mechanism to override the VSP owner Addition optional field for the VF descriptino Issue-ID: VVP-418 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: Ib297a22a75a138881647fc2b8e91149c9e7a686c
Diffstat (limited to 'onap-client/onap_client/sdc/vsp.py')
-rw-r--r--onap-client/onap_client/sdc/vsp.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/onap-client/onap_client/sdc/vsp.py b/onap-client/onap_client/sdc/vsp.py
index 25b3170..c64af36 100644
--- a/onap-client/onap_client/sdc/vsp.py
+++ b/onap-client/onap_client/sdc/vsp.py
@@ -46,6 +46,7 @@ from onap_client.exceptions import ResourceAlreadyExistsException
class VSP(Resource):
resource_name = "VSP"
spec = {
+ "owner": {"type": str, "required": False, "default": ""},
"vendor_name": {"type": str, "required": True},
"license_model_name": {"type": str, "required": True},
"file_path": {"type": str, "required": True},
@@ -83,6 +84,7 @@ class VSP(Resource):
sub_category,
contributers=[],
allow_update=False,
+ owner="",
):
self.oc = Client()
vsp_input = {}
@@ -111,6 +113,7 @@ class VSP(Resource):
vsp_input["sub_category"] = sub_category.lower()
vsp_input["contributers"] = contributers
vsp_input["allow_update"] = allow_update
+ vsp_input["owner"] = owner
super().__init__(vsp_input)
@@ -138,6 +141,11 @@ class VSP(Resource):
user_id=contributer, software_product_id=self.software_product_id
)
+ if self.owner:
+ self.oc.sdc.vsp.modify_vsp_owner(
+ user_id=self.owner, software_product_id=self.software_product_id
+ )
+
def _submit(self):
"""Submits the vsp in SDC"""
self.oc.sdc.vsp.submit_software_product(**self.attributes, action="Submit")