X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fnsi_lib.robot;h=1b883960f1c928bd7f5c60602df00948e7fd9e5f;hb=43f34481b4c5ccfda407a7f82a124012aab0dccc;hp=005d5369c091bd7dbd54431df5efe92c8b100f51;hpb=6e121fd13df4b047df1d0a27c0b7c15d2a19cf10;p=osm%2Ftests.git diff --git a/robot-systest/lib/nsi_lib.robot b/robot-systest/lib/nsi_lib.robot index 005d536..1b88396 100644 --- a/robot-systest/lib/nsi_lib.robot +++ b/robot-systest/lib/nsi_lib.robot @@ -13,7 +13,7 @@ # limitations under the License. *** Settings *** -Library Collections +Library Collections *** Variables *** @@ -45,11 +45,11 @@ Create Network Slice ${config_file_attr} Set Variable If '${config_file}'!='${EMPTY}' --config_file '${config_file}' \ ${nsi_id}= Instantiate Network Slice ${slice_name} ${nst} ${vim_name} ${config_attr} ${config_file_attr} ${sshkeys_attr} - log ${nsi_id} + Log ${nsi_id} WAIT UNTIL KEYWORD SUCCEEDS ${slice_launch_max_wait_time} ${slice_launch_pol_time} Check For Network Slice Instance To Configured ${slice_name} Check For Network Slice Instance For Failure ${slice_name} - [Return] ${nsi_id} + [Return] ${nsi_id} Instantiate Network Slice @@ -65,9 +65,9 @@ Instantiate Network Slice [Arguments] ${slice_name} ${nst} ${vim_name} ${slice_extra_args} ${sshkeys_attr} ${rc} ${stdout}= Run and Return RC and Output osm nsi-create --nsi_name ${slice_name} --nst_name ${nst} --vim_account ${vim_name} ${sshkeys_attr} ${slice_extra_args} - log ${stdout} + Log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} + [Return] ${stdout} Get Slice Ns List @@ -82,9 +82,9 @@ Get Slice Ns List Should Not Be Empty ${slice_name} @{ns_list_string}= Run and Return RC and Output osm ns-list | grep ${slice_name} | awk '{print $4}' 2>&1 # Returns a String of ns_id and needs to be converted into a list - @{ns_list} = Split String ${ns_list_string}[1] - Log List ${ns_list} - [Return] @{ns_list} + @{ns_list} = Split String ${ns_list_string}[1] + Log List ${ns_list} + [Return] @{ns_list} Get Slice Ns List Except One @@ -102,9 +102,9 @@ Get Slice Ns List Except One @{ns_list_string}= Run and Return RC and Output osm ns-list | grep ${slice_name} | awk '!/${exception_ns}/' | awk '{print $4}' 2>&1 # Returns a String of ns_id and needs to be converted into a list - @{ns_list} = Split String ${ns_list_string}[1] - Log List ${ns_list} - [Return] @{ns_list} + @{ns_list} = Split String ${ns_list_string}[1] + Log List ${ns_list} + [Return] @{ns_list} Get Slice Ns Count @@ -118,9 +118,9 @@ Get Slice Ns Count Should Not Be Empty ${slice_name} ${rc} ${stdout}= Run and Return RC and Output osm ns-list | grep ${slice_name} | wc -l 2>&1 - log ${stdout} + Log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} + [Return] ${stdout} Get Slice Vnf Ip Addresses @@ -133,16 +133,16 @@ Get Slice Vnf Ip Addresses [Arguments] ${slice_name} # Get all the ns_id in the slice - @{slice_ns_list} Get Slice Ns List ${slice_name} - log many @{slice_ns_list} - @{temp_list}= Create List + @{slice_ns_list} Get Slice Ns List ${slice_name} + Log Many @{slice_ns_list} + @{temp_list}= Create List # For each ns_id in the list, get all the vnf_id and their IP addresses FOR ${ns_id} IN @{slice_ns_list} - log ${ns_id} + Log ${ns_id} @{vnf_id_list} Get Ns Vnf List ${ns_id} # For each vnf_id in the list, get all its IP addresses @{ns_ip_list} Get Ns Ip List @{vnf_id_list} - @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list} + @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list} END Log List ${temp_list} [Return] @{temp_list} @@ -155,10 +155,10 @@ Check For Network Slice Instance To Configured ... Execution example: ... Check For Network Slice Instance To Configured \${slice_name} - [Arguments] ${slice_name} + [Arguments] ${slice_name} ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}" - log ${stdout} + Log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} Should Contain Any ${stdout} READY BROKEN configured @@ -170,10 +170,10 @@ Check For Network Slice Instance For Failure ... Execution example: ... Check For Network Slice Instance For Failure \${slice_name} - [Arguments] ${slice_name} + [Arguments] ${slice_name} ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}" - log ${stdout} + Log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} Should Not Contain ${stdout} failed @@ -186,15 +186,15 @@ Delete NSI ... Execution example: ... Delete NST \${slice_name} - [Arguments] ${slice_name} ${slice_delete_max_wait_time}=4min + [Arguments] ${slice_name} ${slice_delete_max_wait_time}=4min ${rc} ${stdout}= Run and Return RC and Output osm nsi-delete ${slice_name} - log ${stdout} + Log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} ${slice_delete_max_wait_time}= Convert Time ${slice_delete_max_wait_time} result_format=number ${slice_delete_max_wait_time}= Evaluate ${slice_delete_max_wait_time} * ${vim_timeout_multiplier} - WAIT UNTIL KEYWORD SUCCEEDS ${slice_delete_max_wait_time} ${slice_delete_pol_time} Check For Network Slice Instance To Be Deleted ${slice_name} + WAIT UNTIL KEYWORD SUCCEEDS ${slice_delete_max_wait_time} ${slice_delete_pol_time} Check For Network Slice Instance To Be Deleted ${slice_name} Check For Network Slice Instance To Be Deleted @@ -204,7 +204,7 @@ Check For Network Slice Instance To Be Deleted ... Execution example: ... Check For Network Slice Instance \${slice_name} - [Arguments] ${slice_name} + [Arguments] ${slice_name} ${rc} ${stdout}= Run and Return RC and Output osm nsi-list | awk '{print $2}' | grep ${slice_name} Should Not Be Equal As Strings ${stdout} ${slice_name}