X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fns_lib.robot;h=71268111f10d84dcad04831ce7c1702c934a05f9;hb=74181401ccc81d7d696637b6ea8a86061e87881a;hp=d0b9d5334ca802785e296fff654e0e2ac53676d7;hpb=c88e004791675692aa7eba25800350b19720d5fd;p=osm%2Ftests.git diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot index d0b9d53..7126811 100644 --- a/robot-systest/lib/ns_lib.robot +++ b/robot-systest/lib/ns_lib.robot @@ -19,11 +19,13 @@ ${ns_action_max_wait_time} 1min ${ns_action_pol_time} 15sec ${vnf_scale_max_wait_time} 5min ${vnf_scale_pol_time} 30sec +# If env variable "OSM_NS_TIMEOUT" exists, it prevails over the default timeout +${default_ns_launch_max_wait_time}= Get Environment Variable OSM_NS_TIMEOUT default=5min *** 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}=${default_ns_launch_max_wait_time} ${config_file}=${EMPTY} ${config_attr} Set Variable If '${ns_config}'!='${EMPTY}' --config '${ns_config}' \ ${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \ @@ -57,6 +59,17 @@ Get Vnf Management Ip Address [Return] ${stdout} +Get Vnf Id + [Arguments] ${ns_id} ${vnf_member_index} + + Should Not Be Empty ${ns_id} + Should Not Be Empty ${vnf_member_index} + ${rc} ${stdout}= Run and Return RC and Output osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $2}' 2>&1 + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + [Return] ${stdout} + + Get Ns Vnf List [Arguments] ${ns_id}