nsi_lib: update timeouts with the env modifier OSM_VIM_MULTIPLIER_TIMEOUT 39/11039/1
authoraguilard <e.dah.tid@telefonica.com>
Thu, 24 Jun 2021 15:36:16 +0000 (17:36 +0200)
committeraguilard <e.dah.tid@telefonica.com>
Thu, 24 Jun 2021 15:36:16 +0000 (17:36 +0200)
Change-Id: I9c7aba1729f77c106c7d856fa773251cbfe4fa7a
Signed-off-by: aguilard <e.dah.tid@telefonica.com>
robot-systest/lib/nsi_lib.robot

index 2169f7f..7d5f8fa 100644 (file)
@@ -19,8 +19,9 @@ Library           Collections
 *** Variables ***
 ${success_return_code}   0
 ${slice_launch_pol_time}   30sec
-${slice_delete_max_wait_time}   4min
 ${slice_delete_pol_time}   15sec
+${vim_timeout_multiplier}   %{OSM_VIM_MULTIPLIER_TIMEOUT=1.0}
+
 
 *** Keywords ***
 
@@ -37,6 +38,8 @@ Create Network Slice
 
     [Arguments]   ${nst}   ${vim_name}   ${slice_name}   ${slice_config}   ${publickey}   ${slice_launch_max_wait_time}=6min   ${config_file}=${EMPTY}
 
+    ${slice_launch_max_wait_time}=   Convert Time   ${slice_launch_max_wait_time}   result_format=number
+    ${slice_launch_max_wait_time}=   Evaluate   ${slice_launch_max_wait_time} * ${vim_timeout_multiplier}
     ${config_attr}   Set Variable If   '${slice_config}'!='${EMPTY}'   --config '${slice_config}'   \
     ${sshkeys_attr}   Set Variable If   '${publickey}'!='${EMPTY}'   --ssh_keys ${publickey}   \
     ${config_file_attr}   Set Variable If   '${config_file}'!='${EMPTY}'   --config_file '${config_file}'   \
@@ -179,15 +182,18 @@ Delete NSI
     [Documentation]   Delete Network Slice Instance (NSI)
     ...               Parameters:
     ...                  slice_name: Name of the slice instance
+    ...                  slice_delete_max_wait_time: Delete operation timeout
     ...               Execution example:
     ...                  Delete NST   \${slice_name}
 
-    [Arguments]  ${slice_name}
+    [Arguments]  ${slice_name}   ${slice_delete_max_wait_time}=4min
 
     ${rc}   ${stdout}=   Run and Return RC and Output   osm nsi-delete ${slice_name}
     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}