${ns_delete_pol_time} 15sec
${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
+${vnf_scale_max_wait_time} 2min
+${vnf_scale_pol_time} 15sec
*** Keywords ***
Create Network Service
- [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey} ${ns_launch_max_wait_time}=${default_ns_launch_max_wait_time} ${config_file}=${EMPTY}
+ [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey} ${ns_launch_max_wait_time}=5min ${config_file}=${EMPTY}
${config_attr} Set Variable If '${ns_config}'!='${EMPTY}' --config '${ns_config}' \
${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \
${osm_vnf_scale_command}= Catenate ${osm_vnf_scale_command} ${ns_name} ${vnf_member_index}
${rc} ${stdout}= Run and Return RC and Output ${osm_vnf_scale_command}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- Wait Until Keyword Succeeds ${ns_action_max_wait_time} ${ns_action_pol_time} Check For NS Operation Completed ${stdout}
+ Wait Until Keyword Succeeds ${vnf_scale_max_wait_time} ${vnf_scale_pol_time} Check For NS Operation Completed ${stdout}
[Return] ${stdout}
@{vdur} = Split String ${stdout}
[Return] @{vdur}
+
+Get Vnf Kdu Replica Count
+ [Documentation] Return the number of KDU replicas (empty if none) of a VNF instance.
+
+ [Arguments] ${vnf_id} ${kdu_name}
+
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq r - config.replicaCount
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ [Return] ${stdout}
+