projects
/
osm
/
tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ns_lib: added env variable to modify timeouts depending on VIM
[osm/tests.git]
/
robot-systest
/
lib
/
ns_lib.robot
diff --git
a/robot-systest/lib/ns_lib.robot
b/robot-systest/lib/ns_lib.robot
index
8acdb46
..
065a562
100644
(file)
--- a/
robot-systest/lib/ns_lib.robot
+++ b/
robot-systest/lib/ns_lib.robot
@@
-10,20
+10,29
@@
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
+*** Settings ***
+Documentation Library to deploy and delete NS, and run operations on them.
+
+Library DateTime
+
+
*** Variables ***
${success_return_code} 0
${ns_launch_pol_time} 30sec
*** Variables ***
${success_return_code} 0
${ns_launch_pol_time} 30sec
-${ns_delete_max_wait_time} 4min
${ns_delete_pol_time} 15sec
${ns_action_max_wait_time} 1min
${ns_action_pol_time} 15sec
${vnf_scale_pol_time} 15sec
${ns_delete_pol_time} 15sec
${ns_action_max_wait_time} 1min
${ns_action_pol_time} 15sec
${vnf_scale_pol_time} 15sec
+${vim_timeout_multiplier} %{OSM_VIM_MULTIPLIER_TIMEOUT=1.0}
*** Keywords ***
Create Network Service
*** Keywords ***
Create Network Service
- [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey}
${ns_launch_max_wait_time}=5min
${config_file}=${EMPTY}
+ [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey}
${ns_launch_max_wait_time}=5min
${config_file}=${EMPTY}
+ ${ns_launch_max_wait_time}= Convert Time ${ns_launch_max_wait_time} result_format=number
+ ${ns_launch_max_wait_time}= Evaluate ${ns_launch_max_wait_time} * ${vim_timeout_multiplier}
+ Log ${ns_launch_max_wait_time}
${config_attr} Set Variable If '${ns_config}'!='${EMPTY}' --config '${ns_config}' \
${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \
${config_file_attr} Set Variable If '${config_file}'!='${EMPTY}' --config_file '${config_file}' \
${config_attr} Set Variable If '${ns_config}'!='${EMPTY}' --config '${ns_config}' \
${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \
${config_file_attr} Set Variable If '${config_file}'!='${EMPTY}' --config_file '${config_file}' \
@@
-128,11
+137,14
@@
Check For NS Instance To Be Deleted
Should Not Be Equal As Strings ${stdout} ${ns}
Delete NS
Should Not Be Equal As Strings ${stdout} ${ns}
Delete NS
- [Documentation] Delete ns
- [Arguments]
${ns}
+ [Documentation]
Delete ns
+ [Arguments]
${ns} ${ns_delete_max_wait_time}=4min
+ ${ns_delete_max_wait_time}= Convert Time ${ns_delete_max_wait_time} result_format=number
+ ${ns_delete_max_wait_time}= Evaluate ${ns_delete_max_wait_time} * ${vim_timeout_multiplier}
+ Log ${ns_delete_max_wait_time}
${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns}
${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns}
-
l
og ${stdout}
+
L
og ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Deleted ${ns}
Should Be Equal As Integers ${rc} ${success_return_code}
WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Deleted ${ns}