- [Documentation] Execute a manual VNF Scale action.
- ... The parameter 'scale_type' must be SCALE_IN or SCALE_OUT.
- ... Return the ID of the operation associated to the executed scale action.
-
- [Arguments] ${ns_name} ${vnf_member_index} ${scaling_group} ${scale_type}
-
- Should Contain Any ${scale_type} SCALE_IN SCALE_OUT msg=Unknown scale type: ${scale_type} values=False
- ${osm_vnf_scale_command}= Set Variable osm vnf-scale --scaling-group ${scaling_group}
- ${osm_vnf_scale_command}= Run Keyword If '${scale_type}'=='SCALE_IN' Catenate ${osm_vnf_scale_command} --scale-in
- ... ELSE Catenate ${osm_vnf_scale_command} --scale-out
- ${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 ${vnf_scale_max_wait_time} ${vnf_scale_pol_time} Check For NS Operation Completed ${stdout}
- [Return] ${stdout}
+ [Documentation] Execute a manual VNF Scale action.
+ ... The parameter 'scale_type' must be SCALE_IN or SCALE_OUT.
+ ... Return the ID of the operation associated to the executed scale action.
+
+ [Arguments] ${ns_name} ${vnf_member_index} ${scaling_group} ${scale_type} ${vnf_scale_max_wait_time}=2min
+
+ ${vnf_scale_max_wait_time}= Convert Time ${vnf_scale_max_wait_time} result_format=number
+ ${vnf_scale_max_wait_time}= Evaluate ${vnf_scale_max_wait_time} * ${vim_timeout_multiplier}
+ Should Contain Any ${scale_type} SCALE_IN SCALE_OUT msg=Unknown scale type: ${scale_type} values=False
+ ${osm_vnf_scale_command}= Set Variable osm vnf-scale --scaling-group ${scaling_group}
+ ${osm_vnf_scale_command}= Run Keyword If '${scale_type}'=='SCALE_IN' Catenate ${osm_vnf_scale_command} --scale-in
+ ... ELSE Catenate ${osm_vnf_scale_command} --scale-out
+ ${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 ${vnf_scale_max_wait_time} ${vnf_scale_pol_time} Check For NS Operation Ended ${stdout}
+ Check For NS Operation Completed ${stdout}
+ [Return] ${stdout}
+
+
+Heal Network Service
+ [Documentation] Execute healing operation over one NS.
+ ... Return the ID of the operation associated to the executed healing action.
+
+ [Arguments] ${ns_name} ${params} ${healing_max_wait_time}=10m
+
+ Should Not Be Empty ${ns_name}
+ Should Not Be Empty ${params}
+ ${healing_max_wait_time}= Convert Time ${healing_max_wait_time} result_format=number
+ ${healing_max_wait_time}= Evaluate ${healing_max_wait_time} * ${vim_timeout_multiplier}
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-heal ${ns_name} ${params}
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ Wait Until Keyword Succeeds ${healing_max_wait_time} ${healing_pol_time} Check For NS Operation Ended ${stdout}
+ Check For NS Operation Completed ${stdout}
+ [Return] ${stdout}