X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fnsi_lib.robot;h=5bdd17bad35d0604e4994301a15ecd935700ffa6;hb=f4ebaa88025189ede4f073ab8a1f27c95efff867;hp=7d5f8fa73727d4894e9628e64f9391ffefa20293;hpb=d19692e1b4cb166c09aece8925b67a22724210b2;p=osm%2Ftests.git diff --git a/robot-systest/lib/nsi_lib.robot b/robot-systest/lib/nsi_lib.robot index 7d5f8fa..5bdd17b 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 *** @@ -49,7 +49,7 @@ Create Network Slice 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 @@ -67,7 +67,7 @@ Instantiate Network Slice ${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} 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 @@ -120,7 +120,7 @@ Get Slice Ns Count ${rc} ${stdout}= Run and Return RC and Output osm ns-list | grep ${slice_name} | wc -l 2>&1 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} + @{slice_ns_list} Get Slice Ns List ${slice_name} log many @{slice_ns_list} - @{temp_list}= Create 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} @{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,12 +155,12 @@ 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} Should Be Equal As Integers ${rc} ${success_return_code} - Should Contain Any ${stdout} READY BROKEN configured + Should Contain Any ${stdout} READY BROKEN configured Check For Network Slice Instance For Failure @@ -170,7 +170,7 @@ 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} @@ -186,7 +186,7 @@ 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} @@ -194,7 +194,7 @@ Delete NSI ${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}