WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For NS Instance To Configured ${ns_name}
Check For NS Instance For Failure ${ns_name}
WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For NS Instance To Configured ${ns_name}
Check For NS Instance For Failure ${ns_name}
${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args}
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args}
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${rc} ${stdout}= Run and Return RC and Output osm ns-update ${ns_id} --updatetype ${update_type} --config ${ns_update_config} --timeout ${ns_update_timeout} --wait
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${rc} ${stdout}= Run and Return RC and Output osm ns-update ${ns_id} --updatetype ${update_type} --config ${ns_update_config} --timeout ${ns_update_timeout} --wait
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${rc} ${stdout}= Run and Return RC and Output osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${rc} ${stdout}= Run and Return RC and Output osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${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}
${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}
Should Not Be Empty ${ns_id}
@{vnf_list_string}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
# Returns a String of vnf_id and needs to be converted into a list
Should Not Be Empty ${ns_id}
@{vnf_list_string}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
# Returns a String of vnf_id and needs to be converted into a list
@{vnf_ip_list_string}= run and return rc and output osm vnf-list --filter id=${vnf_id} | grep -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' | sort -t: -u -k1,1 2>&1
# returns a string of ip addresses and needs to be converted into a list
should not be empty ${vnf_ip_list_string}[1]
@{vnf_ip_list_string}= run and return rc and output osm vnf-list --filter id=${vnf_id} | grep -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' | sort -t: -u -k1,1 2>&1
# returns a string of ip addresses and needs to be converted into a list
should not be empty ${vnf_ip_list_string}[1]
- [Documentation] Execute an action over the desired NS.
- ... Parameters are given to this function in key=value format (one argument per key/value pair).
- ... Return the ID of the operation associated to the executed action.
- ... Examples of execution:
- ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index}
- ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index} \${param1}=\${value1} \${param2}=\${value2}
-
- [Arguments] ${ns_name} ${ns_action} ${vnf_member_index} @{action_params}
-
- ${params}= Set Variable ${EMPTY}
- FOR ${param} IN @{action_params}
- ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in parameters
- ${params}= Catenate SEPARATOR= ${params} "${param_name}":"${param_value}",
+ [Documentation] Execute an action over the desired NS.
+ ... Parameters are given to this function in key=value format (one argument per key/value pair).
+ ... Return the ID of the operation associated to the executed action.
+ ... Examples of execution:
+ ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index}
+ ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index} \${param1}=\${value1} \${param2}=\${value2}
+
+ [Arguments] ${ns_name} ${ns_action} ${vnf_member_index} @{action_params}
+
+ ${params}= Set Variable ${EMPTY}
+ FOR ${param} IN @{action_params}
+ ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in parameters
+ ${params}= Catenate SEPARATOR= ${params} "${param_name}":"${param_value}",
- ${osm_ns_action_command}= Set Variable osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index}
- ${osm_ns_action_command}= Run Keyword If '${params}'!='${EMPTY}' Catenate ${osm_ns_action_command} --params '{${params}}'
- ... ELSE Set Variable ${osm_ns_action_command}
- ${osm_ns_action_command}= Catenate ${osm_ns_action_command} ${ns_name}
- ${rc} ${stdout}= Run and Return RC and Output ${osm_ns_action_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 Ended ${stdout}
- Check For NS Operation Completed ${stdout}
- [Return] ${stdout}
+ ${osm_ns_action_command}= Set Variable osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index}
+ ${osm_ns_action_command}= Run Keyword If '${params}'!='${EMPTY}' Catenate ${osm_ns_action_command} --params '{${params}}'
+ ... ELSE Set Variable ${osm_ns_action_command}
+ ${osm_ns_action_command}= Catenate ${osm_ns_action_command} ${ns_name}
+ ${rc} ${stdout}= Run and Return RC and Output ${osm_ns_action_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 Ended ${stdout}
+ Check For NS Operation Completed ${stdout}
+ [Return] ${stdout}
- [Documentation] Execute an action over the desired K8s NS.
- ... Parameters are given to this function in key=value format (one argument per key/value pair).
- ... Return the ID of the operation associated to the executed action.
- ... Examples of execution:
- ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index}
- ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index} \${param1}=\${value1} \${param2}=\${value2}
-
- [Arguments] ${ns_name} ${ns_action} ${vnf_member_index} ${kdu_name} @{action_params}
-
- ${params}= Set Variable ${EMPTY}
- FOR ${param} IN @{action_params}
- ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in parameters
- ${params}= Catenate SEPARATOR= ${params} "${param_name}":"${param_value}",
+ [Documentation] Execute an action over the desired K8s NS.
+ ... Parameters are given to this function in key=value format (one argument per key/value pair).
+ ... Return the ID of the operation associated to the executed action.
+ ... Examples of execution:
+ ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index}
+ ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index} \${param1}=\${value1} \${param2}=\${value2}
+
+ [Arguments] ${ns_name} ${ns_action} ${vnf_member_index} ${kdu_name} @{action_params}
+
+ ${params}= Set Variable ${EMPTY}
+ FOR ${param} IN @{action_params}
+ ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in parameters
+ ${params}= Catenate SEPARATOR= ${params} "${param_name}":"${param_value}",
- ${osm_ns_action_command}= Set Variable osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index} --kdu_name ${kdu_name}
- ${osm_ns_action_command}= Run Keyword If '${params}'!='${EMPTY}' Catenate ${osm_ns_action_command} --params '{${params}}'
- ... ELSE Set Variable ${osm_ns_action_command}
- ${osm_ns_action_command}= Catenate ${osm_ns_action_command} ${ns_name}
- ${rc} ${stdout}= Run and Return RC and Output ${osm_ns_action_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 Ended ${stdout}
- Check For NS Operation Completed ${stdout}
- [Return] ${stdout}
+ ${osm_ns_action_command}= Set Variable osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index} --kdu_name ${kdu_name}
+ ${osm_ns_action_command}= Run Keyword If '${params}'!='${EMPTY}' Catenate ${osm_ns_action_command} --params '{${params}}'
+ ... ELSE Set Variable ${osm_ns_action_command}
+ ${osm_ns_action_command}= Catenate ${osm_ns_action_command} ${ns_name}
+ ${rc} ${stdout}= Run and Return RC and Output ${osm_ns_action_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 Ended ${stdout}
+ 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.
+ [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}
[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}
+ 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}
- [Documentation] Execute healing operation over one NS.
- ... Return the ID of the operation associated to the executed healing action.
+ [Documentation] Execute healing operation over one NS.
+ ... Return the ID of the operation associated to the executed healing action.
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}
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}
+ ${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}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-list ${ns_name}
- log ${stdout}
- log ${rc}
- Should Be Equal As Integers ${rc} ${success_return_code}
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-list ${ns_name}
+ log ${stdout}
+ log ${rc}
+ Should Be Equal As Integers ${rc} ${success_return_code}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Contain ${stdout} COMPLETED msg=The ns-action with id ${ns_operation_id} was not completed values=False
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
+ log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ Should Contain ${stdout} COMPLETED msg=The ns-action with id ${ns_operation_id} was not completed values=False
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Contain ${stdout} FAILED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
+ log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ Should Contain ${stdout} FAILED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Contain Any ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
+ log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ Should Contain Any ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- @{vdur} = Split String ${stdout}
- [Return] @{vdur}
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ @{vdur} = Split String ${stdout}
+ [Return] @{vdur}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq .vdur[].name | tr -d \\"
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- @{vdur} = Split String ${stdout}
- [Return] @{vdur}
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq .vdur[].name | tr -d \\"
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ @{vdur} = Split String ${stdout}
+ [Return] @{vdur}
[Arguments] ${vnf_id} ${kdu_name}
Should Not Be Empty ${vnf_id}
Should Not Be Empty ${kdu_name}
[Arguments] ${vnf_id} ${kdu_name}
Should Not Be Empty ${vnf_id}
Should Not Be Empty ${kdu_name}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq .config.replicaCount | tr -d \\"
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- ${return} = Set Variable If '${stdout}' == 'null' ${EMPTY} ${stdout}
- [Return] ${return}
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq .config.replicaCount | tr -d \\"
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ ${return} = Set Variable If '${stdout}' == 'null' ${EMPTY} ${stdout}
+ [Return] ${return}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq ._admin.deployed.VCA[].application | tr -d \\"
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- @{app_names} = Split String ${stdout}
- [Return] ${app_names}
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq ._admin.deployed.VCA[].application | tr -d \\"
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ @{app_names} = Split String ${stdout}
+ [Return] ${app_names}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${affinity_group_name} values=False
[Return] ${affinity_group_name}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${affinity_group_name} values=False
[Return] ${affinity_group_name}