X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fvnfd_lib.robot;h=d171b672dcd549dc413fb2788efa85a1ea5c5cc4;hb=refs%2Fchanges%2F73%2F12773%2F1;hp=f1cc95ea3a4d9d9666ac80a13d0c18afd981fda2;hpb=f8ea4a6f300025c5f99503f517b12b0a498c67f2;p=osm%2Ftests.git diff --git a/robot-systest/lib/vnfd_lib.robot b/robot-systest/lib/vnfd_lib.robot index f1cc95e..d171b67 100644 --- a/robot-systest/lib/vnfd_lib.robot +++ b/robot-systest/lib/vnfd_lib.robot @@ -59,16 +59,34 @@ Create VNFD [Arguments] ${vnfd_pkg} ${overrides}=${EMPTY} # If env variable "OVERRIDES" exists, it prevails over the value in the argument - ${overrides}= Get Environment Variable OVERRIDES default=${overrides} + ${overrides}= Get Environment Variable OVERRIDES default=${overrides} # Proceedes with the onboarding with the appropriate arguments ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-create ${overrides} ${vnfd_pkg} log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} - ${lines}= Get Line Count ${stdout} - ${last}= Evaluate ${lines} - 1 - ${id}= Get Line ${stdout} ${last} - [Return] ${id} + ${lines}= Get Line Count ${stdout} + ${last}= Evaluate ${lines} - 1 + ${id}= Get Line ${stdout} ${last} + [Return] ${id} + + +Update VNFD + [Documentation] Onboards ("Updates") a NF Package into OSM. + ... - Parameters: + ... - vnfd_pkg: Name (and location) of the NF Package + ... - vnfd_name: Name of the existing NF Package + + [Arguments] ${vnfd_pkg} ${vnfd_name} + + # Proceedes with the onboarding with the appropriate arguments + ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-update --content ${vnfd_pkg} ${vnfd_name} + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + ${lines}= Get Line Count ${stdout} + ${last}= Evaluate ${lines} - 1 + ${id}= Get Line ${stdout} ${last} + [Return] ${id} Create VNFD Overriding Fields @@ -90,16 +108,16 @@ Create VNFD Overriding Fields [Arguments] ${vnfd_pkg} ${override_fields} ${overrides}=${EMPTY} # If env variable "OVERRIDES" exists, it prevails over the value in the argument - ${overrides}= Get Environment Variable OVERRIDES default=${overrides} + ${overrides}= Get Environment Variable OVERRIDES default=${overrides} # Proceedes with the onboarding with the appropriate arguments ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-create ${overrides} ${vnfd_pkg} --override '${override_fields}' log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} - ${lines}= Get Line Count ${stdout} - ${last}= Evaluate ${lines} - 1 - ${id}= Get Line ${stdout} ${last} - [Return] ${id} + ${lines}= Get Line Count ${stdout} + ${last}= Evaluate ${lines} - 1 + ${id}= Get Line ${stdout} ${last} + [Return] ${id} Delete VNFD @@ -123,9 +141,9 @@ Assert Failure Delete VNFD Check For VNFD - [Arguments] ${vnfd_id} ${exists}=False + [Arguments] ${vnfd_id} ${exists}=False ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-list | awk '{print $2}' | grep ${vnfd_id} - Run Keyword If ${exists} Should Be Equal As Strings ${stdout} ${vnfd_id} - ... ELSE Should Not Be Equal As Strings ${stdout} ${vnfd_id} + Run Keyword If ${exists} Should Be Equal As Strings ${stdout} ${vnfd_id} + ... ELSE Should Not Be Equal As Strings ${stdout} ${vnfd_id}