[ { "element_type": "resource", "project_name": "NCS", "uuid": "9c34f309-84ce-4b56-9e10-f13160da59e6", "code": "*** Settings ***\n\nResource ../resource/config.robot\nResource ../resource/ssh.robot\nResource ../resource/node.robot\nResource ../resource/ceph.robot\nLibrary yaml\n\n*** Keywords ***\n\n# public keywords ------------------------------------------\n\ncheck_if_workaround_must_be_applied\n ${ta_env}= config.is_test_automation_development_cloud\n Pass Execution If \"${ta_env}\"==\"${FALSE}\" Workarounds are not applied in customer environments\n\n#delete_multus_ippools\n# THIS JIRA IS HANGING OPEN FOREVER. WAITING CORRECTION FROM 3RD PARTY\n# # https://jiradc2.ext.net.nokia.com/browse/NCSFM-410-WAITING-3RD-PARTY\n# ${is_multus}= network.is_active_multus\n# Return From Keyword If \"${is_multus}\"==\"${FALSE}\" ${FALSE}\n# ${r}= network.get_multus_ippools_name_list\n# Log ${r}\n# ${l}= Get Length ${r}\n# Return From Keyword If ${l} == 0 ${FALSE}\n# FOR ${pool} IN @{r}\n# Log Delete pool ${pool}\n# network.delete_multus_ippool ${pool}\n# END\n# Log Check that pools were deleted\n# ${r}= network.get_multus_ippools_name_list\n# Log ${r}\n# [Return] ${TRUE}\n\n#apply_selinux_bmrules\n# workaround.check_if_workaround_must_be_applied\n#\n# ${k8s_nodename_list}= node.get_name_list\n# FOR ${k8s_nodename} IN @{k8s_nodename_list}\n# ${conn}= ssh.open_connection_to_node ${k8s_nodename}\n# ${output}= ssh.send_command ${conn} uptime\n# ssh.close_connection ${conn}\n# Log ${output}\n# END\n#\n#apply_oom_killer\n# # https://jiradc2.ext.net.nokia.com/browse/CSFS-30830\n# [Documentation] apply oom_killer WA\n# ... 0. docker restart bcmt-nginx\n# ... 1. cd /tmp\n# ... 2. helm fetch --untardir /tmp stable/controller-storage\n# ... 3. tar -zxvf controller-storage-1.0.5.tgz\n# ... 4. modify limit inside controller-storage folder /templates/controller.yaml#41\n# ... 5. helm package controller-storage\n# ... 6. helm upgrade controller-storage controller-storage-1.0.5.tgz\n# ... verification:\n# ... 7. kubectl get pods -A |grep storage\n# ... copy pod id\n# ... 8. kubectl get pod storage-controller-7859fb57b5-nn5dn -n kube-system -o yaml |grep -i memory:\n# ... check limit is set properly\n#\n# ${conn}= ssh.open_connection_to_controller\n#\n# #check if memmory is set to 60Mi for storage-controller\n# ${storage_pod}= get_name_list_by_regexp storage-controller kube-system\n# Log ${storage_pod}\n# ${output}= send_command ${conn} sudo kubectl get pod ${storage_pod[0]} -n kube-system -o yaml\n# Log ${output}\n# ${loaded}= yaml.Safe Load ${output}\n# ${spec}= Get From Dictionary ${loaded} spec\n# Log ${spec}\n# ${containers}= Get From Dictionary ${spec} containers\n# Log ${containers}\n# ${resources}= Get From Dictionary ${containers[0]} resources\n# Log ${resources}\n# ${limits}= Get From Dictionary ${resources} limits\n# Log ${limits}\n# ${memory}= Get From Dictionary ${limits} memory\n# Log ${memory}\n# ${output}= yaml.Dump ${loaded}\n#\n# Run Keyword and Return If \"${memory}\"==\"100Mi\" Log To Console ${storage_pod[0]}'s resource limit of memory already set correctly ${memory}\n# Run Keyword If \"${memory}\"==\"30Mi\" Log To Console ${storage_pod[0]}'s resource limit of memory ${memory} need to set 100Mi\n# ${date}= send_command ${conn} date\n# Log To Console ${date}\n# ${output}= send_command ${conn} sudo docker restart bcmt-nginx\n# Log ${output}\n#\n# #modify limit inside controller-storage folder /templates/controller.yaml\n# ${helm_home}= Set Variable --home /opt/bcmt/storage/helm_home\n# ${cmd_fetch}= Set Variable cd /tmp&&helm fetch ${helm_home} --untardir /tmp stable/controller-storage\n# ${output}= send_command ${conn} ${cmd_fetch}\n# Log ${output}\n#\n# ${output}= send_command ${conn} cd /tmp&&ls controller-storage-1.0.?.tgz\n# Log ${output}\n# ${file}= Set Variable ${output.replace('\\n','').strip()}\n#\n# #${output}= send_command ${conn} cd /tmp&&tar -zxvf controller-storage-1.0.5.tgz\n# #${output}= send_command ${conn} cd /tmp&&tar -zxvf ${output}\n# ${output}= send_command ${conn} cd /tmp&&tar -zxvf ${file}\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&cat controller-storage/templates/controller.yaml;\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&sed -i 's/memory: 30Mi/memory: 100Mi/g' controller-storage/templates/controller.yaml\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&cat controller-storage/templates/controller.yaml;\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&helm package ${helm_home} controller-storage\n# Log ${output}\n# #${output}= send_command ${conn} cd /tmp&&helm upgrade ${helm_home} controller-storage controller-storage-1.0.5.tgz\n# ${output}= send_command ${conn} cd /tmp&&helm upgrade ${helm_home} controller-storage ${file}\n# Log ${output}\n# #wait minute that helm upgrade ready for new pod setting\n# sleep 60\n# ${storage_pod}= get_name_list_by_regexp storage-controller kube-system\n# Log ${storage_pod}\n# ${output}= send_command ${conn} sudo kubectl get pod ${storage_pod[0]} -n kube-system -o yaml\n# Log ${output}\n# ${memory}= get regexp matches ${output} memory: 100Mi\n# Log ${memory[0]}\n# Run Keyword If \"${memory[0]}\"==\"memory: 100Mi\" Log To Console ${storage_pod[0]}'s resource limit of memory set to the ${memory[0]}\n# Log To Console WA run successfully - ${storage_pod[0]} ${memory[0]}\n#\n# ssh.close_connection ${conn}\n\n#workaround_bm_cluster_node_not_accessible_after_reboot\n# # https://jiradc2.ext.net.nokia.com/browse/CSFS-33098\n# [Documentation] Run ncs20 WA/PP1\n#\n##get cluster vip IP for service's External IP\n# ${vip}= config.get_controller_vip\n# Log ${vip}\n# should not be equal ${vip} [] External cluster vip address not found!\n# set suite variable ${S_VIP_ADDRESS} ${vip}\n#\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} sudo kubectl get nodes|grep NotReady\n# Log ${output}\n# Run Keyword and Return If \"${output}\"!=\"${EMPTY}\" Log To Console Some of host are Not Ready - check manually ${output} - Run CSFS-33098 WA manually first\n#\n# ${scp}= ssh.open_scp_connection_to_controller\n# ssh.scp_file_to_host ${scp} ncs/20.0/workaround/network_fix.pp network_fix.pp\n# ssh.scp_file_to_host ${scp} ncs/20.0/workaround/network_fix.te network_fix.te\n#\n# ${allnodes}= node.get_name_list\n## ${cmd1}= Set Variable setenforce 0\n## ${cmd2}= Set Variable systemctl restart network\n## ${cmd3}= Set Variable ip r\n# ${cmd10}= Set Variable semodule -i network_fix.pp\n# ${cmd12}= Set Variable semodule -l|grep network\n# #To verify it's loaded run:\n# ${cmd4}= Set Variable semodule -l|grep network\n#\n# ${control_name_list}= node.get_control_name_list\n# Log ${control_name_list}\n# FOR ${n} IN @{control_name_list}\n# ${active_master_found}= check_if_control_node_has_vip ${n} ${vip}\n# log many MASTER_FOUND=${active_master_found}\n# exit for loop if \"${active_master_found}\" == \"${TRUE}\"\n# END\n# ${vipnode}= Set Variable ${n}\n# Log To Console VIP masterbm =${n} ${vip}\n#\n##copy file to nodes expect vipnode and storage nodes\n# FOR ${n} IN @{allnodes}\n# Continue For Loop If \"${n}\"==\"${vipnode}\"\n# ${is_storage}= get regexp matches ${n} storage\n# Log ${is_storage}\n# Continue For Loop If \"${is_storage}\"==\"storage\"\n# #check if network_fix already loaded\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd12}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Run Keyword If \"${output}\"!=\"[]\" Log To Console ${n} ${output} already loaded, skip this host.\n# Continue For Loop If \"${output}\"!=\"[]\"\n# ${cmd5}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.pp root@${n}:/root/\n# ${cmd6}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.te root@${n}:/root/\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd5}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd6}\n# Log ${output}\n# Log To Console Updating ${n}\n# Log ${output}\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd4}\n# Log ${output}\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd10}\n# Log ${output}\n# Sleep 10\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd12}\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output[0]}\n# Log To Console ${n} ${output[0]} loaded.\n# Run Keyword If \"${output[0]}\"!=\"network_fix\" Fail Check manually why network_fix not found\n# Sleep 10\n# END\n#\n##for storage nodes\n# ${storage_host_list}= ceph.get_host_list\n# Log ${storage_host_list}\n#\n# FOR ${n} IN @{storage_host_list}\n# ${storage_host_ip}= ceph.get_host_ip ${n}\n# ${conn}= ssh.open_connection_to_node ${storage_host_ip}\n# ${output}= ssh.send_command ${conn} semodule -l|grep network\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Run Keyword If \"${output}\"!=\"[]\" Log To Console ${n} ${output} already loaded, skip this host.\n# Continue For Loop If \"${output}\"!=\"[]\"\n# Log To Console Updating ${n} ${storage_host_ip}\n#\n# ${cmd5}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.pp root@${storage_host_ip}:/root/\n# ${cmd6}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.te root@${storage_host_ip}:/root/\n#\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd5}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd6}\n# Log ${output}\n# ${conn}= ssh.open_connection_to_node ${storage_host_ip}\n# ${output}= ssh.send_command ${conn} semodule -i network_fix.pp\n# Log ${output}\n# Sleep 20\n# ${conn}= ssh.open_connection_to_node ${storage_host_ip}\n# ${output}= ssh.send_command ${conn} semodule -l|grep network\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Log To Console ${n} ${output[0]} loaded.\n# Run Keyword If \"${output[0]}\"!=\"network_fix\" Fail Check manually why network_fix not found\n# Sleep 10\n# END\n#\n# #run for the lasthost - vip host\n# FOR ${i} IN RANGE 1\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd12}\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Run Keyword If \"${output}\"!=\"[]\" Log To Console vip masterbm ${output} already loaded, skip this host.\n# Continue For Loop If \"${output}\"!=\"[]\"\n# Log To Console Updating the last controller\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd4}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd10}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd12}\n# Log ${output}\n# Log To Console ${vipnode} ${output} loaded.\n# END\n\n#workaround_for_missing_ncs_manager_logs\n# ${is_central}= config.is_centralized_installation\n# Return from Keyword If \"${is_central}\"==\"${TRUE}\" WA is valid only for cluster mode NCS\n#\n# ${logs}= Create List\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_portal.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_management.log\n# #echo > central_replace_manager.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_backup.log\n# #echo > central_mng_backup.log\n# #echo > central_bm_scale_out.log\n# #echo > central_bm_scale_in.log\n# #echo > central_bm_reboot.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_heal.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/add_bm_configuration.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_patch_management.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_status_update.log\n# #echo > central_installation.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_scale_out.log\n# #append to list ${logs} central_management_termination.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_reboot.log\n# #echo > central_status.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/patch_management.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_external_storage_operations.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_scale_in.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_termination.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/ncs_upgrade.log\n#\n# ${controllers}= node.get_control_name_list\n#\n# ${logs_list}= Set Variable ${EMPTY}\n# FOR ${log} IN @{logs}\n# log ${log}\n# ${logs_list}= Set Variable ${logs_list} ${log}\n# END\n# log logs list: ${logs_list}\n#\n# FOR ${node} IN @{controllers}\n# log Open connection to node ${node}\n# ${conn}= ssh.open_connection_to_node ${node}\n# ssh.send_command ${conn} sudo touch ${logs_list}\n# ssh.close_connection ${conn}\n# END\n\n#check_if_sw_is_correct_for_this_wa\n# ${v} ${b}= config.installed_ncs_sw_package\n# Log ${v}\n# Log ${b}\n# Log To Console ${v} ${b}\n# Pass Execution If \"${b}\"!=\"354\" Workarounds is not applied in this enviroment - need NCS21-B275\n#\n#apply_fix_for_ncsfm4229\n# [Arguments] ${node_ip}\n# #### https://jiradc2.ext.net.nokia.com/browse/NCSFM-4229-CLOSED\n# #### Fix first-call issue after fresh install in python library causing dns issue\n# ${cmd1}= Set Variable sudo kubectl get secret -n ncms harbor-harbor-core -ojson\n# ${conn}= ssh.open_connection_to_node ${node_ip}\n# ${output}= ssh.send_command ${conn} ${cmd1}\n# ${harborinfo}= pythonFunctions.convert_json_to_dict ${output}\n# ${data}= Get From Dictionary ${harborinfo} data\n# ${passwd}= Get From Dictionary ${data} HARBOR_ADMIN_PASSWORD\n# ${cmd2}= Set Variable sudo echo ${passwd} | base64 -d\n# ${base64}= ssh.send_command ${conn} ${cmd2}\n#\n# ${scp}= open_scp_connection_to_controller ${node_ip}\n# ssh.scp_file_to_host ${scp} 22.0/workaround/credentials.json /tmp/\n# ssh.close_scp_connection ${scp}\n#\n# ${cmd}= Set Variable sudo chmod 666 /tmp/credentials.json;sed -i '/password/s/###password###/${base64}/' /tmp/credentials.json;cat /tmp/credentials.json\n# ${res}= ssh.send_command ${conn} ${cmd}\n# ${cmd}= Set Variable sudo curl -v --unix-socket /run/podman/podman.sock http://v1.40/auth -H \"accept: application/json\" -H \"Content-Type: application/json\" -X POST -d@/tmp/credentials.json\n# ${output}= ssh.send_command ${conn} ${cmd}\n# Log ${output}\n# ${check}= Get Regexp Matches ${output} (Login Succeeded) 1\n# Run Keyword If \"${check}\"==\"[]\" Fail Unable to fix NCSFM-4229-CLOSED\n# ssh.close_connection ${conn}\n\n#apply_fix_for_ncsfm16152\n# #### https://jiradc2.ext.net.nokia.com/browse/NCSFM-16152\n# #### install missing sshpass rpm\n# ${file}= Set Variable sshpass-1.09-4.el8ap.x86_64.rpm\n# ${server}= config.ncm_fileserver_address\n# ${fileserver_address}= config.get_ncm_fileserver_addr ${server}\n# ${is_ipv6}= config.is_ipv6_installation\n# IF \"${is_ipv6}\" == \"${FALSE}\"\n# ${wget_cmd}= Set Variable sudo wget ${fileserver_address}/${file}\n# ELSE IF \"${is_ipv6}\" == \"${TRUE}\"\n# ${wget_cmd}= Set Variable sudo wget -6 ${fileserver_address}/${file}\n# END\n#\n# ${username}= config.ncm_cluster_node_username\n# ${status}= image.get_file_as_named ${file}\n# ${is_baremetal_installation}= config.is_baremetal_installation\n# IF \"${is_baremetal_installation}\"==\"${TRUE}\"\n# ${cluster_name}= node.get_management_cluster_name\n# ${inven}= node.get_inventory_dict ${cluster_name}\n# ${node_list}= node.get_manager_node_list ${inven}\n# ELSE\n# ${node_list}= node.get_control_name_list\n# END\n#\n# FOR ${item} IN @{node_list}\n# #log ${item}\n# ${conn}= ssh.open_connection_to_node ${item}\n# #${cmd1}= Set Variable scp -B ${file} ${username}@${item}:.\n# ${res}= ssh.send_command ${conn} ${wget_cmd}\n# ${cmd2}= Set Variable sudo yum localinstall -y ${file}\n# ${res}= ssh.send_command ${conn} ${cmd2}\n# ssh.close_connection ${conn}\n# END\n\n\n\n\n\n#apply_fix_for_ncsfm8895\n# #### https://jiradc2.ext.net.nokia.com/browse/NCSFM-8895-CLOSED\n# #### Fixes missing of cluster local backup file from expected targer folder in NCS22.12 C5 build 185.\n#\t${vip}= config.get_controller_vip\n# Log ${vip}\n# ${deplo_ip}= config.ncm_deployment_server_ip\n# Log ${deplo_ip}\n# ${mode}= config.ncs_config_mode\n# Log ${mode}\n# ${scp}= IF \"${mode}\"!=\"config5\" open_scp_connection_to_controller ELSE open_scp_connection_to_deployment_server\n# ssh.scp_file_to_host ${scp} 22.0/workaround/fix_scheduled_backups.yaml /tmp/\n# ssh.close_scp_connection ${scp}\n#\t${conn}= IF \"${mode}\"!=\"config5\" open_connection_to_controller ELSE open_connection_to_deployment_server\n#\t${cmd}= Set Variable sudo cat /tmp/fix_scheduled_backups.yaml\n#\t${res}= ssh.send_command ${conn} ${cmd}\n#\tLog ${S_CLUSTER_NAME}\n#\t${cmd}= Set Variable cd /tmp/;sudo /usr/local/bin/openstack-ansible --timeout=60 -b -u cbis-admin fix_scheduled_backups.yaml --private-key=/home/cbis-admin/.ssh/id_rsa -i /opt/openstack-ansible/inventory/${S_CLUSTER_NAME}/${S_CLUSTER_NAME}.sh --extra-vars \"cluster_name=${S_CLUSTER_NAME}\"\n#\t${res}= ssh.send_command ${conn} ${cmd}\n#\tssh.close_connection ${conn}\n# ${all_masters}= node.get_control_name_list\n#\tLog ${all_masters}\n# FOR ${master} IN @{all_masters}\n# ${node_ip}= node.get_oam_ip ${master}\n# Log ${node_ip}\n#\t\t ${scp}= open_scp_connection_to_controller ${node_ip}\n#\t\t ssh.scp_file_to_host ${scp} 22.0/workaround/fixed_handle_local_backup_copy.py /tmp/\n#\t\t ssh.close_scp_connection ${scp}\n#\t\t ${conn}= ssh.open_connection_to_node ${node_ip}\n#\t\t ${cmd1}= Set Variable sudo cp /usr/lib/python3.6/site-packages/cbis_common/cbis_storage/handle_local_backup_copy.py /usr/lib/python3.6/site-packages/cbis_common/cbis_storage/original_handle_local_backup_copy.py\n#\t\t ${res}= ssh.send_command ${conn} ${cmd1}\n# ${cmd2}= Set Variable sudo bash -c 'cat /tmp/fixed_handle_local_backup_copy.py > /usr/lib/python3.6/site-packages/cbis_common/cbis_storage/handle_local_backup_copy.py'\n#\t\t ${res}= ssh.send_command ${conn} ${cmd2}\n#\t\t ssh.close_connection ${conn}\n# END\n\n# internal keywords ----------------------------------------\n# never call these from outside of this module\n\n# not yet\n\ninternal_restart_cpu-device-plugin_pod\n [Arguments] ${node}\n ${pods}= pod.get_by_node_and_namespace_name_list ${node} kube-system\n Log ${pods}\n ${p}= get matches ${pods} cpu-device-plugin*\n Log Restart pod: ${p}[0] on node ${node}\n pod.delete ${p}[0] kube-system\n\ninternal_run_calico_in_all_masters\n [Arguments] ${master_ip_list}\n FOR ${m} IN @{master_ip_list}\n ${output}= ssh.send_command_to_controller ${m} ./${S_CALICO_CLEANUP_SCRIPT}\n Log Master node: ${m}\n Log ${output}\n END\n\n#check_if_control_node_has_vip\n# [Documentation] Checks if selected control node has an external vip address active\n# [Arguments] ${nodename} ${vip}\n# ${oam_ip}= node.get_oam_ip ${nodename}\n# ${conn}= ssh.open_connection_to_node ${oam_ip}\n# ${std_out}= ssh.send_command ${conn} sudo ip a\n# log many STD_OUT=${std_out}\n# ssh.close_connection ${conn}\n# ${all_lines}= string.Split To Lines ${std_out}\n# FOR ${line} IN @{all_lines}\n# ${find_vip}= String.Get Regexp Matches String.Get Regexp Matches ${line} (${vip})\\\\/ 1\n# return from keyword if \"${find_vip}\"!=\"[]\" ${TRUE}\n# END\n# [Return] ${FALSE}\n\n#sort_out_node_ipv4_address\n# [Documentation] Sorting out node oam IPV4 addresses.\n# [Arguments] ${node}\n# ${node_ip}= node.get_oam_ip ${node}\n# Log ${node_ip}\n# [Return] ${node_ip}\n", "name": "workaround/workaround.robot", "imports_file_locations": "{'../resource/config.robot': 'resource/config.robot', '../resource/ssh.robot': 'resource/ssh.robot', '../resource/node.robot': 'resource/node.robot', '../resource/ceph.robot': 'resource/ceph.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/workaround/workaround.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d3222f52-98e7-43fe-9ff1-c0168b0a4986", "code": "check_if_workaround_must_be_applied\n ${ta_env}= config.is_test_automation_development_cloud\n Pass Execution If \"${ta_env}\"==\"${FALSE}\" Workarounds are not applied in customer environments\n\n#delete_multus_ippools\n# THIS JIRA IS HANGING OPEN FOREVER. WAITING CORRECTION FROM 3RD PARTY\n# # https://jiradc2.ext.net.nokia.com/browse/NCSFM-410-WAITING-3RD-PARTY\n# ${is_multus}= network.is_active_multus\n# Return From Keyword If \"${is_multus}\"==\"${FALSE}\" ${FALSE}\n# ${r}= network.get_multus_ippools_name_list\n# Log ${r}\n# ${l}= Get Length ${r}\n# Return From Keyword If ${l} == 0 ${FALSE}\n# FOR ${pool} IN @{r}\n# Log Delete pool ${pool}\n# network.delete_multus_ippool ${pool}\n# END\n# Log Check that pools were deleted\n# ${r}= network.get_multus_ippools_name_list\n# Log ${r}\n# [Return] ${TRUE}\n\n#apply_selinux_bmrules\n# workaround.check_if_workaround_must_be_applied\n#\n# ${k8s_nodename_list}= node.get_name_list\n# FOR ${k8s_nodename} IN @{k8s_nodename_list}\n# ${conn}= ssh.open_connection_to_node ${k8s_nodename}\n# ${output}= ssh.send_command ${conn} uptime\n# ssh.close_connection ${conn}\n# Log ${output}\n# END\n#\n#apply_oom_killer\n# # https://jiradc2.ext.net.nokia.com/browse/CSFS-30830\n# [Documentation] apply oom_killer WA\n# ... 0. docker restart bcmt-nginx\n# ... 1. cd /tmp\n# ... 2. helm fetch --untardir /tmp stable/controller-storage\n# ... 3. tar -zxvf controller-storage-1.0.5.tgz\n# ... 4. modify limit inside controller-storage folder /templates/controller.yaml#41\n# ... 5. helm package controller-storage\n# ... 6. helm upgrade controller-storage controller-storage-1.0.5.tgz\n# ... verification:\n# ... 7. kubectl get pods -A |grep storage\n# ... copy pod id\n# ... 8. kubectl get pod storage-controller-7859fb57b5-nn5dn -n kube-system -o yaml |grep -i memory:\n# ... check limit is set properly\n#\n# ${conn}= ssh.open_connection_to_controller\n#\n# #check if memmory is set to 60Mi for storage-controller\n# ${storage_pod}= get_name_list_by_regexp storage-controller kube-system\n# Log ${storage_pod}\n# ${output}= send_command ${conn} sudo kubectl get pod ${storage_pod[0]} -n kube-system -o yaml\n# Log ${output}\n# ${loaded}= yaml.Safe Load ${output}\n# ${spec}= Get From Dictionary ${loaded} spec\n# Log ${spec}\n# ${containers}= Get From Dictionary ${spec} containers\n# Log ${containers}\n# ${resources}= Get From Dictionary ${containers[0]} resources\n# Log ${resources}\n# ${limits}= Get From Dictionary ${resources} limits\n# Log ${limits}\n# ${memory}= Get From Dictionary ${limits} memory\n# Log ${memory}\n# ${output}= yaml.Dump ${loaded}\n#\n# Run Keyword and Return If \"${memory}\"==\"100Mi\" Log To Console ${storage_pod[0]}'s resource limit of memory already set correctly ${memory}\n# Run Keyword If \"${memory}\"==\"30Mi\" Log To Console ${storage_pod[0]}'s resource limit of memory ${memory} need to set 100Mi\n# ${date}= send_command ${conn} date\n# Log To Console ${date}\n# ${output}= send_command ${conn} sudo docker restart bcmt-nginx\n# Log ${output}\n#\n# #modify limit inside controller-storage folder /templates/controller.yaml\n# ${helm_home}= Set Variable --home /opt/bcmt/storage/helm_home\n# ${cmd_fetch}= Set Variable cd /tmp&&helm fetch ${helm_home} --untardir /tmp stable/controller-storage\n# ${output}= send_command ${conn} ${cmd_fetch}\n# Log ${output}\n#\n# ${output}= send_command ${conn} cd /tmp&&ls controller-storage-1.0.?.tgz\n# Log ${output}\n# ${file}= Set Variable ${output.replace('\\n','').strip()}\n#\n# #${output}= send_command ${conn} cd /tmp&&tar -zxvf controller-storage-1.0.5.tgz\n# #${output}= send_command ${conn} cd /tmp&&tar -zxvf ${output}\n# ${output}= send_command ${conn} cd /tmp&&tar -zxvf ${file}\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&cat controller-storage/templates/controller.yaml;\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&sed -i 's/memory: 30Mi/memory: 100Mi/g' controller-storage/templates/controller.yaml\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&cat controller-storage/templates/controller.yaml;\n# Log ${output}\n# ${output}= send_command ${conn} cd /tmp&&helm package ${helm_home} controller-storage\n# Log ${output}\n# #${output}= send_command ${conn} cd /tmp&&helm upgrade ${helm_home} controller-storage controller-storage-1.0.5.tgz\n# ${output}= send_command ${conn} cd /tmp&&helm upgrade ${helm_home} controller-storage ${file}\n# Log ${output}\n# #wait minute that helm upgrade ready for new pod setting\n# sleep 60\n# ${storage_pod}= get_name_list_by_regexp storage-controller kube-system\n# Log ${storage_pod}\n# ${output}= send_command ${conn} sudo kubectl get pod ${storage_pod[0]} -n kube-system -o yaml\n# Log ${output}\n# ${memory}= get regexp matches ${output} memory: 100Mi\n# Log ${memory[0]}\n# Run Keyword If \"${memory[0]}\"==\"memory: 100Mi\" Log To Console ${storage_pod[0]}'s resource limit of memory set to the ${memory[0]}\n# Log To Console WA run successfully - ${storage_pod[0]} ${memory[0]}\n#\n# ssh.close_connection ${conn}\n\n#workaround_bm_cluster_node_not_accessible_after_reboot\n# # https://jiradc2.ext.net.nokia.com/browse/CSFS-33098\n# [Documentation] Run ncs20 WA/PP1\n#\n##get cluster vip IP for service's External IP\n# ${vip}= config.get_controller_vip\n# Log ${vip}\n# should not be equal ${vip} [] External cluster vip address not found!\n# set suite variable ${S_VIP_ADDRESS} ${vip}\n#\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} sudo kubectl get nodes|grep NotReady\n# Log ${output}\n# Run Keyword and Return If \"${output}\"!=\"${EMPTY}\" Log To Console Some of host are Not Ready - check manually ${output} - Run CSFS-33098 WA manually first\n#\n# ${scp}= ssh.open_scp_connection_to_controller\n# ssh.scp_file_to_host ${scp} ncs/20.0/workaround/network_fix.pp network_fix.pp\n# ssh.scp_file_to_host ${scp} ncs/20.0/workaround/network_fix.te network_fix.te\n#\n# ${allnodes}= node.get_name_list\n## ${cmd1}= Set Variable setenforce 0\n## ${cmd2}= Set Variable systemctl restart network\n## ${cmd3}= Set Variable ip r\n# ${cmd10}= Set Variable semodule -i network_fix.pp\n# ${cmd12}= Set Variable semodule -l|grep network\n# #To verify it's loaded run:\n# ${cmd4}= Set Variable semodule -l|grep network\n#\n# ${control_name_list}= node.get_control_name_list\n# Log ${control_name_list}\n# FOR ${n} IN @{control_name_list}\n# ${active_master_found}= check_if_control_node_has_vip ${n} ${vip}\n# log many MASTER_FOUND=${active_master_found}\n# exit for loop if \"${active_master_found}\" == \"${TRUE}\"\n# END\n# ${vipnode}= Set Variable ${n}\n# Log To Console VIP masterbm =${n} ${vip}\n#\n##copy file to nodes expect vipnode and storage nodes\n# FOR ${n} IN @{allnodes}\n# Continue For Loop If \"${n}\"==\"${vipnode}\"\n# ${is_storage}= get regexp matches ${n} storage\n# Log ${is_storage}\n# Continue For Loop If \"${is_storage}\"==\"storage\"\n# #check if network_fix already loaded\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd12}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Run Keyword If \"${output}\"!=\"[]\" Log To Console ${n} ${output} already loaded, skip this host.\n# Continue For Loop If \"${output}\"!=\"[]\"\n# ${cmd5}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.pp root@${n}:/root/\n# ${cmd6}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.te root@${n}:/root/\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd5}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd6}\n# Log ${output}\n# Log To Console Updating ${n}\n# Log ${output}\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd4}\n# Log ${output}\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd10}\n# Log ${output}\n# Sleep 10\n# ${conn}= ssh.open_connection_to_node ${n}\n# ${output}= ssh.send_command ${conn} ${cmd12}\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output[0]}\n# Log To Console ${n} ${output[0]} loaded.\n# Run Keyword If \"${output[0]}\"!=\"network_fix\" Fail Check manually why network_fix not found\n# Sleep 10\n# END\n#\n##for storage nodes\n# ${storage_host_list}= ceph.get_host_list\n# Log ${storage_host_list}\n#\n# FOR ${n} IN @{storage_host_list}\n# ${storage_host_ip}= ceph.get_host_ip ${n}\n# ${conn}= ssh.open_connection_to_node ${storage_host_ip}\n# ${output}= ssh.send_command ${conn} semodule -l|grep network\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Run Keyword If \"${output}\"!=\"[]\" Log To Console ${n} ${output} already loaded, skip this host.\n# Continue For Loop If \"${output}\"!=\"[]\"\n# Log To Console Updating ${n} ${storage_host_ip}\n#\n# ${cmd5}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.pp root@${storage_host_ip}:/root/\n# ${cmd6}= Set Variable sshpass -p 'root' scp -o StrictHostKeyChecking=no network_fix.te root@${storage_host_ip}:/root/\n#\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd5}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd6}\n# Log ${output}\n# ${conn}= ssh.open_connection_to_node ${storage_host_ip}\n# ${output}= ssh.send_command ${conn} semodule -i network_fix.pp\n# Log ${output}\n# Sleep 20\n# ${conn}= ssh.open_connection_to_node ${storage_host_ip}\n# ${output}= ssh.send_command ${conn} semodule -l|grep network\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Log To Console ${n} ${output[0]} loaded.\n# Run Keyword If \"${output[0]}\"!=\"network_fix\" Fail Check manually why network_fix not found\n# Sleep 10\n# END\n#\n# #run for the lasthost - vip host\n# FOR ${i} IN RANGE 1\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd12}\n# Log ${output}\n# ${output}= get regexp matches ${output} network_fix\n# Log ${output}\n# Run Keyword If \"${output}\"!=\"[]\" Log To Console vip masterbm ${output} already loaded, skip this host.\n# Continue For Loop If \"${output}\"!=\"[]\"\n# Log To Console Updating the last controller\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd4}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd10}\n# Log ${output}\n# ${rc} ${output}= ssh.send_command_to_controller ${S_VIP_ADDRESS} ${cmd12}\n# Log ${output}\n# Log To Console ${vipnode} ${output} loaded.\n# END\n\n#workaround_for_missing_ncs_manager_logs\n# ${is_central}= config.is_centralized_installation\n# Return from Keyword If \"${is_central}\"==\"${TRUE}\" WA is valid only for cluster mode NCS\n#\n# ${logs}= Create List\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_portal.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_management.log\n# #echo > central_replace_manager.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_backup.log\n# #echo > central_mng_backup.log\n# #echo > central_bm_scale_out.log\n# #echo > central_bm_scale_in.log\n# #echo > central_bm_reboot.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_heal.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/add_bm_configuration.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_patch_management.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_status_update.log\n# #echo > central_installation.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_scale_out.log\n# #append to list ${logs} central_management_termination.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_reboot.log\n# #echo > central_status.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/patch_management.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_external_storage_operations.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_scale_in.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/cluster_bm_termination.log\n# append to list ${logs} /var/log/cbis/${S_CLUSTER_NAME}/ncs_upgrade.log\n#\n# ${controllers}= node.get_control_name_list\n#\n# ${logs_list}= Set Variable ${EMPTY}\n# FOR ${log} IN @{logs}\n# log ${log}\n# ${logs_list}= Set Variable ${logs_list} ${log}\n# END\n# log logs list: ${logs_list}\n#\n# FOR ${node} IN @{controllers}\n# log Open connection to node ${node}\n# ${conn}= ssh.open_connection_to_node ${node}\n# ssh.send_command ${conn} sudo touch ${logs_list}\n# ssh.close_connection ${conn}\n# END\n\n#check_if_sw_is_correct_for_this_wa\n# ${v} ${b}= config.installed_ncs_sw_package\n# Log ${v}\n# Log ${b}\n# Log To Console ${v} ${b}\n# Pass Execution If \"${b}\"!=\"354\" Workarounds is not applied in this enviroment - need NCS21-B275\n#\n#apply_fix_for_ncsfm4229\n# [Arguments] ${node_ip}\n# #### https://jiradc2.ext.net.nokia.com/browse/NCSFM-4229-CLOSED\n# #### Fix first-call issue after fresh install in python library causing dns issue\n# ${cmd1}= Set Variable sudo kubectl get secret -n ncms harbor-harbor-core -ojson\n# ${conn}= ssh.open_connection_to_node ${node_ip}\n# ${output}= ssh.send_command ${conn} ${cmd1}\n# ${harborinfo}= pythonFunctions.convert_json_to_dict ${output}\n# ${data}= Get From Dictionary ${harborinfo} data\n# ${passwd}= Get From Dictionary ${data} HARBOR_ADMIN_PASSWORD\n# ${cmd2}= Set Variable sudo echo ${passwd} | base64 -d\n# ${base64}= ssh.send_command ${conn} ${cmd2}\n#\n# ${scp}= open_scp_connection_to_controller ${node_ip}\n# ssh.scp_file_to_host ${scp} 22.0/workaround/credentials.json /tmp/\n# ssh.close_scp_connection ${scp}\n#\n# ${cmd}= Set Variable sudo chmod 666 /tmp/credentials.json;sed -i '/password/s/###password###/${base64}/' /tmp/credentials.json;cat /tmp/credentials.json\n# ${res}= ssh.send_command ${conn} ${cmd}\n# ${cmd}= Set Variable sudo curl -v --unix-socket /run/podman/podman.sock http://v1.40/auth -H \"accept: application/json\" -H \"Content-Type: application/json\" -X POST -d@/tmp/credentials.json\n# ${output}= ssh.send_command ${conn} ${cmd}\n# Log ${output}\n# ${check}= Get Regexp Matches ${output} (Login Succeeded) 1\n# Run Keyword If \"${check}\"==\"[]\" Fail Unable to fix NCSFM-4229-CLOSED\n# ssh.close_connection ${conn}\n\n#apply_fix_for_ncsfm16152\n# #### https://jiradc2.ext.net.nokia.com/browse/NCSFM-16152\n# #### install missing sshpass rpm\n# ${file}= Set Variable sshpass-1.09-4.el8ap.x86_64.rpm\n# ${server}= config.ncm_fileserver_address\n# ${fileserver_address}= config.get_ncm_fileserver_addr ${server}\n# ${is_ipv6}= config.is_ipv6_installation\n# IF \"${is_ipv6}\" == \"${FALSE}\"\n# ${wget_cmd}= Set Variable sudo wget ${fileserver_address}/${file}\n# ELSE IF \"${is_ipv6}\" == \"${TRUE}\"\n# ${wget_cmd}= Set Variable sudo wget -6 ${fileserver_address}/${file}\n# END\n#\n# ${username}= config.ncm_cluster_node_username\n# ${status}= image.get_file_as_named ${file}\n# ${is_baremetal_installation}= config.is_baremetal_installation\n# IF \"${is_baremetal_installation}\"==\"${TRUE}\"\n# ${cluster_name}= node.get_management_cluster_name\n# ${inven}= node.get_inventory_dict ${cluster_name}\n# ${node_list}= node.get_manager_node_list ${inven}\n# ELSE\n# ${node_list}= node.get_control_name_list\n# END\n#\n# FOR ${item} IN @{node_list}\n# #log ${item}\n# ${conn}= ssh.open_connection_to_node ${item}\n# #${cmd1}= Set Variable scp -B ${file} ${username}@${item}:.\n# ${res}= ssh.send_command ${conn} ${wget_cmd}\n# ${cmd2}= Set Variable sudo yum localinstall -y ${file}\n# ${res}= ssh.send_command ${conn} ${cmd2}\n# ssh.close_connection ${conn}\n# END\n\n\n\n\n\n#apply_fix_for_ncsfm8895\n# #### https://jiradc2.ext.net.nokia.com/browse/NCSFM-8895-CLOSED\n# #### Fixes missing of cluster local backup file from expected targer folder in NCS22.12 C5 build 185.\n#\t${vip}= config.get_controller_vip\n# Log ${vip}\n# ${deplo_ip}= config.ncm_deployment_server_ip\n# Log ${deplo_ip}\n# ${mode}= config.ncs_config_mode\n# Log ${mode}\n# ${scp}= IF \"${mode}\"!=\"config5\" open_scp_connection_to_controller ELSE open_scp_connection_to_deployment_server\n# ssh.scp_file_to_host ${scp} 22.0/workaround/fix_scheduled_backups.yaml /tmp/\n# ssh.close_scp_connection ${scp}\n#\t${conn}= IF \"${mode}\"!=\"config5\" open_connection_to_controller ELSE open_connection_to_deployment_server\n#\t${cmd}= Set Variable sudo cat /tmp/fix_scheduled_backups.yaml\n#\t${res}= ssh.send_command ${conn} ${cmd}\n#\tLog ${S_CLUSTER_NAME}\n#\t${cmd}= Set Variable cd /tmp/;sudo /usr/local/bin/openstack-ansible --timeout=60 -b -u cbis-admin fix_scheduled_backups.yaml --private-key=/home/cbis-admin/.ssh/id_rsa -i /opt/openstack-ansible/inventory/${S_CLUSTER_NAME}/${S_CLUSTER_NAME}.sh --extra-vars \"cluster_name=${S_CLUSTER_NAME}\"\n#\t${res}= ssh.send_command ${conn} ${cmd}\n#\tssh.close_connection ${conn}\n# ${all_masters}= node.get_control_name_list\n#\tLog ${all_masters}\n# FOR ${master} IN @{all_masters}\n# ${node_ip}= node.get_oam_ip ${master}\n# Log ${node_ip}\n#\t\t ${scp}= open_scp_connection_to_controller ${node_ip}\n#\t\t ssh.scp_file_to_host ${scp} 22.0/workaround/fixed_handle_local_backup_copy.py /tmp/\n#\t\t ssh.close_scp_connection ${scp}\n#\t\t ${conn}= ssh.open_connection_to_node ${node_ip}\n#\t\t ${cmd1}= Set Variable sudo cp /usr/lib/python3.6/site-packages/cbis_common/cbis_storage/handle_local_backup_copy.py /usr/lib/python3.6/site-packages/cbis_common/cbis_storage/original_handle_local_backup_copy.py\n#\t\t ${res}= ssh.send_command ${conn} ${cmd1}\n# ${cmd2}= Set Variable sudo bash -c 'cat /tmp/fixed_handle_local_backup_copy.py > /usr/lib/python3.6/site-packages/cbis_common/cbis_storage/handle_local_backup_copy.py'\n#\t\t ${res}= ssh.send_command ${conn} ${cmd2}\n#\t\t ssh.close_connection ${conn}\n# END\n\n# internal keywords ----------------------------------------\n# never call these from outside of this module\n\n# not yet", "settings": "{}", "variables": "{}", "name": "check_if_workaround_must_be_applied", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/workaround/workaround.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c589cdb0-44f0-43f0-9b25-0fe20c0b8bd3", "code": "internal_restart_cpu-device-plugin_pod\n [Arguments] ${node}\n ${pods}= pod.get_by_node_and_namespace_name_list ${node} kube-system\n Log ${pods}\n ${p}= get matches ${pods} cpu-device-plugin*\n Log Restart pod: ${p}[0] on node ${node}\n pod.delete ${p}[0] kube-system", "settings": "{}", "variables": "{}", "name": "internal_restart_cpu-device-plugin_pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/workaround/workaround.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c2576ef7-8876-4381-8123-0ba46ffa67f1", "code": "internal_run_calico_in_all_masters\n [Arguments] ${master_ip_list}\n FOR ${m} IN @{master_ip_list}\n ${output}= ssh.send_command_to_controller ${m} ./${S_CALICO_CLEANUP_SCRIPT}\n Log Master node: ${m}\n Log ${output}\n END\n\n#check_if_control_node_has_vip\n# [Documentation] Checks if selected control node has an external vip address active\n# [Arguments] ${nodename} ${vip}\n# ${oam_ip}= node.get_oam_ip ${nodename}\n# ${conn}= ssh.open_connection_to_node ${oam_ip}\n# ${std_out}= ssh.send_command ${conn} sudo ip a\n# log many STD_OUT=${std_out}\n# ssh.close_connection ${conn}\n# ${all_lines}= string.Split To Lines ${std_out}\n# FOR ${line} IN @{all_lines}\n# ${find_vip}= String.Get Regexp Matches String.Get Regexp Matches ${line} (${vip})\\\\/ 1\n# return from keyword if \"${find_vip}\"!=\"[]\" ${TRUE}\n# END\n# [Return] ${FALSE}\n\n#sort_out_node_ipv4_address\n# [Documentation] Sorting out node oam IPV4 addresses.\n# [Arguments] ${node}\n# ${node_ip}= node.get_oam_ip ${node}\n# Log ${node_ip}\n# [Return] ${node_ip}", "settings": "{}", "variables": "{}", "name": "internal_run_calico_in_all_masters", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/workaround/workaround.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "9da82cdc-c6b7-42fc-bdc0-bb41d84cedc6", "code": "*** Settings ***\n\nDocumentation \t\tDocumentation of case\n ... Another line of Documentation\n ... Another line of Documentation\n\n### add you own tags\nForce Tags production ncsci\n\n### Test timeout set timeout for each test case in suite.\nTest Timeout 30 min\n\n### Add only Resource files that are needed in test suite. Start with minimal list of resources and add new resource files\n### in needed base only\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\n.\n.\nLibrary Collections\nLibrary String\n\n### These are default suite setup and teardown. Do not modify these\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n\n### Define constants if needed\n${C_IMAGE_NAME} \n\n*** Test Cases ***\n\n# preparation for the case -------------------------------------------------------------------------\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n internal_check_prereqs ### internal_check_prereqs and internal_check_if_case_is_valid can be run before\n ### setup.precase_setup if check is based on SUT variables and doesn't need connections to NCS\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case\n internal_check_if_case_is_valid\n check.precase_cluster_status\n\n# test case -------------------------------------------------------------------------\n\ntest_case_1\n [Timeout] 30 min ### Optional test timeout. Override timeout given in Settings section.\n ### Use test timeout if test case run time is considerable londer than\n ### other cases in test suite. Timeout is also used to prevent infite loops\n internal_check_if_case_is_valid ## Test case is skipped if case prerequirements are not met\n ### Test case\n\ntest_case_2\n internal_check_if_case_is_valid\n ### Test case\n\n# post actions for the case -------------------------------------------------------------------------\n\npostcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n internal_check_if_case_is_valid\n setup.suite_cleanup\n\npostcase_cluster_status\n [Documentation] Check cluster status after the case\n internal_check_if_case_is_valid\n check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_check_prereqs\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n ### Another condition here...\n\ninternal_check_if_case_is_valid\n [Documentation] Check if configuration is supported.\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If ### another condition is true", "name": "testcase_config_files/test_case_sceleton.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "08954a88-b6ac-4aa1-a263-df2e8c2065ec", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n internal_check_prereqs ### internal_check_prereqs and internal_check_if_case_is_valid can be run before\n ### setup.precase_setup if check is based on SUT variables and doesn't need connections to NCS", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "30e36837-4fca-469b-92c1-10e56c39c5e0", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case\n internal_check_if_case_is_valid\n check.precase_cluster_status\n\n# test case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d9cbb1ff-073e-41ff-9fc9-2b10ec19e5f6", "code": "test_case_1\n [Timeout] 30 min ### Optional test timeout. Override timeout given in Settings section.\n ### Use test timeout if test case run time is considerable londer than\n ### other cases in test suite. Timeout is also used to prevent infite loops\n internal_check_if_case_is_valid ## Test case is skipped if case prerequirements are not met\n ### Test case", "settings": "{}", "variables": "{}", "name": "test_case_1", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "fe248926-3c74-4d4e-aaf2-83dbff7aee33", "code": "test_case_2\n internal_check_if_case_is_valid\n ### Test case\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "test_case_2", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "374c9c49-01d4-41fa-9029-cbe2f290d9ab", "code": "postcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n internal_check_if_case_is_valid\n setup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a28396f7-4715-42a8-a982-a5aab72d0b5d", "code": "postcase_cluster_status\n [Documentation] Check cluster status after the case\n internal_check_if_case_is_valid\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d2d009bc-c31c-4c35-ba60-d953d7d35ec2", "code": "internal_check_prereqs\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n ### Another condition here...", "settings": "{}", "variables": "{}", "name": "internal_check_prereqs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "74a13701-cad1-4708-8d94-50ada1ea45da", "code": "internal_check_if_case_is_valid\n [Documentation] Check if configuration is supported.\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If ### another condition is true", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/testcase_config_files/test_case_sceleton.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "f6a3388b-2001-4802-a6db-6ba57aa31367", "code": "*** Settings ***\nDocumentation Implements all needes workarounds to our own test clusters\n\n# scp doesn't work in newly installed systems due to missing ssh known host keys\n# Removed Force Tags.. based on discussion with Petteri on 30.12.2020..\n# It must be possible to add/remove individual WA cases with taggging\n#Force Tags production ncsci\n\nTest Timeout 15 min\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/check.robot\nResource ../../resource/node.robot\nResource ../../workaround/workaround.robot\nResource ../../resource/common.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n [Tags] production ncsci\n # This is WA suite spesific check\n workaround.check_if_workaround_must_be_applied\n # mandatory\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n\n#precase_cluster_status\n# [Documentation] Check cluster status before the case\n# [Tags] production ncsci\n# SKIP\n# workaround.check_if_workaround_must_be_applied\n## ####-------------------->--------------\n## #### when fixed, remove between the lines\n## #### precase_cluster_status notices if harbor pods are not up and running\n## ${status}= Run Keyword And Return Status check.precase_cluster_status\n## Log ${status}\n## internal_workaround_for_harbor_crashloop harbor-harbor-jobservice ncms\n## internal_workaround_for_harbor_crashloop harbor-harbor-nginx ncms\n## ####--------------------<--------------\n# check.precase_cluster_status\n#\n#delete_multus_ippools\n# # https://jiradc2.ext.net.nokia.com/browse/NCSFM-410-WAITING-3RD-PARTY\n# [Documentation] Check cluster status before the case\n# [Tags] production ncsci\n# workaround.check_if_workaround_must_be_applied\n# ${r}= workaround.delete_multus_ippools\n# Run Keyword If \"${r}\"==\"${FALSE}\" Log WA not needed. Multus not active or ippools not found.\n#\n#workaround_for_ncsfm4229\n# [Documentation] Fixes a one-time occurrence on a python library, which causes ncs tenant-app-resource chart install to fail because of dns issue.\n# ... Needed to be executed once after a new installation.\n# [Tags] production ncsci\n# workaround.check_if_workaround_must_be_applied\n# #### NCSFM-4229\n# ${is_multi_tenant}= tenant.is_multi_tenant\n# Pass Execution If \"${is_multi_tenant}\"==\"${FALSE}\" Multi-tenancy is disabled, this workaround cannot be executed.\n# ${master_nodes}= node.get_control_name_list\n# Set Suite Variable ${S_MASTER_NODES} ${master_nodes}\n# Log Fixing one-time occurrence fault NCSFM-4229\n# FOR ${master} IN @{S_MASTER_NODES}\n# ${node_ip}= sort_out_node_ipv4_address ${master}\n# Log ${node_ip}\n# Wait Until Keyword Succeeds 3x 5 workaround.apply_fix_for_ncsfm4229 ${node_ip}\n# END\n#\n## Rest api modified to accept return code 400 in case of missing log\n##create_missing_ncs_manager_logs\n## # https://jiradc2.ext.net.nokia.com/browse/NCSFM-3706\n## [Documentation] Create missing NCS Manager logs\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.workaround_for_missing_ncs_manager_logs\n#\n## This WA should be included to NCS20FP1 PP1\n##workaround_apply_selinux_bmrules\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.apply_selinux_bmrules\n#\n##workaround_release_unused_calico_IPs\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-31074\n## [Documentation] Calico ip addresses are not released even pods are deleted\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround_release_unused_calico_IPs\n#\n#\n#\n##workaround_reset_cpu-device-plugin\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-30278\n## [Documentation] Restart cpu-device-plugin pod on each worker node that has nokia.k8s.io/exclusive_numa_?_pool = 0\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround_reset_cpu-device-plugin\n#\n#\n##workaround_apply_oom_killer\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-30830\n## [Documentation] apply oom_killer WA\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.apply_oom_killer\n#\n##workaround_bm_cluster_node_not_accessible_after_reboot\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-33098\n## [Documentation] Run ncs20 WA/PP1\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.check_if_sw_is_correct_for_this_wa\n## workaround.workaround_bm_cluster_node_not_accessible_after_reboot\n#\n\n#workaround_for_ncsfm16152\n# [Documentation] Gets sshpass rpm from artifactory and installs it on system\n# [Tags] production ncsci\n# workaround.check_if_workaround_must_be_applied\n# #### NCSFM-16152\n# Log Fixing NCSFM-16152 missing sshpass\n# workaround.apply_fix_for_ncsfm16152\n\n\n#\n## post actions for the case -------------------------------------------------------------------------\n#\n## no need for cleanup since this robot suite will never create any objects\n#\n#postcase_cluster_status\n# [Documentation] Check cluster status after the case\n# [Tags] production ncsci openstacknotwork\n# workaround.check_if_workaround_must_be_applied\n# check.postcase_cluster_status\n\n*** Keywords ***\n\nsuite_setup\n config.check_envsetup\n setup.setup_k8s\n setup.setup_ssh\n setup.setup_node\n setup.setup_ceph\n \nsuite_teardown\n setup.teardown_ceph\n setup.teardown_node\n setup.teardown_ssh\n setup.teardown_k8s\n\n\n#internal_restart_cpu-device-plugin_pod\n# [Arguments] ${node}\n# ${pods}= pod.get_by_node_and_namespace_name_list ${node} kube-system\n# Log ${pods}\n# ${p}= get matches ${pods} cpu-device-plugin*\n# Log Restart pod: ${p}[0] on node ${node}\n# pod.delete ${p}[0] kube-system\n#\n#internal_run_calico_in_all_masters\n# [Arguments] ${master_ip_list}\n# FOR ${m} IN @{master_ip_list}\n# ${output}= ssh.send_command_to_controller ${m} ./${S_CALICO_CLEANUP_SCRIPT}\n# Log Master node: ${m}\n# Log ${output}\n# END\n\n#internal_workaround_for_harbor_crashloop\n# [Documentation] Delete (and restart) pods which may not be in running state after controller restart or system installation\n# [Arguments] ${pod_prefix} ${namespace}\n# ${list}= pod.get_list_pods_by_prefix_name ${pod_prefix} ${namespace}\n# Log ${list}\n# Pass Execution If \"${list}\"==\"[]\" Empty list\n# ${name}= Get Value From Json ${list}[0] $.nodeName\n# ${ready}= Get Value From Json ${list}[0] $.ready\n# Pass Execution If \"${name}\"==\"[]\" Empty list\n# Pass Execution If \"${ready}\"==\"[]\" Empty list\n# Run Keyword If \"${ready}[0]\"==\"${FALSE}\" pod.delete ${name}[0] ncms\n\n", "name": "suites/workaround/workaround_suite.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/check.robot': 'resource/check.robot', '../../resource/node.robot': 'resource/node.robot', '../../workaround/workaround.robot': 'workaround/workaround.robot', '../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/workaround/workaround_suite.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "eb386165-eba5-4358-a17d-44ae323115af", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n [Tags] production ncsci\n # This is WA suite spesific check\n workaround.check_if_workaround_must_be_applied\n # mandatory\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n\n#precase_cluster_status\n# [Documentation] Check cluster status before the case\n# [Tags] production ncsci\n# SKIP\n# workaround.check_if_workaround_must_be_applied\n## ####-------------------->--------------\n## #### when fixed, remove between the lines\n## #### precase_cluster_status notices if harbor pods are not up and running\n## ${status}= Run Keyword And Return Status check.precase_cluster_status\n## Log ${status}\n## internal_workaround_for_harbor_crashloop harbor-harbor-jobservice ncms\n## internal_workaround_for_harbor_crashloop harbor-harbor-nginx ncms\n## ####--------------------<--------------\n# check.precase_cluster_status\n#\n#delete_multus_ippools\n# # https://jiradc2.ext.net.nokia.com/browse/NCSFM-410-WAITING-3RD-PARTY\n# [Documentation] Check cluster status before the case\n# [Tags] production ncsci\n# workaround.check_if_workaround_must_be_applied\n# ${r}= workaround.delete_multus_ippools\n# Run Keyword If \"${r}\"==\"${FALSE}\" Log WA not needed. Multus not active or ippools not found.\n#\n#workaround_for_ncsfm4229\n# [Documentation] Fixes a one-time occurrence on a python library, which causes ncs tenant-app-resource chart install to fail because of dns issue.\n# ... Needed to be executed once after a new installation.\n# [Tags] production ncsci\n# workaround.check_if_workaround_must_be_applied\n# #### NCSFM-4229\n# ${is_multi_tenant}= tenant.is_multi_tenant\n# Pass Execution If \"${is_multi_tenant}\"==\"${FALSE}\" Multi-tenancy is disabled, this workaround cannot be executed.\n# ${master_nodes}= node.get_control_name_list\n# Set Suite Variable ${S_MASTER_NODES} ${master_nodes}\n# Log Fixing one-time occurrence fault NCSFM-4229\n# FOR ${master} IN @{S_MASTER_NODES}\n# ${node_ip}= sort_out_node_ipv4_address ${master}\n# Log ${node_ip}\n# Wait Until Keyword Succeeds 3x 5 workaround.apply_fix_for_ncsfm4229 ${node_ip}\n# END\n#\n## Rest api modified to accept return code 400 in case of missing log\n##create_missing_ncs_manager_logs\n## # https://jiradc2.ext.net.nokia.com/browse/NCSFM-3706\n## [Documentation] Create missing NCS Manager logs\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.workaround_for_missing_ncs_manager_logs\n#\n## This WA should be included to NCS20FP1 PP1\n##workaround_apply_selinux_bmrules\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.apply_selinux_bmrules\n#\n##workaround_release_unused_calico_IPs\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-31074\n## [Documentation] Calico ip addresses are not released even pods are deleted\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround_release_unused_calico_IPs\n#\n#\n#\n##workaround_reset_cpu-device-plugin\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-30278\n## [Documentation] Restart cpu-device-plugin pod on each worker node that has nokia.k8s.io/exclusive_numa_?_pool = 0\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround_reset_cpu-device-plugin\n#\n#\n##workaround_apply_oom_killer\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-30830\n## [Documentation] apply oom_killer WA\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.apply_oom_killer\n#\n##workaround_bm_cluster_node_not_accessible_after_reboot\n## # https://jiradc2.ext.net.nokia.com/browse/CSFS-33098\n## [Documentation] Run ncs20 WA/PP1\n## [Tags] production ncsci\n## workaround.check_if_workaround_must_be_applied\n## workaround.check_if_sw_is_correct_for_this_wa\n## workaround.workaround_bm_cluster_node_not_accessible_after_reboot\n#\n\n#workaround_for_ncsfm16152\n# [Documentation] Gets sshpass rpm from artifactory and installs it on system\n# [Tags] production ncsci\n# workaround.check_if_workaround_must_be_applied\n# #### NCSFM-16152\n# Log Fixing NCSFM-16152 missing sshpass\n# workaround.apply_fix_for_ncsfm16152\n\n\n#\n## post actions for the case -------------------------------------------------------------------------\n#\n## no need for cleanup since this robot suite will never create any objects\n#\n#postcase_cluster_status\n# [Documentation] Check cluster status after the case\n# [Tags] production ncsci openstacknotwork\n# workaround.check_if_workaround_must_be_applied\n# check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/workaround/workaround_suite.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "76db3c56-1b00-4a6a-a359-06d410dcca43", "code": "suite_setup\n config.check_envsetup\n setup.setup_k8s\n setup.setup_ssh\n setup.setup_node\n setup.setup_ceph", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/workaround/workaround_suite.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2c5b7435-3ad1-4b6c-ba9b-717afa8be55a", "code": "suite_teardown\n setup.teardown_ceph\n setup.teardown_node\n setup.teardown_ssh\n setup.teardown_k8s\n\n\n#internal_restart_cpu-device-plugin_pod\n# [Arguments] ${node}\n# ${pods}= pod.get_by_node_and_namespace_name_list ${node} kube-system\n# Log ${pods}\n# ${p}= get matches ${pods} cpu-device-plugin*\n# Log Restart pod: ${p}[0] on node ${node}\n# pod.delete ${p}[0] kube-system\n#\n#internal_run_calico_in_all_masters\n# [Arguments] ${master_ip_list}\n# FOR ${m} IN @{master_ip_list}\n# ${output}= ssh.send_command_to_controller ${m} ./${S_CALICO_CLEANUP_SCRIPT}\n# Log Master node: ${m}\n# Log ${output}\n# END\n\n#internal_workaround_for_harbor_crashloop\n# [Documentation] Delete (and restart) pods which may not be in running state after controller restart or system installation\n# [Arguments] ${pod_prefix} ${namespace}\n# ${list}= pod.get_list_pods_by_prefix_name ${pod_prefix} ${namespace}\n# Log ${list}\n# Pass Execution If \"${list}\"==\"[]\" Empty list\n# ${name}= Get Value From Json ${list}[0] $.nodeName\n# ${ready}= Get Value From Json ${list}[0] $.ready\n# Pass Execution If \"${name}\"==\"[]\" Empty list\n# Pass Execution If \"${ready}\"==\"[]\" Empty list\n# Run Keyword If \"${ready}[0]\"==\"${FALSE}\" pod.delete ${name}[0] ncms", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/workaround/workaround_suite.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "b2523090-26b3-4a28-9d5b-7d4ac903ba1d", "code": "*** Settings ***\nDocumentation The Local Storage test case will test Storage architectures\n ... Local storage.\n ... Manual jira ticket: NCSDEV-143\n ... Requirments and Validation: at least one host group with local\n ... storage enabled.\n\nDefault Tags NCSSyVe\n\nResource ../../../resource/config.robot\nResource ../../../infra/k8sRestApi.robot\nResource ../../../resource/setup.robot\nResource ../../../resource/ssh.robot\nResource ../../../resource/pod.robot\nResource ../../../resource/node.robot\nResource ../../../resource/check.robot\nLibrary Collections\nLibrary String\n\nSuite Setup suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n${S_USER_CONFIG_FILE_NAME} user_config.yaml\n\n${S_HOST_GROUP}\n${S_FULLPOD_NAME}\n\n${S_LSBLK_CMD} lsblk\n${S_LVDISPLAY_CMD} lvdisplay\n${S_VGDISPLAY_CMD} vgdisplay\n\n${S_SPECIAL_SPEC} dynamic_local_storage_node TRUE\n\n*** Test Cases ***\n#----pre test cases --------------------------------\nprecase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\n#---- actual test cases --------------------------------\nvalidate_setup_with_local_storage\n [Documentation] validate setup with local persistent storage\n ... and verify configurations\n ${is_storage_enable}= check_local_storage\n Run Keyword If \"${is_storage_enable}\"==\"False\" Fatal Error \"Storage is not Enabled\"\n ${S_HOST_GROUP}= Convert To Lower Case ${S_HOST_GROUP}\n ${node_ip}= get_node_ip\n Run Keyword If \"${node_ip}\"==\"${EMPTY}\" Fatal Error \"No node IP is available\"\n ${conn_node}= ssh.open_connection_to_node ${node_ip}\n ${lsblk}= ssh.send_command ${conn_node} ${S_LSBLK_CMD}\n Log ${lsblk}\n ${lvdisplay}= ssh.send_command ${conn_node} ${S_LVDISPLAY_CMD}\n Log ${lvdisplay}\n ${vgdisplay}= ssh.send_command ${conn_node} ${S_VGDISPLAY_CMD}\n Log ${vgdisplay}\n ssh.close_all_connections\n \ncreate_pod_on_host_group\n [Documentation] create PODs on host group\n ${full_pod_name} ${pod}= pod.create local-storage-test-${S_HOST_GROUP} special_spec=${S_SPECIAL_SPEC}\n pod.is_exist ${full_pod_name}\n Set Suite Variable ${S_FULLPOD_NAME} ${full_pod_name}\n\nreboot_node_with_local_storage\n [Documentation] reboot the node with local storage\n ${pod}= pod.get ${S_FULLPOD_NAME}\n ${nodename}= pod.read_nodeName ${pod}\n ${oam_ip}= node.get_oam_ip ${nodename}\n node.reboot ${oam_ip}\n\ndelete_test_pod_created\n [Documentation] delete all PODs created on test\n pod.delete ${S_FULLPOD_NAME}\n\n*** Keywords ***\n# ----------------------------------------------------------------------------------\n# setup & teardown\nsuite_setup\n config.check_envsetup\n setup.setup_k8s\n setup.setup_node\n setup.setup_ssh\n setup.setup_ncs_manager\n setup.setup_ipmi\n setup.setup_ceph\n\nsuite_teardown\n setup.teardown_ceph\n setup.teardown_ipmi\n setup.teardown_ncs_manager\n setup.teardown_ssh\n setup.teardown_node\n setup.teardown_k8s\n\ncheck_local_storage\n ${conn}= ssh.open_connection_to_deployment_server\n ${user_config_full_path}= ssh.send_command ${conn} find /opt -name ${S_USER_CONFIG_FILE_NAME} | xargs grep -H -c 'monitoring_cluster' | grep 0$ | cut -d':' -f1\n ${user_config_full_path}= Strip String ${user_config_full_path}\n ${user_config}= ssh.send_command ${conn} cat ${user_config_full_path}\n ${is_storage_enable} ${host_group}= check.is_local_storage_enabled ${user_config}\n Set Suite Variable ${S_HOST_GROUP} ${host_group}\n [Return] ${is_storage_enable}\n\nget_node_ip\n ${node_list}= Run Keyword If \"${S_HOST_GROUP}\" == \"masterbm\" node.get_control_name_list\n ... ELSE IF \"${S_HOST_GROUP}\" == \"workerbm\" node.get_worker_name_list\n ... ELSE IF \"${S_HOST_GROUP}\" == \"edgebm\" node.get_edge_name_list\n ... ELSE IF \"${S_HOST_GROUP}\" == \"storagebm\" node.get_storage_name_list\n ... ELSE set variable ${EMPTY}\n ${node_ip}= Run Keyword If \"${node_list}\" != \"${EMPTY}\" get_private_oam_ip ${node_list[0]} ELSE Set Variable ${EMPTY}\n [Return] ${node_ip}\n\n\n", "name": "suites/tests_functionality/storage/Local_Storage.robot", "imports_file_locations": "{'../../../resource/config.robot': 'resource/config.robot', '../../../infra/k8sRestApi.robot': 'infra/k8sRestApi.robot', '../../../resource/setup.robot': 'resource/setup.robot', '../../../resource/ssh.robot': 'resource/ssh.robot', '../../../resource/pod.robot': 'resource/pod.robot', '../../../resource/node.robot': 'resource/node.robot', '../../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "69e26342-18e6-4260-936a-69776b652311", "code": "precase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\n#---- actual test cases --------------------------------", "settings": "{}", "variables": "{}", "name": "precase_ncm_rest_api_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "58afe1cd-6515-4bc5-b56e-b3d536360d89", "code": "validate_setup_with_local_storage\n [Documentation] validate setup with local persistent storage\n ... and verify configurations\n ${is_storage_enable}= check_local_storage\n Run Keyword If \"${is_storage_enable}\"==\"False\" Fatal Error \"Storage is not Enabled\"\n ${S_HOST_GROUP}= Convert To Lower Case ${S_HOST_GROUP}\n ${node_ip}= get_node_ip\n Run Keyword If \"${node_ip}\"==\"${EMPTY}\" Fatal Error \"No node IP is available\"\n ${conn_node}= ssh.open_connection_to_node ${node_ip}\n ${lsblk}= ssh.send_command ${conn_node} ${S_LSBLK_CMD}\n Log ${lsblk}\n ${lvdisplay}= ssh.send_command ${conn_node} ${S_LVDISPLAY_CMD}\n Log ${lvdisplay}\n ${vgdisplay}= ssh.send_command ${conn_node} ${S_VGDISPLAY_CMD}\n Log ${vgdisplay}\n ssh.close_all_connections", "settings": "{}", "variables": "{'S_HOST_GROUP': {'text': '${S_HOST_GROUP}'}, 'S_LSBLK_CMD': {'text': '${S_LSBLK_CMD} lsblk'}, 'S_LVDISPLAY_CMD': {'text': '${S_LVDISPLAY_CMD} lvdisplay'}, 'S_VGDISPLAY_CMD': {'text': '${S_VGDISPLAY_CMD} vgdisplay'}}", "name": "validate_setup_with_local_storage", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3168c52d-7dfc-4b05-8728-460a3c019d5f", "code": "create_pod_on_host_group\n [Documentation] create PODs on host group\n ${full_pod_name} ${pod}= pod.create local-storage-test-${S_HOST_GROUP} special_spec=${S_SPECIAL_SPEC}\n pod.is_exist ${full_pod_name}\n Set Suite Variable ${S_FULLPOD_NAME} ${full_pod_name}", "settings": "{}", "variables": "{'S_HOST_GROUP': {'text': '${S_HOST_GROUP}'}, 'S_SPECIAL_SPEC': {'text': '${S_SPECIAL_SPEC} dynamic_local_storage_node TRUE'}, 'S_FULLPOD_NAME': {'text': '${S_FULLPOD_NAME}'}}", "name": "create_pod_on_host_group", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "42df2f1f-cc6a-44bb-8658-7a2148296f87", "code": "reboot_node_with_local_storage\n [Documentation] reboot the node with local storage\n ${pod}= pod.get ${S_FULLPOD_NAME}\n ${nodename}= pod.read_nodeName ${pod}\n ${oam_ip}= node.get_oam_ip ${nodename}\n node.reboot ${oam_ip}", "settings": "{}", "variables": "{'S_FULLPOD_NAME': {'text': '${S_FULLPOD_NAME}'}}", "name": "reboot_node_with_local_storage", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cae614f5-2773-47da-8db4-9e70a15af22f", "code": "delete_test_pod_created\n [Documentation] delete all PODs created on test\n pod.delete ${S_FULLPOD_NAME}", "settings": "{}", "variables": "{'S_FULLPOD_NAME': {'text': '${S_FULLPOD_NAME}'}}", "name": "delete_test_pod_created", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "870e972f-78bf-4b8f-82ce-98eedb783f87", "code": "suite_setup\n config.check_envsetup\n setup.setup_k8s\n setup.setup_node\n setup.setup_ssh\n setup.setup_ncs_manager\n setup.setup_ipmi\n setup.setup_ceph", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c5828815-51bf-459e-897f-b7384aa19085", "code": "suite_teardown\n setup.teardown_ceph\n setup.teardown_ipmi\n setup.teardown_ncs_manager\n setup.teardown_ssh\n setup.teardown_node\n setup.teardown_k8s", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "6f96da1f-6fa2-4866-b77c-237b15b5ed30", "code": "check_local_storage\n ${conn}= ssh.open_connection_to_deployment_server\n ${user_config_full_path}= ssh.send_command ${conn} find /opt -name ${S_USER_CONFIG_FILE_NAME} | xargs grep -H -c 'monitoring_cluster' | grep 0$ | cut -d':' -f1\n ${user_config_full_path}= Strip String ${user_config_full_path}\n ${user_config}= ssh.send_command ${conn} cat ${user_config_full_path}\n ${is_storage_enable} ${host_group}= check.is_local_storage_enabled ${user_config}\n Set Suite Variable ${S_HOST_GROUP} ${host_group}\n [Return] ${is_storage_enable}\n\nget_node_ip\n ${node_list}= Run Keyword If \"${S_HOST_GROUP}\" == \"masterbm\" node.get_control_name_list\n ... ELSE IF \"${S_HOST_GROUP}\" == \"workerbm\" node.get_worker_name_list\n ... ELSE IF \"${S_HOST_GROUP}\" == \"edgebm\" node.get_edge_name_list\n ... ELSE IF \"${S_HOST_GROUP}\" == \"storagebm\" node.get_storage_name_list\n ... ELSE set variable ${EMPTY}\n ${node_ip}= Run Keyword If \"${node_list}\" != \"${EMPTY}\" get_private_oam_ip ${node_list[0]} ELSE Set Variable ${EMPTY}", "settings": "{}", "variables": "{'S_USER_CONFIG_FILE_NAME': {'text': '${S_USER_CONFIG_FILE_NAME} user_config.yaml'}, 'S_HOST_GROUP': {'text': '${S_HOST_GROUP}'}}", "name": "check_local_storage", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/Local_Storage.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "851321cf-674e-4214-acaf-f46a0134bdc5", "code": "*** Settings ***\nDocumentation This health check test case tests general health of container cluster.\n... Another purpose is to collect some cluster specific information for troubleshooting.\n\nResource ../../../resource/config.robot\nResource ../../../resource/middleware.robot\nResource ../../../resource/setup.robot\nResource ../../../resource/ssh.robot\nResource ../../../resource/node.robot\nResource ../../../resource/check.robot\nResource ../../../resource/ipmi.robot\nResource ../../../resource/ping.robot\nResource ../../../infra/ncmRestApi.robot\nResource ../../../infra/k8sRestApi.robot\nResource ../../../infra/ncsManagerRestApi.robot\nLibrary Collections\nLibrary String\n\nSuite Setup suite_setup\nSuite Teardown suite_teardown\n \n*** Variables ***\n${global_name} ceph-fast\n${image_name} CentOS7.qcow2\n\n${ZONE}\n${S_OVS}\n${G_NAME}\n${NVME_OSD}\n\n*** Test Cases *** \n\nprecase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n [Tags] production\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\n*** Keywords ***\n\n# ----------------------------------------------------------------------------------\n# setup & teardown\nsuite_setup\n config.check_envsetup\n setup.setup_k8s\n setup.setup_node\n setup.setup_ssh\n setup.setup_ncs_manager\n setup.setup_ipmi\n setup.setup_ceph\n\nsuite_teardown\n setup.teardown_ceph\n setup.teardown_ipmi\n setup.teardown_ncs_manager\n setup.teardown_ssh\n setup.teardown_node\n setup.teardown_k8s\n\n", "name": "suites/tests_functionality/storage/ceph_fast_pool.robot", "imports_file_locations": "{'../../../resource/config.robot': 'resource/config.robot', '../../../resource/middleware.robot': 'resource/middleware.robot', '../../../resource/setup.robot': 'resource/setup.robot', '../../../resource/ssh.robot': 'resource/ssh.robot', '../../../resource/node.robot': 'resource/node.robot', '../../../resource/check.robot': 'resource/check.robot', '../../../resource/ipmi.robot': 'resource/ipmi.robot', '../../../resource/ping.robot': 'resource/ping.robot', '../../../infra/ncmRestApi.robot': 'infra/ncmRestApi.robot', '../../../infra/k8sRestApi.robot': 'infra/k8sRestApi.robot', '../../../infra/ncsManagerRestApi.robot': 'infra/ncsManagerRestApi.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/ceph_fast_pool.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "371b14f5-464e-4d22-8f83-5a9edf7bfc28", "code": "precase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n [Tags] production\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}", "settings": "{}", "variables": "{}", "name": "precase_ncm_rest_api_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/ceph_fast_pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d0f197a9-b6a7-4fb3-8721-029e24a67e28", "code": "suite_setup\n config.check_envsetup\n setup.setup_k8s\n setup.setup_node\n setup.setup_ssh\n setup.setup_ncs_manager\n setup.setup_ipmi\n setup.setup_ceph", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/ceph_fast_pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "52a8bbed-7e25-4274-8397-115023640eea", "code": "suite_teardown\n setup.teardown_ceph\n setup.teardown_ipmi\n setup.teardown_ncs_manager\n setup.teardown_ssh\n setup.teardown_node\n setup.teardown_k8s", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/storage/ceph_fast_pool.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "5dfcc99a-a18f-412b-a768-fb64128dd5a8", "code": "*** Settings ***\nDocumentation Sonobuoy is a diagnostic tool that makes it easier to understand the state of a Kubernetes cluster \n... by running a set of plugins (including Kubernetes conformance tests)\n... in an accessible and non-destructive manner.\n... It is a customizable, extendable, and cluster-agnostic way to generate clear, \n... informative reports about your cluster.\n\n... to this test we have an open bug that we cant execute all the e2e tests.\n... so only for check if the tool works e set here only name of one e2e test.\n... the real command is :\n... sonobuoy run --sonobuoy-image bcmt-registry:5000/sonobuoy:${sonobuoy_build}\n... --kube-conformance-image bcmt-registry:5000/${kube-conformance-image} \n... --systemd-logs-image bcmt-registry:5000/systemd-logs:v0.3\n... --plugin-env=e2e.E2E_EXTRA_ARGS=\"--non-blocking-taints=is_control,is_edge\"\n... --e2e-repo-config /root/custom-repo-config.yaml\n... --mode=certified-conformance\n\n\n\nResource ../../../resource/OperationFile.robot\nResource ../../../resource/check.robot\nResource ../../../infra/ncmRestApi.robot\n\nSuite Setup Setup Env\nSuite Teardown suite_teardown\n\n*** Variables ***\n${proxy_address} 87.254.212.120:8080\n${registery} bcmt-registry:5000\n\n*** Test Cases ***\nPrecase Ncm Rest Api Login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\nCluster Status\n [Documentation] Check cluster status before the case\n check.precase_cluster_status\n\nInstall Sonobuoy\n [Documentation] install sonobuoy on setup\n ${sonobuoy_items_in_path}= common.get_link_name_from_div_name path=https://github.com/vmware-tanzu/sonobuoy/releases div_name=Box Box--condensed mt-3\n ${sonobuoy_path}= pythonFunctions.get_item_that_contain_str_from_list ${sonobuoy_items_in_path} linux_amd64.tar.gz\n ${sonobuoy_build}= PythonFunctions.split_str_by_charcter_and_return_specific_place ${sonobuoy_path}[0] / -2\n ${sonobuoy_name}= PythonFunctions.split_str_by_charcter_and_return_specific_place ${sonobuoy_path}[0] / -1\n\n OperationFile.download_files https://github.com/${sonobuoy_path}[0]\n Run Command On Manage mkdir -p /root/bin\n Run Command On Manage tar -xzvf ${sonobuoy_name} -C /root/bin\n Run Command On Manage chmod +x /root/bin/sonobuoy\n Run Command On Manage cp /root/bin/sonobuoy /usr/bin\n\n Set Suite Variable ${sonobuoy_build} ${sonobuoy_build}\n\nDownload Pull Push Sonobuoy Images\n ${extract_images}= Create List gcr.io/k8s-authenticated-test/agnhost:2.6 invalid.com/invalid/alpine:3.1\n ... gcr.io/authenticated-image-pulling/alpine:3.7 gcr.io/authenticated-image-pulling/windows-nanoserver:v1 mcr.microsoft.com/windows:1809\n\n Run Command On Manage export PROXY=http://${proxy_address};export HTTP_PROXY=http://${proxy_address};export HTTPS_PROXY=https://${proxy_address}\n ${sonobuoy_images}= Run Command On Manage Return List sonobuoy images\n ${kube-conformance-image}= PythonFunctions.split_str_by_charcter_and_return_specific_place ${sonobuoy_images}[6] / -1\n Set Suite Variable ${kube-conformance-image} ${kube-conformance-image}\n\n ${sonobuoy_images_after_remove_images}= PythonFunctions.remove_list_from_list ${sonobuoy_images}[12:] ${extract_images}\n ${content}= Catenate buildImageRegistry: bcmt-registry:5000${\\n}dockerGluster: bcmt-registry:5000${\\n}dockerLibraryRegistry: bcmt-registry:5000\n ... ${\\n}e2eRegistry: bcmt-registry:5000${\\n}e2eVolumeRegistry: bcmt-registry:5000${\\n}gcRegistry: bcmt-registry:5000${\\n}promoterE2eRegistry: bcmt-registry:5000\n ... ${\\n}sigStorageRegistry: bcmt-registry:5000${\\n}\n\n Run Command On Manage echo \"${content}\" > /root/custom-repo-config.yaml\n Run Command On Manage sonobuoy gen default-image-config\n\n FOR ${image} IN @{sonobuoy_images_after_remove_images}\n Run Command On Manage docker pull ${image}\n\n ${name_docker}= Run Keyword PythonFunctions.split_str_by_charcter_and_return_specific_place ${image} / -1\n Run Command On Manage docker tag ${image} ${registery}/${name_docker}\n Run Command On Manage docker push ${registery}/${name_docker}\n END\n\nExecute Sonobuoy\n ${cmd}= Catenate sonobuoy run --sonobuoy-image bcmt-registry:5000/sonobuoy:${sonobuoy_build}\n ... --kube-conformance-image bcmt-registry:5000/${kube-conformance-image} --systemd-logs-image bcmt-registry:5000/systemd-logs:v0.3\n ... --plugin-env=e2e.E2E_EXTRA_ARGS=\"--non-blocking-taints=is_control,is_edge\" --e2e-repo-config /root/custom-repo-config.yaml\n ... --e2e-focus \"should update pod when spec was updated and update strategy is RollingUpdate\"\n\n Run Command On Manage ${cmd}\n Sleep 6 minutes\n\n wait_sonobuoy_finish_execution sonobuoy status\n\n ${get_tar_results}= Run Command On Manage Return String sonobuoy retrieve ./\n ${get_results}= Run Command On Manage Return String sonobuoy results ${get_tar_results} | grep Fail\n ${fail}= pythonFunctins.check_str_containing_str ${get_results}\n ${cmd}= Set Variable Sonobuoy Fail, For more informeation execute : sonobuoy results ${get_tar_results} --mode=detailed --plugin e2e\n Run Keyword If ${fail}==${true} Fatal Error ${cmd}\n\nPost Cluster Status\n Run Command On Manage sonobuoy delete --all --wait\n setup.suite_cleanup\n check.postcase_cluster_status\n\n\n*** Keywords ***\ncheck_exection_sonobuoy\n [Arguments] ${cmd}\n ${response}= Run Command On Manage Return String sonobuoy status\n Should Not Contain ${response} running Sonobuoy Still Running\n\n\nwait_sonobuoy_finish_execution\n [Arguments] ${cmd} ${retries}=30x ${interval}=600s\n Wait Until Keyword Succeeds ${retries} ${interval} check_exection_sonobuoy ${cmd}", "name": "suites/tests_functionality/sanity/Sonobuoy.robot", "imports_file_locations": "{'../../../resource/OperationFile.robot': 'resource/OperationFile.robot', '../../../resource/check.robot': 'resource/check.robot', '../../../infra/ncmRestApi.robot': 'infra/ncmRestApi.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8e7eaafe-f876-4f7c-bad4-e4cd34b30105", "code": "Precase Ncm Rest Api Login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}", "settings": "{}", "variables": "{}", "name": "Precase Ncm Rest Api Login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "fa887c21-b1bb-4543-84f8-78e5463fa8fa", "code": "Cluster Status\n [Documentation] Check cluster status before the case\n check.precase_cluster_status", "settings": "{}", "variables": "{}", "name": "Cluster Status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "52eea548-feb5-4196-a477-f1b64a33cab7", "code": "Install Sonobuoy\n [Documentation] install sonobuoy on setup\n ${sonobuoy_items_in_path}= common.get_link_name_from_div_name path=https://github.com/vmware-tanzu/sonobuoy/releases div_name=Box Box--condensed mt-3\n ${sonobuoy_path}= pythonFunctions.get_item_that_contain_str_from_list ${sonobuoy_items_in_path} linux_amd64.tar.gz\n ${sonobuoy_build}= PythonFunctions.split_str_by_charcter_and_return_specific_place ${sonobuoy_path}[0] / -2\n ${sonobuoy_name}= PythonFunctions.split_str_by_charcter_and_return_specific_place ${sonobuoy_path}[0] / -1\n\n OperationFile.download_files https://github.com/${sonobuoy_path}[0]\n Run Command On Manage mkdir -p /root/bin\n Run Command On Manage tar -xzvf ${sonobuoy_name} -C /root/bin\n Run Command On Manage chmod +x /root/bin/sonobuoy\n Run Command On Manage cp /root/bin/sonobuoy /usr/bin\n\n Set Suite Variable ${sonobuoy_build} ${sonobuoy_build}", "settings": "{}", "variables": "{}", "name": "Install Sonobuoy", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1ced4f88-0b55-4337-a739-9d8faa06a38a", "code": "Download Pull Push Sonobuoy Images\n ${extract_images}= Create List gcr.io/k8s-authenticated-test/agnhost:2.6 invalid.com/invalid/alpine:3.1\n ... gcr.io/authenticated-image-pulling/alpine:3.7 gcr.io/authenticated-image-pulling/windows-nanoserver:v1 mcr.microsoft.com/windows:1809\n\n Run Command On Manage export PROXY=http://${proxy_address};export HTTP_PROXY=http://${proxy_address};export HTTPS_PROXY=https://${proxy_address}\n ${sonobuoy_images}= Run Command On Manage Return List sonobuoy images\n ${kube-conformance-image}= PythonFunctions.split_str_by_charcter_and_return_specific_place ${sonobuoy_images}[6] / -1\n Set Suite Variable ${kube-conformance-image} ${kube-conformance-image}\n\n ${sonobuoy_images_after_remove_images}= PythonFunctions.remove_list_from_list ${sonobuoy_images}[12:] ${extract_images}\n ${content}= Catenate buildImageRegistry: bcmt-registry:5000${\\n}dockerGluster: bcmt-registry:5000${\\n}dockerLibraryRegistry: bcmt-registry:5000\n ... ${\\n}e2eRegistry: bcmt-registry:5000${\\n}e2eVolumeRegistry: bcmt-registry:5000${\\n}gcRegistry: bcmt-registry:5000${\\n}promoterE2eRegistry: bcmt-registry:5000\n ... ${\\n}sigStorageRegistry: bcmt-registry:5000${\\n}\n\n Run Command On Manage echo \"${content}\" > /root/custom-repo-config.yaml\n Run Command On Manage sonobuoy gen default-image-config\n\n FOR ${image} IN @{sonobuoy_images_after_remove_images}\n Run Command On Manage docker pull ${image}\n\n ${name_docker}= Run Keyword PythonFunctions.split_str_by_charcter_and_return_specific_place ${image} / -1\n Run Command On Manage docker tag ${image} ${registery}/${name_docker}\n Run Command On Manage docker push ${registery}/${name_docker}\n END", "settings": "{}", "variables": "{'proxy_address': {'text': '${proxy_address} 87.254.212.120:8080'}, 'registery': {'text': '${registery} bcmt-registry:5000'}}", "name": "Download Pull Push Sonobuoy Images", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f8a3225b-4de5-4e28-ad3f-8bf275f08a43", "code": "Execute Sonobuoy\n ${cmd}= Catenate sonobuoy run --sonobuoy-image bcmt-registry:5000/sonobuoy:${sonobuoy_build}\n ... --kube-conformance-image bcmt-registry:5000/${kube-conformance-image} --systemd-logs-image bcmt-registry:5000/systemd-logs:v0.3\n ... --plugin-env=e2e.E2E_EXTRA_ARGS=\"--non-blocking-taints=is_control,is_edge\" --e2e-repo-config /root/custom-repo-config.yaml\n ... --e2e-focus \"should update pod when spec was updated and update strategy is RollingUpdate\"\n\n Run Command On Manage ${cmd}\n Sleep 6 minutes\n\n wait_sonobuoy_finish_execution sonobuoy status\n\n ${get_tar_results}= Run Command On Manage Return String sonobuoy retrieve ./\n ${get_results}= Run Command On Manage Return String sonobuoy results ${get_tar_results} | grep Fail\n ${fail}= pythonFunctins.check_str_containing_str ${get_results}\n ${cmd}= Set Variable Sonobuoy Fail, For more informeation execute : sonobuoy results ${get_tar_results} --mode=detailed --plugin e2e\n Run Keyword If ${fail}==${true} Fatal Error ${cmd}", "settings": "{}", "variables": "{}", "name": "Execute Sonobuoy", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "32d15083-0357-4e40-bcc5-da17830c0f40", "code": "Post Cluster Status\n Run Command On Manage sonobuoy delete --all --wait\n setup.suite_cleanup\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "Post Cluster Status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "43f10cca-b0f6-4be6-9d8a-26b4dbb473cc", "code": "check_exection_sonobuoy\n [Arguments] ${cmd}\n ${response}= Run Command On Manage Return String sonobuoy status\n Should Not Contain ${response} running Sonobuoy Still Running", "settings": "{}", "variables": "{}", "name": "check_exection_sonobuoy", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "ff6382d6-f7f7-4778-8cf7-63e9a769ed23", "code": "wait_sonobuoy_finish_execution\n [Arguments] ${cmd} ${retries}=30x ${interval}=600s\n Wait Until Keyword Succeeds ${retries} ${interval} check_exection_sonobuoy ${cmd}", "settings": "{}", "variables": "{}", "name": "wait_sonobuoy_finish_execution", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/tests_functionality/sanity/Sonobuoy.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "cfa7cf0a-0dd3-4b35-9c64-403fb0d94677", "code": "*** Settings ***\n#Force Tags production ncsci\nForce Tags test_forced\n\nTest Timeout 60 min\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/node.robot\nLibrary DateTime\nLibrary String\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n#${C_VAR} varvalue\n#@{C_PRIO_ORDER_FOR_PARAMS} G_ TMGUI_ API_\n\n*** Test Cases ***\n\nprecase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\t#ssh.setup_keys\n\t#config.ncs_config_mod\n\n#precase_setup\n #[Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n # Add here precase keywordskeywords that do require ssh or rest api connections to lab\n # mandatory\n #setup.precase_setup\n\t# optional - ADD OPTIONAL precase kws here\n\nping_vip\n [Documentation] ping NCS vip\n ${cntrl_vip}= config.get_controller_vip\n ${x}= Set Variable 1\n WHILE True\n ${r}= ping.from_robot ${cntrl_vip}\n ${now}= DateTime.Get Current Date\n IF ${r} is False\n Log ${now} Ping ${cntrl_vip} failed level=WARN\n #${rc} ${output}= Operatingsystem.Run And Return Rc And Output sudo traceroute -T ${cntrl_vip} -p 22\n ${rc} ${output}= Operatingsystem.Run And Return Rc And Output echo abc123 | sudo -S -k traceroute -T ${cntrl_vip} -p 22\n Log ${output} level=WARN\n ELSE\n Log ${now} Ping ${cntrl_vip} ok\n END\n IF ${x} == 300\n BREAK\n END\n ${x}= Evaluate ${x} + 1\n BuiltIn.Sleep 1\n END", "name": "suites/task/test_ip_connectivity_jenkins_to_lab.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/node.robot': 'resource/node.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/test_ip_connectivity_jenkins_to_lab.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "2d3872ec-11b5-4549-a8aa-513207351dc1", "code": "precase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\t#ssh.setup_keys\n\t#config.ncs_config_mod\n\n#precase_setup\n #[Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n # Add here precase keywordskeywords that do require ssh or rest api connections to lab\n # mandatory\n #setup.precase_setup\n\t# optional - ADD OPTIONAL precase kws here", "settings": "{}", "variables": "{}", "name": "precase_ncm_rest_api_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/test_ip_connectivity_jenkins_to_lab.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dcec9a62-e468-41ab-aea7-cb8d03f10dff", "code": "ping_vip\n [Documentation] ping NCS vip\n ${cntrl_vip}= config.get_controller_vip\n ${x}= Set Variable 1", "settings": "{}", "variables": "{}", "name": "ping_vip", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/test_ip_connectivity_jenkins_to_lab.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "2269b503-3adf-4449-8eeb-8cea621c3685", "code": "*** Settings ***\nDocumentation ncs22 installation robot\n\nTest Timeout 300 min\nDefault Tags installation\n\n#Resource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\n#Resource ../../resource/namespace.robot\n#Resource ../../resource/node.robot\n#Resource ../../resource/pod.robot\n#Resource ../../resource/check.robot\n#Resource ../../resource/ping.robot\n#Resource ../../infra/ncmRestApi.robot\n#Resource ../../workaround/workaround.robot\n#Resource ../../resource/middleware.robot\n#Resource ../../infra/ncmRestApi.robot\n#Resource ../../infra/ncsManagerRestApi.robot\n#Resource ../../infra/k8sRestApi.robot\nLibrary Collections\nLibrary String\nLibrary DateTime\nLibrary Process\n\n#Suite Setup setup.suite_setup\n#Suite Teardown setup.suite_teardown\n\n\n*** Variables ***\n${C_NCS22_ENV_NAME} ruby #t\u00e4h\u00e4n editoi env tieto oikein!\n${C_NCS22_BUILD} 746 #t\u00e4h\u00e4n editoi green bild tieto oikein!\n${C_NCS22_envi} espoo_rack148_ncs_${C_NCS22_ENV_NAME}_or19 #t\u00e4st\u00e4 editoi rack-tieto oikein! espoo_rack148_ncs_ruby_or19\n${C_NCS22_PATH} /home/centos/datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD}/\n${C_HELPER_SERVER_IP} 10.74.66.78\n${C_HELPER_SERVER_USERNAME} centos\n${C_HELPER_SERVER_SSHKEY} 21.0/suites/task/installation_configs/Apuserveri-keypair\n*** Test Cases ***\n\n# preparation for the case -------------------------------------------------------------------------\n\n#open_connection_to_the_deployment_serve\n# [Documentation] open_connection_to_the_deployment_serve\n#\n# ${conn_depl_serv}= ssh.open_connection_to_deployment_server\n# Set Suite Variable ${S_CONN_DEPL_SERV} ${conn_depl_serv}\nsetup\n config.check_envsetup\n setup.setup_ssh\n\nopen_connection_to_helper_server\n Set Suite Variable ${S_EXTERNAL_NFS_SERVER_PASSWORD} ${EMPTY}\n Set Suite Variable ${S_EXTERNAL_NFS_SERVER_USERNAME} centos\n Set Suite Variable ${S_SSH_EXTERNAL_NFS_SERVER_KEY_FILE} ${C_HELPER_SERVER_SSHKEY}\n ${conn}= ssh.open_connection_to_external_server ${C_HELPER_SERVER_IP}\n## ${conn}= paramikowrapper.open_connection_with_key_file ${C_HELPER_SERVER_IP} ${C_HELPER_SERVER_USERNAME} ${C_HELPER_SERVER_SSHKEY}\n Set Suite Variable ${S_HELPER_SERVER_CONN} ${conn}\n ${host}= Set Variable ${C_HELPER_SERVER_IP}\n## Set To Dictionary ${S_SSH_CONNECTION_DICT} ${host}=${C_HELPER_SERVER_IP}\n Set To Dictionary ${S_SSH_CONNECTION_DICT} ${host}=${conn}\n\ndownload_wanted_sw\n [Documentation] Download wanted SW from sw repo\n download_wanted_sw\n\ncheck_installation_files_on_fileserver\n [Documentation] Check installation files on fileserver's dictionary\n\n ${linstallation_files}= Run Keyword check_installation_files ${S_HELPER_SERVER_CONN}\n Log ${linstallation_files}\n\nmodify_network_config\n [Documentation] Modify network_config\n modify_network_config\n\ncreate_confboot_iso\n#Run script\n ${cmd}= Set Variable sudo python3 /root/patchiso/patchiso.py --network_config ${C_NCS22_PATH}${C_NCS22_envi}_network_config ${C_NCS22_PATH}ncs-bootcd-22.100.1-${C_NCS22_BUILD}.iso ${C_NCS22_PATH}${C_NCS22_ENV_NAME}B${C_NCS22_BUILD}confbootcd.iso\n Log To console cmd ${cmd}\n ${std_out} ${std_err} ${code}= send_command_external_server_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n# ${std_out} ${std_err} ${code}= ssh.send_command_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${std_out}\n Log To console installed ${std_out}\n#/root/patchiso/patchiso.py --network_config /root/Tomato/NCS21_B399/network_config /root/Tomato/NCS21_B399/ncs-bootcd-21.100.1-399.iso /root/Tomato/NCS21_B399/tomatoB399confbootcd.iso\n\n\n\n# post actions for the case -------------------------------------------------------------------------\n\n#postcase_cleanup\n# [Documentation] Cleanup any possible object this robot suite might have created\n# setup.suite_cleanup\n\n#postcase_cluster_status\n# [Documentation] Check cluster status after the case\n# check.postcase_cluster_status\n\n*** Keywords ***\ncheck_installation_files\n [Documentation] Check installation files on fileserver's dictionary\n [Arguments] ${helper_server_conn}\n\n\n# ${conn}= ssh.open_connection_to_deployment_server\n ${cmd}= Set Variable sudo ls --full-time -ltr ${C_NCS22_PATH}\n ${installation_files}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${installation_files}= ssh.send_command ${helper_server_conn} ${cmd}\n Log ${installation_files}\n\n Log To console installation_files ${installation_files}\n\n\ndownload_wanted_sw\n\n [Documentation] Download wanted sw\n\n #make new directory for new build\n ${cmd}= Set Variable sudo mkdir datawarehouse/${C_NCS22_ENV_NAME};sudo mkdir datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD};sudo cd ${C_NCS22_PATH};\n Log To console cmd ${cmd}\n ${new_dire}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n ${new_dire}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${new_dire}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${new_dire}\n Log To console installation_files ${new_dire}\n\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/22.100.1/ncs/${C_NCS22_BUILD}/patchiso-22.100.1-${C_NCS22_BUILD}.el7.centos.noarch.rpm\n Log To console cmd ${cmd}\n ${patchiso_rpm}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${patchiso_rpm}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${patchiso_rpm}\n Log To console installation_files ${patchiso_rpm}\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo yum -y install patchiso-22.100.1-${C_NCS22_BUILD}.el7.centos.noarch.rpm\n Log To console cmd ${cmd}\n ${std_out} ${std_err} ${code}= ssh.send_command_external_server_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n# ${std_out} ${std_err} ${code}= ssh.send_command_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${std_out}\n Log To console installed ${std_out}\n\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc http://mirror.centos.org/centos/7/os/x86_64/Packages/bsdtar-3.1.2-14.el7_7.x86_64.rpm\n Log To console cmd ${cmd}\n ${bsdtar_rpm}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${bsdtar_rpm}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${bsdtar_rpm}\n Log To console installation_files ${bsdtar_rpm}\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc http://mirror.centos.org/centos/7/os/x86_64/Packages/libarchive-3.1.2-14.el7_7.x86_64.rpm\n Log To console cmd ${cmd}\n ${libarchive_rpm}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${libarchive_rpm}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${libarchive_rpm}\n Log To console installation_files ${libarchive_rpm}\n\n#install rpms\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo rpm -ivh libarchive-3.1.2-14.el7_7.x86_64.rpm bsdtar-3.1.2-14.el7_7.x86_64.rpm patchiso-22.100.1-${C_NCS22_BUILD}.el7.centos.noarch.rpm\n Log To console cmd ${cmd}\n ${depencenties}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd} 3\n# ${depencenties}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd} 3\n Log ${depencenties}\n Log To console installation_files ${depencenties}\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/22.100.1/ncs/${C_NCS22_BUILD}/ncs-bootcd-22.100.1-${C_NCS22_BUILD}.iso\n Log To console cmd ${cmd}\n ${bootcd_iso}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${bootcd_iso}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${bootcd_iso}\n Log To console installation_files ${bootcd_iso}\n\n\nmodify_network_config\n [Documentation] Modify network_config\n ... Create file \"network_config\" with the following network parameters (see an example), the name of file is mandatory \"network_config\":\n ... 4. \u00a0Provide the network info via a configuration file. e.g:\n ... modify wanted build number iso path to the enviroment's network_config\n ... NCS21_387]# cat network_config\n ... [DEFAULT]\n ... DEV=enp94s0f0\n ... VLAN=311\n ... IP=10.55.220.68/27\n ... DGW=10.55.220.65\n ... NAMESERVER=10.20.176.11\n ... ISO_URL=\"https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/21.100.1/cbis/399/ncs-21.100.1-399.iso\"\n ...\n ... sudo /root/patchiso/patchiso.py --network_config /root/Tomato/NCS21_B399/network_config /root/Tomato/NCS21_B399/ncs-bootcd-21.100.1-399.iso /root/Tomato/NCS21_B399/tomatoB399confbootcd.iso\n\n ${scp}= open_scp_connection_with_key_file ${C_HELPER_SERVER_IP} ${C_HELPER_SERVER_USERNAME} ${C_HELPER_SERVER_SSHKEY}\n ssh.scp_file_to_host ${scp} 22.0/suites/task/installation_configs/${C_NCS22_envi}_network_config ${C_NCS22_envi}_network_config\n\n ${output}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} sudo mv ${C_NCS22_envi}_network_config ${C_NCS22_PATH}${C_NCS22_envi}_network_config;cd ${C_NCS22_PATH}&&sudo cat ${C_NCS22_PATH}${C_NCS22_envi}_network_config\n Log ${output}\n Log To console network config file ${output}\n\n ${output}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} cd ${C_NCS22_PATH}&&sudo sed -i 's/xxx/${C_NCS22_BUILD}/g' ${C_NCS22_PATH}${C_NCS22_envi}_network_config\n Log ${output}\n Log To console sed output ${output}\n\n ${output}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} cd ${C_NCS22_PATH}&&sudo cat ${C_NCS22_PATH}${C_NCS22_envi}_network_config\n Log ${output}\n Log To console modified network config file ${output}\n\n\n\n\n", "name": "suites/task/installation.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6e24c49b-5523-49c6-aa2d-1796ea45b0ba", "code": "setup\n config.check_envsetup\n setup.setup_ssh", "settings": "{}", "variables": "{}", "name": "setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7aa6a449-1610-470e-a28e-25dfeb0e06c3", "code": "open_connection_to_helper_server\n Set Suite Variable ${S_EXTERNAL_NFS_SERVER_PASSWORD} ${EMPTY}\n Set Suite Variable ${S_EXTERNAL_NFS_SERVER_USERNAME} centos\n Set Suite Variable ${S_SSH_EXTERNAL_NFS_SERVER_KEY_FILE} ${C_HELPER_SERVER_SSHKEY}\n ${conn}= ssh.open_connection_to_external_server ${C_HELPER_SERVER_IP}\n## ${conn}= paramikowrapper.open_connection_with_key_file ${C_HELPER_SERVER_IP} ${C_HELPER_SERVER_USERNAME} ${C_HELPER_SERVER_SSHKEY}\n Set Suite Variable ${S_HELPER_SERVER_CONN} ${conn}\n ${host}= Set Variable ${C_HELPER_SERVER_IP}\n## Set To Dictionary ${S_SSH_CONNECTION_DICT} ${host}=${C_HELPER_SERVER_IP}\n Set To Dictionary ${S_SSH_CONNECTION_DICT} ${host}=${conn}", "settings": "{}", "variables": "{'C_HELPER_SERVER_SSHKEY': {'text': 'LPER_SERVER_SSHKEY} 21.0/suites/task/installation_configs/Apuserveri-keypair\\n*** Te'}, 'C_HELPER_SERVER_IP': {'text': 'LPER_SERVER_IP} 10.74.66.78\\n${C_HE'}}", "name": "open_connection_to_helper_server", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "21a4d7dd-e2ad-4f6c-86bf-9366588c963a", "code": "download_wanted_sw\n [Documentation] Download wanted SW from sw repo\n download_wanted_sw", "settings": "{}", "variables": "{}", "name": "download_wanted_sw", "documentation": "", "imports_file_locations": "{'installation': 'suites/task/installation.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "328a50bc-075e-4424-bd82-e9f512ef6f46", "code": "check_installation_files_on_fileserver\n [Documentation] Check installation files on fileserver's dictionary\n\n ${linstallation_files}= Run Keyword check_installation_files ${S_HELPER_SERVER_CONN}\n Log ${linstallation_files}", "settings": "{}", "variables": "{}", "name": "check_installation_files_on_fileserver", "documentation": "", "imports_file_locations": "{'installation': 'suites/task/installation.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "75e98ad1-5ad5-422b-9462-d7b494e9e30a", "code": "modify_network_config\n [Documentation] Modify network_config\n modify_network_config", "settings": "{}", "variables": "{}", "name": "modify_network_config", "documentation": "", "imports_file_locations": "{'installation': 'suites/task/installation.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d1296b03-f1fe-4ef5-8f8b-1ffe888771a8", "code": "create_confboot_iso\n#Run script\n ${cmd}= Set Variable sudo python3 /root/patchiso/patchiso.py --network_config ${C_NCS22_PATH}${C_NCS22_envi}_network_config ${C_NCS22_PATH}ncs-bootcd-22.100.1-${C_NCS22_BUILD}.iso ${C_NCS22_PATH}${C_NCS22_ENV_NAME}B${C_NCS22_BUILD}confbootcd.iso\n Log To console cmd ${cmd}\n ${std_out} ${std_err} ${code}= send_command_external_server_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n# ${std_out} ${std_err} ${code}= ssh.send_command_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${std_out}\n Log To console installed ${std_out}\n#/root/patchiso/patchiso.py --network_config /root/Tomato/NCS21_B399/network_config /root/Tomato/NCS21_B399/ncs-bootcd-21.100.1-399.iso /root/Tomato/NCS21_B399/tomatoB399confbootcd.iso\n\n\n\n# post actions for the case -------------------------------------------------------------------------\n\n#postcase_cleanup\n# [Documentation] Cleanup any possible object this robot suite might have created\n# setup.suite_cleanup\n\n#postcase_cluster_status\n# [Documentation] Check cluster status after the case\n# check.postcase_cluster_status", "settings": "{}", "variables": "{'C_NCS22_PATH': {'text': 'S22_PATH} /home/centos/datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD}/\\n${C_HE'}, 'C_NCS22_envi': {'text': 'NCS22_envi} espoo_rack148_ncs_${C_NCS22_ENV_NAME}_or19 #t\u00e4st\u00e4 editoi rack-tieto oikein! espoo_rack148_ncs_ruby_or19\\n${C_NC'}, 'C_NCS22_BUILD': {'text': 'C_NCS22_BUILD} 746 #t\u00e4h\u00e4n editoi green bild tieto oikein!\\n${C_'}, 'C_NCS22_ENV_NAME': {'text': '${C_NCS22_ENV_NAME} ruby #t\u00e4h\u00e4n editoi env tieto oikein!\\n${'}}", "name": "create_confboot_iso", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "44601b93-d9c9-4bd8-bfb4-78b9e6e10f7b", "code": "check_installation_files\n [Documentation] Check installation files on fileserver's dictionary\n [Arguments] ${helper_server_conn}\n\n\n# ${conn}= ssh.open_connection_to_deployment_server\n ${cmd}= Set Variable sudo ls --full-time -ltr ${C_NCS22_PATH}\n ${installation_files}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${installation_files}= ssh.send_command ${helper_server_conn} ${cmd}\n Log ${installation_files}\n\n Log To console installation_files ${installation_files}", "settings": "{}", "variables": "{'C_NCS22_PATH': {'text': 'S22_PATH} /home/centos/datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD}/\\n${C_HE'}}", "name": "check_installation_files", "documentation": "[Arguments] ${helper_server_conn}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "de5dea6c-8369-435a-bb1b-e9f9ad914900", "code": "download_wanted_sw\n\n [Documentation] Download wanted sw\n\n #make new directory for new build\n ${cmd}= Set Variable sudo mkdir datawarehouse/${C_NCS22_ENV_NAME};sudo mkdir datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD};sudo cd ${C_NCS22_PATH};\n Log To console cmd ${cmd}\n ${new_dire}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n ${new_dire}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${new_dire}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${new_dire}\n Log To console installation_files ${new_dire}\n\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/22.100.1/ncs/${C_NCS22_BUILD}/patchiso-22.100.1-${C_NCS22_BUILD}.el7.centos.noarch.rpm\n Log To console cmd ${cmd}\n ${patchiso_rpm}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${patchiso_rpm}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${patchiso_rpm}\n Log To console installation_files ${patchiso_rpm}\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo yum -y install patchiso-22.100.1-${C_NCS22_BUILD}.el7.centos.noarch.rpm\n Log To console cmd ${cmd}\n ${std_out} ${std_err} ${code}= ssh.send_command_external_server_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n# ${std_out} ${std_err} ${code}= ssh.send_command_and_return_rc ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${std_out}\n Log To console installed ${std_out}\n\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc http://mirror.centos.org/centos/7/os/x86_64/Packages/bsdtar-3.1.2-14.el7_7.x86_64.rpm\n Log To console cmd ${cmd}\n ${bsdtar_rpm}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${bsdtar_rpm}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${bsdtar_rpm}\n Log To console installation_files ${bsdtar_rpm}\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc http://mirror.centos.org/centos/7/os/x86_64/Packages/libarchive-3.1.2-14.el7_7.x86_64.rpm\n Log To console cmd ${cmd}\n ${libarchive_rpm}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${libarchive_rpm}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${libarchive_rpm}\n Log To console installation_files ${libarchive_rpm}\n\n#install rpms\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo rpm -ivh libarchive-3.1.2-14.el7_7.x86_64.rpm bsdtar-3.1.2-14.el7_7.x86_64.rpm patchiso-22.100.1-${C_NCS22_BUILD}.el7.centos.noarch.rpm\n Log To console cmd ${cmd}\n ${depencenties}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd} 3\n# ${depencenties}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd} 3\n Log ${depencenties}\n Log To console installation_files ${depencenties}\n\n ${cmd}= Set Variable cd ${C_NCS22_PATH};sudo wget -nc https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/22.100.1/ncs/${C_NCS22_BUILD}/ncs-bootcd-22.100.1-${C_NCS22_BUILD}.iso\n Log To console cmd ${cmd}\n ${bootcd_iso}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} ${cmd}\n# ${bootcd_iso}= ssh.send_command ${S_HELPER_SERVER_CONN} ${cmd}\n Log ${bootcd_iso}\n Log To console installation_files ${bootcd_iso}", "settings": "{}", "variables": "{'C_NCS22_ENV_NAME': {'text': '${C_NCS22_ENV_NAME} ruby #t\u00e4h\u00e4n editoi env tieto oikein!\\n${'}, 'C_NCS22_BUILD': {'text': 'C_NCS22_BUILD} 746 #t\u00e4h\u00e4n editoi green bild tieto oikein!\\n${C_'}, 'C_NCS22_PATH': {'text': 'S22_PATH} /home/centos/datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD}/\\n${C_HE'}}", "name": "download_wanted_sw", "documentation": "Download wanted sw", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "afe34aa9-6d14-4895-b4ec-db1355a76aaa", "code": "modify_network_config\n [Documentation] Modify network_config\n ... Create file \"network_config\" with the following network parameters (see an example), the name of file is mandatory \"network_config\":\n ... 4. \u00a0Provide the network info via a configuration file. e.g:\n ... modify wanted build number iso path to the enviroment's network_config\n ... NCS21_387]# cat network_config\n ... [DEFAULT]\n ... DEV=enp94s0f0\n ... VLAN=311\n ... IP=10.55.220.68/27\n ... DGW=10.55.220.65\n ... NAMESERVER=10.20.176.11\n ... ISO_URL=\"https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/21.100.1/cbis/399/ncs-21.100.1-399.iso\"\n ...\n ... sudo /root/patchiso/patchiso.py --network_config /root/Tomato/NCS21_B399/network_config /root/Tomato/NCS21_B399/ncs-bootcd-21.100.1-399.iso /root/Tomato/NCS21_B399/tomatoB399confbootcd.iso\n\n ${scp}= open_scp_connection_with_key_file ${C_HELPER_SERVER_IP} ${C_HELPER_SERVER_USERNAME} ${C_HELPER_SERVER_SSHKEY}\n ssh.scp_file_to_host ${scp} 22.0/suites/task/installation_configs/${C_NCS22_envi}_network_config ${C_NCS22_envi}_network_config\n\n ${output}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} sudo mv ${C_NCS22_envi}_network_config ${C_NCS22_PATH}${C_NCS22_envi}_network_config;cd ${C_NCS22_PATH}&&sudo cat ${C_NCS22_PATH}${C_NCS22_envi}_network_config\n Log ${output}\n Log To console network config file ${output}\n\n ${output}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} cd ${C_NCS22_PATH}&&sudo sed -i 's/xxx/${C_NCS22_BUILD}/g' ${C_NCS22_PATH}${C_NCS22_envi}_network_config\n Log ${output}\n Log To console sed output ${output}\n\n ${output}= ssh.send_command_external_server ${S_HELPER_SERVER_CONN} cd ${C_NCS22_PATH}&&sudo cat ${C_NCS22_PATH}${C_NCS22_envi}_network_config\n Log ${output}\n Log To console modified network config file ${output}", "settings": "{}", "variables": "{'C_HELPER_SERVER_IP': {'text': 'LPER_SERVER_IP} 10.74.66.78\\n${C_HE'}, 'C_HELPER_SERVER_USERNAME': {'text': 'LPER_SERVER_USERNAME} centos\\n${C_HE'}, 'C_HELPER_SERVER_SSHKEY': {'text': 'LPER_SERVER_SSHKEY} 21.0/suites/task/installation_configs/Apuserveri-keypair\\n*** Te'}, 'C_NCS22_envi': {'text': 'NCS22_envi} espoo_rack148_ncs_${C_NCS22_ENV_NAME}_or19 #t\u00e4st\u00e4 editoi rack-tieto oikein! espoo_rack148_ncs_ruby_or19\\n${C_NC'}, 'C_NCS22_PATH': {'text': 'S22_PATH} /home/centos/datawarehouse/${C_NCS22_ENV_NAME}/NCS22_B${C_NCS22_BUILD}/\\n${C_HE'}, 'C_NCS22_BUILD': {'text': 'C_NCS22_BUILD} 746 #t\u00e4h\u00e4n editoi green bild tieto oikein!\\n${C_'}}", "name": "modify_network_config", "documentation": "VLAN=311\n ... IP=10.55.220.68/27\n ... DGW=10.55.220.65\n ... NAMESERVER=10.20.176.11\n ... ISO_URL=\"https://repo3.cci.nokia.net/cbis-generic-candidates/cbis_vlab_repo/21.100.1/cbis/399/ncs-21.100.1-399.iso\"\n ...\n ... sudo /root/patchiso/patchiso.py --network_config /root/Tomato/NCS21_B399/network_config /root/Tomato/NCS21_B399/ncs-bootcd-21.100.1-399.iso /root/Tomato/NCS21_B399/tomatoB399confbootcd.iso", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/installation.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "920f1ff3-4d58-4373-ad61-c386997e134f", "code": "*** Settings ***\n\nDocumentation Case resets all BMCs straight from the node itself\n\n#Force Tags production ncsci\n\nTest Timeout 60 min\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/node.robot\nResource ../../resource/ceph.robot\n\nLibrary Collections\nLibrary String\nLibrary BuiltIn\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\\n\\n\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n setup.set_accepted_skip_TM_flag\n\ncollect_needed_info_and_sets_suite_variables\n [Documentation] Collects node info and set suite variables.\\n\\n\n get_nodeoamip_addr_list_and_set_suite_variables\n\ntc_reset_cluster_node_bmcs\n [Documentation] Reset cluster nodes BMCs.\\n\\n\n internal_check_is_baremetal\n FOR ${node} IN @{S_NODE_IP_LIST}\n ${conn}= ssh.open_connection_to_node ${node}\n ${hostname}= ssh.send_command ${conn} cmd=hostname\n ${std_out}= ssh.send_command ${conn} cmd=sudo ipmitool mc reset cold\n #Log To Console \\n\\tMC cold reset sent, ${hostname}\n Log To Console \\n\\t${std_out}, ${hostname}\n ssh.close_connection ${conn}\n END\n\ntc_reset_monitoring_node_bmcs\n [Documentation] Reset Monitoring node BMCs\\n\\n\n internal_check_is_baremetal\n Skip If \"${S_NCS_CONFIG_MODE}\"!=\"config5\" \\n\\tOnly NCS Config 5 is supported by this case\n Skip If \"${S_CENTRALCITEMONITOR_LIST}\"==\"${FALSE}\" \\n\\tDedicated Monitoring nodes not found from this environment!\n LOG TO CONSOLE \\n\n FOR ${node_ip} IN @{S_MONITOR_IP_LIST}\n ${conn}= ssh.open_connection_to_deployment_server\n ${deployment_password}= config.ncm_deployment_server_password\n ${deployment_username}= config.ncm_deployment_server_username\n ${cmd}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"hostname\"\n ${cmd2}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"sudo ipmitool mc reset cold\"\n ${hostname}= ssh.send_command ${conn} ${cmd}\n ${std_out}= ssh.send_command ${conn} ${cmd2}\n LOG TO CONSOLE \\n\\tCold reset BMC, ${hostname}\n ssh.close_connection ${conn}\n END\n\ntc_reset_central_manager_node_bmcs\n [Documentation] Reset Manager node BMCs\\n\\n\n internal_check_is_baremetal\n Skip If \"${S_NCS_CONFIG_MODE}\"!=\"config5\" \\n\\tOnly NCS Config 5 is supported by this case\n LOG TO CONSOLE \\n\n FOR ${node_ip} IN @{S_CENTRAL_MANAGER_IP_LIST}\n ${conn}= ssh.open_connection_to_deployment_server\n ${deployment_password}= config.ncm_deployment_server_password\n ${deployment_username}= config.ncm_deployment_server_username\n ${cmd}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"hostname\"\n ${cmd2}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"sudo ipmitool mc reset cold\"\n ${hostname}= ssh.send_command ${conn} ${cmd}\n ${std_out}= ssh.send_command ${conn} ${cmd2}\n LOG TO CONSOLE \\n\\tCold reset BMC, ${hostname}\n ssh.close_connection ${conn}\n END\n\n#tc_reset_workloadcluster_bmcs_from_central_site\n# [Documentation] Reset BMCs Central toward workloadcluster\\n\\n\n# internal_check_is_baremetal\n# Skip If \"${S_NCS_CONFIG_MODE}\"!=\"config5\" \\n\\tOnly NCS Config 5 is supported by this case\n## ${all_workloadcluster_node_names}= Combine Lists ${S_K8S_NAME_LIST} ${S_STORAGE_NAME_LIST}\n## Log To Console \\n\\n\\tSSH connection test from ${S_CENTRAL_CLUSTER_NAME} to workloadcluster ${S_NCS_CLUSTER_NAME}\n# Run Keyword And Continue On Failure internal_ssh_node_oam_ips ${S_NODE_IP_LIST} #${all_workloadcluster_node_names}\n\n# post actions for the case -------------------------------------------------------------------------\n\n#postcase_cleanup\n# [Documentation] Cleanup any possible object this robot suite might have created\n# ... This test is not creating anything, just cheking commands.\n# setup.suite_cleanup\n\n*** Keywords ***\n\ninternal_check_is_baremetal\n [Documentation] Check that it's baremetal installation\\n\\n\n ...\n ${is_baremetal_installation}= config.is_baremetal_installation\n #${is_baremetal_installation}= set variable ${FALSE} #TESTING TESTING !!!!!\n Skip If \"${is_baremetal_installation}\" != \"${TRUE}\" This can be executed only in baremetal nodes.\n\ninternal_ssh_node_oam_ips\n [Arguments] ${host_oam_ip_list} #${hostname_list}\n ${conn}= ssh.open_connection_to_deployment_server\n ${deployment_password}= config.ncm_deployment_server_password\n ${deployment_username}= config.ncm_deployment_server_username\n ${conn}= ssh.open_connection_to_deployment_server\n #${list_nbr}= Set Variable 0\n FOR ${node_oam_ip} IN @{host_oam_ip_list}\n ${cmd}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_oam_ip} \"hostname\"\n ${std_out}= Run Keyword And Continue On Failure ssh.send_command ${conn} ${cmd}\n Log To Console \\n\\tNODE_IP=${node_oam_ip}, ${std_out}\n END\n ssh.close_connection ${conn}\n\nget_nodeoamip_addr_list_and_set_suite_variables\n [Documentation] Gets node OAM IP list and sets suite variables.\\n\\n\n ... can't be used for Openstack NCS.\\n\\n\n ${is_openstack_installation}= config.is_openstack_installation\n Set Suite Variable ${IS_OPENSTACK_INSTALLATION} ${is_openstack_installation}\n ${is_ipv6}= config.is_ipv6_installation\n Set Suite Variable ${S_IS_IPV6} ${is_ipv6}\n ${ncs_config_mode}= config.ncs_config_mode\n Set Suite Variable ${S_NCS_CONFIG_MODE} ${ncs_config_mode}\n #LOG TO CONSOLE \\n IS_OPENSTACK=${IS_OPENSTACK_INSTALLATION}\n ${controller_vip}= get_controller_vip\n Set Suite Variable ${S_SSH_CONTROLLER_VIP} ${controller_vip}\n ${central_cluster_name}= IF \"${S_NCS_CONFIG_MODE}\"==\"config5\" config.central_deployment_cloud_name\n ... ELSE Set Variable ${FALSE}\n Set Suite Variable ${S_CENTRAL_CLUSTER_NAME} ${central_cluster_name}\n ${ncs_cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_NCS_CLUSTER_NAME} ${ncs_cluster_name}\n get_list_of_all_nodes\n change_node_name_to_ip_list\n ${is_baremetal_installation}= config.is_baremetal_installation\n IF \"${is_baremetal_installation}\" == \"${TRUE}\" internal_remove_duplicate_oam_ips\n\n\nchange_node_name_to_ip_list\n [Documentation] Change node names to IPs. As BM storage nodes can be SSH accessed\\n\\n\n ... only via OEM IP, not by name.\\n\\n\n ${node_ip_list}= create list\n ${storage_ip_list}= create list\n ${monitor_ip_list}= create_list\n ${central_manager_ip_list}= create_list\n FOR ${nodename} IN @{S_K8S_NAME_LIST}\n ${node_ip}= node.get_oam_ip ${nodename}\n log many NODE=${nodename}, IP=${node_ip}\n Collections.Append To List ${node_ip_list} ${node_ip}\n END\n\n FOR ${storage_name} IN @{S_STORAGE_NAME_LIST}\n ${storage_ip}= ceph.get_host_ip ${storage_name}\n ${storage_ip_list}= Collections.Append To List ${node_ip_list} ${storage_ip}\n END\n ${node_ip_list}= remove duplicates ${node_ip_list}\n #set suite variable ${S_NODE_IP_LIST} ${node_ip_list}\n #LOG TO CONSOLE \\nNODE_IP_LIST=${S_NODE_IP_LIST}\\n\n set suite variable ${S_NODE_IP_LIST} ${node_ip_list}\n\n Return From Keyword If \"${S_CENTRALCITEMANAGER_LIST}\"==\"${FALSE}\"\n LOG TO CONSOLE \\n\n FOR ${central_manager_name} IN @{S_CENTRALCITEMANAGER_LIST}\n ${node_ip}= node.get_centralsitemanager_node_oam_ip_address ${central_manager_name}\n Collections.Append To List ${central_manager_ip_list} ${node_ip}\n #LOG TO CONSOLE \\tMANAGER_OAM_IP=${central_manager_name}, ${node_ip}\n END\n Set Suite Variable ${S_CENTRAL_MANAGER_IP_LIST} ${central_manager_ip_list}\n\n Return From Keyword If \"${S_CENTRALCITEMONITOR_LIST}\"==\"${FALSE}\"\n LOG TO CONSOLE \\n\n FOR ${monitor_name} IN @{S_CENTRALCITEMONITOR_LIST}\n ${node_ip}= node.get_centralsitemonitor_node_oam_ip_address ${monitor_name}\n Collections.Append To List ${monitor_ip_list} ${node_ip}\n #LOG TO CONSOLE \\tMONITOR_OAM_IP=${monitor_name}, ${node_ip}\n END\n Set Suite Variable ${S_MONITOR_IP_LIST} ${monitor_ip_list}\n\nget_list_of_all_nodes\n [Documentation] Finds all node types.\\n\\n\n ... Creates a list of those.\n ${k8s_node_name_list}= node.get_name_list\n ${storage_list}= IF \"${IS_OPENSTACK_INSTALLATION}\"==\"${FALSE}\" ceph.get_host_list\n ... ELSE Set Variable ${EMPTY}\n ${node_list}= Create List\n ${node_list_temp}= Create List\n ${centralsitemonitor_node_list}= IF \"${S_NCS_CONFIG_MODE}\"==\"config5\" node.get_centralsitemonitor_nodes_name_list\n ... ELSE Set Variable ${FALSE}\n ${centralsitemanager_node_list}= IF \"${S_NCS_CONFIG_MODE}\"==\"config5\" node.get_centralsitemanager_nodes_name_list\n ... ELSE Set Variable ${FALSE}\n\n IF \"${centralsitemonitor_node_list}\"!=\"[]\" and \"${centralsitemonitor_node_list}\"!=\"${FALSE}\" Set Suite Variable ${S_CENTRALCITEMONITOR_LIST} ${centralsitemonitor_node_list}\n ... ELSE Set Suite Variable ${S_CENTRALCITEMONITOR_LIST} ${FALSE}\n\n IF \"${centralsitemanager_node_list}\"!=\"[]\" and \"${centralsitemanager_node_list}\"!=\"${FALSE}\" Set Suite Variable ${S_CENTRALCITEMANAGER_LIST} ${centralsitemanager_node_list}\n ... ELSE Set Suite Variable ${S_CENTRALCITEMANAGER_LIST} ${FALSE}\n #IF \"${S_CENTRALCITEMONITOR_LIST}\"==\"${FALSE}\" LOG TO CONSOLE \\n\\tMONITORIT=${S_CENTRALCITEMONITOR_LIST}\n log many STORAGE_LIST=${storage_list}\n log many LIST_OF_ALL_NODE_TYPES=${node_list}\n set suite variable ${S_K8S_NAME_LIST} ${k8s_node_name_list}\n ${storage_list}= IF \"${IS_OPENSTACK_INSTALLATION}\"==\"${TRUE}\" Create List\n ... ELSE Set Variable ${storage_list}\n set suite variable ${S_STORAGE_NAME_LIST} ${storage_list}\n\ninternal_remove_duplicate_oam_ips\n [Documentation] In case of conf 2 & 3 duplicates must be removed\\n\\n\n ... as there are many nodes in the same physical server.\\n\\n\n ... It's done by comparing node ipmi ips and if duplicates,\\n\\n\n ... not added to oam node ip list.\\n\\n\n ${node_ipmi_ip_list}= Create List\n ${node_oam_ip_list}= Create List\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${ipmi_ip}= ipmi.get_ipmi_address ${node_oam_address}\n #LOG TO CONSOLE NODE_OAM_IP=${node_oam_address}, Node IPMI_IP=${ipmi_ip}\n ${node_is there_already}= Collections.Get Matches ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE IS_ALREADY=${node_is there_already}\n IF \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_oam_ip_list} ${node_oam_address}\n IF \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE OAM=${node_oam_ip_list}, IPMI=${node_ipmi_ip_list}\n END\n set suite variable ${S_NODE_IP_LIST} ${node_oam_ip_list}", "name": "suites/task/cold_reset_bmc.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/ceph.robot': 'resource/ceph.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c5160498-758e-4874-ad2b-09779cce5f12", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\\n\\n\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n setup.set_accepted_skip_TM_flag", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7cbbdcf9-4ed0-45d3-be46-dc99b2370e54", "code": "collect_needed_info_and_sets_suite_variables\n [Documentation] Collects node info and set suite variables.\\n\\n\n get_nodeoamip_addr_list_and_set_suite_variables", "settings": "{}", "variables": "{}", "name": "collect_needed_info_and_sets_suite_variables", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "864edb8b-0fb6-4766-9c00-e649b9b2f091", "code": "tc_reset_cluster_node_bmcs\n [Documentation] Reset cluster nodes BMCs.\\n\\n\n internal_check_is_baremetal\n FOR ${node} IN @{S_NODE_IP_LIST}\n ${conn}= ssh.open_connection_to_node ${node}\n ${hostname}= ssh.send_command ${conn} cmd=hostname\n ${std_out}= ssh.send_command ${conn} cmd=sudo ipmitool mc reset cold\n #Log To Console \\n\\tMC cold reset sent, ${hostname}\n Log To Console \\n\\t${std_out}, ${hostname}\n ssh.close_connection ${conn}\n END", "settings": "{}", "variables": "{}", "name": "tc_reset_cluster_node_bmcs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "94b8030f-974b-4746-9913-06a7846c63c8", "code": "tc_reset_monitoring_node_bmcs\n [Documentation] Reset Monitoring node BMCs\\n\\n\n internal_check_is_baremetal\n Skip If \"${S_NCS_CONFIG_MODE}\"!=\"config5\" \\n\\tOnly NCS Config 5 is supported by this case\n Skip If \"${S_CENTRALCITEMONITOR_LIST}\"==\"${FALSE}\" \\n\\tDedicated Monitoring nodes not found from this environment!\n LOG TO CONSOLE \\n\n FOR ${node_ip} IN @{S_MONITOR_IP_LIST}\n ${conn}= ssh.open_connection_to_deployment_server\n ${deployment_password}= config.ncm_deployment_server_password\n ${deployment_username}= config.ncm_deployment_server_username\n ${cmd}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"hostname\"\n ${cmd2}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"sudo ipmitool mc reset cold\"\n ${hostname}= ssh.send_command ${conn} ${cmd}\n ${std_out}= ssh.send_command ${conn} ${cmd2}\n LOG TO CONSOLE \\n\\tCold reset BMC, ${hostname}\n ssh.close_connection ${conn}\n END", "settings": "{}", "variables": "{}", "name": "tc_reset_monitoring_node_bmcs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "2bf73f79-9a2f-4b64-91fa-8d029c5d11c0", "code": "tc_reset_central_manager_node_bmcs\n [Documentation] Reset Manager node BMCs\\n\\n\n internal_check_is_baremetal\n Skip If \"${S_NCS_CONFIG_MODE}\"!=\"config5\" \\n\\tOnly NCS Config 5 is supported by this case\n LOG TO CONSOLE \\n\n FOR ${node_ip} IN @{S_CENTRAL_MANAGER_IP_LIST}\n ${conn}= ssh.open_connection_to_deployment_server\n ${deployment_password}= config.ncm_deployment_server_password\n ${deployment_username}= config.ncm_deployment_server_username\n ${cmd}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"hostname\"\n ${cmd2}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_ip} \"sudo ipmitool mc reset cold\"\n ${hostname}= ssh.send_command ${conn} ${cmd}\n ${std_out}= ssh.send_command ${conn} ${cmd2}\n LOG TO CONSOLE \\n\\tCold reset BMC, ${hostname}\n ssh.close_connection ${conn}\n END\n\n#tc_reset_workloadcluster_bmcs_from_central_site\n# [Documentation] Reset BMCs Central toward workloadcluster\\n\\n\n# internal_check_is_baremetal\n# Skip If \"${S_NCS_CONFIG_MODE}\"!=\"config5\" \\n\\tOnly NCS Config 5 is supported by this case\n## ${all_workloadcluster_node_names}= Combine Lists ${S_K8S_NAME_LIST} ${S_STORAGE_NAME_LIST}\n## Log To Console \\n\\n\\tSSH connection test from ${S_CENTRAL_CLUSTER_NAME} to workloadcluster ${S_NCS_CLUSTER_NAME}\n# Run Keyword And Continue On Failure internal_ssh_node_oam_ips ${S_NODE_IP_LIST} #${all_workloadcluster_node_names}\n\n# post actions for the case -------------------------------------------------------------------------\n\n#postcase_cleanup\n# [Documentation] Cleanup any possible object this robot suite might have created\n# ... This test is not creating anything, just cheking commands.\n# setup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "tc_reset_central_manager_node_bmcs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d817b6de-900f-4c3f-a5de-91b66339b83f", "code": "internal_check_is_baremetal\n [Documentation] Check that it's baremetal installation\\n\\n\n ...\n ${is_baremetal_installation}= config.is_baremetal_installation\n #${is_baremetal_installation}= set variable ${FALSE} #TESTING TESTING !!!!!\n Skip If \"${is_baremetal_installation}\" != \"${TRUE}\" This can be executed only in baremetal nodes.", "settings": "{}", "variables": "{}", "name": "internal_check_is_baremetal", "documentation": "...", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e0aca364-37b8-456d-ae92-30090ee6a16f", "code": "internal_ssh_node_oam_ips\n [Arguments] ${host_oam_ip_list} #${hostname_list}\n ${conn}= ssh.open_connection_to_deployment_server\n ${deployment_password}= config.ncm_deployment_server_password\n ${deployment_username}= config.ncm_deployment_server_username\n ${conn}= ssh.open_connection_to_deployment_server\n #${list_nbr}= Set Variable 0\n FOR ${node_oam_ip} IN @{host_oam_ip_list}\n ${cmd}= Set Variable sshpass -p ${deployment_password} ssh -q -tt -o StrictHostKeyChecking=no ${deployment_username}@${node_oam_ip} \"hostname\"\n ${std_out}= Run Keyword And Continue On Failure ssh.send_command ${conn} ${cmd}\n Log To Console \\n\\tNODE_IP=${node_oam_ip}, ${std_out}\n END\n ssh.close_connection ${conn}", "settings": "{}", "variables": "{}", "name": "internal_ssh_node_oam_ips", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "21be4cbf-660a-4707-a94f-89e1047e46b5", "code": "get_nodeoamip_addr_list_and_set_suite_variables\n [Documentation] Gets node OAM IP list and sets suite variables.\\n\\n\n ... can't be used for Openstack NCS.\\n\\n\n ${is_openstack_installation}= config.is_openstack_installation\n Set Suite Variable ${IS_OPENSTACK_INSTALLATION} ${is_openstack_installation}\n ${is_ipv6}= config.is_ipv6_installation\n Set Suite Variable ${S_IS_IPV6} ${is_ipv6}\n ${ncs_config_mode}= config.ncs_config_mode\n Set Suite Variable ${S_NCS_CONFIG_MODE} ${ncs_config_mode}\n #LOG TO CONSOLE \\n IS_OPENSTACK=${IS_OPENSTACK_INSTALLATION}\n ${controller_vip}= get_controller_vip\n Set Suite Variable ${S_SSH_CONTROLLER_VIP} ${controller_vip}\n ${central_cluster_name}= IF \"${S_NCS_CONFIG_MODE}\"==\"config5\" config.central_deployment_cloud_name\n ... ELSE Set Variable ${FALSE}\n Set Suite Variable ${S_CENTRAL_CLUSTER_NAME} ${central_cluster_name}\n ${ncs_cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_NCS_CLUSTER_NAME} ${ncs_cluster_name}\n get_list_of_all_nodes\n change_node_name_to_ip_list\n ${is_baremetal_installation}= config.is_baremetal_installation\n IF \"${is_baremetal_installation}\" == \"${TRUE}\" internal_remove_duplicate_oam_ips", "settings": "{}", "variables": "{}", "name": "get_nodeoamip_addr_list_and_set_suite_variables", "documentation": "can't be used for Openstack NCS.\\n\\n", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f043c2fa-9c64-4207-b5ef-ea5198fb0c06", "code": "change_node_name_to_ip_list\n [Documentation] Change node names to IPs. As BM storage nodes can be SSH accessed\\n\\n\n ... only via OEM IP, not by name.\\n\\n\n ${node_ip_list}= create list\n ${storage_ip_list}= create list\n ${monitor_ip_list}= create_list\n ${central_manager_ip_list}= create_list\n FOR ${nodename} IN @{S_K8S_NAME_LIST}\n ${node_ip}= node.get_oam_ip ${nodename}\n log many NODE=${nodename}, IP=${node_ip}\n Collections.Append To List ${node_ip_list} ${node_ip}\n END\n\n FOR ${storage_name} IN @{S_STORAGE_NAME_LIST}\n ${storage_ip}= ceph.get_host_ip ${storage_name}\n ${storage_ip_list}= Collections.Append To List ${node_ip_list} ${storage_ip}\n END\n ${node_ip_list}= remove duplicates ${node_ip_list}\n #set suite variable ${S_NODE_IP_LIST} ${node_ip_list}\n #LOG TO CONSOLE \\nNODE_IP_LIST=${S_NODE_IP_LIST}\\n\n set suite variable ${S_NODE_IP_LIST} ${node_ip_list}\n\n Return From Keyword If \"${S_CENTRALCITEMANAGER_LIST}\"==\"${FALSE}\"\n LOG TO CONSOLE \\n\n FOR ${central_manager_name} IN @{S_CENTRALCITEMANAGER_LIST}\n ${node_ip}= node.get_centralsitemanager_node_oam_ip_address ${central_manager_name}\n Collections.Append To List ${central_manager_ip_list} ${node_ip}\n #LOG TO CONSOLE \\tMANAGER_OAM_IP=${central_manager_name}, ${node_ip}\n END\n Set Suite Variable ${S_CENTRAL_MANAGER_IP_LIST} ${central_manager_ip_list}\n\n Return From Keyword If \"${S_CENTRALCITEMONITOR_LIST}\"==\"${FALSE}\"\n LOG TO CONSOLE \\n\n FOR ${monitor_name} IN @{S_CENTRALCITEMONITOR_LIST}\n ${node_ip}= node.get_centralsitemonitor_node_oam_ip_address ${monitor_name}\n Collections.Append To List ${monitor_ip_list} ${node_ip}\n #LOG TO CONSOLE \\tMONITOR_OAM_IP=${monitor_name}, ${node_ip}\n END\n Set Suite Variable ${S_MONITOR_IP_LIST} ${monitor_ip_list}", "settings": "{}", "variables": "{}", "name": "change_node_name_to_ip_list", "documentation": "only via OEM IP, not by name.\\n\\n", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "7ec9c3b4-65fd-46b0-9897-d4d4e3753e11", "code": "get_list_of_all_nodes\n [Documentation] Finds all node types.\\n\\n\n ... Creates a list of those.\n ${k8s_node_name_list}= node.get_name_list\n ${storage_list}= IF \"${IS_OPENSTACK_INSTALLATION}\"==\"${FALSE}\" ceph.get_host_list\n ... ELSE Set Variable ${EMPTY}\n ${node_list}= Create List\n ${node_list_temp}= Create List\n ${centralsitemonitor_node_list}= IF \"${S_NCS_CONFIG_MODE}\"==\"config5\" node.get_centralsitemonitor_nodes_name_list\n ... ELSE Set Variable ${FALSE}\n ${centralsitemanager_node_list}= IF \"${S_NCS_CONFIG_MODE}\"==\"config5\" node.get_centralsitemanager_nodes_name_list\n ... ELSE Set Variable ${FALSE}\n\n IF \"${centralsitemonitor_node_list}\"!=\"[]\" and \"${centralsitemonitor_node_list}\"!=\"${FALSE}\" Set Suite Variable ${S_CENTRALCITEMONITOR_LIST} ${centralsitemonitor_node_list}\n ... ELSE Set Suite Variable ${S_CENTRALCITEMONITOR_LIST} ${FALSE}\n\n IF \"${centralsitemanager_node_list}\"!=\"[]\" and \"${centralsitemanager_node_list}\"!=\"${FALSE}\" Set Suite Variable ${S_CENTRALCITEMANAGER_LIST} ${centralsitemanager_node_list}\n ... ELSE Set Suite Variable ${S_CENTRALCITEMANAGER_LIST} ${FALSE}\n #IF \"${S_CENTRALCITEMONITOR_LIST}\"==\"${FALSE}\" LOG TO CONSOLE \\n\\tMONITORIT=${S_CENTRALCITEMONITOR_LIST}\n log many STORAGE_LIST=${storage_list}\n log many LIST_OF_ALL_NODE_TYPES=${node_list}\n set suite variable ${S_K8S_NAME_LIST} ${k8s_node_name_list}\n ${storage_list}= IF \"${IS_OPENSTACK_INSTALLATION}\"==\"${TRUE}\" Create List\n ... ELSE Set Variable ${storage_list}\n set suite variable ${S_STORAGE_NAME_LIST} ${storage_list}", "settings": "{}", "variables": "{}", "name": "get_list_of_all_nodes", "documentation": "Creates a list of those.", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "39191dfa-b49e-4074-a33e-50122d6b8c5c", "code": "internal_remove_duplicate_oam_ips\n [Documentation] In case of conf 2 & 3 duplicates must be removed\\n\\n\n ... as there are many nodes in the same physical server.\\n\\n\n ... It's done by comparing node ipmi ips and if duplicates,\\n\\n\n ... not added to oam node ip list.\\n\\n\n ${node_ipmi_ip_list}= Create List\n ${node_oam_ip_list}= Create List\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${ipmi_ip}= ipmi.get_ipmi_address ${node_oam_address}\n #LOG TO CONSOLE NODE_OAM_IP=${node_oam_address}, Node IPMI_IP=${ipmi_ip}\n ${node_is there_already}= Collections.Get Matches ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE IS_ALREADY=${node_is there_already}\n IF \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_oam_ip_list} ${node_oam_address}\n IF \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE OAM=${node_oam_ip_list}, IPMI=${node_ipmi_ip_list}\n END\n set suite variable ${S_NODE_IP_LIST} ${node_oam_ip_list}", "settings": "{}", "variables": "{}", "name": "internal_remove_duplicate_oam_ips", "documentation": "It's done by comparing node ipmi ips and if duplicates,\\n\\n\n ... not added to oam node ip list.\\n\\n", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/cold_reset_bmc.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "a5899f5f-3ae0-4361-b68f-d31ff24aa43b", "code": "*** Settings ***\n\nDocumentation Case steps:\n ...\t preparation_ncm_rest_api_login\n ...\t precase_cluster_status\n ...\t collect_needed_info_and_sets_suite_variables\n ... tc_founded_ipmi_ips\n ...\t tc_is_ipmi_log_dir_available\n ...\t tc_read_and_save_current_ipmi_log\n ...\t tc_clear_ipmi_log\n ...\t postcase_ncm_rest_api_login\n ...\t postcase_cleanup\n ...\t postcase_cluster_status\n\nForce Tags ipmi_sel_log_clear\n\nTest Timeout 60 min\n\nResource ../../resource/config.robot\nResource ../../resource/ipmi.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/node.robot\nResource ../../resource/ceph.robot\nResource ../../resource/check.robot\nLibrary Collections\nLibrary String\nLibrary BuiltIn\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n\npreparation_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}\n\nprecase_ssh_keys\n\tssh.setup_keys\n\n#precase_cluster_status\n# [Documentation] Check cluster status before the case\n# check.precase_cluster_status\n\ncollect_needed_info_and_sets_suite_variables\n [Documentation] Collects node info and set suite variables.\n internal_check_if_case_is_valid\n get_ipmi_addr_list_and_set_suite_variables\n\ntc_founded_ipmi_ips\n [Documentation] Printout the list of founded ipmi ips\n ... and amount of BM nodes.\n ...\n internal_check_if_case_is_valid\n ${cnt}= BuiltIn.Get Length ${S_IPMI_ADDRESS_LIST}\n Log To Console \\n\n Log To Console ~~~~~~~~~~~~~\n Log To Console IPMI_IP_LIST:\n Log To Console ~~~~~~~~~~~~~\n FOR ${ipmi_ip} IN @{S_IPMI_ADDRESS_LIST}\n Log To Console ${ipmi_ip}\n END\n Log To Console \\n\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\n Log To Console Amount of Bare Metal nodes = ${cnt}\\n\\n\n\ntc_is_ipmi_log_dir_available\n [Documentation] Checks does ipmi_sel_log directory exist on server.\n ... If not, create it.\n ... /var/log/ipmi_sel_log/\n ... As cbis-user is not allowed to modify directories under /var/log/\n ... access rights must be edited.\n ... Original drwxr-xr-x+ >>> drwxrwxrwx+\n ... The same issue may consern also the log file itsef. It's also checked.\n internal_check_if_case_is_valid\n LOG TO CONSOLE \\n\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${is_available}= internal_check_ipmi_directory ${node_oam_address}\n run keyword if \"${is_available}\"==\"${FALSE}\" internal_create_ipmi_directory ${node_oam_address}\n ... ELSE LOG TO CONSOLE Directory ipmi_sel_log found from node ${node_oam_address}\n internal_check_ipmi_directory_access ${node_oam_address}\n ${is_file_available}= internal_check_ipmi_log_file ${node_oam_address}\n run keyword if \"${is_file_available}\"==\"${TRUE}\" internal_check_ipmi_log_file_access ${node_oam_address}\n ... ELSE LOG TO CONSOLE ipmi_sel_list.log file not found from node ${node_oam_address}\\n\n END\n\ntc_read_and_save_current_ipmi_log\n [Documentation] Read and save current ipmi sel log.\n ... /var/log/ipmi_sel_log/ipmi_sel_list.log\n ...\n internal_check_if_case_is_valid\n LOG TO CONSOLE \\n\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${create}= ssh.send_command ${conn} sudo ipmitool sel elist -v > /var/log/ipmi_sel_log/ipmi_sel_list.log\n ${lines}= ssh.send_command ${conn} cat /var/log/ipmi_sel_log/ipmi_sel_list.log | grep -i 'SEL Record ID'\n ${cnt}= Get Count ${lines} SEL Record\n ssh.close_connection ${conn}\n LOG TO CONSOLE READING node ${node_oam_address}, Found and saving ${cnt} SEL Record(s)\n END\n\ntc_clear_ipmi_log\n [Documentation] Clear ipmi sel log.\n ...\n ...\n internal_check_if_case_is_valid\n LOG TO CONSOLE \\n\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n LOG TO CONSOLE CLEARING node ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${clear}= ssh.send_command ${conn} sudo ipmitool sel clear\n ssh.close_connection ${conn}\n END\n\n#postcase_ncm_rest_api_login\n# [Documentation] NCM rest api login needed to access the api in coming robot test cases\n# ${baseurl}= config.ncm_rest_api_base_url\n# ${username}= config.ncm_rest_api_username\n# ${password}= config.ncm_rest_api_password\n# ncmRestApi.login ${baseurl} ${username} ${password}\n\n# post actions for the case -------------------------------------------------------------------------\n\n#postcase_cleanup\n# [Documentation] Cleanup any possible object this robot suite might have created\n# setup.suite_cleanup\n\n#postcase_cluster_status\n# [Documentation] Check cluster status after the case\n# check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_check_if_case_is_valid\n [Documentation] Check that it's baremetal installation\n ...\n ${is_baremetal_installation}= config.is_baremetal_installation\n Skip If \"${is_baremetal_installation}\" != \"${TRUE}\" This can be executed only in baremetal nodes.\n\ninternal_check_ipmi_directory\n [Documentation] Check does ipmi_sel_log directory exist.\n ... If yes => ${TRUE}\n [Arguments] ${node_oam_address}\n\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/\n ssh.close_connection ${conn}\n ${match}= String.Get Regexp Matches ${result} (ipmi_sel_log) 1\n ${is_available}= run keyword if \"${match}\"!=\"[]\" set variable ${TRUE}\n ... ELSE set variable ${FALSE}\n [Return] ${is_available}\n\ninternal_check_ipmi_log_file\n [Documentation] Check does ipmi_sel_log file exist.\n ... If yes => ${TRUE}\n [Arguments] ${node_oam_address}\n\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/ipmi_sel_log/\n ssh.close_connection ${conn}\n ${match}= String.Get Regexp Matches ${result} (ipmi_sel_list) 1\n ${is_file_available}= run keyword if \"${match}\"!=\"[]\" set variable ${TRUE}\n ... ELSE set variable ${FALSE}\n [Return] ${is_file_available}\n\ninternal_check_ipmi_directory_access\n [Documentation] As cbis-user is not allowed to modify directories under /var/log/\n ... access rights must be edited.\n ... Original drwxr-xr-x+ >>>\n ... drwxrwxrwx+ 2 root root 31 Aug 18 12:01 ipmi_sel_log\n [Arguments] ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/ | grep ipmi_sel_log\n ${match}= String.Get Regexp Matches ${result} ^.{7}([a-z-]{3}) 1\n Should Not Be Equal \"${match}\" \"[]\" Failed to read /var/log/ipmi_sel_log/ directory access rights\n run keyword if \"${match[0]}\"!=\"rwx\" LOG TO CONSOLE Current access rights o=${match[0]}, modifying access rights of /var/log/ipmi_sel_log/ directory for ncs-administrator user\n run keyword if \"${match[0]}\"!=\"rwx\" ssh.send_command ${conn} sudo chmod o=rwx /var/log/ipmi_sel_log/\n ... ELSE LOG TO CONSOLE Access rights of /var/log/ipmi_sel_log/ directory were correct (o=${match[0]}) for ncs-administrator user already\n ssh.close_connection ${conn}\n\ninternal_check_ipmi_log_file_access\n [Documentation] As cbis-user is not allowed to modify log file /var/log/ipmi_sel_log/ipmi_sel_list.log\n ... if created as root. Access rights must be edited.\n ... Created as root \"-rw-r-----+\" modified to \"-rw-r--rw-+\"\n ...\n [Arguments] ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/ipmi_sel_log/ipmi_sel_list.log\n ${match}= String.Get Regexp Matches ${result} ^.{7}([a-z-]{3}) 1\n Should Not Be Equal \"${match}\" \"[]\" Failed to read /var/log/ipmi_sel_log/ipmi_sel_list.log file access rights\n run keyword if \"${match[0]}\"!=\"rw-\" LOG TO CONSOLE Current access rights o=${match[0]}, modifying access rights of /var/log/ipmi_sel_log/ipmi_sel_list.log file for ncs-administrator user\\n\n run keyword if \"${match[0]}\"!=\"rw-\" ssh.send_command ${conn} sudo chmod o=rw /var/log/ipmi_sel_log/ipmi_sel_list.log\n ... ELSE LOG TO CONSOLE Access rights of /var/log/ipmi_sel_log/ipmi_sel_list.log file were correct (o=${match[0]}) for ncs-administrator user already\\n\n ssh.close_connection ${conn}\n\ninternal_create_ipmi_directory\n [Documentation] Creates ipmi_sel_log directory to node.\n ... Confirms that it's created.\n [Arguments] ${node_oam_address}\n\n LOG TO CONSOLE \\nCREATING ipmi_sel_log directory to node ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${create}= ssh.send_command ${conn} sudo mkdir /var/log/ipmi_sel_log\n ssh.close_connection ${conn}\n ${is_success}= internal_check_ipmi_directory ${node_oam_address}\n run keyword if \"${is_success}\" == \"${TRUE}\" LOG TO CONSOLE Created /var/log/ipmi_sel_log directory to node ${node_oam_address}\n ... ELSE Run run keyword and continue on failure Fail NOT possible to create ipmi_sel_log directory to node ${node_oam_address}\n\nget_ipmi_addr_list_and_set_suite_variables\n [Documentation] Gets ipmi address list and sets suite variables.\n ... Confirms that it's BareMetal installation.\n ... Othervise will fail as ipmitool and RedFish\n ... can't be used for Openstack NCS.\n internal_check_if_case_is_valid\n# ${mode}= config.ncs_config_mode\n# ${is_central}= Run Keyword If \"${mode}\"==\"config5\" Set Variable ${TRUE}\n# ... ELSE Set Variable ${FALSE}\n# Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n# ${cluster_name}= Run Keyword If \"${S_IS_CENTRAL}\"==\"${FALSE}\" config.get_ncs_cluster_name\n# ... ELSE config.central_deployment_cloud_name\n ${cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n get_list_of_all_nodes\n change_node_name_to_ip_list\n ${ip_list}= create list\n ${ip_list}= get_ipmi_address_of_all_nodes\n log many IP_LIST=${ip_list}\n Set Suite Variable ${S_IPMI_ADDRESS_LIST} ${ip_list}\n internal_remove_duplicate_oam_ips\n\nchange_node_name_to_ip_list\n [Documentation] Change node names to IPs. As BM storage nodes can be SSH accessed\n ... only via OEM IP, not by name.\n ${node_ip_list}= create list\n ${storage_ip_list}= create list\n FOR ${nodename} IN @{S_K8S_NAME_LIST}\n ${node_ip}= node.get_oam_ip ${nodename}\n log many NODE=${nodename}, IP=${node_ip}\n Collections.Append To List ${node_ip_list} ${node_ip}\n END\n\n FOR ${storage_name} IN @{S_STORAGE_NAME_LIST}\n ${storage_ip}= ceph.get_host_ip ${storage_name}\n ${storage_ip_list}= Collections.Append To List ${node_ip_list} ${storage_ip}\n END\n ${node_ip_list}= remove duplicates ${node_ip_list}\n set suite variable ${S_NODE_IP_LIST} ${node_ip_list}\n log NODE_IP_LIST=${S_NODE_IP_LIST}\n\nget_ipmi_address_of_all_nodes\n [Documentation] Chanes node IPs to ipmi address. Those are needed for ipmi and\n ... RedFish operations. Creates a list of those.\n\n ${node_list}= Create List\n ${node_list_temp}= Create List\n FOR ${node} IN @{S_NODE_IP_LIST}\n LOG NODE=${node}\n ${node_ipmi_ip}= ipmi.get_ipmi_address ${node}\n Collections.Append To List ${node_list_temp} ${node_ipmi_ip}\n log IP=${node_ipmi_ip}, LIST=${node_list_temp}\n END\n ${node_list}= Remove Duplicates ${node_list_temp}\n log many DUPLICATES_REMOVED_IPMI=${node_list}\n [Return] ${node_list}\n\nget_list_of_all_nodes\n [Documentation] Finds all node types.\n ... Creates a list of those.\n ${k8s_node_name_list}= node.get_name_list\n ${storage_list}= ceph.get_host_list\n ${node_list}= Create List\n ${node_list_temp}= Create List\n log many STORAGE_LIST=${storage_list}\n log many LIST_OF_ALL_NODE_TYPES=${node_list}\n set suite variable ${S_K8S_NAME_LIST} ${k8s_node_name_list}\n set suite variable ${S_STORAGE_NAME_LIST} ${storage_list}\n\ninternal_remove_duplicate_oam_ips\n [Documentation] In case of conf 2 & 3 duplicates must be removed\n ... as there are many nodes in the same physical server.\n ... It's done by comparing node ipmi ips and if duplicates,\n ... not added to oam node ip list.\n internal_check_if_case_is_valid\n ${node_ipmi_ip_list}= Create List\n ${node_oam_ip_list}= Create List\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${ipmi_ip}= ipmi.get_ipmi_address ${node_oam_address}\n #LOG TO CONSOLE NODE_OAM_IP=${node_oam_address}, Node IPMI_IP=${ipmi_ip}\n ${node_is there_already}= Collections.Get Matches ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE IS_ALREADY=${node_is there_already}\n run keyword if \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_oam_ip_list} ${node_oam_address}\n run keyword if \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE OAM=${node_oam_ip_list}, IPMI=${node_ipmi_ip_list}\n END\n set suite variable ${S_NODE_IP_LIST} ${node_oam_ip_list}\n", "name": "suites/task/clear_ipmi_sel_log.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/ipmi.robot': 'resource/ipmi.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/ceph.robot': 'resource/ceph.robot', '../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "862e28d2-4f23-424c-8f6b-640a0e8f35d7", "code": "preparation_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n ${baseurl}= config.ncm_rest_api_base_url\n ${username}= config.ncm_rest_api_username\n ${password}= config.ncm_rest_api_password\n ncmRestApi.login ${baseurl} ${username} ${password}", "settings": "{}", "variables": "{}", "name": "preparation_ncm_rest_api_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "03843c74-1c75-4bcf-911b-ef10e17d1b86", "code": "precase_ssh_keys\n\tssh.setup_keys\n\n#precase_cluster_status\n# [Documentation] Check cluster status before the case\n# check.precase_cluster_status", "settings": "{}", "variables": "{}", "name": "precase_ssh_keys", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "becd1d4a-4138-4d8e-8746-7f9ae62baa7c", "code": "collect_needed_info_and_sets_suite_variables\n [Documentation] Collects node info and set suite variables.\n internal_check_if_case_is_valid\n get_ipmi_addr_list_and_set_suite_variables", "settings": "{}", "variables": "{}", "name": "collect_needed_info_and_sets_suite_variables", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "53a96a65-9362-4806-a0d6-aaeb40586df8", "code": "tc_founded_ipmi_ips\n [Documentation] Printout the list of founded ipmi ips\n ... and amount of BM nodes.\n ...\n internal_check_if_case_is_valid\n ${cnt}= BuiltIn.Get Length ${S_IPMI_ADDRESS_LIST}\n Log To Console \\n\n Log To Console ~~~~~~~~~~~~~\n Log To Console IPMI_IP_LIST:\n Log To Console ~~~~~~~~~~~~~\n FOR ${ipmi_ip} IN @{S_IPMI_ADDRESS_LIST}\n Log To Console ${ipmi_ip}\n END\n Log To Console \\n\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\u00a4\n Log To Console Amount of Bare Metal nodes = ${cnt}\\n\\n", "settings": "{'BuiltIn': {'text': 'Library BuiltIn'}}", "variables": "{}", "name": "tc_founded_ipmi_ips", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "acc1f2e3-686c-49bc-b52e-cb71093fafe5", "code": "tc_is_ipmi_log_dir_available\n [Documentation] Checks does ipmi_sel_log directory exist on server.\n ... If not, create it.\n ... /var/log/ipmi_sel_log/\n ... As cbis-user is not allowed to modify directories under /var/log/\n ... access rights must be edited.\n ... Original drwxr-xr-x+ >>> drwxrwxrwx+\n ... The same issue may consern also the log file itsef. It's also checked.\n internal_check_if_case_is_valid\n LOG TO CONSOLE \\n\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${is_available}= internal_check_ipmi_directory ${node_oam_address}\n run keyword if \"${is_available}\"==\"${FALSE}\" internal_create_ipmi_directory ${node_oam_address}\n ... ELSE LOG TO CONSOLE Directory ipmi_sel_log found from node ${node_oam_address}\n internal_check_ipmi_directory_access ${node_oam_address}\n ${is_file_available}= internal_check_ipmi_log_file ${node_oam_address}\n run keyword if \"${is_file_available}\"==\"${TRUE}\" internal_check_ipmi_log_file_access ${node_oam_address}\n ... ELSE LOG TO CONSOLE ipmi_sel_list.log file not found from node ${node_oam_address}\\n\n END", "settings": "{}", "variables": "{}", "name": "tc_is_ipmi_log_dir_available", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "62cba816-fcfd-44cf-8510-78562e1e1535", "code": "tc_read_and_save_current_ipmi_log\n [Documentation] Read and save current ipmi sel log.\n ... /var/log/ipmi_sel_log/ipmi_sel_list.log\n ...\n internal_check_if_case_is_valid\n LOG TO CONSOLE \\n\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${create}= ssh.send_command ${conn} sudo ipmitool sel elist -v > /var/log/ipmi_sel_log/ipmi_sel_list.log\n ${lines}= ssh.send_command ${conn} cat /var/log/ipmi_sel_log/ipmi_sel_list.log | grep -i 'SEL Record ID'\n ${cnt}= Get Count ${lines} SEL Record\n ssh.close_connection ${conn}\n LOG TO CONSOLE READING node ${node_oam_address}, Found and saving ${cnt} SEL Record(s)\n END", "settings": "{}", "variables": "{}", "name": "tc_read_and_save_current_ipmi_log", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "305dbefb-77e2-4a97-9a0f-d94624d5335f", "code": "tc_clear_ipmi_log\n [Documentation] Clear ipmi sel log.\n ...\n ...\n internal_check_if_case_is_valid\n LOG TO CONSOLE \\n\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n LOG TO CONSOLE CLEARING node ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${clear}= ssh.send_command ${conn} sudo ipmitool sel clear\n ssh.close_connection ${conn}\n END\n\n#postcase_ncm_rest_api_login\n# [Documentation] NCM rest api login needed to access the api in coming robot test cases\n# ${baseurl}= config.ncm_rest_api_base_url\n# ${username}= config.ncm_rest_api_username\n# ${password}= config.ncm_rest_api_password\n# ncmRestApi.login ${baseurl} ${username} ${password}\n\n# post actions for the case -------------------------------------------------------------------------\n\n#postcase_cleanup\n# [Documentation] Cleanup any possible object this robot suite might have created\n# setup.suite_cleanup\n\n#postcase_cluster_status\n# [Documentation] Check cluster status after the case\n# check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "tc_clear_ipmi_log", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f35297bf-11ff-4098-b442-ecd02b6cb107", "code": "internal_check_if_case_is_valid\n [Documentation] Check that it's baremetal installation\n ...\n ${is_baremetal_installation}= config.is_baremetal_installation\n Skip If \"${is_baremetal_installation}\" != \"${TRUE}\" This can be executed only in baremetal nodes.", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "...", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "0af6c92f-a7a7-4f15-ae34-b903200f2a5a", "code": "internal_check_ipmi_directory\n [Documentation] Check does ipmi_sel_log directory exist.\n ... If yes => ${TRUE}\n [Arguments] ${node_oam_address}\n\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/\n ssh.close_connection ${conn}\n ${match}= String.Get Regexp Matches ${result} (ipmi_sel_log) 1\n ${is_available}= run keyword if \"${match}\"!=\"[]\" set variable ${TRUE}\n ... ELSE set variable ${FALSE}\n [Return] ${is_available}\n\ninternal_check_ipmi_log_file\n [Documentation] Check does ipmi_sel_log file exist.\n ... If yes => ${TRUE}\n [Arguments] ${node_oam_address}\n\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/ipmi_sel_log/\n ssh.close_connection ${conn}\n ${match}= String.Get Regexp Matches ${result} (ipmi_sel_list) 1\n ${is_file_available}= run keyword if \"${match}\"!=\"[]\" set variable ${TRUE}\n ... ELSE set variable ${FALSE}\n [Return] ${is_file_available}\n\ninternal_check_ipmi_directory_access\n [Documentation] As cbis-user is not allowed to modify directories under /var/log/\n ... access rights must be edited.\n ... Original drwxr-xr-x+ >>>\n ... drwxrwxrwx+ 2 root root 31 Aug 18 12:01 ipmi_sel_log\n [Arguments] ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/ | grep ipmi_sel_log\n ${match}= String.Get Regexp Matches ${result} ^.{7}([a-z-]{3}) 1\n Should Not Be Equal \"${match}\" \"[]\" Failed to read /var/log/ipmi_sel_log/ directory access rights\n run keyword if \"${match[0]}\"!=\"rwx\" LOG TO CONSOLE Current access rights o=${match[0]}, modifying access rights of /var/log/ipmi_sel_log/ directory for ncs-administrator user\n run keyword if \"${match[0]}\"!=\"rwx\" ssh.send_command ${conn} sudo chmod o=rwx /var/log/ipmi_sel_log/\n ... ELSE LOG TO CONSOLE Access rights of /var/log/ipmi_sel_log/ directory were correct (o=${match[0]}) for ncs-administrator user already\n ssh.close_connection ${conn}", "settings": "{'String': {'text': 'Library String'}}", "variables": "{}", "name": "internal_check_ipmi_directory", "documentation": "[Arguments] ${node_oam_address}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8b58fa15-7f54-4e3b-87f4-e111f6960d7b", "code": "internal_check_ipmi_log_file_access\n [Documentation] As cbis-user is not allowed to modify log file /var/log/ipmi_sel_log/ipmi_sel_list.log\n ... if created as root. Access rights must be edited.\n ... Created as root \"-rw-r-----+\" modified to \"-rw-r--rw-+\"\n ...\n [Arguments] ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${result}= ssh.send_command ${conn} sudo ls -ltr /var/log/ipmi_sel_log/ipmi_sel_list.log\n ${match}= String.Get Regexp Matches ${result} ^.{7}([a-z-]{3}) 1\n Should Not Be Equal \"${match}\" \"[]\" Failed to read /var/log/ipmi_sel_log/ipmi_sel_list.log file access rights\n run keyword if \"${match[0]}\"!=\"rw-\" LOG TO CONSOLE Current access rights o=${match[0]}, modifying access rights of /var/log/ipmi_sel_log/ipmi_sel_list.log file for ncs-administrator user\\n\n run keyword if \"${match[0]}\"!=\"rw-\" ssh.send_command ${conn} sudo chmod o=rw /var/log/ipmi_sel_log/ipmi_sel_list.log\n ... ELSE LOG TO CONSOLE Access rights of /var/log/ipmi_sel_log/ipmi_sel_list.log file were correct (o=${match[0]}) for ncs-administrator user already\\n\n ssh.close_connection ${conn}", "settings": "{'String': {'text': 'Library String'}}", "variables": "{}", "name": "internal_check_ipmi_log_file_access", "documentation": "[Arguments] ${node_oam_address}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "bedd039a-6276-4148-ae4e-09968d63ac07", "code": "internal_create_ipmi_directory\n [Documentation] Creates ipmi_sel_log directory to node.\n ... Confirms that it's created.\n [Arguments] ${node_oam_address}\n\n LOG TO CONSOLE \\nCREATING ipmi_sel_log directory to node ${node_oam_address}\n ${conn}= ssh.open_connection_to_node ${node_oam_address}\n ${create}= ssh.send_command ${conn} sudo mkdir /var/log/ipmi_sel_log\n ssh.close_connection ${conn}\n ${is_success}= internal_check_ipmi_directory ${node_oam_address}\n run keyword if \"${is_success}\" == \"${TRUE}\" LOG TO CONSOLE Created /var/log/ipmi_sel_log directory to node ${node_oam_address}\n ... ELSE Run run keyword and continue on failure Fail NOT possible to create ipmi_sel_log directory to node ${node_oam_address}", "settings": "{}", "variables": "{}", "name": "internal_create_ipmi_directory", "documentation": "Confirms that it's created.", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b0a0a7bd-dad1-48b8-965a-112e2efd8334", "code": "get_ipmi_addr_list_and_set_suite_variables\n [Documentation] Gets ipmi address list and sets suite variables.\n ... Confirms that it's BareMetal installation.\n ... Othervise will fail as ipmitool and RedFish\n ... can't be used for Openstack NCS.\n internal_check_if_case_is_valid\n# ${mode}= config.ncs_config_mode\n# ${is_central}= Run Keyword If \"${mode}\"==\"config5\" Set Variable ${TRUE}\n# ... ELSE Set Variable ${FALSE}\n# Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n# ${cluster_name}= Run Keyword If \"${S_IS_CENTRAL}\"==\"${FALSE}\" config.get_ncs_cluster_name\n# ... ELSE config.central_deployment_cloud_name\n ${cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n get_list_of_all_nodes\n change_node_name_to_ip_list\n ${ip_list}= create list\n ${ip_list}= get_ipmi_address_of_all_nodes\n log many IP_LIST=${ip_list}\n Set Suite Variable ${S_IPMI_ADDRESS_LIST} ${ip_list}\n internal_remove_duplicate_oam_ips", "settings": "{}", "variables": "{}", "name": "get_ipmi_addr_list_and_set_suite_variables", "documentation": "Othervise will fail as ipmitool and RedFish\n ... can't be used for Openstack NCS.", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b5a16d62-6259-4e4e-9f26-df480f6e87af", "code": "change_node_name_to_ip_list\n [Documentation] Change node names to IPs. As BM storage nodes can be SSH accessed\n ... only via OEM IP, not by name.\n ${node_ip_list}= create list\n ${storage_ip_list}= create list\n FOR ${nodename} IN @{S_K8S_NAME_LIST}\n ${node_ip}= node.get_oam_ip ${nodename}\n log many NODE=${nodename}, IP=${node_ip}\n Collections.Append To List ${node_ip_list} ${node_ip}\n END\n\n FOR ${storage_name} IN @{S_STORAGE_NAME_LIST}\n ${storage_ip}= ceph.get_host_ip ${storage_name}\n ${storage_ip_list}= Collections.Append To List ${node_ip_list} ${storage_ip}\n END\n ${node_ip_list}= remove duplicates ${node_ip_list}\n set suite variable ${S_NODE_IP_LIST} ${node_ip_list}\n log NODE_IP_LIST=${S_NODE_IP_LIST}", "settings": "{}", "variables": "{}", "name": "change_node_name_to_ip_list", "documentation": "only via OEM IP, not by name.", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d8f7b8a3-9b2e-4a2a-ae45-2166be2ddafc", "code": "get_ipmi_address_of_all_nodes\n [Documentation] Chanes node IPs to ipmi address. Those are needed for ipmi and\n ... RedFish operations. Creates a list of those.\n\n ${node_list}= Create List\n ${node_list_temp}= Create List\n FOR ${node} IN @{S_NODE_IP_LIST}\n LOG NODE=${node}\n ${node_ipmi_ip}= ipmi.get_ipmi_address ${node}\n Collections.Append To List ${node_list_temp} ${node_ipmi_ip}\n log IP=${node_ipmi_ip}, LIST=${node_list_temp}\n END\n ${node_list}= Remove Duplicates ${node_list_temp}\n log many DUPLICATES_REMOVED_IPMI=${node_list}\n [Return] ${node_list}\n\nget_list_of_all_nodes\n [Documentation] Finds all node types.\n ... Creates a list of those.\n ${k8s_node_name_list}= node.get_name_list\n ${storage_list}= ceph.get_host_list\n ${node_list}= Create List\n ${node_list_temp}= Create List\n log many STORAGE_LIST=${storage_list}\n log many LIST_OF_ALL_NODE_TYPES=${node_list}\n set suite variable ${S_K8S_NAME_LIST} ${k8s_node_name_list}\n set suite variable ${S_STORAGE_NAME_LIST} ${storage_list}", "settings": "{}", "variables": "{}", "name": "get_ipmi_address_of_all_nodes", "documentation": "RedFish operations. Creates a list of those.", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8eed53b2-0d55-4b6d-8f6e-7629288c163d", "code": "internal_remove_duplicate_oam_ips\n [Documentation] In case of conf 2 & 3 duplicates must be removed\n ... as there are many nodes in the same physical server.\n ... It's done by comparing node ipmi ips and if duplicates,\n ... not added to oam node ip list.\n internal_check_if_case_is_valid\n ${node_ipmi_ip_list}= Create List\n ${node_oam_ip_list}= Create List\n FOR ${node_oam_address} IN @{S_NODE_IP_LIST}\n ${ipmi_ip}= ipmi.get_ipmi_address ${node_oam_address}\n #LOG TO CONSOLE NODE_OAM_IP=${node_oam_address}, Node IPMI_IP=${ipmi_ip}\n ${node_is there_already}= Collections.Get Matches ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE IS_ALREADY=${node_is there_already}\n run keyword if \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_oam_ip_list} ${node_oam_address}\n run keyword if \"${node_is there_already}\" == \"[]\" Collections.Append To List ${node_ipmi_ip_list} ${ipmi_ip}\n #LOG TO CONSOLE OAM=${node_oam_ip_list}, IPMI=${node_ipmi_ip_list}\n END\n set suite variable ${S_NODE_IP_LIST} ${node_oam_ip_list}", "settings": "{}", "variables": "{}", "name": "internal_remove_duplicate_oam_ips", "documentation": "It's done by comparing node ipmi ips and if duplicates,\n ... not added to oam node ip list.", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_ipmi_sel_log.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "37e1b6f9-7f33-4bfb-ab36-425efbd10acc", "code": "*** Settings ***\nDocumentation Clear all alarms\n\nForce Tags fix\n\nResource ../../resource/ceph.robot\nResource ../../resource/setup.robot\nResource ../../resource/middleware.robot\nResource ../../resource/ssh.robot\nResource ../../resource/check.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Variables ***\n\n*** Test Cases ***\n\n# preparation for the case -------------------------------------------------------------------------\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n setup.precase_setup\n ${ta_env}= config.is_test_automation_development_cloud\n Set Suite Variable ${S_TEST_AUTOMATION_DEVELOPMENT_CLOUD} ${ta_env}\n ${cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case\n Run Keyword And Ignore Error check.precase_cluster_status\n\n# actual test case -------------------------------------------------------------------------\n\nclear_all_alarms\n [Documentation] Clear all alarms\n #${alarms_filtered}= alarmManager.Get Alarms Filtered severity_filter=MINOR\n ${alarms}= alarmManager.Get Alarms\n #### FOR ${alarm} IN @{alarms_filtered}\n FOR ${alarm} IN @{alarms}\n ${id}= Get From Dictionary ${alarm} id\n Log To Console ${id}\n alarmManager.clear_alarm_by_alarm_id ${id}\n END\n\n# post actions for the case -------------------------------------------------------------------------\n\nPostcase cluster status\n [Documentation] Check cluster status after the case\n Run Keyword And Ignore Error check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_iterate_fix_spillover\n [Documentation] ceph.health check, execute commands to fix spillover issues\n #### return fixing commandss with true parameter\n ${ceph_fix_cmds}= ceph.health return_cmds=${TRUE}\n ${conn}= ssh.open_connection_to_controller\n FOR ${cmd} IN @{ceph_fix_cmds}\n ${std_out}= ssh.send_command ${conn} ${cmd}\n END\n Sleep 10\n #### return status with false parameter\n ${status}= ceph.health return_cmds=${FALSE}\n [Return] ${status}\n\n\n", "name": "suites/task/clear_all_alarms.robot", "imports_file_locations": "{'../../resource/ceph.robot': 'resource/ceph.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/middleware.robot': 'resource/middleware.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_all_alarms.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "9c267e1f-85de-4b9b-b51d-abb65152430c", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n setup.precase_setup\n ${ta_env}= config.is_test_automation_development_cloud\n Set Suite Variable ${S_TEST_AUTOMATION_DEVELOPMENT_CLOUD} ${ta_env}\n ${cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_all_alarms.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1d7b4ea7-9ab5-4bf4-9e22-a5a5baaa306c", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case\n Run Keyword And Ignore Error check.precase_cluster_status\n\n# actual test case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_all_alarms.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f103dac2-e337-496a-9cd4-103b9bbd3b0b", "code": "clear_all_alarms\n [Documentation] Clear all alarms\n #${alarms_filtered}= alarmManager.Get Alarms Filtered severity_filter=MINOR\n ${alarms}= alarmManager.Get Alarms\n #### FOR ${alarm} IN @{alarms_filtered}\n FOR ${alarm} IN @{alarms}\n ${id}= Get From Dictionary ${alarm} id\n Log To Console ${id}\n alarmManager.clear_alarm_by_alarm_id ${id}\n END\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "clear_all_alarms", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_all_alarms.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4633ad35-2244-4bf4-a79e-981ed83b852c", "code": "Postcase cluster status\n [Documentation] Check cluster status after the case\n Run Keyword And Ignore Error check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "Postcase cluster status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_all_alarms.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "45763abd-551c-45ed-a7b9-0e77f7976858", "code": "internal_iterate_fix_spillover\n [Documentation] ceph.health check, execute commands to fix spillover issues\n #### return fixing commandss with true parameter\n ${ceph_fix_cmds}= ceph.health return_cmds=${TRUE}\n ${conn}= ssh.open_connection_to_controller\n FOR ${cmd} IN @{ceph_fix_cmds}\n ${std_out}= ssh.send_command ${conn} ${cmd}\n END\n Sleep 10\n #### return status with false parameter\n ${status}= ceph.health return_cmds=${FALSE}", "settings": "{}", "variables": "{}", "name": "internal_iterate_fix_spillover", "documentation": "ceph.health check, execute commands to fix spillover issues", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/clear_all_alarms.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "5684648a-2ca7-41ed-a951-6f92e74b8fa2", "code": "*** Settings ***\nDocumentation ceph load/unload capacity of pools\n\nForce Tags load\n\nResource ../../resource/ceph.robot\nResource ../../resource/setup.robot\nResource ../../resource/middleware.robot\nResource ../../resource/ssh.robot\nResource ../../resource/check.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Variables ***\n${load_unload_to_percent} 10\n@{pools_list} volumes\n${operation_type} load\n\n*** Test Cases ***\n\n# preparation for the case -------------------------------------------------------------------------\n\nPrecase ncm rest api login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n setup.ncm_rest_api_login\n\nPrecase ssh keys\n ssh.setup_keys\n\nprecase_cluster_status\n [Documentation] Check cluster status before the casematch.\n check.precase_cluster_status\n\n# actual test case -------------------------------------------------------------------------\n\nLoad ceph capacity of pools\n Skip If '${operation_type}'== 'unload'\n ceph.load_ceph_capacity_of_pools ${pools_list} ${load_unload_to_percent}\n\nUnload ceph capacity of pools\n Skip If '${operation_type}'== 'load'\n ceph.unload_ceph_capacity_of_pools ${pools_list} ${load_unload_to_percent}\n\n# post actions for the case -------------------------------------------------------------------------\n\nPostcase cluster status\n [Documentation] Check cluster status after the case\n check.postcase_cluster_status\n", "name": "suites/task/ceph_load.robot", "imports_file_locations": "{'../../resource/ceph.robot': 'resource/ceph.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/middleware.robot': 'resource/middleware.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0c4a5de6-4718-48d5-9157-68e6445cedf7", "code": "Precase ncm rest api login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n setup.ncm_rest_api_login", "settings": "{}", "variables": "{}", "name": "Precase ncm rest api login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "be595323-0a3b-47e1-b52b-b548ed0276a7", "code": "Precase ssh keys\n ssh.setup_keys", "settings": "{}", "variables": "{}", "name": "Precase ssh keys", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "83a5cbc7-fb21-4267-a5c1-2efb56a1e930", "code": "precase_cluster_status\n [Documentation] Check cluster status before the casematch.\n check.precase_cluster_status\n\n# actual test case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "67fe6acf-8fd8-49fb-828a-2600a1222304", "code": "Load ceph capacity of pools\n Skip If '${operation_type}'== 'unload'\n ceph.load_ceph_capacity_of_pools ${pools_list} ${load_unload_to_percent}", "settings": "{}", "variables": "{'operation_type': {'text': '${operation_type} load'}, 'pools_list': {'text': '@{pools_list} volumes'}, 'load_unload_to_percent': {'text': '${load_unload_to_percent} 10'}}", "name": "Load ceph capacity of pools", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c4f034ea-93d1-4a30-930f-8b390f664f10", "code": "Unload ceph capacity of pools\n Skip If '${operation_type}'== 'load'\n ceph.unload_ceph_capacity_of_pools ${pools_list} ${load_unload_to_percent}\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{'operation_type': {'text': '${operation_type} load'}, 'pools_list': {'text': '@{pools_list} volumes'}, 'load_unload_to_percent': {'text': '${load_unload_to_percent} 10'}}", "name": "Unload ceph capacity of pools", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e775494d-8027-44b7-ae5e-235e3104ddb0", "code": "Postcase cluster status\n [Documentation] Check cluster status after the case\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "Postcase cluster status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_load.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "f9e14c9e-7031-4b0a-a052-6c7d6e267880", "code": "*** Settings ***\nDocumentation Fix ceph spillover issues\n\nForce Tags fix\n\nResource ../../resource/ceph.robot\nResource ../../resource/setup.robot\nResource ../../resource/middleware.robot\nResource ../../resource/ssh.robot\nResource ../../resource/check.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Variables ***\n\n*** Test Cases ***\n\n# preparation for the case -------------------------------------------------------------------------\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n setup.precase_setup\n ${ta_env}= config.is_test_automation_development_cloud\n Set Suite Variable ${S_TEST_AUTOMATION_DEVELOPMENT_CLOUD} ${ta_env}\n ${cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case\n Run Keyword And Ignore Error check.precase_cluster_status\n\n# actual test case -------------------------------------------------------------------------\n\nceph_fix_spillover_issues\n [Documentation] Fix ceph spillover issues\n TRY\n FOR ${i} IN RANGE 100\n ${ignore-status} ${status}= Run Keyword And Ignore Error internal_iterate_fix_spillover\n Exit For Loop If \"${status}\"==\"HEALTH_OK\"\n END\n EXCEPT\n ${status}= internal_iterate_fix_spillover\n END\n\n# post actions for the case -------------------------------------------------------------------------\n\nPostcase cluster status\n [Documentation] Check cluster status after the case\n Run Keyword And Ignore Error check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_iterate_fix_spillover\n [Documentation] ceph.health check, execute commands to fix spillover issues\n #### return fixing commandss with true parameter\n ${ceph_fix_cmds}= ceph.health return_cmds=${TRUE}\n ${conn}= ssh.open_connection_to_controller\n FOR ${cmd} IN @{ceph_fix_cmds}\n ${std_out}= ssh.send_command ${conn} ${cmd}\n END\n Sleep 10\n #### return status with false parameter\n ${status}= ceph.health return_cmds=${FALSE}\n [Return] ${status}\n\n\n", "name": "suites/task/ceph_fix_spillover.robot", "imports_file_locations": "{'../../resource/ceph.robot': 'resource/ceph.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/middleware.robot': 'resource/middleware.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_fix_spillover.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "08245f6e-db5f-4a36-9852-7374de617d7e", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n setup.precase_setup\n ${ta_env}= config.is_test_automation_development_cloud\n Set Suite Variable ${S_TEST_AUTOMATION_DEVELOPMENT_CLOUD} ${ta_env}\n ${cluster_name}= config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_fix_spillover.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "53f019c5-122d-4258-827e-21196acb21f8", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case\n Run Keyword And Ignore Error check.precase_cluster_status\n\n# actual test case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_fix_spillover.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b2fe7b30-e0a1-4d1b-aa8a-efdb290dbac7", "code": "ceph_fix_spillover_issues\n [Documentation] Fix ceph spillover issues\n TRY\n FOR ${i} IN RANGE 100\n ${ignore-status} ${status}= Run Keyword And Ignore Error internal_iterate_fix_spillover\n Exit For Loop If \"${status}\"==\"HEALTH_OK\"\n END\n EXCEPT\n ${status}= internal_iterate_fix_spillover\n END\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "ceph_fix_spillover_issues", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_fix_spillover.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b10d4753-cc24-45aa-a29f-f4bff40e6b13", "code": "Postcase cluster status\n [Documentation] Check cluster status after the case\n Run Keyword And Ignore Error check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "Postcase cluster status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_fix_spillover.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "1bb7dca8-fe3e-442d-8b0c-c4445dbbbcbf", "code": "internal_iterate_fix_spillover\n [Documentation] ceph.health check, execute commands to fix spillover issues\n #### return fixing commandss with true parameter\n ${ceph_fix_cmds}= ceph.health return_cmds=${TRUE}\n ${conn}= ssh.open_connection_to_controller\n FOR ${cmd} IN @{ceph_fix_cmds}\n ${std_out}= ssh.send_command ${conn} ${cmd}\n END\n Sleep 10\n #### return status with false parameter\n ${status}= ceph.health return_cmds=${FALSE}", "settings": "{}", "variables": "{}", "name": "internal_iterate_fix_spillover", "documentation": "ceph.health check, execute commands to fix spillover issues", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/task/ceph_fix_spillover.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "78f30d53-e471-4c2b-9651-d5b4d5a1c646", "code": "*** Settings ***\nDocumentation WEB restriction: Limit the number of user's concurrent web sessions. The range is 1-1000.This case checking the Web connections limits on Central deployment.\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nLibrary urllib.parse\nResource ../../resource/common.robot\nResource ../../resource/node.robot\nResource ../../resource/setup.robot\nResource ../../resource/selenium.robot\n\n\nSuite Setup setup.suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n\n${Login Username Input Field} id=Login-username-textInput\n${Login Password Input Field} id=Login-password-textInput\n${Login Submit Button} id=Login-signIn-content\n${Security Tab} xpath=//button[@id='security']/div/div\n\n${Deploy Button} //button[.//text() = 'DEPLOY']\n${Yes In Popup Window} //button[.//text() = 'Yes']\n\n${security task selection} Specific TAG(s)\n${Web restriction tag} ANSSI-06-0012\n${restrict_value} 20\n\n*** Test Cases ***\n\ntc_ANSSI_06_0012\n [Documentation] Check the limit of concurrent Web sessions.\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set Web Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should not be Empty ${result}\n END\n\n Web Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should be Empty ${result}\n END\n\n*** Keywords ***\n\nsuite_teardown\n Close All Browsers\n setup.suite_teardown\n\nOpen Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs\n\nSet Web Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=web_hardening-open-button\n selenium.input_text id=web_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser\n\nWeb Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=web_hardening_rollback-open-button\n selenium.click_elements id=rollback_web_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser\n", "name": "suites/security/web_restriction_to_central.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/selenium.robot': 'resource/selenium.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_to_central.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c442d722-dcca-42bc-9425-cdd30dfdb26c", "code": "tc_ANSSI_06_0012\n [Documentation] Check the limit of concurrent Web sessions.\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set Web Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should not be Empty ${result}\n END\n\n Web Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should be Empty ${result}\n END", "settings": "{}", "variables": "{'restrict_value': {'text': '${restrict_value} 20'}}", "name": "tc_ANSSI_06_0012", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9339ae07-45b5-4786-946a-cb56d3ba54a4", "code": "suite_teardown\n Close All Browsers\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c81655d7-1cea-4ac7-8b23-666b2b7d97b4", "code": "Open Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs", "settings": "{}", "variables": "{}", "name": "Open Browser To Login Page", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "57da9060-b409-4c99-bce6-734c3c521fa1", "code": "Set Web Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=web_hardening-open-button\n selenium.input_text id=web_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'restrict_value': {'text': '${restrict_value} 20'}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'Web restriction tag': {'text': '${Web restriction tag} ANSSI-06-0012'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "Set Web Restriction", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2eb6d2e7-bef2-410c-874d-e9e24da1ee17", "code": "Web Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=web_hardening_rollback-open-button\n selenium.click_elements id=rollback_web_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'Web restriction tag': {'text': '${Web restriction tag} ANSSI-06-0012'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "Web Restriction Rollback", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_to_central.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "2dc3e384-ad5b-4e24-b07b-7690afddf6d9", "code": "*** Settings ***\nDocumentation WEB restriction: Limit the number of user's concurrent web sessions. The range is 1-1000.This case checking the Web connections limits on AllInOne deployment.\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nLibrary urllib.parse\nResource ../../resource/common.robot\nResource ../../resource/node.robot\nResource ../../resource/setup.robot\nResource ../../resource/selenium.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n\n${Login Username Input Field} id=Login-username-textInput\n${Login Password Input Field} id=Login-password-textInput\n${Login Submit Button} id=Login-signIn-content\n${Security Tab} xpath=//button[@id='security']/div/div\n\n${Deploy Button} //button[.//text() = 'DEPLOY']\n${Yes In Popup Window} //button[.//text() = 'Yes']\n\n${security task selection} Specific TAG(s)\n${Web restriction tag} ANSSI-06-0012\n${restrict_value} 20\n\n*** Test Cases ***\n\ntc_ANSSI_06_0012\n [Documentation] Check the limit of concurrent Web sessions.\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set Web Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should not be Empty ${result}\n END\n\n Web Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should be Empty ${result}\n END\n\n*** Keywords ***\n\nsuite_teardown\n Close All Browsers\n setup.suite_teardown\n\nOpen Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs\n\nSet Web Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=web_hardening-open-button\n selenium.input_text id=web_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser\n\nWeb Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=web_hardening_rollback-open-button\n selenium.click_elements id=rollback_web_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser\n", "name": "suites/security/web_restriction_allinone.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/selenium.robot': 'resource/selenium.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_allinone.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0f383738-6c50-44fc-a67f-56a1ac76323b", "code": "tc_ANSSI_06_0012\n [Documentation] Check the limit of concurrent Web sessions.\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set Web Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should not be Empty ${result}\n END\n\n Web Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/httpd/conf.modules.d/00-mpm.conf | grep MaxRequestWorkers | grep ${restrict_value}\n Should be Empty ${result}\n END", "settings": "{}", "variables": "{'restrict_value': {'text': '${restrict_value} 20'}}", "name": "tc_ANSSI_06_0012", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "991829da-3f76-4b76-b955-2d9225e37c12", "code": "suite_teardown\n Close All Browsers\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "0140c10d-d8be-4b8f-94cc-c2386064b7ba", "code": "Open Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs", "settings": "{}", "variables": "{}", "name": "Open Browser To Login Page", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "92cf69fc-7682-40ad-8c7b-3e09f4eff936", "code": "Set Web Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=web_hardening-open-button\n selenium.input_text id=web_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'restrict_value': {'text': '${restrict_value} 20'}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'Web restriction tag': {'text': '${Web restriction tag} ANSSI-06-0012'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "Set Web Restriction", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a4bc1e0f-ff93-4bc7-a4de-92524fa17921", "code": "Web Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=web_hardening_rollback-open-button\n selenium.click_elements id=rollback_web_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${Web restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'Web restriction tag': {'text': '${Web restriction tag} ANSSI-06-0012'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "Web Restriction Rollback", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/web_restriction_allinone.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "c059730b-837f-4a24-a219-5f141f68241c", "code": "*** Settings ***\nDocumentation User Management - Create, Update, Delete User\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nLibrary urllib.parse\nResource ../../resource/common.robot\n\n\nSuite Setup suite_setup\nSuite Teardown suite_teardown\n\n\n*** Variables ***\n\n${Login Username Input Field} id=Login-username-textInput\n${Login Password Input Field} id=Login-password-textInput\n${Login Submit Button} id=Login-signIn-content\n${Cluster Username Input Field} id=cluster_username-textInput\n${Cluster Password Input Field} id=cluster_password-textInput\n${Cluster Login Submit Button} //button[.//text() = 'Continue']\n${Security Tab} xpath=//button[@id='security']/div/div\n${External Tools Tab} //*[contains(text(),'EXTERNAL TOOLS')]\n${Open UserManagement} id=security_user_management_bm-open-button\n${Create User Tab} //div[@id=\"security_user_management_create_user-0\"]\n${Delete User Tab} //div[@id=\"security_user_management_delete_user-1\"]\n${Password Update Tab} //div[@id=\"security_user_management_password_udpate-2\"]\n${Create Manager User Switch} id=create_cbis_manager_user-toggleSwitch-button\n${Delete Manager User Switch} id=delete_cbis_manager_user-toggleSwitch-button\n${Update Manager User Switch} id=update_cbis_manager_user-toggleSwitch-button\n${New Manager Username Input Field} id=create_cbis_manager_user_name_value-textInput\n${New Manager Password Input Field} id=create_cbis_manager_user_pwd_value-textInput\n${Delete Manager Username Input Field} id=delete_cbis_manager_user_name_value-textInput\n${Update Manager Username Input Field} id=update_cbis_manager_user_name_value-textInput\n${Update Manager Password Input Field} id=update_cbis_manager_user_pwd_value-textInput\n${Deploy Button} //button[.//text() = 'DEPLOY']\n${Yes In Popup Window} //button[.//text() = 'Yes']\n${Deploy Succesful} usermngt_state: 0\n${Create Operator Linux User Switch} id=create_operator_user-toggleSwitch-button\n${Delete Operator Linux User Switch} id=delete_operator_user-toggleSwitch-button\n${Update Operator Linux User Switch} id=update_linux_user_password-toggleSwitch-button\n${New Operator Username Input Field} id=create_operator_user_name_value-textInput\n${New Operator Password Input Field} id=create_operator_user_pwd_value-textInput\n${Delete Operator Username Input Field} id=delete_operator_user_name_value-textInput\n${Update Operator Username Input Field} id=linux_user_name_value-textInput\n${Update Operator Password Input Field} id=linux_user_pwd_value-textInput\n${Update Zabbix User Password Switch} id=update_zabbix_user_pwd-toggleSwitch-button\n${Update Zabbix User Password Input Field} id=zabbix_user_pwd-textInput\n${Zabbix Tile} //*[contains(text(),'Zabbix')]\n${Zabbix Username} //input[@name=\"name\"]\n${Zabbix Password} //input[@name=\"password\"]\n${Zabbix Sign In Button} //*[contains(text(),'Sign in')]\n${Update Kibana User Password Switch} id=update_kibana_user_pwd-toggleSwitch-button\n${Update Kibana User Password Input Field} id=kibana_user_pwd-textInput\n\n*** Test Cases ***\n\nCreate, Update And Delete NCS Manager User\n [Documentation] TC for creating new NCS Manager user,\n ... checking if new NCS Manager user is able to login,\n ... updating new NCS Manager user password,\n ... checking if new NCS Manager user is able to login,\n ... and deleting the new NCS Manager user.\n\n ${new username} = Create Random Username\n ${new password} = Create Random Manager Password\n ${update password} = Create Random Manager Password\n Create New Manager User ${new username} ${new password}\n Check New Manager User Exists And Can Login With Password ${new username} ${new password}\n Update Manager User Password ${new username} ${update password}\n Check New Manager User Cannot Login or Doesn't Exist ${new username} ${new password}\n Check New Manager User Exists And Can Login With Password ${new username} ${update password}\n [Teardown] Run Keywords Delete New Manager User ${new username}\n ... AND Check New Manager User Cannot Login or Doesn't Exist ${new username} ${update password}\n\nCreate, Update And Delete Operator Linux User\n [Documentation] TC for creating new Operator Linux user,\n ... checking if new Operator Linux user is able to login on all required nodes,\n ... updating new Operator Linux user password,\n ... checking if new Operator Linux user is able to login,\n ... and deleting the new Operator Linux user.\n\n ${new username} = Create Random Username\n ${new password} = Create Random Linux Password\n ${update password} = Create Random Linux Password\n Create New Operator User ${new username} ${new password}\n Check New Operator User Exists And Can Login With Password ${new username} ${new password}\n Update Operator User Password ${new username} ${update password}\n Check New Operator User Cannot Login With Password ${new username} ${new password}\n Check New Operator User Exists And Can Login With Password ${new username} ${update password}\n [Teardown] Run Keywords Delete New Operator User ${new username}\n ... AND Check New Operator User Doesn't Exists ${new username}\n\nUpdate Zabbix User Password and Check It\n [Documentation] TC for updating Zabbix user password,\n ... checking if Zabbix user is able to login.\n\n ${new password} = Create Random Linux Password\n Update Zabbix User Password ${new password}\n Check Zabbix User Can Login With Password ${new password}\n\nUpdate Kibana User Password and Check It\n [Documentation] TC for updating Kibana user password,\n ... checking if Kibana user is able to login.\n\n ${new password} = Create Random Linux Password\n Update Kibana User Password ${new password}\n Check Kibana User Can Login With Password ${new password}\n\n*** Keywords ***\n\nsuite_setup\n Setup Env\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\nsuite_teardown\n Close All Browsers\n\tTeardown Env\n\nOpen Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Title Should Be CBIS\n\ntype\n [Arguments] ${element} ${value}\n Wait Until Keyword Succeeds 1 min 3s Input Text ${element} ${value}\n\nclick\n [Arguments] ${element}\n Wait Until Keyword Succeeds 1 min 15s Click Element ${element}\n\nCreate Random Username\n ${value}= Generate Random String 8 [LETTERS][NUMBERS]\n [Return] ${value}\n\nCreate Random Manager Password\n ${str1}= Generate Random String 1 [LOWER]\n ${str2}= Generate Random String 1 [UPPER]\n ${str3}= Generate Random String 1 [NUMBERS]\n ${str4}= Generate Random String 1 !@#$%^&*_?.()=+~{}/|-\n ${str5}= Generate Random String 6 [LOWER][UPPER][NUMBERS]!@#$%^&*_?.()=+~{}/|-\n ${value}= Catenate SEPARATOR= ${str1} ${str2} ${str3} ${str4} ${str5}\n [Return] ${value}\n\nCreate Random Linux Password\n ${str1}= Generate Random String 1 [LOWER]\n ${str2}= Generate Random String 1 [UPPER]\n ${str3}= Generate Random String 1 [NUMBERS]\n ${str4}= Generate Random String 1 !@#$%^&*_?.()=+~{}/|-\n ${str5}= Generate Random String 6 [LOWER][UPPER][NUMBERS]!@#$%^&*_?.()=+~{}/|-\n ${value}= Catenate SEPARATOR= ${str1} ${str2} ${str3} ${str4} ${str5}\n [Return] ${value}\n\nCreate New Manager User\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Create User Tab}\n click ${Create Manager User Switch}\n type ${New Manager Username Input Field} ${new username}\n type ${New Manager Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck New Manager User Exists And Can Login With Password\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${new username}\n type ${Login Password Input Field} ${new password}\n click ${Login Submit Button}\n Wait Until Element Is Visible ${Security Tab} 30 sec\n Capture Page Screenshot\n Close Browser\n\nUpdate Manager User Password\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Manager User Switch}\n type ${Update Manager Username Input Field} ${new username}\n type ${Update Manager Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nDelete New Manager User\n [Arguments] ${new username}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Delete User Tab}\n click ${Delete Manager User Switch}\n type ${Delete Manager Username Input Field} ${new username}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck New Manager User Cannot Login or Doesn't Exist\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${new username}\n type ${Login Password Input Field} ${new password}\n click ${Login Submit Button}\n Wait Until Page Contains Unable to log you in. 30 sec\n Capture Page Screenshot\n Close Browser\n\nCreate New Operator User\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Create User Tab}\n click ${Create Operator Linux User Switch}\n type ${New Operator Username Input Field} ${new username}\n type ${New Operator Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck New Operator User Exists And Can Login With Password\n [Arguments] ${new username} ${new password}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name}\n ... echo \\\"${new password}\\\" | su ${new username} -c 'echo \\\"${new password}\\\" | su ${new username} -c pwd'\n Should Be True ${result}[2] == 0\n END\n\nCheck New Operator User Cannot Login With Password\n [Arguments] ${new username} ${new password}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name}\n ... echo \\\"${new password}\\\" | su ${new username} -c 'echo \\\"${new password}\\\" | su ${new username} -c pwd'\n Should Not Be True ${result}[2] == 0\n END\n\nUpdate Operator User Password\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Operator Linux User Switch}\n type ${Update Operator Username Input Field} ${new username}\n type ${Update Operator Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nDelete New Operator User\n [Arguments] ${new username}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Delete User Tab}\n click ${Delete Operator Linux User Switch}\n type ${Delete Operator Username Input Field} ${new username}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck New Operator User Doesn't Exists\n [Arguments] ${new username}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name} id -u ${new username}\n Should Not Be True ${result}[2] == 0\n END\n\nUpdate Zabbix User Password\n [Arguments] ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Zabbix User Password Switch}\n type ${Update Zabbix User Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck Zabbix User Can Login With Password\n [Arguments] ${password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${External Tools Tab}\n Click ${Zabbix Tile}\n Switch Window NEW\n type ${Zabbix Username} ${G_ZABBIX_USERNAME}\n type ${Zabbix Password} ${password}\n click ${Zabbix Sign In Button}\n Title Should Be cbis: Dashboard\n Capture Page Screenshot\n Close All Browsers\n\nUpdate Kibana User Password\n [Arguments] ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Kibana User Password Switch}\n type ${Update Kibana User Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck Kibana User Can Login With Password\n [Arguments] ${password}\n ${uni password} = Quote ${password} ' '\n ${external monitoring vip} = Run Command On Manage Return String\n ... grep external_monitoring_vip /opt/install/data/cbis-clusters/security-security-cloud/postconfig-inv.json\n @{external monitoring vip} = Split String ${external monitoring vip} :\n ${kibana ip} = Strip String ${external monitoring vip}[1] characters= \\r\\n,\"\n Wait Until Keyword Succeeds 5x 2s Open Browser https://kibana:${uni password}@${kibana ip}:5602/kibana\n Set Window Size 1920 1080\n Title Should Be Kibana\n Wait Until Page Contains Add Data to Kibana 30\n Capture Page Screenshot\n Close Browser", "name": "suites/security/user_management.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4ac696cc-ba9d-438c-bfe3-4b75fd959c41", "code": "Create, Update And Delete NCS Manager User\n [Documentation] TC for creating new NCS Manager user,\n ... checking if new NCS Manager user is able to login,\n ... updating new NCS Manager user password,\n ... checking if new NCS Manager user is able to login,\n ... and deleting the new NCS Manager user.\n\n ${new username} = Create Random Username\n ${new password} = Create Random Manager Password\n ${update password} = Create Random Manager Password\n Create New Manager User ${new username} ${new password}\n Check New Manager User Exists And Can Login With Password ${new username} ${new password}\n Update Manager User Password ${new username} ${update password}\n Check New Manager User Cannot Login or Doesn't Exist ${new username} ${new password}\n Check New Manager User Exists And Can Login With Password ${new username} ${update password}\n [Teardown] Run Keywords Delete New Manager User ${new username}\n ... AND Check New Manager User Cannot Login or Doesn't Exist ${new username} ${update password}", "settings": "{}", "variables": "{}", "name": "Create, Update And Delete NCS Manager User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3fca26f1-9291-4071-b810-255b51080734", "code": "Create, Update And Delete Operator Linux User\n [Documentation] TC for creating new Operator Linux user,\n ... checking if new Operator Linux user is able to login on all required nodes,\n ... updating new Operator Linux user password,\n ... checking if new Operator Linux user is able to login,\n ... and deleting the new Operator Linux user.\n\n ${new username} = Create Random Username\n ${new password} = Create Random Linux Password\n ${update password} = Create Random Linux Password\n Create New Operator User ${new username} ${new password}\n Check New Operator User Exists And Can Login With Password ${new username} ${new password}\n Update Operator User Password ${new username} ${update password}\n Check New Operator User Cannot Login With Password ${new username} ${new password}\n Check New Operator User Exists And Can Login With Password ${new username} ${update password}\n [Teardown] Run Keywords Delete New Operator User ${new username}\n ... AND Check New Operator User Doesn't Exists ${new username}", "settings": "{}", "variables": "{}", "name": "Create, Update And Delete Operator Linux User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "245eeaf6-144b-4bbe-9151-46fe7e1bb547", "code": "Update Zabbix User Password and Check It\n [Documentation] TC for updating Zabbix user password,\n ... checking if Zabbix user is able to login.\n\n ${new password} = Create Random Linux Password\n Update Zabbix User Password ${new password}\n Check Zabbix User Can Login With Password ${new password}", "settings": "{}", "variables": "{}", "name": "Update Zabbix User Password and Check It", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "595537b7-5837-452e-96c1-bb2835768590", "code": "Update Kibana User Password and Check It\n [Documentation] TC for updating Kibana user password,\n ... checking if Kibana user is able to login.\n\n ${new password} = Create Random Linux Password\n Update Kibana User Password ${new password}\n Check Kibana User Can Login With Password ${new password}", "settings": "{}", "variables": "{}", "name": "Update Kibana User Password and Check It", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "fae8fd38-99e0-4f78-9661-f678b9500074", "code": "suite_setup\n Setup Env\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8db679f9-d17a-4012-82f3-7c9fbf849670", "code": "suite_teardown\n Close All Browsers\n\tTeardown Env", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "47e67be9-a7b6-4ebe-a89e-da85a41c5829", "code": "Open Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Title Should Be CBIS", "settings": "{}", "variables": "{}", "name": "Open Browser To Login Page", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "6276919b-cdce-445b-b42c-1a4ff92eff77", "code": "type\n [Arguments] ${element} ${value}\n Wait Until Keyword Succeeds 1 min 3s Input Text ${element} ${value}", "settings": "{}", "variables": "{}", "name": "type", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "04ed5a79-f31e-4233-8b0e-359b3633632f", "code": "click\n [Arguments] ${element}\n Wait Until Keyword Succeeds 1 min 15s Click Element ${element}", "settings": "{}", "variables": "{}", "name": "click", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f89aac23-9586-43e9-bf16-a922885c81a7", "code": "Create Random Username\n ${value}= Generate Random String 8 [LETTERS][NUMBERS]\n [Return] ${value}\n\nCreate Random Manager Password\n ${str1}= Generate Random String 1 [LOWER]\n ${str2}= Generate Random String 1 [UPPER]\n ${str3}= Generate Random String 1 [NUMBERS]\n ${str4}= Generate Random String 1 !@#$%^&*_?.()=+~{}/|-\n ${str5}= Generate Random String 6 [LOWER][UPPER][NUMBERS]!@#$%^&*_?.()=+~{}/|-\n ${value}= Catenate SEPARATOR= ${str1} ${str2} ${str3} ${str4} ${str5}\n [Return] ${value}\n\nCreate Random Linux Password\n ${str1}= Generate Random String 1 [LOWER]\n ${str2}= Generate Random String 1 [UPPER]\n ${str3}= Generate Random String 1 [NUMBERS]\n ${str4}= Generate Random String 1 !@#$%^&*_?.()=+~{}/|-\n ${str5}= Generate Random String 6 [LOWER][UPPER][NUMBERS]!@#$%^&*_?.()=+~{}/|-\n ${value}= Catenate SEPARATOR= ${str1} ${str2} ${str3} ${str4} ${str5}\n [Return] ${value}\n\nCreate New Manager User\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Create User Tab}\n click ${Create Manager User Switch}\n type ${New Manager Username Input Field} ${new username}\n type ${New Manager Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Create User Tab': {'text': '${Create User Tab} //div[@id=\"security_user_management_create_user-0\"]'}, 'Create Manager User Switch': {'text': '${Create Manager User Switch} id=create_cbis_manager_user-toggleSwitch-button'}, 'New Manager Username Input Field': {'text': '${New Manager Username Input Field} id=create_cbis_manager_user_name_value-textInput'}, 'New Manager Password Input Field': {'text': '${New Manager Password Input Field} id=create_cbis_manager_user_pwd_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Create Random Username", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "99bce3a0-799c-4fbf-b9f6-29a588fb627e", "code": "Check New Manager User Exists And Can Login With Password\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${new username}\n type ${Login Password Input Field} ${new password}\n click ${Login Submit Button}\n Wait Until Element Is Visible ${Security Tab} 30 sec\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}}", "name": "Check New Manager User Exists And Can Login With Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "48bd494d-9385-4811-a956-6466d273c48c", "code": "Update Manager User Password\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Manager User Switch}\n type ${Update Manager Username Input Field} ${new username}\n type ${Update Manager Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Password Update Tab': {'text': '${Password Update Tab} //div[@id=\"security_user_management_password_udpate-2\"]'}, 'Update Manager User Switch': {'text': '${Update Manager User Switch} id=update_cbis_manager_user-toggleSwitch-button'}, 'Update Manager Username Input Field': {'text': '${Update Manager Username Input Field} id=update_cbis_manager_user_name_value-textInput'}, 'Update Manager Password Input Field': {'text': '${Update Manager Password Input Field} id=update_cbis_manager_user_pwd_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Update Manager User Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c3adfb56-0cd8-49bf-b4b4-66840bab071f", "code": "Delete New Manager User\n [Arguments] ${new username}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Delete User Tab}\n click ${Delete Manager User Switch}\n type ${Delete Manager Username Input Field} ${new username}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Delete User Tab': {'text': '${Delete User Tab} //div[@id=\"security_user_management_delete_user-1\"]'}, 'Delete Manager User Switch': {'text': '${Delete Manager User Switch} id=delete_cbis_manager_user-toggleSwitch-button'}, 'Delete Manager Username Input Field': {'text': '${Delete Manager Username Input Field} id=delete_cbis_manager_user_name_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Delete New Manager User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "94ef5c0d-40ee-4258-8d6f-adebdba4c0ee", "code": "Check New Manager User Cannot Login or Doesn't Exist\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${new username}\n type ${Login Password Input Field} ${new password}\n click ${Login Submit Button}\n Wait Until Page Contains Unable to log you in. 30 sec\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}}", "name": "Check New Manager User Cannot Login or Doesn't Exist", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "1def078b-6e9b-42b9-85f0-79b2d464ee16", "code": "Create New Operator User\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Create User Tab}\n click ${Create Operator Linux User Switch}\n type ${New Operator Username Input Field} ${new username}\n type ${New Operator Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Create User Tab': {'text': '${Create User Tab} //div[@id=\"security_user_management_create_user-0\"]'}, 'Create Operator Linux User Switch': {'text': '${Create Operator Linux User Switch} id=create_operator_user-toggleSwitch-button'}, 'New Operator Username Input Field': {'text': '${New Operator Username Input Field} id=create_operator_user_name_value-textInput'}, 'New Operator Password Input Field': {'text': '${New Operator Password Input Field} id=create_operator_user_pwd_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Create New Operator User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8fb2b206-1318-4075-a6db-ad1c421fe527", "code": "Check New Operator User Exists And Can Login With Password\n [Arguments] ${new username} ${new password}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name}\n ... echo \\\"${new password}\\\" | su ${new username} -c 'echo \\\"${new password}\\\" | su ${new username} -c pwd'\n Should Be True ${result}[2] == 0\n END", "settings": "{}", "variables": "{}", "name": "Check New Operator User Exists And Can Login With Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "bdb31415-5d20-44f6-83f4-c477e82697d4", "code": "Check New Operator User Cannot Login With Password\n [Arguments] ${new username} ${new password}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name}\n ... echo \\\"${new password}\\\" | su ${new username} -c 'echo \\\"${new password}\\\" | su ${new username} -c pwd'\n Should Not Be True ${result}[2] == 0\n END", "settings": "{}", "variables": "{}", "name": "Check New Operator User Cannot Login With Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "63a86eed-6526-4d19-adcc-00398211d400", "code": "Update Operator User Password\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Operator Linux User Switch}\n type ${Update Operator Username Input Field} ${new username}\n type ${Update Operator Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Password Update Tab': {'text': '${Password Update Tab} //div[@id=\"security_user_management_password_udpate-2\"]'}, 'Update Operator Linux User Switch': {'text': '${Update Operator Linux User Switch} id=update_linux_user_password-toggleSwitch-button'}, 'Update Operator Username Input Field': {'text': '${Update Operator Username Input Field} id=linux_user_name_value-textInput'}, 'Update Operator Password Input Field': {'text': '${Update Operator Password Input Field} id=linux_user_pwd_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Update Operator User Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c58540e0-a354-416c-9196-cfcd4ded72a5", "code": "Delete New Operator User\n [Arguments] ${new username}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Delete User Tab}\n click ${Delete Operator Linux User Switch}\n type ${Delete Operator Username Input Field} ${new username}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Delete User Tab': {'text': '${Delete User Tab} //div[@id=\"security_user_management_delete_user-1\"]'}, 'Delete Operator Linux User Switch': {'text': '${Delete Operator Linux User Switch} id=delete_operator_user-toggleSwitch-button'}, 'Delete Operator Username Input Field': {'text': '${Delete Operator Username Input Field} id=delete_operator_user_name_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Delete New Operator User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "7210a52a-5003-4d16-a8c1-ee7bbe701b7b", "code": "Check New Operator User Doesn't Exists\n [Arguments] ${new username}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name} id -u ${new username}\n Should Not Be True ${result}[2] == 0\n END", "settings": "{}", "variables": "{}", "name": "Check New Operator User Doesn't Exists", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "91e6d053-fe8d-43bf-9c56-563a082a4a79", "code": "Update Zabbix User Password\n [Arguments] ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Zabbix User Password Switch}\n type ${Update Zabbix User Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Password Update Tab': {'text': '${Password Update Tab} //div[@id=\"security_user_management_password_udpate-2\"]'}, 'Update Zabbix User Password Switch': {'text': '${Update Zabbix User Password Switch} id=update_zabbix_user_pwd-toggleSwitch-button'}, 'Update Zabbix User Password Input Field': {'text': '${Update Zabbix User Password Input Field} id=zabbix_user_pwd-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Update Zabbix User Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "511bb3c3-1185-40b5-8d3c-6e2d53e7f284", "code": "Check Zabbix User Can Login With Password\n [Arguments] ${password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${External Tools Tab}\n Click ${Zabbix Tile}\n Switch Window NEW\n type ${Zabbix Username} ${G_ZABBIX_USERNAME}\n type ${Zabbix Password} ${password}\n click ${Zabbix Sign In Button}\n Title Should Be cbis: Dashboard\n Capture Page Screenshot\n Close All Browsers", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'External Tools Tab': {'text': \"${External Tools Tab} //*[contains(text(),'EXTERNAL TOOLS')]\"}, 'Zabbix Tile': {'text': \"${Zabbix Tile} //*[contains(text(),'Zabbix')]\"}, 'Zabbix Username': {'text': '${Zabbix Username} //input[@name=\"name\"]'}, 'Zabbix Password': {'text': '${Zabbix Password} //input[@name=\"password\"]'}, 'Zabbix Sign In Button': {'text': \"${Zabbix Sign In Button} //*[contains(text(),'Sign in')]\"}}", "name": "Check Zabbix User Can Login With Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d02bb4bb-ada3-492c-9cc5-902173c00737", "code": "Update Kibana User Password\n [Arguments] ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Password Update Tab}\n click ${Update Kibana User Password Switch}\n type ${Update Kibana User Password Input Field} ${new password}\n click ${Deploy Button}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Password Update Tab': {'text': '${Password Update Tab} //div[@id=\"security_user_management_password_udpate-2\"]'}, 'Update Kibana User Password Switch': {'text': '${Update Kibana User Password Switch} id=update_kibana_user_pwd-toggleSwitch-button'}, 'Update Kibana User Password Input Field': {'text': '${Update Kibana User Password Input Field} id=kibana_user_pwd-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Succesful': {'text': '${Deploy Succesful} usermngt_state: 0'}}", "name": "Update Kibana User Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c67debe3-d70f-4f45-947f-561442ec13ec", "code": "Check Kibana User Can Login With Password\n [Arguments] ${password}\n ${uni password} = Quote ${password} ' '\n ${external monitoring vip} = Run Command On Manage Return String\n ... grep external_monitoring_vip /opt/install/data/cbis-clusters/security-security-cloud/postconfig-inv.json\n @{external monitoring vip} = Split String ${external monitoring vip} :\n ${kibana ip} = Strip String ${external monitoring vip}[1] characters= \\r\\n,\"\n Wait Until Keyword Succeeds 5x 2s Open Browser https://kibana:${uni password}@${kibana ip}:5602/kibana\n Set Window Size 1920 1080\n Title Should Be Kibana\n Wait Until Page Contains Add Data to Kibana 30\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{}", "name": "Check Kibana User Can Login With Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/user_management.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "3937e684-2ec0-4eda-9d6a-de9aa1c38a98", "code": "*** Settings ***\nDocumentation The test verify in all the external tools if support TLS1.3\n\nResource ../../resource/setup.robot\n\nSuite Setup common.Setup Env\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n#precase_ncm_rest_api_login\n# [Documentation] NCM rest api login needed to access the api in coming robot test cases\n# setup.ncm_rest_api_login\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n # mandatory\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here\n\ncheck_test_requirements_checks\n internal_check_if_case_is_valid\n\ncheck_security_hardening_status\n [Documentation] Check if security already execute on setup, if not - the test will execute , to activate the password-expiry code.\n ${get_state}= ncsManagerOperations.get_security_hardening_bm_state\n ${validate_execute}= ncsManagerOperations.validate_spesific_tag_execute ANSSI-05-0011\n Pass Execution If \"${get_state}\"!=\"NEW\" and ${validate_execute}==${true} Security Hardenning Already Execute.\n\n ${body_operation}= ncsManagerOperations.get_security_hardening_json_payload tag=ANSSI-05-0011\n\n ${succeed}= ncsManagerOperations.security_hardening_post ${body_operation}\n Run Keyword If \"${fail}\"==\"${true}\" and \"${succeed}\"==\"${false}\" Fatal Error Security Hardening Tag Fail\n\n ${validate_tls_exist_in_setup}= Run Command On Manage Return String grep ssl-default-bind-options /etc/haproxy/haproxy.cfg\n ${contain}= pythonFunctions.check_str_containing_str ${validate_tls_exist_in_setup} ssl-default-bind-options no-sslv3\n Run Keyword If \"${contain}\"==\"${false}\" Setup Not Support TLS.\n\nverify_TLS1.3_in_different_tools\n ${tools_ports}= Create List 9443 5602\n ${cmd}= Set Variable podman run --rm shamelesscookie/openssl:1.1.1 s_client -tls1_3 -connect ${G_NCM_DEPLOYMENT_SERVER_IP}\n FOR ${port} IN @{tools_ports}\n ${validate_tls_exist_in_tool}= Run Command On Manage Return String ${cmd}:${port}\n ${contain}= pythonFunctions.check_str_containing_str ${validate_tls_exist_in_tool} New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384\n Run Keyword If \"${contain}\"==\"${false}\" Log port ${port} Not Support TLS.\n END\n\n*** Keywords ***\n\ninternal_check_if_case_is_valid\n [Documentation] Check the required prerequisites on this setup for the test.\n ${baremetal_installation_check}= config.is_baremetal_installation\n ${mode_check}= config.ncs_config_mode\n Skip If \"${baremetal_installation_check}\"==\"${FALSE}\" \\n----This case is valid ONLY in baremetal installation.----\n Skip If \"${mode_check}\"==\"config1\" Config 1 not yet supported\n", "name": "suites/security/TLS1.3_Verification.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/TLS1.3_Verification.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "67180841-ae99-4564-87f7-8ca65b514c50", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n # mandatory\n setup.precase_setup\n # optional - ADD OPTIONAL precase kws here", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/TLS1.3_Verification.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1fe67fd0-3182-44f5-938e-abc539bba791", "code": "check_test_requirements_checks\n internal_check_if_case_is_valid", "settings": "{}", "variables": "{}", "name": "check_test_requirements_checks", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/TLS1.3_Verification.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "03ab1245-8114-45bd-9644-fd2a69c9a3e2", "code": "check_security_hardening_status\n [Documentation] Check if security already execute on setup, if not - the test will execute , to activate the password-expiry code.\n ${get_state}= ncsManagerOperations.get_security_hardening_bm_state\n ${validate_execute}= ncsManagerOperations.validate_spesific_tag_execute ANSSI-05-0011\n Pass Execution If \"${get_state}\"!=\"NEW\" and ${validate_execute}==${true} Security Hardenning Already Execute.\n\n ${body_operation}= ncsManagerOperations.get_security_hardening_json_payload tag=ANSSI-05-0011\n\n ${succeed}= ncsManagerOperations.security_hardening_post ${body_operation}\n Run Keyword If \"${fail}\"==\"${true}\" and \"${succeed}\"==\"${false}\" Fatal Error Security Hardening Tag Fail\n\n ${validate_tls_exist_in_setup}= Run Command On Manage Return String grep ssl-default-bind-options /etc/haproxy/haproxy.cfg\n ${contain}= pythonFunctions.check_str_containing_str ${validate_tls_exist_in_setup} ssl-default-bind-options no-sslv3\n Run Keyword If \"${contain}\"==\"${false}\" Setup Not Support TLS.", "settings": "{}", "variables": "{}", "name": "check_security_hardening_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/TLS1.3_Verification.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3ad90961-688b-49d3-91a0-978b2f084def", "code": "verify_TLS1.3_in_different_tools\n ${tools_ports}= Create List 9443 5602\n ${cmd}= Set Variable podman run --rm shamelesscookie/openssl:1.1.1 s_client -tls1_3 -connect ${G_NCM_DEPLOYMENT_SERVER_IP}\n FOR ${port} IN @{tools_ports}\n ${validate_tls_exist_in_tool}= Run Command On Manage Return String ${cmd}:${port}\n ${contain}= pythonFunctions.check_str_containing_str ${validate_tls_exist_in_tool} New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384\n Run Keyword If \"${contain}\"==\"${false}\" Log port ${port} Not Support TLS.\n END", "settings": "{}", "variables": "{}", "name": "verify_TLS1.3_in_different_tools", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/TLS1.3_Verification.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4110d717-b4b8-42f3-98a0-66c28b50a005", "code": "internal_check_if_case_is_valid\n [Documentation] Check the required prerequisites on this setup for the test.\n ${baremetal_installation_check}= config.is_baremetal_installation\n ${mode_check}= config.ncs_config_mode\n Skip If \"${baremetal_installation_check}\"==\"${FALSE}\" \\n----This case is valid ONLY in baremetal installation.----\n Skip If \"${mode_check}\"==\"config1\" Config 1 not yet supported", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "${baremetal_installation_check}= config.is_baremetal_installation", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/TLS1.3_Verification.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "3a52eaed-e61a-4d08-89ec-6347442bbae3", "code": "*** Settings ***\nDocumentation SSH restriction: Set to the specified number to limit the number of concurrent SSH connections per-user. The range is 1-1000. This case checking the ssh limits on Central deployment.\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nLibrary urllib.parse\nResource ../../resource/common.robot\nResource ../../resource/node.robot\nResource ../../resource/setup.robot\nResource ../../resource/selenium.robot\n\n\nSuite Setup setup.suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n\n${Login Username Input Field} id=Login-username-textInput\n${Login Password Input Field} id=Login-password-textInput\n${Login Submit Button} id=Login-signIn-content\n${Security Tab} xpath=//button[@id='security']/div/div\n\n${Deploy Button} //button[.//text() = 'DEPLOY']\n${Yes In Popup Window} //button[.//text() = 'Yes']\n\n${security task selection} Specific TAG(s)\n${SSH restriction tag} ANSSI-06-0011\n${restrict_value} 60\n\n*** Test Cases ***\n\ntc_ANSSI_06_0011\n [Documentation] Check the limit of concurrent SSH connections per-user\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set SSH Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should not be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should not be Empty ${result}\n END\n\n SSH Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should be Empty ${result}\n END\n\n*** Keywords ***\n\nsuite_teardown\n Close All Browsers\n setup.suite_teardown\n\nOpen Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs\n\nSet SSH Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=ssh_hardening-open-button\n selenium.input_text id=ssh_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser\n\nSSH Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=ssh_hardening_rollback-open-button\n selenium.click_elements id=rollback_ssh_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser\n", "name": "suites/security/ssh_restriction_to_central.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/selenium.robot': 'resource/selenium.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_to_central.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f77b3a01-ac11-40c4-8ddd-3e2c3a989ba4", "code": "tc_ANSSI_06_0011\n [Documentation] Check the limit of concurrent SSH connections per-user\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set SSH Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should not be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should not be Empty ${result}\n END\n\n SSH Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should be Empty ${result}\n END", "settings": "{}", "variables": "{'restrict_value': {'text': '${restrict_value} 60'}}", "name": "tc_ANSSI_06_0011", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2dfeb3e6-fd3c-484d-b92d-e1d780b7d384", "code": "suite_teardown\n Close All Browsers\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "cd403739-2abc-4f9d-a305-27e51554ba05", "code": "Open Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs", "settings": "{}", "variables": "{}", "name": "Open Browser To Login Page", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "73f17b87-2f6f-4c97-af9c-1054c26d5ac8", "code": "Set SSH Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=ssh_hardening-open-button\n selenium.input_text id=ssh_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'restrict_value': {'text': '${restrict_value} 60'}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'SSH restriction tag': {'text': '${SSH restriction tag} ANSSI-06-0011'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "Set SSH Restriction", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_to_central.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e56e40bb-ec14-4eaa-b43b-8909a62b2002", "code": "SSH Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_to_link link:Show details\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=ssh_hardening_rollback-open-button\n selenium.click_elements id=rollback_ssh_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'SSH restriction tag': {'text': '${SSH restriction tag} ANSSI-06-0011'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "SSH Restriction Rollback", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_to_central.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "d80124ba-3158-4a9a-a3b0-695f102a2e23", "code": "*** Settings ***\nDocumentation SSH restriction: Set to the specified number to limit the number of concurrent SSH connections per-user. The range is 1-1000. This case checking the ssh limits on allinone system.\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nLibrary urllib.parse\nResource ../../resource/common.robot\nResource ../../resource/node.robot\nResource ../../resource/setup.robot\nResource ../../resource/selenium.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n\n${Login Username Input Field} id=Login-username-textInput\n${Login Password Input Field} id=Login-password-textInput\n${Login Submit Button} id=Login-signIn-content\n${Security Tab} xpath=//button[@id='security']/div/div\n\n${Deploy Button} //button[.//text() = 'DEPLOY']\n${Yes In Popup Window} //button[.//text() = 'Yes']\n\n${security task selection} Specific TAG(s)\n${SSH restriction tag} ANSSI-06-0011\n${restrict_value} 60\n\n*** Test Cases ***\n\ntc_ANSSI_06_0011\n [Documentation] Check the limit of concurrent SSH connections per-user\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set SSH Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should not be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should not be Empty ${result}\n END\n\n SSH Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should be Empty ${result}\n END\n\n*** Keywords ***\n\nsuite_teardown\n Close All Browsers\n setup.suite_teardown\n\nOpen Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs\n\nSet SSH Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=ssh_hardening-open-button\n selenium.input_text id=ssh_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser\n\nSSH Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=ssh_hardening_rollback-open-button\n selenium.click_elements id=rollback_ssh_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser\n", "name": "suites/security/ssh_restriction_allinone.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/selenium.robot': 'resource/selenium.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_allinone.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "752054d0-8983-4cf8-87ad-0276fd0134ee", "code": "tc_ANSSI_06_0011\n [Documentation] Check the limit of concurrent SSH connections per-user\n [Tags] security\n\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\n Set SSH Restriction\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should not be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should not be Empty ${result}\n END\n\n SSH Restriction Rollback\n FOR ${node_name} IN @{host_names}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep cbis-admin | grep maxlogins | grep 100\n\t Should be Empty ${result}\n\t ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/security/limits.conf | grep maxlogins | grep ${restrict_value} | grep -v cbis-admin\n\t Should be Empty ${result}\n END", "settings": "{}", "variables": "{'restrict_value': {'text': '${restrict_value} 60'}}", "name": "tc_ANSSI_06_0011", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e2fb4a80-070c-4fb6-94b5-49876431990b", "code": "suite_teardown\n Close All Browsers\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9807e00e-eac0-4a13-aa04-d830d3570878", "code": "Open Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Wait Until Page Contains Manager\n Title Should Be ncs", "settings": "{}", "variables": "{}", "name": "Open Browser To Login Page", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "df926145-227a-4a24-b043-e9328c07ddb8", "code": "Set SSH Restriction\n Open Browser To Login Page ${G_NCS_MANAGER_REST_API_BASE_URL}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_NCS_MANAGER_REST_API_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_NCS_MANAGER_REST_API_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_bm-open-button\n selenium.click_elements id=security_hardening_general-open-button\n selenium.click_elements id=ssh_hardening-open-button\n selenium.input_text id=ssh_concurrent_limit_value-textInput ${restrict_value}\n selenium.click_elements id=task_selection-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains hardening_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'restrict_value': {'text': '${restrict_value} 60'}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'SSH restriction tag': {'text': '${SSH restriction tag} ANSSI-06-0011'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "Set SSH Restriction", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_allinone.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "99ddb38f-892f-49b1-9c37-be3f8af5e770", "code": "SSH Restriction Rollback\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n selenium.input_text ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n selenium.input_text ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n selenium.click_elements ${Login Submit Button}\n selenium.click_elements ${Security Tab}\n selenium.click_elements id=security_hardening_rollback_bm-open-button\n selenium.click_elements id=security_hardening_rollback_general-open-button\n selenium.click_elements id=ssh_hardening_rollback-open-button\n selenium.click_elements id=rollback_ssh_concurrent_limit_enable-open-button\n selenium.click_elements id=security_feature-open-button\n selenium.input_text id=security_type-textInput ${security task selection}\n selenium.input_text id=ansible_tags_list-textInput ${SSH restriction tag}\n selenium.click_elements ${Deploy Button}\n selenium.click_elements ${Yes In Popup Window}\n Wait Until Page Contains rollback_state: 0\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'security task selection': {'text': '${security task selection} Specific TAG(s)'}, 'SSH restriction tag': {'text': '${SSH restriction tag} ANSSI-06-0011'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}}", "name": "SSH Restriction Rollback", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/ssh_restriction_allinone.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "a20ef122-32f3-48fb-b005-c07125ba352e", "code": "*** Settings ***\nDocumentation Platfrom Secret Update - TLS Certificate and SSH Auth Key Update\n\nTest Timeout 10 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nLibrary urllib.parse\nResource ../../resource/common.robot\n\n\nSuite Setup suite_setup\nSuite Teardown suite_teardown\n\n\n*** Variables ***\n\n${Login Username Input Field} id=Login-username-textInput\n${Login Password Input Field} id=Login-password-textInput\n${Login Submit Button} id=Login-signIn-content\n${Cluster Username Input Field} id=cluster_username-textInput\n${Cluster Password Input Field} id=cluster_password-textInput\n${Cluster Login Submit Button} //button[.//text() = 'Continue']\n${Security Tab} xpath=//button[@id='security']/div/div\n${External Tools Tab} //*[contains(text(),'EXTERNAL TOOLS')]\n${Deploy Button} //button[.//text() = 'DEPLOY']\n${Yes In Popup Window} //button[.//text() = 'Yes']\n\n${Open UserManagement} id=security_user_management_bm-open-button\n${Create User Tab} //div[@id=\"security_user_management_create_user-0\"]\n${Delete User Tab} //div[@id=\"security_user_management_delete_user-1\"]\n${Create Operator Linux User Switch} id=create_operator_user-toggleSwitch-button\n${Delete Operator Linux User Switch} id=delete_operator_user-toggleSwitch-button\n${Delete Operator Username Input Field} id=delete_operator_user_name_value-textInput\n${New Operator Username Input Field} id=create_operator_user_name_value-textInput\n${New Operator Password Input Field} id=create_operator_user_pwd_value-textInput\n${TestUser Name} Test1\n${TestUser Pass} Test_user1\n${Deploy UM Succesful} usermngt_state: 0\n\n${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button\n${SSH Authorized Key Tab} //div[@id=\"security_platform_secrets_auth_update-0\"]\n${Update Auth Key For cbis-admin} id=update_auth_key_cbis_heat_admin-toggleSwitch-button\n${Update Auth Key For Operator User} id=update_auth_key_operator-toggleSwitch-button\n${Update Auth Key For Operator User Field} id=update_operator_user_name_value-textInput\n${Deploy Platsec Succesful} platsec_state: 0\n${authorized_keys_location} /home/cbis-admin/.ssh/authorized_keys\n${operator_keys_location} /home/Test1/.ssh/authorized_keys\n\n${TLS Certificate Tab} //div[@id=\"security_platform_secrets_tls_update-1\"]\n${Update of the BM infrastructure Certs Switch} id=update_tls_cert-toggleSwitch-button\n${Update of the BM With User Provided Switch} id=enable_user_tls_update-toggleSwitch-button\n${Update of the NCS manager cert Switch} id=update_cbis_tls_cert-toggleSwitch-button\n${User Provided NCS manager TLS Cert Switch} id=enable_user_cbis_tls_update-toggleSwitch-button\n${Manager SSL TLS Key Cert File Field} id=user_cbis_tls_crt_update-textInput\n${Manager SSL TLS Key File Field} id=user_cbis_tls_keys_update-textInput\n${CA Certificate File Field} id=user_tls_ca_crt_update-textInput\n${SSL TLS Key Certificate File Field} id=user_tls_crt_update-textInput\n${SSL TLS Key File Field} id=user_tls_keys_update-textInput\n${old_ca_cert_path} /etc/pki/ca-trust/source/anchors/ca.crt.pem\n${old_overcloud_cert_path} /etc/pki/tls/private/overcloud_endpoint.pem\n${old_server_key_path} /etc/pki/tls/private/server.key.pem\n${test_dir} /tmp/test\n${new_ca_cert} ${test_dir}/ca.crt.pem\n${new_overcloud_cert} ${test_dir}/overcloud_endpoint.pem\n${new_server_key} ${test_dir}/server.key.pem\n${old_manager_cert_path} /etc/nginx/certs/nginx.crt\n${old_manager_key_path} /etc/nginx/certs/nginx.key\n${manager_cert_path} ${test_dir}/nginx.crt\n${manager_key_path} ${test_dir}/nginx.key\n\n\n*** Test Cases ***\n\nUpdate SSH Auth Key For cbis-admin\n [Documentation] TC for updateing SSH authorized key for cbis-admin\n\n\t${old_authorized_keys} = Add File Content ${authorized_keys_location}\n Check File Content On Nodes ${authorized_keys_location} ${old_authorized_keys}\n\tUpdate SSH Authorized Key For cbis-admin\n Check Updated File Content On Nodes ${authorized_keys_location} ${old_authorized_keys}\n\nUpdate SSH Auth Key For An Operator User\n [Documentation] TC for updateing SSH authorized key for an operator user\n\n Create New Operator User ${TestUser Name} ${TestUser Pass}\n Check New Operator User Exists And Can Login With Password ${TestUser Name} ${TestUser Pass}\n\n ${old_authorized_keys} = Add File Content ${operator_keys_location}\n Check File Content On Nodes ${operator_keys_location} ${old_authorized_keys}\n\tUpdate SSH Authorized Key For Operator User\n Check Updated File Content On Nodes ${operator_keys_location} ${old_authorized_keys}\n\n [Teardown] Run Keywords Delete New Operator User ${TestUser Name}\n ... AND Check New Operator User Doesn't Exists ${TestUser Name}\n\nUpdate of the BM infrastructure TLS certificates\n [Documentation] TC for updateing the BM infrastructure TLS certificates\n\t... with a generated certificates, and checking the new certificates.\n\n ${old_ca_cert} = Add File Content ${old_ca_cert_path}\n\t${old_overcloud_cert} = Add File Content From BM ${old_overcloud_cert_path}\n\t${old_server_key} = Add File Content From BM ${old_server_key_path}\n\t\n\tUpdate of the BM TLS certificates\n\n\tCheck Certs Content On BM ${old_ca_cert} ${old_ca_cert_path}\n\tCheck Updated File Content On Nodes ${old_overcloud_cert_path} ${old_overcloud_cert}\n\tCheck Updated File Content On Nodes ${old_server_key_path} ${old_server_key}\n\nUpdate of the BM infrastructure User Prov TLS certificates\n [Documentation] TC updateing the BM infrastructure TLS certificates to user provide certificate.\n\t\n\tCreate Test Dir And Generate Certs\n\t${old_ca_cert} = Add File Content ${old_ca_cert_path}\n ${old_overcloud_cert} = Add File Content From BM ${old_overcloud_cert_path}\n ${old_server_key} = Add File Content From BM ${old_server_key_path}\n\n\tUpdate With User Provided TLS Certificates And Key\n\t\n\tCheck Certs Content On BM ${old_ca_cert} ${old_ca_cert_path}\n\tCheck Updated File Content On Nodes ${old_overcloud_cert_path} ${old_overcloud_cert}\n\tCheck Updated File Content On Nodes ${old_server_key_path} ${old_server_key}\n\n\t[Teardown] Delete Test Dir\n\nUpdate of the NCS manager TLS certificates\n [Documentation] TC for updateing the NCS manager TLS certificates\n\t... with a generated certificates, and checking the new certificates.\n\n\t${old_manager_cert} = Add File Content From BM ${old_manager_cert_path}\n\t${old_manager_key} = Add File Content From BM ${old_manager_key_path}\n\t\n\tUpdate NCS manager certificates\n\n\tCheck Certs Content On BM ${old_manager_cert} ${old_manager_cert_path}\n\tCheck Certs Content On BM ${old_manager_key} ${old_manager_key_path}\n\nUpdate User Provided NCS Manager TLS Certificates\n [Documentation] TC for updateing the NCS manager TLS certificates\n\t... with user provided certificates, and checking the new certificates.\n\n Create Test Dir And Generate NCS Manager Certs\n\t${old_manager_key} = Add File Content From BM ${old_manager_key_path}\n\t${old_manager_cert} = Add File Content From BM ${old_manager_cert_path}\n\n User provided NCS manager TLS Certificates and Key\n\n Check Certs Content On BM ${old_manager_cert} ${old_manager_cert_path}\n\tCheck Certs Content On BM ${old_manager_key} ${old_manager_key_path}\n\n [Teardown] Delete Test Dir\n\n*** Keywords ***\n\nsuite_setup\n Setup Env\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080\n\nsuite_teardown\n Close All Browsers\n\tTeardown Env\n\nOpen Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Title Should Be CBIS\n\ntype\n [Arguments] ${element} ${value}\n Wait Until Keyword Succeeds 1 min 3s Input Text ${element} ${value}\n\nclick\n [Arguments] ${element}\n Wait Until Keyword Succeeds 1 min 15s Click Element ${element}\n\nAdd File Content\n [Arguments] ${file}\n\t${file_content} Run Command On Manage Return String sudo cat ${file}\n\t[Return] ${file_content}\n\nAdd File Content From BM \n [Arguments] ${file}\n\tFOR ${node} IN @{host_names}\n\t ${file_content} Run Command On Nodes Return String ${node} sudo cat ${file}\n\tEND\n\t[Return] ${file_content}\n\nCheck File Content On Nodes\n [Arguments] ${file} ${content}\n\tFOR ${node} IN @{host_names}\n\t ${file_content} Run Command On Nodes Return String ${node} sudo cat ${file}\n\t Should Be Equal ${file_content} ${content}\n END\n\nCheck Updated File Content On Nodes\n [Arguments] ${file} ${content}\n\tFOR ${node} IN @{host_names}\n\t ${file_content} Run Command On Nodes Return String ${node} sudo cat ${file}\n\t Should Not Be Equal ${file_content} ${content}\n END\n\nCheck Certs Content On BM\n [Arguments] ${old_ca_cert} ${old_cert_path}\n ${file_content} Run Command On Manage Return String sudo cat ${old_cert_path}\n\tShould Not Be Equal ${file_content} ${old_ca_cert}\n\nUpdate SSH Authorized Key For cbis-admin\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${SSH Authorized Key Tab}\n click ${Update Auth Key For cbis-admin}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser\n\nCreate New Operator User\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Create User Tab}\n click ${Create Operator Linux User Switch}\n type ${New Operator Username Input Field} ${new username}\n type ${New Operator Password Input Field} ${new password}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy UM Succesful}\n Capture Page Screenshot\n Close Browser\n\nCheck New Operator User Exists And Can Login With Password\n [Arguments] ${new username} ${new password}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name}\n ... echo \\\"${new password}\\\" | su ${new username} -c 'echo \\\"${new password}\\\" | su ${new username} -c pwd'\n Should Be True ${result}[2] == 0\n END\n\nCheck New Operator User Doesn't Exists\n [Arguments] ${new username}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name} id -u ${new username}\n Should Not Be True ${result}[2] == 0\n END\n\nUpdate SSH Authorized Key For Operator User\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${SSH Authorized Key Tab}\n click ${Update Auth Key For Operator User}\n\ttype ${Update Auth Key For Operator User Field} ${TestUser Name}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser\n\nDelete New Operator User\n [Arguments] ${new username}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Delete User Tab}\n click ${Delete Operator Linux User Switch}\n type ${Delete Operator Username Input Field} ${new username}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy UM Succesful}\n Capture Page Screenshot\n Close Browser\n\nCreate Test Dir And Generate Certs\n Run Command On Manage Return String sudo mkdir ${test_dir}\n\tRun Command On Manage Return String sudo openssl genrsa -out ${test_dir}/CA.key 2048\n\tRun Command On Manage Return String sudo openssl req -new -key ${test_dir}/CA.key -x509 -days 1000 -out ${new_ca_cert} -subj \"/C=HU/ST=BP/L=Budapest/O=NOKIA/OU=Dev\"\n\tRun Command On Manage Return String sudo openssl genrsa -out ${new_server_key} 2048\n\tRun Command On Manage Return String sudo openssl req -new -nodes -sha256 -config /etc/pki/tls/openssl.cnf -key ${new_server_key} -out ${test_dir}/servercert.csr -subj \"/C=HU/ST=BP/L=Budapest/O=NOKIA/OU=NCS\"\n\tRun Command On Manage Return String sudo openssl x509 -req -days 365 -in ${test_dir}/servercert.csr -CA ${new_ca_cert} -CAkey ${test_dir}/CA.key -CAcreateserial -out ${new_overcloud_cert}\n\nCreate Test Dir And Generate NCS Manager Certs\n Run Command On Manage Return String sudo mkdir ${test_dir}\n\tRun Command On Manage Return String sudo openssl req -x509 -nodes -newkey rsa:4096 -keyout ${manager_key_path} -out ${manager_cert_path} -days 365 -subj \"/C=HU/ST=BP/L=Budapest/O=NOKIA/OU=NCS\"\n\nDelete Test Dir\n Run Command On Manage Return String sudo rm -rf ${test_dir}\n\nUpdate of the BM TLS certificates\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the BM infrastructure Certs Switch}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser\n\nUpdate With User Provided TLS Certificates And Key\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the BM infrastructure Certs Switch}\n\tclick ${Update of the BM With User Provided Switch}\n\ttype ${CA Certificate File Field} ${new_ca_cert}\n\ttype ${SSL TLS Key Certificate File Field} ${new_overcloud_cert}\n\ttype ${SSL TLS Key File Field} ${new_server_key}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser\n\nUpdate NCS manager certificates\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the NCS manager cert Switch}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser\n\nUser provided NCS manager TLS Certificates and Key\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the NCS manager cert Switch}\n\tclick ${User Provided NCS manager TLS Cert Switch}\n\ttype ${Manager SSL TLS Key Cert File Field} ${manager_cert_path}\n\ttype ${Manager SSL TLS Key File Field} ${manager_key_path}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser\n\n", "name": "suites/security/secret_update.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0894e553-90ae-491e-9d7b-bcf19372abef", "code": "Update SSH Auth Key For cbis-admin\n [Documentation] TC for updateing SSH authorized key for cbis-admin\n\n\t${old_authorized_keys} = Add File Content ${authorized_keys_location}\n Check File Content On Nodes ${authorized_keys_location} ${old_authorized_keys}\n\tUpdate SSH Authorized Key For cbis-admin\n Check Updated File Content On Nodes ${authorized_keys_location} ${old_authorized_keys}", "settings": "{}", "variables": "{'authorized_keys_location': {'text': '${authorized_keys_location} /home/cbis-admin/.ssh/authorized_keys'}}", "name": "Update SSH Auth Key For cbis-admin", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6db478ae-391c-4149-8a13-d518fd282b1a", "code": "Update SSH Auth Key For An Operator User\n [Documentation] TC for updateing SSH authorized key for an operator user\n\n Create New Operator User ${TestUser Name} ${TestUser Pass}\n Check New Operator User Exists And Can Login With Password ${TestUser Name} ${TestUser Pass}\n\n ${old_authorized_keys} = Add File Content ${operator_keys_location}\n Check File Content On Nodes ${operator_keys_location} ${old_authorized_keys}\n\tUpdate SSH Authorized Key For Operator User\n Check Updated File Content On Nodes ${operator_keys_location} ${old_authorized_keys}\n\n [Teardown] Run Keywords Delete New Operator User ${TestUser Name}\n ... AND Check New Operator User Doesn't Exists ${TestUser Name}", "settings": "{}", "variables": "{'TestUser Name': {'text': '${TestUser Name} Test1'}, 'TestUser Pass': {'text': '${TestUser Pass} Test_user1'}, 'operator_keys_location': {'text': '${operator_keys_location} /home/Test1/.ssh/authorized_keys'}}", "name": "Update SSH Auth Key For An Operator User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4b5bb230-08d3-4536-8911-3b8045034702", "code": "Update of the BM infrastructure TLS certificates\n [Documentation] TC for updateing the BM infrastructure TLS certificates\n\t... with a generated certificates, and checking the new certificates.\n\n ${old_ca_cert} = Add File Content ${old_ca_cert_path}\n\t${old_overcloud_cert} = Add File Content From BM ${old_overcloud_cert_path}\n\t${old_server_key} = Add File Content From BM ${old_server_key_path}\n\t\n\tUpdate of the BM TLS certificates\n\n\tCheck Certs Content On BM ${old_ca_cert} ${old_ca_cert_path}\n\tCheck Updated File Content On Nodes ${old_overcloud_cert_path} ${old_overcloud_cert}\n\tCheck Updated File Content On Nodes ${old_server_key_path} ${old_server_key}", "settings": "{}", "variables": "{'old_ca_cert_path': {'text': '${old_ca_cert_path} /etc/pki/ca-trust/source/anchors/ca.crt.pem'}, 'old_overcloud_cert_path': {'text': '${old_overcloud_cert_path} /etc/pki/tls/private/overcloud_endpoint.pem'}, 'old_server_key_path': {'text': '${old_server_key_path} /etc/pki/tls/private/server.key.pem'}}", "name": "Update of the BM infrastructure TLS certificates", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "906ff4dd-f349-4ba9-9fbc-5e8ff818b654", "code": "Update of the BM infrastructure User Prov TLS certificates\n [Documentation] TC updateing the BM infrastructure TLS certificates to user provide certificate.\n\t\n\tCreate Test Dir And Generate Certs\n\t${old_ca_cert} = Add File Content ${old_ca_cert_path}\n ${old_overcloud_cert} = Add File Content From BM ${old_overcloud_cert_path}\n ${old_server_key} = Add File Content From BM ${old_server_key_path}\n\n\tUpdate With User Provided TLS Certificates And Key\n\t\n\tCheck Certs Content On BM ${old_ca_cert} ${old_ca_cert_path}\n\tCheck Updated File Content On Nodes ${old_overcloud_cert_path} ${old_overcloud_cert}\n\tCheck Updated File Content On Nodes ${old_server_key_path} ${old_server_key}\n\n\t[Teardown] Delete Test Dir", "settings": "{}", "variables": "{'old_ca_cert_path': {'text': '${old_ca_cert_path} /etc/pki/ca-trust/source/anchors/ca.crt.pem'}, 'old_overcloud_cert_path': {'text': '${old_overcloud_cert_path} /etc/pki/tls/private/overcloud_endpoint.pem'}, 'old_server_key_path': {'text': '${old_server_key_path} /etc/pki/tls/private/server.key.pem'}}", "name": "Update of the BM infrastructure User Prov TLS certificates", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "48533820-8d50-4294-97cd-f27e5d73c9a3", "code": "Update of the NCS manager TLS certificates\n [Documentation] TC for updateing the NCS manager TLS certificates\n\t... with a generated certificates, and checking the new certificates.\n\n\t${old_manager_cert} = Add File Content From BM ${old_manager_cert_path}\n\t${old_manager_key} = Add File Content From BM ${old_manager_key_path}\n\t\n\tUpdate NCS manager certificates\n\n\tCheck Certs Content On BM ${old_manager_cert} ${old_manager_cert_path}\n\tCheck Certs Content On BM ${old_manager_key} ${old_manager_key_path}", "settings": "{}", "variables": "{'old_manager_cert_path': {'text': '${old_manager_cert_path} /etc/nginx/certs/nginx.crt'}, 'old_manager_key_path': {'text': '${old_manager_key_path} /etc/nginx/certs/nginx.key'}}", "name": "Update of the NCS manager TLS certificates", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cdd32e67-36ff-486e-85af-354cb2ee9ca3", "code": "Update User Provided NCS Manager TLS Certificates\n [Documentation] TC for updateing the NCS manager TLS certificates\n\t... with user provided certificates, and checking the new certificates.\n\n Create Test Dir And Generate NCS Manager Certs\n\t${old_manager_key} = Add File Content From BM ${old_manager_key_path}\n\t${old_manager_cert} = Add File Content From BM ${old_manager_cert_path}\n\n User provided NCS manager TLS Certificates and Key\n\n Check Certs Content On BM ${old_manager_cert} ${old_manager_cert_path}\n\tCheck Certs Content On BM ${old_manager_key} ${old_manager_key_path}\n\n [Teardown] Delete Test Dir", "settings": "{}", "variables": "{'old_manager_key_path': {'text': '${old_manager_key_path} /etc/nginx/certs/nginx.key'}, 'old_manager_cert_path': {'text': '${old_manager_cert_path} /etc/nginx/certs/nginx.crt'}}", "name": "Update User Provided NCS Manager TLS Certificates", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "78f70c39-d0a2-42d7-8fc3-3663723c02ca", "code": "suite_setup\n Setup Env\n @{host_names}= node.get_name_list\n Set Suite Variable @{host_names} @{host_names}\n Start Virtual Display 1920 1080", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "57b18e1f-5ba0-4197-9457-a8f76589d877", "code": "suite_teardown\n Close All Browsers\n\tTeardown Env", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d66ef240-a9a9-4752-8029-3dbe62172447", "code": "Open Browser To Login Page\n [Arguments] ${login url}\n Wait Until Keyword Succeeds 5x 2s Open Browser ${login url}\n Title Should Be CBIS", "settings": "{}", "variables": "{}", "name": "Open Browser To Login Page", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "7d5eca69-0e96-4ef5-8e53-68829f278594", "code": "type\n [Arguments] ${element} ${value}\n Wait Until Keyword Succeeds 1 min 3s Input Text ${element} ${value}", "settings": "{}", "variables": "{}", "name": "type", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a57bf09e-158e-477c-9e35-0b3c9db9914e", "code": "click\n [Arguments] ${element}\n Wait Until Keyword Succeeds 1 min 15s Click Element ${element}", "settings": "{}", "variables": "{}", "name": "click", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "05ead642-fffe-4e6a-90dd-9014ba2f7782", "code": "Add File Content\n [Arguments] ${file}\n\t${file_content} Run Command On Manage Return String sudo cat ${file}\n\t[Return] ${file_content}\n\nAdd File Content From BM \n [Arguments] ${file}\n\tFOR ${node} IN @{host_names}\n\t ${file_content} Run Command On Nodes Return String ${node} sudo cat ${file}\n\tEND\n\t[Return] ${file_content}\n\nCheck File Content On Nodes\n [Arguments] ${file} ${content}\n\tFOR ${node} IN @{host_names}\n\t ${file_content} Run Command On Nodes Return String ${node} sudo cat ${file}\n\t Should Be Equal ${file_content} ${content}\n END", "settings": "{}", "variables": "{}", "name": "Add File Content", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e8429eb3-89d9-492d-a0fb-71b2cb6e7357", "code": "Check Updated File Content On Nodes\n [Arguments] ${file} ${content}\n\tFOR ${node} IN @{host_names}\n\t ${file_content} Run Command On Nodes Return String ${node} sudo cat ${file}\n\t Should Not Be Equal ${file_content} ${content}\n END", "settings": "{}", "variables": "{}", "name": "Check Updated File Content On Nodes", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f55a714c-2a9b-43d1-a912-abdca4e41388", "code": "Check Certs Content On BM\n [Arguments] ${old_ca_cert} ${old_cert_path}\n ${file_content} Run Command On Manage Return String sudo cat ${old_cert_path}\n\tShould Not Be Equal ${file_content} ${old_ca_cert}", "settings": "{}", "variables": "{}", "name": "Check Certs Content On BM", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c59f54e4-6284-48e4-8277-d0067cdc064e", "code": "Update SSH Authorized Key For cbis-admin\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${SSH Authorized Key Tab}\n click ${Update Auth Key For cbis-admin}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open SecretUpdate': {'text': '${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'SSH Authorized Key Tab': {'text': '${SSH Authorized Key Tab} //div[@id=\"security_platform_secrets_auth_update-0\"]'}, 'Update Auth Key For cbis-admin': {'text': '${Update Auth Key For cbis-admin} id=update_auth_key_cbis_heat_admin-toggleSwitch-button'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Platsec Succesful': {'text': '${Deploy Platsec Succesful} platsec_state: 0'}}", "name": "Update SSH Authorized Key For cbis-admin", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "dd0d9365-e284-4b18-8918-4f90a3748674", "code": "Create New Operator User\n [Arguments] ${new username} ${new password}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Create User Tab}\n click ${Create Operator Linux User Switch}\n type ${New Operator Username Input Field} ${new username}\n type ${New Operator Password Input Field} ${new password}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy UM Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Create User Tab': {'text': '${Create User Tab} //div[@id=\"security_user_management_create_user-0\"]'}, 'Create Operator Linux User Switch': {'text': '${Create Operator Linux User Switch} id=create_operator_user-toggleSwitch-button'}, 'New Operator Username Input Field': {'text': '${New Operator Username Input Field} id=create_operator_user_name_value-textInput'}, 'New Operator Password Input Field': {'text': '${New Operator Password Input Field} id=create_operator_user_pwd_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy UM Succesful': {'text': '${Deploy UM Succesful} usermngt_state: 0'}}", "name": "Create New Operator User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e3268396-0ab7-450e-b290-605f80ee0aa4", "code": "Check New Operator User Exists And Can Login With Password\n [Arguments] ${new username} ${new password}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name}\n ... echo \\\"${new password}\\\" | su ${new username} -c 'echo \\\"${new password}\\\" | su ${new username} -c pwd'\n Should Be True ${result}[2] == 0\n END", "settings": "{}", "variables": "{}", "name": "Check New Operator User Exists And Can Login With Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c5ff9a6d-ab3d-4a2f-855b-e6d5ce7b8102", "code": "Check New Operator User Doesn't Exists\n [Arguments] ${new username}\n FOR ${host_name} IN @{host_names}\n ${result}= Run Command On Nodes And Return All Fields ${host_name} id -u ${new username}\n Should Not Be True ${result}[2] == 0\n END", "settings": "{}", "variables": "{}", "name": "Check New Operator User Doesn't Exists", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "130cf0de-900d-4797-a97c-1aea75a680d0", "code": "Update SSH Authorized Key For Operator User\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${SSH Authorized Key Tab}\n click ${Update Auth Key For Operator User}\n\ttype ${Update Auth Key For Operator User Field} ${TestUser Name}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open SecretUpdate': {'text': '${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'SSH Authorized Key Tab': {'text': '${SSH Authorized Key Tab} //div[@id=\"security_platform_secrets_auth_update-0\"]'}, 'Update Auth Key For Operator User': {'text': '${Update Auth Key For Operator User} id=update_auth_key_operator-toggleSwitch-button'}, 'Update Auth Key For Operator User Field': {'text': '${Update Auth Key For Operator User Field} id=update_operator_user_name_value-textInput'}, 'TestUser Name': {'text': '${TestUser Name} Test1'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Platsec Succesful': {'text': '${Deploy Platsec Succesful} platsec_state: 0'}}", "name": "Update SSH Authorized Key For Operator User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2a522f54-9282-4d2e-8613-589ed06eba5e", "code": "Delete New Operator User\n [Arguments] ${new username}\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open UserManagement}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n click ${Delete User Tab}\n click ${Delete Operator Linux User Switch}\n type ${Delete Operator Username Input Field} ${new username}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy UM Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open UserManagement': {'text': '${Open UserManagement} id=security_user_management_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'Delete User Tab': {'text': '${Delete User Tab} //div[@id=\"security_user_management_delete_user-1\"]'}, 'Delete Operator Linux User Switch': {'text': '${Delete Operator Linux User Switch} id=delete_operator_user-toggleSwitch-button'}, 'Delete Operator Username Input Field': {'text': '${Delete Operator Username Input Field} id=delete_operator_user_name_value-textInput'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy UM Succesful': {'text': '${Deploy UM Succesful} usermngt_state: 0'}}", "name": "Delete New Operator User", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "92692c3d-e1d3-487f-9267-864efe540994", "code": "Create Test Dir And Generate Certs\n Run Command On Manage Return String sudo mkdir ${test_dir}\n\tRun Command On Manage Return String sudo openssl genrsa -out ${test_dir}/CA.key 2048\n\tRun Command On Manage Return String sudo openssl req -new -key ${test_dir}/CA.key -x509 -days 1000 -out ${new_ca_cert} -subj \"/C=HU/ST=BP/L=Budapest/O=NOKIA/OU=Dev\"\n\tRun Command On Manage Return String sudo openssl genrsa -out ${new_server_key} 2048\n\tRun Command On Manage Return String sudo openssl req -new -nodes -sha256 -config /etc/pki/tls/openssl.cnf -key ${new_server_key} -out ${test_dir}/servercert.csr -subj \"/C=HU/ST=BP/L=Budapest/O=NOKIA/OU=NCS\"\n\tRun Command On Manage Return String sudo openssl x509 -req -days 365 -in ${test_dir}/servercert.csr -CA ${new_ca_cert} -CAkey ${test_dir}/CA.key -CAcreateserial -out ${new_overcloud_cert}", "settings": "{}", "variables": "{'test_dir': {'text': '${test_dir} /tmp/test'}, 'new_ca_cert': {'text': '${new_ca_cert} ${test_dir}/ca.crt.pem'}, 'new_server_key': {'text': '${new_server_key} ${test_dir}/server.key.pem'}, 'new_overcloud_cert': {'text': '${new_overcloud_cert} ${test_dir}/overcloud_endpoint.pem'}}", "name": "Create Test Dir And Generate Certs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "ab94327f-696e-4498-a301-6a3db5b86a96", "code": "Create Test Dir And Generate NCS Manager Certs\n Run Command On Manage Return String sudo mkdir ${test_dir}\n\tRun Command On Manage Return String sudo openssl req -x509 -nodes -newkey rsa:4096 -keyout ${manager_key_path} -out ${manager_cert_path} -days 365 -subj \"/C=HU/ST=BP/L=Budapest/O=NOKIA/OU=NCS\"", "settings": "{}", "variables": "{'test_dir': {'text': '${test_dir} /tmp/test'}, 'manager_key_path': {'text': '${manager_key_path} ${test_dir}/nginx.key'}, 'manager_cert_path': {'text': '${manager_cert_path} ${test_dir}/nginx.crt'}}", "name": "Create Test Dir And Generate NCS Manager Certs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4f90eed2-1d9a-47cb-9a72-18295abe07d2", "code": "Delete Test Dir\n Run Command On Manage Return String sudo rm -rf ${test_dir}", "settings": "{}", "variables": "{'test_dir': {'text': '${test_dir} /tmp/test'}}", "name": "Delete Test Dir", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b50fc3e4-3112-4d6f-904d-0c3297214e0d", "code": "Update of the BM TLS certificates\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the BM infrastructure Certs Switch}\n click ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open SecretUpdate': {'text': '${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'TLS Certificate Tab': {'text': '${TLS Certificate Tab} //div[@id=\"security_platform_secrets_tls_update-1\"]'}, 'Update of the BM infrastructure Certs Switch': {'text': '${Update of the BM infrastructure Certs Switch} id=update_tls_cert-toggleSwitch-button'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Platsec Succesful': {'text': '${Deploy Platsec Succesful} platsec_state: 0'}}", "name": "Update of the BM TLS certificates", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "554ec66e-6d9d-4f73-9da6-b93a1d545012", "code": "Update With User Provided TLS Certificates And Key\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the BM infrastructure Certs Switch}\n\tclick ${Update of the BM With User Provided Switch}\n\ttype ${CA Certificate File Field} ${new_ca_cert}\n\ttype ${SSL TLS Key Certificate File Field} ${new_overcloud_cert}\n\ttype ${SSL TLS Key File Field} ${new_server_key}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open SecretUpdate': {'text': '${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'TLS Certificate Tab': {'text': '${TLS Certificate Tab} //div[@id=\"security_platform_secrets_tls_update-1\"]'}, 'Update of the BM infrastructure Certs Switch': {'text': '${Update of the BM infrastructure Certs Switch} id=update_tls_cert-toggleSwitch-button'}, 'Update of the BM With User Provided Switch': {'text': '${Update of the BM With User Provided Switch} id=enable_user_tls_update-toggleSwitch-button'}, 'CA Certificate File Field': {'text': '${CA Certificate File Field} id=user_tls_ca_crt_update-textInput'}, 'new_ca_cert': {'text': '${new_ca_cert} ${test_dir}/ca.crt.pem'}, 'SSL TLS Key Certificate File Field': {'text': '${SSL TLS Key Certificate File Field} id=user_tls_crt_update-textInput'}, 'new_overcloud_cert': {'text': '${new_overcloud_cert} ${test_dir}/overcloud_endpoint.pem'}, 'SSL TLS Key File Field': {'text': '${SSL TLS Key File Field} id=user_tls_keys_update-textInput'}, 'new_server_key': {'text': '${new_server_key} ${test_dir}/server.key.pem'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Platsec Succesful': {'text': '${Deploy Platsec Succesful} platsec_state: 0'}}", "name": "Update With User Provided TLS Certificates And Key", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "6fa26859-09ac-4b15-b93f-187489033c8e", "code": "Update NCS manager certificates\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the NCS manager cert Switch}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open SecretUpdate': {'text': '${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'TLS Certificate Tab': {'text': '${TLS Certificate Tab} //div[@id=\"security_platform_secrets_tls_update-1\"]'}, 'Update of the NCS manager cert Switch': {'text': '${Update of the NCS manager cert Switch} id=update_cbis_tls_cert-toggleSwitch-button'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Platsec Succesful': {'text': '${Deploy Platsec Succesful} platsec_state: 0'}}", "name": "Update NCS manager certificates", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "84f46df7-528c-4bf5-97b8-5d8015496e05", "code": "User provided NCS manager TLS Certificates and Key\n Open Browser To Login Page http://${G_HYPERVISOR_ADDR}\n Set Window Size 1920 1080\n type ${Login Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Login Password Input Field} ${G_CBISMANAGER_PASSWORD}\n click ${Login Submit Button}\n click ${Security Tab}\n click ${Open SecretUpdate}\n type ${Cluster Username Input Field} ${G_CBISMANAGER_USERNAME}\n type ${Cluster Password Input Field} ${G_NCS_CLUSTER_PASSWORD}\n click ${Cluster Login Submit Button}\n click ${Cluster Login Submit Button}\n\tclick ${TLS Certificate Tab}\n\tclick ${Update of the NCS manager cert Switch}\n\tclick ${User Provided NCS manager TLS Cert Switch}\n\ttype ${Manager SSL TLS Key Cert File Field} ${manager_cert_path}\n\ttype ${Manager SSL TLS Key File Field} ${manager_key_path}\n click ${Deploy Button}\n\tclick ${Deploy Button}\n click ${Yes In Popup Window}\n Wait Until Page Contains ${Deploy Platsec Succesful}\n Capture Page Screenshot\n Close Browser", "settings": "{}", "variables": "{'Login Username Input Field': {'text': '${Login Username Input Field} id=Login-username-textInput'}, 'Login Password Input Field': {'text': '${Login Password Input Field} id=Login-password-textInput'}, 'Login Submit Button': {'text': '${Login Submit Button} id=Login-signIn-content'}, 'Security Tab': {'text': \"${Security Tab} xpath=//button[@id='security']/div/div\"}, 'Open SecretUpdate': {'text': '${Open SecretUpdate} id=security_platform_secrets_update_bm-open-button'}, 'Cluster Username Input Field': {'text': '${Cluster Username Input Field} id=cluster_username-textInput'}, 'Cluster Password Input Field': {'text': '${Cluster Password Input Field} id=cluster_password-textInput'}, 'Cluster Login Submit Button': {'text': \"${Cluster Login Submit Button} //button[.//text() = 'Continue']\"}, 'TLS Certificate Tab': {'text': '${TLS Certificate Tab} //div[@id=\"security_platform_secrets_tls_update-1\"]'}, 'Update of the NCS manager cert Switch': {'text': '${Update of the NCS manager cert Switch} id=update_cbis_tls_cert-toggleSwitch-button'}, 'User Provided NCS manager TLS Cert Switch': {'text': '${User Provided NCS manager TLS Cert Switch} id=enable_user_cbis_tls_update-toggleSwitch-button'}, 'Manager SSL TLS Key Cert File Field': {'text': '${Manager SSL TLS Key Cert File Field} id=user_cbis_tls_crt_update-textInput'}, 'manager_cert_path': {'text': '${manager_cert_path} ${test_dir}/nginx.crt'}, 'Manager SSL TLS Key File Field': {'text': '${Manager SSL TLS Key File Field} id=user_cbis_tls_keys_update-textInput'}, 'manager_key_path': {'text': '${manager_key_path} ${test_dir}/nginx.key'}, 'Deploy Button': {'text': \"${Deploy Button} //button[.//text() = 'DEPLOY']\"}, 'Yes In Popup Window': {'text': \"${Yes In Popup Window} //button[.//text() = 'Yes']\"}, 'Deploy Platsec Succesful': {'text': '${Deploy Platsec Succesful} platsec_state: 0'}}", "name": "User provided NCS manager TLS Certificates and Key", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/secret_update.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "95be6a82-a00b-452c-976f-a752c3b0cef8", "code": "*** Settings ***\nDocumentation NCS Security Hardening\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\n\nResource ../../resource/ping.robot\n\n\nSuite Setup suite_setup\nSuite Teardown Teardown Env\n\n\n*** Variables ***\n\n\n\n*** Test Cases ***\ntc_Web_01\n [Documentation] Web hardening - Apache Enable apache headers module\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf.modules.d/headers.load\n Run Keyword And Continue On Failure Should Contain ${content} LoadModule\\ headers_module modules/mod_headers.so\n END\n\n\ntc_Web_02\n [Documentation] Web hardening - Apache Enable apache header backward compatibility\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*Header[ ]+set[ ]+Pragma[ ]+\"no\\-cache\"\n Should Not Be Empty ${lines}\n END\n\n\ntc_Web_03\n [Documentation] Web hardening - Apache Enable apache header expire\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*Header[ ]+set[ ]+Expires[ ]+0\n Should Not Be Empty ${lines}\n END\n\n\ntc_WA000_WWA054\n [Documentation] Web hardening - WA000-WWA054 Configure apache options to none\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*Options[ ]+None\n Should Not Be Empty ${lines}\n END\n\n\ntc_Nessus_11213\n [Documentation] Web hardening - Apache Disable HTTP TRACE / TRACK methods\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*TraceEnable[ ]+off\n Should Not Be Empty ${lines}\n END\n\n\ntc_Web_etag\n [Documentation] Web hardening - ETag Disable HTTP FileETag methods\n [Tags] production ncsci security hardening web apache\n\n @{list}= Create List (?i)^[ ]*TraceEnable[ ]+Header[ ]+unset[ ]+ETag\n ... (?i)^[ ]*TraceEnable[ ]+FileETag[ ]+None\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n check_list_items_regexp ${content} @{list}\n END\n\ntc_remove_indexes_option\n [Documentation] TC for hardening Remove Indexes option from /etc/httpd/ configuration files\n\n FOR ${nodename} IN @{nodenamelist}\n ${conf_file_string} Run Command On Nodes Return String ${nodename} find /etc/httpd/conf.d -type f -name '*.conf'\n @{conf_file_list} Split To Lines ${conf_file_string}\n Run Keyword And Continue On Failure Check Found Conf Files Loop ${nodename} @{conf_file_list}\n END\n\ntc_secure_php_config\n [Documentation] TC for hardening PHP - Secure the PHP configuration file\n\n FOR ${nodename} IN @{nodenamelist}\n ${header} Run Command On Nodes Return String ${nodename} cat /etc/php.ini\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^allow_url_fopen = Off$\n\t Should Not Be Empty ${lines}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^expose_php = Off$\n\t Should Not Be Empty ${lines}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^session.cookie_httponly = Off$\n\t Should Not Be Empty ${lines}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^disable_functions = apache_setenv,popen,posix_kill,posix_mkfifo,ftp_connect,highlight_file,ini_get_all,proc_open,posix_setuid,shell_exec,show_source,system,socket_accept,socket_bind,socket_connect,socket_create_listen$\n Should Not Be Empty ${lines}\n\tEND\n\n\n*** Keywords ***\nsuite_setup\n Setup Env\n ${lst}= node.get_name_list\n Set Suite Variable ${nodenamelist} ${lst}\n\ncheck_list_items_regexp\n [Arguments] ${content} @{list}\n FOR ${item} IN @{list}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} ${item}\n Should Not Be Empty ${lines}\n END\n", "name": "suites/security/hardening_web.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ee6a2778-a09f-4c5c-ae6b-d38cc34e2c3e", "code": "tc_Web_01\n [Documentation] Web hardening - Apache Enable apache headers module\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf.modules.d/headers.load\n Run Keyword And Continue On Failure Should Contain ${content} LoadModule\\ headers_module modules/mod_headers.so\n END", "settings": "{}", "variables": "{}", "name": "tc_Web_01", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f99a1d75-9769-4878-9f62-19b3e59febf3", "code": "tc_Web_02\n [Documentation] Web hardening - Apache Enable apache header backward compatibility\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*Header[ ]+set[ ]+Pragma[ ]+\"no\\-cache\"\n Should Not Be Empty ${lines}\n END", "settings": "{}", "variables": "{}", "name": "tc_Web_02", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ad7311a2-508c-4e11-84d8-35d8714e989b", "code": "tc_Web_03\n [Documentation] Web hardening - Apache Enable apache header expire\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*Header[ ]+set[ ]+Expires[ ]+0\n Should Not Be Empty ${lines}\n END", "settings": "{}", "variables": "{}", "name": "tc_Web_03", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d314db71-32fb-4e18-a93d-80eaa28dd34c", "code": "tc_WA000_WWA054\n [Documentation] Web hardening - WA000-WWA054 Configure apache options to none\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*Options[ ]+None\n Should Not Be Empty ${lines}\n END", "settings": "{}", "variables": "{}", "name": "tc_WA000_WWA054", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ca8e5356-4ac7-4c58-9926-b432b764f968", "code": "tc_Nessus_11213\n [Documentation] Web hardening - Apache Disable HTTP TRACE / TRACK methods\n [Tags] production ncsci security hardening web apache\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} (?i)^[ ]*TraceEnable[ ]+off\n Should Not Be Empty ${lines}\n END", "settings": "{}", "variables": "{}", "name": "tc_Nessus_11213", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ff101290-4c06-400c-8518-7bb2743533b7", "code": "tc_Web_etag\n [Documentation] Web hardening - ETag Disable HTTP FileETag methods\n [Tags] production ncsci security hardening web apache\n\n @{list}= Create List (?i)^[ ]*TraceEnable[ ]+Header[ ]+unset[ ]+ETag\n ... (?i)^[ ]*TraceEnable[ ]+FileETag[ ]+None\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} cat /etc/httpd/conf/httpd.conf\n check_list_items_regexp ${content} @{list}\n END", "settings": "{}", "variables": "{}", "name": "tc_Web_etag", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3b95e9e5-493e-4c6d-833e-05b526247e58", "code": "tc_remove_indexes_option\n [Documentation] TC for hardening Remove Indexes option from /etc/httpd/ configuration files\n\n FOR ${nodename} IN @{nodenamelist}\n ${conf_file_string} Run Command On Nodes Return String ${nodename} find /etc/httpd/conf.d -type f -name '*.conf'\n @{conf_file_list} Split To Lines ${conf_file_string}\n Run Keyword And Continue On Failure Check Found Conf Files Loop ${nodename} @{conf_file_list}\n END", "settings": "{}", "variables": "{}", "name": "tc_remove_indexes_option", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0ceabc5d-8bb5-45bf-b96e-ff7f20d2ef04", "code": "tc_secure_php_config\n [Documentation] TC for hardening PHP - Secure the PHP configuration file\n\n FOR ${nodename} IN @{nodenamelist}\n ${header} Run Command On Nodes Return String ${nodename} cat /etc/php.ini\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^allow_url_fopen = Off$\n\t Should Not Be Empty ${lines}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^expose_php = Off$\n\t Should Not Be Empty ${lines}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^session.cookie_httponly = Off$\n\t Should Not Be Empty ${lines}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${header} (?i)^disable_functions = apache_setenv,popen,posix_kill,posix_mkfifo,ftp_connect,highlight_file,ini_get_all,proc_open,posix_setuid,shell_exec,show_source,system,socket_accept,socket_bind,socket_connect,socket_create_listen$\n Should Not Be Empty ${lines}\n\tEND", "settings": "{}", "variables": "{}", "name": "tc_secure_php_config", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "26035f9f-c60a-480b-98fa-2d64e6a59a22", "code": "suite_setup\n Setup Env\n ${lst}= node.get_name_list\n Set Suite Variable ${nodenamelist} ${lst}", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "dfda68da-7be7-4591-9cc8-ee27dc2feaec", "code": "check_list_items_regexp\n [Arguments] ${content} @{list}\n FOR ${item} IN @{list}\n ${lines}= Run Keyword And Continue On Failure Get Lines Matching Regexp ${content} ${item}\n Should Not Be Empty ${lines}\n END", "settings": "{}", "variables": "{}", "name": "check_list_items_regexp", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_web.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "00b0d92d-0022-4e7f-8379-ed326b4a398c", "code": "*** Settings ***\nDocumentation Password security hardening\n\nTest Timeout 30 min\nDefault Tags security hardening_password\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\nResource ../../resource/ping.robot\n\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n*** Test Cases ***\n\ntc_ANSSI-03-0110\n [Documentation] TC for hardening ANSSI-03-0110 - Remove direct logons to the root account\n\n ${sshd_conf} Run Command On Deployment Server sudo cat /etc/ssh/sshd_config | grep ^PermitRootLogin.no$\n Run Keyword And Continue On Failure Should Not Be Empty ${sshd_conf}\n\ntc_ANSSI-03-0111\n [Documentation] TC for hardening ANSSI-03-0111 Linux User - Disable Root shell\n ${node_name_list}= node.get_name_list\n FOR ${node_type} IN @{node_name_list}\n Check root shell ${node_type}\n END\n\n*** Keywords ***\n\nCheck root shell\n [Arguments] ${type}\n ${root} Run Command On Nodes Return String ${type} sudo cat /etc/passwd | grep ^root\n Should End With And Strip Newline ${root} /sbin/nologin\n\nShould End With And Strip Newline\n [Arguments] ${result} ${expected}\n ${stripped} Strip String ${result} characters=\\n\n Should End With ${stripped} ${expected}\n", "name": "suites/security/hardening_usermanagement.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_usermanagement.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "94665ab1-891f-4b2e-8868-014a122b83d7", "code": "tc_ANSSI-03-0110\n [Documentation] TC for hardening ANSSI-03-0110 - Remove direct logons to the root account\n\n ${sshd_conf} Run Command On Deployment Server sudo cat /etc/ssh/sshd_config | grep ^PermitRootLogin.no$\n Run Keyword And Continue On Failure Should Not Be Empty ${sshd_conf}", "settings": "{}", "variables": "{}", "name": "tc_ANSSI-03-0110", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_usermanagement.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "43e902a6-44c1-4871-b50e-09c5afe17419", "code": "tc_ANSSI-03-0111\n [Documentation] TC for hardening ANSSI-03-0111 Linux User - Disable Root shell\n ${node_name_list}= node.get_name_list\n FOR ${node_type} IN @{node_name_list}\n Check root shell ${node_type}\n END", "settings": "{}", "variables": "{}", "name": "tc_ANSSI-03-0111", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_usermanagement.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "85c3a9a3-ea34-428a-863b-13a891f66145", "code": "Check root shell\n [Arguments] ${type}\n ${root} Run Command On Nodes Return String ${type} sudo cat /etc/passwd | grep ^root\n Should End With And Strip Newline ${root} /sbin/nologin", "settings": "{}", "variables": "{}", "name": "Check root shell", "documentation": "", "imports_file_locations": "{'security': 'suites/security/hardening_usermanagement.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_usermanagement.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "22d108de-77ad-4704-ae6b-f99c3a887c59", "code": "Should End With And Strip Newline\n [Arguments] ${result} ${expected}\n ${stripped} Strip String ${result} characters=\\n\n Should End With ${stripped} ${expected}", "settings": "{}", "variables": "{}", "name": "Should End With And Strip Newline", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_usermanagement.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "d51f3e49-62bf-4b33-b9d2-f0d749a1768c", "code": "*** Settings ***\nDocumentation TLS security hardening\n\nTest Timeout 30 min\nDefault Tags security hardening_password\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\nResource ../../resource/ping.robot\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n*** Test Cases ***\n\ntc_ANSSI-05-0003\n [Documentation] TC for hardening ANSSI-05-0003 - Configure supported TLS version\n\n ${manager_conf} Get Cbis Manager Conf Content\n Run Keyword And Continue On Failure Should Contain ${manager_conf} ssl_protocols TLSv1.2;\n\n Check Haproxy Config For Ssl Bind Options /etc/haproxy/haproxy.cfg\n\ntc_ANSSI-05-0011\n [Documentation] TC for hardening ANSSI-05-0011 - Configure TLS supported ciphers\n\n ${manager_conf} Get Cbis Manager Conf Content\n Run Keyword And Continue On Failure Should Contain ${manager_conf} ssl_prefer_server_ciphers on;\n Run Keyword And Continue On Failure Should Contain ${manager_conf} ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-CBC-SHA384:ECDHE-RSA-AES128-CBC-SHA256;\n\n Check Haproxy Config For Ssl Cipher List /etc/haproxy/haproxy.cfg\n\n\n*** Keywords ***\n\nGet Cbis Manager Conf Content\n ${nginx_path} Run Command On Deployment Server Return String sudo docker volume inspect cbis_nginx_etc_vol | grep \"Mountpoint\" |awk '{print $2}' |awk -F '\"' '{print $2}'\n ${stripped} Strip String ${nginx_path} characters=\\r\\n\n ${manager_conf} Run Command On Deployment Server Return String sudo cat ${stripped}/sites-enabled/cbis_manager.conf\n [Return] ${manager_conf}\n\nCheck Haproxy Config For Ssl Bind Options\n [Arguments] ${file}\n\t${result} Run Command On Deployment Server Return String sudo cat ${file} | grep ssl-default-bind-options\n\tRun Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11\n\t@{controller_list}= node.get_control_name_list\n FOR ${controller} IN @{controller_list}\n ${result} Run Command On Nodes Return String ${controller} sudo cat ${file} | grep ssl-default-bind-options\n Run Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11\n END\n\nCheck Haproxy Config For Ssl Cipher List\n [Arguments] ${file}\n\t${result} Run Command On Deployment Server Return String sudo cat ${file} | grep ssl-default-bind-ciphers\n\tRun Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-CBC-SHA384:ECDHE-RSA-AES128-CBC-SHA256\n\t@{controller_list}= node.get_control_name_list\n FOR ${controller} IN @{controller_list}\n ${result} Run Command On Nodes Return String ${controller} sudo cat ${file} | grep ssl-default-bind-ciphers\n Run Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-CBC-SHA384:ECDHE-RSA-AES128-CBC-SHA256\n END\n\n", "name": "suites/security/hardening_tls.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_tls.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "9bc6dbe7-db4c-4119-9bb5-d6fb9048497a", "code": "tc_ANSSI-05-0003\n [Documentation] TC for hardening ANSSI-05-0003 - Configure supported TLS version\n\n ${manager_conf} Get Cbis Manager Conf Content\n Run Keyword And Continue On Failure Should Contain ${manager_conf} ssl_protocols TLSv1.2;\n\n Check Haproxy Config For Ssl Bind Options /etc/haproxy/haproxy.cfg", "settings": "{}", "variables": "{}", "name": "tc_ANSSI-05-0003", "documentation": "", "imports_file_locations": "{'security': 'suites/security/hardening_tls.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_tls.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "44c6610a-3e67-4dc8-94d6-dae7166ac1cf", "code": "tc_ANSSI-05-0011\n [Documentation] TC for hardening ANSSI-05-0011 - Configure TLS supported ciphers\n\n ${manager_conf} Get Cbis Manager Conf Content\n Run Keyword And Continue On Failure Should Contain ${manager_conf} ssl_prefer_server_ciphers on;\n Run Keyword And Continue On Failure Should Contain ${manager_conf} ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-CBC-SHA384:ECDHE-RSA-AES128-CBC-SHA256;\n\n Check Haproxy Config For Ssl Cipher List /etc/haproxy/haproxy.cfg", "settings": "{}", "variables": "{}", "name": "tc_ANSSI-05-0011", "documentation": "", "imports_file_locations": "{'security': 'suites/security/hardening_tls.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_tls.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "567b97cf-68b7-45b6-b729-728fa432fc30", "code": "Get Cbis Manager Conf Content\n ${nginx_path} Run Command On Deployment Server Return String sudo docker volume inspect cbis_nginx_etc_vol | grep \"Mountpoint\" |awk '{print $2}' |awk -F '\"' '{print $2}'\n ${stripped} Strip String ${nginx_path} characters=\\r\\n\n ${manager_conf} Run Command On Deployment Server Return String sudo cat ${stripped}/sites-enabled/cbis_manager.conf\n [Return] ${manager_conf}\n\nCheck Haproxy Config For Ssl Bind Options\n [Arguments] ${file}\n\t${result} Run Command On Deployment Server Return String sudo cat ${file} | grep ssl-default-bind-options\n\tRun Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11\n\t@{controller_list}= node.get_control_name_list\n FOR ${controller} IN @{controller_list}\n ${result} Run Command On Nodes Return String ${controller} sudo cat ${file} | grep ssl-default-bind-options\n Run Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11\n END", "settings": "{}", "variables": "{}", "name": "Get Cbis Manager Conf Content", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_tls.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d178a766-5463-45e7-9775-292629fa7d8d", "code": "Check Haproxy Config For Ssl Cipher List\n [Arguments] ${file}\n\t${result} Run Command On Deployment Server Return String sudo cat ${file} | grep ssl-default-bind-ciphers\n\tRun Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-CBC-SHA384:ECDHE-RSA-AES128-CBC-SHA256\n\t@{controller_list}= node.get_control_name_list\n FOR ${controller} IN @{controller_list}\n ${result} Run Command On Nodes Return String ${controller} sudo cat ${file} | grep ssl-default-bind-ciphers\n Run Keyword And Continue On Failure Should Contain ${result} ssl-default-bind-ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-CBC-SHA384:ECDHE-RSA-AES128-CBC-SHA256\n END", "settings": "{}", "variables": "{}", "name": "Check Haproxy Config For Ssl Cipher List", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_tls.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "91263494-9d61-4997-b51a-eb5dd323bb5e", "code": "*** Settings ***\nDocumentation SSH security hardening\n\nTest Timeout 30 min\nDefault Tags security hardening_password\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\nResource ../../resource/ping.robot\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n*** Test Cases ***\n\ntc_ANSSI_04_0022\n [Documentation] Configure AllowUsers - compose internal_AllowUsers\n [Tags] security\n\t\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/ssh/sshd_config|grep AllowUsers\n\t Should not be Empty ${result}\n END\n\n*** Keywords ***\n\n", "name": "suites/security/hardening_ssh.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_ssh.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "83f4db69-eaea-4533-8ac2-dba7cdd3c624", "code": "tc_ANSSI_04_0022\n [Documentation] Configure AllowUsers - compose internal_AllowUsers\n [Tags] security\n\t\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n ${result} Run Command On Nodes Return String ${node_name} sudo cat /etc/ssh/sshd_config|grep AllowUsers\n\t Should not be Empty ${result}\n END", "settings": "{}", "variables": "{}", "name": "tc_ANSSI_04_0022", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_ssh.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "016e4802-c0ae-4a1f-ab5d-774000782ffe", "code": "*** Settings ***\nDocumentation RPM security hardening\n\nTest Timeout 30 min\nDefault Tags security hardening_password\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\nResource ../../resource/ping.robot\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n*** Test Cases ***\n\ntc_cis_1_2_2\n [Documentation] Test RPM hardening part - CIS 1.2.2 blahblah\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check yum conf gpgcheck *= *1 ${node_name}\n\t Check yum repos gpgcheck *= *1 ${node_name}\n END\n\ntc_rhel_07_020151\n [Documentation] Test RPM hardening part - RHEL-07-020151\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check yum conf localpkg_gpgcheck *= *1 ${node_name}\n END\n\ntc_rhel_07_020152\n [Documentation] Test RPM hardening part - RHEL-07-020152\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check yum conf repo_gpgcheck *= *1 ${node_name}\n END\n\n*** Keywords ***\n\nCheck yum conf\n [Documentation] Checks /etc/yum.conf\n [Arguments] ${string} ${node_name}\n\n ${yum_conf} Run Command On Nodes Return String ${node_name} cat /etc/yum.conf | grep ^${string}$\n Should Not Be Empty ${yum_conf}\n\nCheck yum repos\n [Documentation] Checks /etc/yum.repos.d/*.repo\n [Arguments] ${string} ${node_name}\n\n ${yum_repos_string} Run Command On Nodes Return String ${node_name} ls /etc/yum.repos.d/*.repo\n @{yum_repos_list} Split To Lines ${yum_repos_string}\n FOR ${repo} IN @{yum_repos_list}\n ${repo_conf} Run Command On Nodes Return String ${node_name} cat ${repo} | grep ^${string}$\n Run Keyword And Continue On Failure Should Not Be Empty ${repo_conf}\n END\n\n", "name": "suites/security/hardening_rpm.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_rpm.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1b541d70-2e4d-4e2d-adc8-b60be6728a32", "code": "tc_cis_1_2_2\n [Documentation] Test RPM hardening part - CIS 1.2.2 blahblah\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check yum conf gpgcheck *= *1 ${node_name}\n\t Check yum repos gpgcheck *= *1 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_cis_1_2_2", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_rpm.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "81df22b8-e997-4688-9064-fd836bb955eb", "code": "tc_rhel_07_020151\n [Documentation] Test RPM hardening part - RHEL-07-020151\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check yum conf localpkg_gpgcheck *= *1 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_rhel_07_020151", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_rpm.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d15f6672-16ee-470a-aad7-31b6db57d9bd", "code": "tc_rhel_07_020152\n [Documentation] Test RPM hardening part - RHEL-07-020152\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check yum conf repo_gpgcheck *= *1 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_rhel_07_020152", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_rpm.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4c4d6155-5153-42cc-80fd-f614b79cd82a", "code": "Check yum conf\n [Documentation] Checks /etc/yum.conf\n [Arguments] ${string} ${node_name}\n\n ${yum_conf} Run Command On Nodes Return String ${node_name} cat /etc/yum.conf | grep ^${string}$\n Should Not Be Empty ${yum_conf}", "settings": "{}", "variables": "{}", "name": "Check yum conf", "documentation": "[Arguments] ${string} ${node_name}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_rpm.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b96eba50-8e82-4fbd-962a-20feebe7c5b2", "code": "Check yum repos\n [Documentation] Checks /etc/yum.repos.d/*.repo\n [Arguments] ${string} ${node_name}\n\n ${yum_repos_string} Run Command On Nodes Return String ${node_name} ls /etc/yum.repos.d/*.repo\n @{yum_repos_list} Split To Lines ${yum_repos_string}\n FOR ${repo} IN @{yum_repos_list}\n ${repo_conf} Run Command On Nodes Return String ${node_name} cat ${repo} | grep ^${string}$\n Run Keyword And Continue On Failure Should Not Be Empty ${repo_conf}\n END", "settings": "{}", "variables": "{}", "name": "Check yum repos", "documentation": "[Arguments] ${string} ${node_name}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_rpm.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "0c178aef-b466-4aff-91ed-286b13cb7a50", "code": "*** Settings ***\nDocumentation Password security hardening\n\nTest Timeout 30 min\nDefault Tags security hardening_password\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\nResource ../../resource/ping.robot\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n*** Test Cases ***\n\ntc_RHEL-07-010130\n [Documentation] TC for hardening RHEL-07-010130\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality difok.*=.*8 ${node_name}\n END\n\ntc_RHEL-07-010140\n [Documentation] TC for hardening RHEL-07-010140\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality minclass.*=.*4 ${node_name}\n END\n\ntc_RHEL-07-010150\n [Documentation] TC for hardening RHEL-07-010150\n\n\t${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality maxrepeat.*=.*2 ${node_name}\n END\n\ntc_RHEL-07-010160\n [Documentation] TC for hardening RHEL-07-010160\n\n\t${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality maxclassrepeat.*=.*4 ${node_name}\n END\n\ntc_password_expiry_alarm\n [Documentation] TC for hardening password expiry alarm\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwexp file /var/log/zabbix/linux_password_exp.log ${node_name}\n\t Check pwexp file /var/log/zabbix/linux_password_exp.log ${node_name}\n\t Check pwexp perm ${node_name}\n\t Check cron ${node_name}\n END\n\n\n*** Keywords ***\n\nCheck pwquality\n [Documentation] Checks /etc/security/pwquality.conf\n [Arguments] ${string} ${nodename}\n\n ${pwq_conf} Run Command On Nodes Return String ${nodename} sudo cat /etc/security/pwquality.conf | grep ^${string}$\n Should Not Be Empty ${pwq_conf}\n\nCheck pwexp file\n [Documentation] Checks ${file} exists\n [Arguments] ${file} ${nodename}\n\n ${pwexp_log} Run Command On Nodes Return String ${nodename} ls ${file}\n Should Not Be Empty ${pwexp_log}\n\nCheck pwexp perm\n [Documentation] Checks zabbix permission for /var/log/messages\n [Arguments] ${nodename}\n\n ${pwexp_perm} Run Command On Nodes Return String ${nodename} getfacl /var/log/messages | grep ^user:zabbix:r--$\n Should Not Be Empty ${pwexp_perm}\n\nCheck cron\n [Documentation] Checks zabbix permission for /var/log/messages\n [Arguments] ${nodename}\n\n ${cron} Run Command On Nodes Return String ${nodename} sudo cat /var/spool/cron/root | grep '^@daily sh /usr/local/bin/check_passwd_expiry.sh$'\n Should Not Be Empty ${cron}\n\n", "name": "suites/security/hardening_password.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d2ed5afa-7e2b-4266-adb8-e03f871ce514", "code": "tc_RHEL-07-010130\n [Documentation] TC for hardening RHEL-07-010130\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality difok.*=.*8 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_RHEL-07-010130", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d8f358eb-6d36-4683-8637-30d092af9c4e", "code": "tc_RHEL-07-010140\n [Documentation] TC for hardening RHEL-07-010140\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality minclass.*=.*4 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_RHEL-07-010140", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "72764ad9-6e6d-4c7c-a956-77f92e06df7e", "code": "tc_RHEL-07-010150\n [Documentation] TC for hardening RHEL-07-010150\n\n\t${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality maxrepeat.*=.*2 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_RHEL-07-010150", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e680f6e0-dfeb-4dd7-b313-4af73bc2f417", "code": "tc_RHEL-07-010160\n [Documentation] TC for hardening RHEL-07-010160\n\n\t${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwquality maxclassrepeat.*=.*4 ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_RHEL-07-010160", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8e23eb8f-646d-4f08-b445-3a1e96c2a99b", "code": "tc_password_expiry_alarm\n [Documentation] TC for hardening password expiry alarm\n\n ${node_name_list}= node.get_name_list\n FOR ${node_name} IN @{node_name_list}\n Check pwexp file /var/log/zabbix/linux_password_exp.log ${node_name}\n\t Check pwexp file /var/log/zabbix/linux_password_exp.log ${node_name}\n\t Check pwexp perm ${node_name}\n\t Check cron ${node_name}\n END", "settings": "{}", "variables": "{}", "name": "tc_password_expiry_alarm", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "78752fb9-bfc8-47fe-870b-8973d691ddcf", "code": "Check pwquality\n [Documentation] Checks /etc/security/pwquality.conf\n [Arguments] ${string} ${nodename}\n\n ${pwq_conf} Run Command On Nodes Return String ${nodename} sudo cat /etc/security/pwquality.conf | grep ^${string}$\n Should Not Be Empty ${pwq_conf}", "settings": "{}", "variables": "{}", "name": "Check pwquality", "documentation": "[Arguments] ${string} ${nodename}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "5c7d901e-a7d6-4dc3-b732-4c9486c4224e", "code": "Check pwexp file\n [Documentation] Checks ${file} exists\n [Arguments] ${file} ${nodename}\n\n ${pwexp_log} Run Command On Nodes Return String ${nodename} ls ${file}\n Should Not Be Empty ${pwexp_log}", "settings": "{}", "variables": "{}", "name": "Check pwexp file", "documentation": "[Arguments] ${file} ${nodename}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "3cefbdc8-5fcd-47e8-a7d5-ca62244e0029", "code": "Check pwexp perm\n [Documentation] Checks zabbix permission for /var/log/messages\n [Arguments] ${nodename}\n\n ${pwexp_perm} Run Command On Nodes Return String ${nodename} getfacl /var/log/messages | grep ^user:zabbix:r--$\n Should Not Be Empty ${pwexp_perm}", "settings": "{}", "variables": "{}", "name": "Check pwexp perm", "documentation": "[Arguments] ${nodename}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "04e7a460-7349-4e4c-8680-d88d53006c1b", "code": "Check cron\n [Documentation] Checks zabbix permission for /var/log/messages\n [Arguments] ${nodename}\n\n ${cron} Run Command On Nodes Return String ${nodename} sudo cat /var/spool/cron/root | grep '^@daily sh /usr/local/bin/check_passwd_expiry.sh$'\n Should Not Be Empty ${cron}", "settings": "{}", "variables": "{}", "name": "Check cron", "documentation": "[Arguments] ${nodename}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_password.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "1ae2e369-0258-45cd-a0a3-d3c0ea3ddbb4", "code": "*** Settings ***\nDocumentation Security NCS22 - CIS NGINX Hardening\n\nTest Timeout 30 min\n\n\nResource ../../resource/common.robot\nResource ../../resource/node.robot\nResource ../../resource/setup.robot\nResource ../../resource/config.robot\n\nSuite Setup suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n# (conf files)\n@{conf_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf\n# (conf files, included files)\n@{files_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf\n# (conf files, included files, dirs)\n${all_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/ /opt/nokia/guest-img-nginx /etc/elk/nginx /opt/bcmt/config/bcmt-nginx/nginx\n# (dirs)\n${directories_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data /opt/nokia/guest-img-nginx /etc/elk/nginx /opt/bcmt/config/bcmt-nginx/nginx\n# (included files)\n@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf\n\n\n*** Test Cases ***\n\ntc_Nginx_WEB-01-0050_rb\n [Documentation] Rollback Set NGINX send_timeout to {{ nginx_send_timeout_value }}s\n [Tags] security Nginx WEB-01-0050 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # The bcmt-nginx is excluded because it violate the cis 'send_timeout 300s;'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0050 -.*\\\\n(.*send_timeout\\\\s+(10|[1-9])s\\\\;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} send_timeout\n END\n END\n\ntc_Nginx_WEB-01-0060_rb\n [Documentation] Rollback Set NGINX server_tokens directive to off\n [Tags] security Nginx WEB-01-0060 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0060 -.*\\\\n(.*server_tokens\\\\s+off\\\\;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} server_tokens\n END\n END\n\ntc_Nginx_WEB-01-0080_rb\n [Documentation] Rollback Configure NGINX log files to rotated and compressed\n [Tags] security Nginx WEB-01-0080 Rollback\n FOR ${node_name} IN @{manag_master_names}\n ${result} Run Command On Nodes Return String ${nodename} (ls /etc/logrotate.d/nginx >> /dev/null 2>&1 && echo yes) || echo no\n log ${result}\n should contain ${result} no\n END\n\ntc_Nginx_WEB-01-0100_rb\n [Documentation] Rollback Configure NGINX Online Certificate Status Protocol (OCSP)\n [Tags] security Nginx WEB-01-0100 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0100 -.*\\\\n(.*ssl_stapling on;).*\\\\n(.*ssl_stapling_verify on;)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} ssl_stapling\n END\n END\n\ntc_Nginx_WEB-01-0110_rb\n [Documentation] Rollback Enable NGINX HTTP Strict Transport Security (HSTS)\n [Tags] security Nginx WEB-01-0110 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0110 -.*\\\\n(.*add_header Strict-Transport-Security \\\\\"max-age=(1576[89]\\\\d{3}|157[7-9]\\\\d{4}|15[89]\\\\d{5}|1[6-9]\\\\d{6}|[2-9]\\\\d{7}|[1-9]\\\\d{8,});\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} Strict-Transport-Security\n END\n END\n\ntc_Nginx_WEB-01-0120_rb\n [Documentation] Rollback Disable NGINX session resumption\n [Tags] security Nginx WEB-01-0120 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0120 -.*\\\\n(.*ssl_session_tickets off.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} ssl_session_tickets\n END\n END\n\ntc_Nginx_WEB-01-0130_rb\n [Documentation] Rollback Set NGINX timeout values for reading the client header and body\n [Tags] security Nginx WEB-01-0130 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0130 -.*\\\\n(.*client_body_timeout 10;.*$)\\\\n(.*client_header_timeout 10;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} client_header_timeout\n should not contain ${result} client_body_timeout\n END\n END\n\ntc_Nginx_WEB-01-0150_rb\n [Documentation] Rollback Set NGINX maximum buffer size for URIs\n [Tags] security Nginx WEB-01-0150 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0150 -.*\\\\n(.*large_client_header_buffers.\\\\d{1,3}\\\\s+\\\\d{1,3}k.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} large_client_header_buffers\n END\n END\n\ntc_Nginx_WEB-01-0160_rb\n [Documentation] Rollback Set NGINX X-Frame-Options header\n [Tags] security Nginx WEB-01-0160 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0160 -.*\\\\n(.*add_header X-Frame-Options \\\\\"SAMEORIGIN\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} add_header X-Frame-Options\n END\n END\n\ntc_Nginx_WEB-01-0170_rb\n [Documentation] Rollback Set NGINX X-Content-Type-Options header\n [Tags] security Nginx WEB-01-0170 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0170 -.*\\\\n(.*add_header X-Content-Type-Options \\\\\"nosniff\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} add_header X-Content-Type-Options\n END\n END\n\ntc_Nginx_WEB-01-0180_rb\n [Documentation] Rollback Set NGINX X-Xss-Protection header\n [Tags] security Nginx WEB-01-0180 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0180 -.*\\\\n(.*add_header X-Xss-Protection \\\\\"1; mode=block\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} add_header X-Xss-Protection\n END\n END\n\ntc_Nginx_WEB-01-0190_rb\n [Documentation] Rollback Set NGINX keepalive_timeout to {{ nginx_keepalive_timeout_value }}s\n [Tags] security Nginx WEB-01-0190 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n# # The bcmt-nginx is excluded because it violate the cis 'send_timeout 300s;'\n# Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n# Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*keepalive_timeout\\\\s+(10|[1-9])\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} keepalive_timeout\n END\n END\n\ntc_Nginx_WEB-01-0210_rb\n [Documentation] Rollback Create custom Diffie-Hellman parameters\n [Tags] security Nginx WEB-01-0210 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n log ${path}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_dhparam\\\\s*\\/etc\\/nginx\\/certs\\/dhparam.pem;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} ssl_dhparam\n END\n END\n\n*** Keywords ***\nsuite_setup\n setup.suite_setup\n Get_Manage_And_Master_Names\n\nsuite_teardown\n setup.suite_teardown\n\nGet_Manage_And_Master_Names\n ${cluster_name}= node.get_management_cluster_name\n log ${cluster_name}\n ${inven}= node.get_inventory_dict ${cluster_name}\n log ${inven}\n ${names_manager}= node.get_manager_node_list ${inven}\n log ${names_manager}\n ${names_master}= node.get_master_node_list ${inven}\n log ${names_master}\n Set Global Variable ${names_manager} ${names_manager}\n Set Global Variable ${names_master} ${names_master}\n ${manag_master_names}= Combine Lists ${names_manager} ${names_master}\n ${manag_master_names} Remove Duplicates ${manag_master_names}\n log ${manag_master_names}\n FOR ${item} IN @{manag_master_names}\n log ${item}\n END\n Set Global Variable @{manag_master_names} @{manag_master_names}\n", "name": "suites/security/hardening_nginx_rb.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/config.robot': 'resource/config.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6d2667e1-a5da-490a-84e5-031c64d272d5", "code": "tc_Nginx_WEB-01-0050_rb\n [Documentation] Rollback Set NGINX send_timeout to {{ nginx_send_timeout_value }}s\n [Tags] security Nginx WEB-01-0050 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # The bcmt-nginx is excluded because it violate the cis 'send_timeout 300s;'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0050 -.*\\\\n(.*send_timeout\\\\s+(10|[1-9])s\\\\;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} send_timeout\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0050_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3fb55b23-7aef-4215-b876-473169376c85", "code": "tc_Nginx_WEB-01-0060_rb\n [Documentation] Rollback Set NGINX server_tokens directive to off\n [Tags] security Nginx WEB-01-0060 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0060 -.*\\\\n(.*server_tokens\\\\s+off\\\\;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} server_tokens\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0060_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "47c1049a-539e-43b3-8adf-612b83cce4bf", "code": "tc_Nginx_WEB-01-0080_rb\n [Documentation] Rollback Configure NGINX log files to rotated and compressed\n [Tags] security Nginx WEB-01-0080 Rollback\n FOR ${node_name} IN @{manag_master_names}\n ${result} Run Command On Nodes Return String ${nodename} (ls /etc/logrotate.d/nginx >> /dev/null 2>&1 && echo yes) || echo no\n log ${result}\n should contain ${result} no\n END", "settings": "{}", "variables": "{}", "name": "tc_Nginx_WEB-01-0080_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e9f87f34-68e8-46c0-8f24-6ca6d6d8c1c4", "code": "tc_Nginx_WEB-01-0100_rb\n [Documentation] Rollback Configure NGINX Online Certificate Status Protocol (OCSP)\n [Tags] security Nginx WEB-01-0100 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0100 -.*\\\\n(.*ssl_stapling on;).*\\\\n(.*ssl_stapling_verify on;)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} ssl_stapling\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0100_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "193814ee-1e05-4ebd-a4ff-5578e3cb85c0", "code": "tc_Nginx_WEB-01-0110_rb\n [Documentation] Rollback Enable NGINX HTTP Strict Transport Security (HSTS)\n [Tags] security Nginx WEB-01-0110 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0110 -.*\\\\n(.*add_header Strict-Transport-Security \\\\\"max-age=(1576[89]\\\\d{3}|157[7-9]\\\\d{4}|15[89]\\\\d{5}|1[6-9]\\\\d{6}|[2-9]\\\\d{7}|[1-9]\\\\d{8,});\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} Strict-Transport-Security\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0110_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "91cd5e4c-d7b9-4319-b356-18158d501c0b", "code": "tc_Nginx_WEB-01-0120_rb\n [Documentation] Rollback Disable NGINX session resumption\n [Tags] security Nginx WEB-01-0120 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0120 -.*\\\\n(.*ssl_session_tickets off.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} ssl_session_tickets\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0120_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7b950afb-8a44-4dc5-b202-8a73b10f3900", "code": "tc_Nginx_WEB-01-0130_rb\n [Documentation] Rollback Set NGINX timeout values for reading the client header and body\n [Tags] security Nginx WEB-01-0130 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0130 -.*\\\\n(.*client_body_timeout 10;.*$)\\\\n(.*client_header_timeout 10;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} client_header_timeout\n should not contain ${result} client_body_timeout\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0130_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dbb5b286-0989-47fc-b687-4ef69f1e0a14", "code": "tc_Nginx_WEB-01-0150_rb\n [Documentation] Rollback Set NGINX maximum buffer size for URIs\n [Tags] security Nginx WEB-01-0150 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0150 -.*\\\\n(.*large_client_header_buffers.\\\\d{1,3}\\\\s+\\\\d{1,3}k.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} large_client_header_buffers\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0150_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "fcf7da94-885d-48bb-8c4a-4e391e383dad", "code": "tc_Nginx_WEB-01-0160_rb\n [Documentation] Rollback Set NGINX X-Frame-Options header\n [Tags] security Nginx WEB-01-0160 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0160 -.*\\\\n(.*add_header X-Frame-Options \\\\\"SAMEORIGIN\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} add_header X-Frame-Options\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0160_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6261cc7d-8ac0-46c5-b6fa-a32a26d66e36", "code": "tc_Nginx_WEB-01-0170_rb\n [Documentation] Rollback Set NGINX X-Content-Type-Options header\n [Tags] security Nginx WEB-01-0170 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0170 -.*\\\\n(.*add_header X-Content-Type-Options \\\\\"nosniff\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} add_header X-Content-Type-Options\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0170_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0a8e8fc0-f182-4751-813c-c9e218a23309", "code": "tc_Nginx_WEB-01-0180_rb\n [Documentation] Rollback Set NGINX X-Xss-Protection header\n [Tags] security Nginx WEB-01-0180 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*#CBIS - WEB-01-0180 -.*\\\\n(.*add_header X-Xss-Protection \\\\\"1; mode=block\\\\\";.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} add_header X-Xss-Protection\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0180_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a1335752-c996-4175-aa4c-2288ffae0631", "code": "tc_Nginx_WEB-01-0190_rb\n [Documentation] Rollback Set NGINX keepalive_timeout to {{ nginx_keepalive_timeout_value }}s\n [Tags] security Nginx WEB-01-0190 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n# # The bcmt-nginx is excluded because it violate the cis 'send_timeout 300s;'\n# Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n# Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*keepalive_timeout\\\\s+(10|[1-9])\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} keepalive_timeout\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0190_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "838a13c4-14b4-4961-a1d1-2bf7cdd5ab1c", "code": "tc_Nginx_WEB-01-0210_rb\n [Documentation] Rollback Create custom Diffie-Hellman parameters\n [Tags] security Nginx WEB-01-0210 Rollback\n FOR ${node_name} IN @{manag_master_names}\n FOR ${path} IN @{included_paths}\n log ${path}\n # This is because bcmt-nginx is excluded because it already has this setting.\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_dhparam\\\\s*\\/etc\\/nginx\\/certs\\/dhparam.pem;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result} ssl_dhparam\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0210_rb", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "66b10065-c6dd-4528-af1d-44eebf8bdff5", "code": "suite_setup\n setup.suite_setup\n Get_Manage_And_Master_Names", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "26d6032d-fe5b-4fe4-a168-15fddb9d022d", "code": "suite_teardown\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "669d1566-77eb-4733-a39d-bffeadf85511", "code": "Get_Manage_And_Master_Names\n ${cluster_name}= node.get_management_cluster_name\n log ${cluster_name}\n ${inven}= node.get_inventory_dict ${cluster_name}\n log ${inven}\n ${names_manager}= node.get_manager_node_list ${inven}\n log ${names_manager}\n ${names_master}= node.get_master_node_list ${inven}\n log ${names_master}\n Set Global Variable ${names_manager} ${names_manager}\n Set Global Variable ${names_master} ${names_master}\n ${manag_master_names}= Combine Lists ${names_manager} ${names_master}\n ${manag_master_names} Remove Duplicates ${manag_master_names}\n log ${manag_master_names}\n FOR ${item} IN @{manag_master_names}\n log ${item}\n END\n Set Global Variable @{manag_master_names} @{manag_master_names}", "settings": "{}", "variables": "{}", "name": "Get_Manage_And_Master_Names", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx_rb.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "7aee062d-6a24-4895-a3f7-3cb609da9a10", "code": "*** Settings ***\nDocumentation Security NCS22 - CIS NGINX Hardening\n\nTest Timeout 30 min\n\n\nResource ../../resource/common.robot\nResource ../../resource/node.robot\nResource ../../resource/setup.robot\nResource ../../resource/config.robot\n\n\n\nSuite Setup suite_setup\nSuite Teardown suite_teardown\n\n*** Variables ***\n# (conf files)\n@{conf_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf\n# (conf files, included files)\n${files_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf\n# (conf files, included files, dirs)\n${all_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/ /opt/nokia/guest-img-nginx /etc/elk/nginx /opt/bcmt/config/bcmt-nginx/nginx\n# (dirs)\n${directories_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data /opt/nokia/guest-img-nginx /etc/elk/nginx /opt/bcmt/config/bcmt-nginx/nginx\n# (included files)\n@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf\n\n\n*** Test Cases ***\n\ntc_Nginx_WEB-01-0010\n [Documentation] check autoindex directive\n [Tags] security Nginx WEB-01-0010\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{conf_paths}\n ${result_on} Run Command On Nodes Return String ${nodename} sudo grep '^\\\\s*autoindex on;' ${path}\n ${result_off} Run Command On Nodes Return String ${nodename} sudo grep '^\\\\s*autoindex off;' ${path}\n log ${result_on}\n log ${result_off}\n ${temp}= Get Lines Containing String ${result_off} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result_on} autoindex on;\n should contain ${result_off} autoindex off;\n END\n END\n\ntc_Nginx_WEB-01-0020\n [Documentation] check NGINX directories and files to owned by root\n [Tags] security Nginx WEB-01-0020\n FOR ${node_name} IN @{manage_master_names}\n ${result} Run Command On Nodes Return String ${nodename} sudo getfacl ${all_paths} | grep 'owner:.*\\n# group:.*'\n log ${result}\n ${lines} =\tGet Lines Matching Regexp\t${result}\t^# (owner|group): (?!root).*\n log ${lines}\n Should Be Empty ${lines}\n END\n\ntc_Nginx_WEB-01-0030\n [Documentation] Restrict access to NGINX files and directories\n [Tags] security Nginx WEB-01-0030\n FOR ${node_name} IN @{manage_master_names}\n\n ${result_files} Run Command On Nodes Return String ${nodename} sudo getfacl ${files_paths} | grep 'user::.*\\ngroup::.*\\nother::.*'\n ${result_dirs} Run Command On Nodes Return String ${nodename} sudo getfacl ${directories_paths} | grep 'user::.*\\ngroup::.*\\nother::.*'\n\n log ${result_files}\n log ${result_dirs}\n #check user\n ${user} =\tGet Lines Matching Regexp\t${result_files}\t^user::(?!rw-).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${result_files}\t^group::(?!r--).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${result_files}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n\n #check user\n ${user} =\tGet Lines Matching Regexp\t${result_dirs}\t^user::(?!rwx).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${result_dirs}\t^group::(?!r-x).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${result_dirs}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n END\n\ntc_Nginx_WEB-01-0050\n [Documentation] Set NGINX send_timeout to {{ nginx_send_timeout_value }}s\n [Tags] security Nginx WEB-01-0050\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n log ${path}\n # The bcmt-nginx is excluded because it violate the cis 'send_timeout 300s;'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*send_timeout\\\\s+(10|[1-9])\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} send_timeout\n END\n END\n\ntc_Nginx_WEB-01-0060\n [Documentation] Set NGINX server_tokens directive to off\n [Tags] security Nginx WEB-01-0060\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*server_tokens\\\\s+off\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} server_tokens\n END\n END\n\ntc_Nginx_WEB-01-0070\n [Documentation] Enable NGINX error logging\n [Tags] security Nginx WEB-01-0070\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{conf_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -E '.*error_log.*?info' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} error_log\n END\n END\n\ntc_Nginx_WEB-01-0080\n [Documentation] Configure NGINX log files to rotated and compressed\n [Tags] security Nginx WEB-01-0080\n FOR ${node_name} IN @{manage_master_names}\n ${result} Run Command On Nodes Return String ${nodename} (ls /etc/logrotate.d/nginx >> /dev/null 2>&1 && echo yes) || echo no\n log ${result}\n should contain ${result} yes\n END\n\ntc_Nginx_WEB-01-0090\n [Documentation] Slave of NCS ANSSI-05-0003 - WEB-01-0090 - Configure all NGINX TLS servers\n [Tags] security Nginx WEB-01-0090 tls ANSSI-05-0003\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_protocols\\\\s*TLSv1.3 TLSv1.2.*;$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_protocols\n END\n END\n\ntc_Nginx_WEB-01-0100\n [Documentation] Configure NGINX Online Certificate Status Protocol (OCSP)\n [Tags] security Nginx WEB-01-0100\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_stapling on;.*\\\\n(.*ssl_stapling_verify on;)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_stapling\n END\n END\n\ntc_Nginx_WEB-01-0110\n [Documentation] Enable NGINX HTTP Strict Transport Security (HSTS)\n [Tags] security Nginx WEB-01-0110\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*add_header Strict-Transport-Security \\\\\"max-age=(1576[89]\\\\d{3}|157[7-9]\\\\d{4}|15[89]\\\\d{5}|1[6-9]\\\\d{6}|[2-9]\\\\d{7}|[1-9]\\\\d{8,});\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} Strict-Transport-Security\n END\n END\n\ntc_Nginx_WEB-01-0120\n [Documentation] Disable NGINX session resumption\n [Tags] security Nginx WEB-01-0120\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_session_tickets off.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_session_tickets\n END\n END\n\ntc_Nginx_WEB-01-0130\n [Documentation] Set NGINX timeout values for reading the client header and body\n [Tags] security Nginx WEB-01-0130\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*client_body_timeout (10|[1-9])s?;.*$\\\\n(.*client_header_timeout (10|[1-9])s?;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} client_header_timeout\n should contain ${result} client_body_timeout\n END\n END\n\ntc_Nginx_WEB-01-0150\n [Documentation] Set NGINX maximum buffer size for URIs\n [Tags] security Nginx WEB-01-0150\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*large_client_header_buffers.\\\\d{1,3}\\\\s+\\\\d{1,3}k.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} large_client_header_buffers\n END\n END\n\ntc_Nginx_WEB-01-0160\n [Documentation] Set NGINX X-Frame-Options header\n [Tags] security Nginx WEB-01-0160\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '\\\\s*add_header X-Frame-Options \\\\\"SAMEORIGIN\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} add_header X-Frame-Options\n END\n END\n\ntc_Nginx_WEB-01-0170\n [Documentation] Set NGINX X-Content-Type-Options header\n [Tags] security Nginx WEB-01-0170\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*add_header X-Content-Type-Options \\\\\"nosniff\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} add_header X-Content-Type-Options\n END\n END\n\ntc_Nginx_WEB-01-0180\n [Documentation] Set NGINX X-Xss-Protection header\n [Tags] security Nginx WEB-01-0180\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Pozi '^\\\\s*add_header X-Xss-Protection \\\\\"1; mode=block\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} add_header X-Xss-Protection ignore_case=True\n END\n END\n\ntc_Nginx_WEB-01-0190\n [Documentation] Set NGINX keepalive_timeout to {{ nginx_keepalive_timeout_value }}s\n [Tags] security Nginx WEB-01-0190\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n log ${path}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*keepalive_timeout\\\\s+(10|[1-9])\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} keepalive_timeout\n END\n END\n\ntc_Nginx_WEB-01-0200\n [Documentation] Restrict access to NGINX files and directories\n [Tags] security Nginx WEB-01-0200\n FOR ${node_name} IN @{manage_master_names}\n\n ${nginx_certs_files} Run Command On Nodes Return String ${nodename} sudo getfacl -R /etc/nginx/certs | grep 'user::.*\\ngroup::.*\\nother::.*'\n ${bcmt-nginx_certs_files} Run Command On Nodes Return String ${nodename} sudo getfacl -R /opt/bcmt/config/bcmt-nginx/certs | grep 'user::.*\\ngroup::.*\\nother::.*'\n log ${nginx_certs_files}\n log ${bcmt-nginx_certs_files}\n ${certs_files} catenate ${nginx_certs_files} ${bcmt-nginx_certs_files}\n log ${certs_files}\n #check user\n ${user} =\tGet Lines Matching Regexp\t${certs_files}\t^user::(?!r--).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${certs_files}\t^group::(?!---).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${certs_files}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n END\n\ntc_Nginx_WEB-01-0210\n [Documentation] Create custom Diffie-Hellman parameters\n [Tags] security Nginx WEB-01-0210\n FOR ${node_name} IN @{manage_master_names}\n\n ${nginx_result} Run Command On Nodes Return String ${nodename} (ls /etc/nginx/certs/dhparam.pem >> /dev/null 2>&1 && echo yes) || echo no\n log ${nginx_result}\n should contain ${nginx_result} yes\n\n ${bcmt-nginx_result} Run Command On Nodes Return String ${nodename} (ls /opt/bcmt/config/bcmt-nginx/certs/dhparam.pem >> /dev/null 2>&1 && echo yes) || echo no\n log ${bcmt-nginx_result}\n should contain ${bcmt-nginx_result} yes\n\n ${nginx_dhparam} Run Command On Nodes Return String ${nodename} sudo getfacl /etc/nginx/certs/dhparam.pem | grep 'user::.*\\ngroup::.*\\nother::.*'\n ${bcmt-nginx_dhparam} Run Command On Nodes Return String ${nodename} sudo getfacl /opt/bcmt/config/bcmt-nginx/certs/dhparam.pem | grep 'user::.*\\ngroup::.*\\nother::.*'\n log ${nginx_dhparam}\n log ${bcmt-nginx_dhparam}\n ${dhparam_files} catenate ${nginx_dhparam} ${bcmt-nginx_dhparam}\n log ${dhparam_files}\n #check user\n ${user} =\tGet Lines Matching Regexp\t${dhparam_files}\t^user::(?!r--).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${dhparam_files}\t^group::(?!---).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${dhparam_files}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n FOR ${path} IN @{included_paths}\n log ${path}\n Continue For Loop If '${path}'=='/etc/elk/nginx/nginx.conf'\n Continue For Loop If '${path}'=='/opt/nokia/guest-img-nginx/guest-img-nginx.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_dhparam\\\\s*\\/etc\\/nginx\\/certs\\/dhparam.pem;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_dhparam\n END\n END\n\n*** Keywords ***\nsuite_setup\n setup.suite_setup\n Get_Manage_And_Master_Names\n\nsuite_teardown\n setup.suite_teardown\n\nGet_Manage_And_Master_Names\n ${cluster_name}= node.get_management_cluster_name\n log ${cluster_name}\n ${inven}= node.get_inventory_dict ${cluster_name}\n log ${inven}\n ${names_manager}= node.get_manager_node_list ${inven}\n log ${names_manager}\n ${names_master}= node.get_master_node_list ${inven}\n log ${names_master}\n Set Global Variable ${names_manager} ${names_manager}\n Set Global Variable ${names_master} ${names_master}\n ${manage_master_names}= Combine Lists ${names_manager} ${names_master}\n ${manage_master_names} Remove Duplicates ${manage_master_names}\n log ${manage_master_names}\n FOR ${item} IN @{manage_master_names}\n log ${item}\n END\n Set Global Variable @{manage_master_names} @{manage_master_names}\n", "name": "suites/security/hardening_nginx.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/config.robot': 'resource/config.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6b283f01-6113-4ced-9829-5b112e4bf3dc", "code": "tc_Nginx_WEB-01-0010\n [Documentation] check autoindex directive\n [Tags] security Nginx WEB-01-0010\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{conf_paths}\n ${result_on} Run Command On Nodes Return String ${nodename} sudo grep '^\\\\s*autoindex on;' ${path}\n ${result_off} Run Command On Nodes Return String ${nodename} sudo grep '^\\\\s*autoindex off;' ${path}\n log ${result_on}\n log ${result_off}\n ${temp}= Get Lines Containing String ${result_off} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should not contain ${result_on} autoindex on;\n should contain ${result_off} autoindex off;\n END\n END", "settings": "{}", "variables": "{'conf_paths': {'text': '@{conf_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf'}}", "name": "tc_Nginx_WEB-01-0010", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ea8f0459-3c8b-444d-a761-a6fda261af99", "code": "tc_Nginx_WEB-01-0020\n [Documentation] check NGINX directories and files to owned by root\n [Tags] security Nginx WEB-01-0020\n FOR ${node_name} IN @{manage_master_names}\n ${result} Run Command On Nodes Return String ${nodename} sudo getfacl ${all_paths} | grep 'owner:.*\\n# group:.*'\n log ${result}\n ${lines} =\tGet Lines Matching Regexp\t${result}\t^# (owner|group): (?!root).*\n log ${lines}\n Should Be Empty ${lines}\n END", "settings": "{}", "variables": "{'all_paths': {'text': '${all_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/ /opt/nokia/guest-img-nginx /etc/elk/nginx /opt/bcmt/config/bcmt-nginx/nginx'}}", "name": "tc_Nginx_WEB-01-0020", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "2a47c768-aefb-41a3-b6f2-e77ad85965b1", "code": "tc_Nginx_WEB-01-0030\n [Documentation] Restrict access to NGINX files and directories\n [Tags] security Nginx WEB-01-0030\n FOR ${node_name} IN @{manage_master_names}\n\n ${result_files} Run Command On Nodes Return String ${nodename} sudo getfacl ${files_paths} | grep 'user::.*\\ngroup::.*\\nother::.*'\n ${result_dirs} Run Command On Nodes Return String ${nodename} sudo getfacl ${directories_paths} | grep 'user::.*\\ngroup::.*\\nother::.*'\n\n log ${result_files}\n log ${result_dirs}\n #check user\n ${user} =\tGet Lines Matching Regexp\t${result_files}\t^user::(?!rw-).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${result_files}\t^group::(?!r--).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${result_files}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n\n #check user\n ${user} =\tGet Lines Matching Regexp\t${result_dirs}\t^user::(?!rwx).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${result_dirs}\t^group::(?!r-x).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${result_dirs}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n END", "settings": "{}", "variables": "{'files_paths': {'text': '${files_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}, 'directories_paths': {'text': '${directories_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data /opt/nokia/guest-img-nginx /etc/elk/nginx /opt/bcmt/config/bcmt-nginx/nginx'}}", "name": "tc_Nginx_WEB-01-0030", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "93446964-6603-43d5-8a15-ac68dbd21cfb", "code": "tc_Nginx_WEB-01-0050\n [Documentation] Set NGINX send_timeout to {{ nginx_send_timeout_value }}s\n [Tags] security Nginx WEB-01-0050\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n log ${path}\n # The bcmt-nginx is excluded because it violate the cis 'send_timeout 300s;'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf'\n Continue For Loop If '${path}'=='/opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*send_timeout\\\\s+(10|[1-9])\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} send_timeout\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0050", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "27abf5e7-bca7-4546-9de5-ead909dc4e90", "code": "tc_Nginx_WEB-01-0060\n [Documentation] Set NGINX server_tokens directive to off\n [Tags] security Nginx WEB-01-0060\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*server_tokens\\\\s+off\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} server_tokens\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0060", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1a2ada7a-f7c9-46a2-8dfe-aef0f8c6ae1e", "code": "tc_Nginx_WEB-01-0070\n [Documentation] Enable NGINX error logging\n [Tags] security Nginx WEB-01-0070\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{conf_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -E '.*error_log.*?info' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} error_log\n END\n END", "settings": "{}", "variables": "{'conf_paths': {'text': '@{conf_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/nginx.conf /opt/nokia/guest-img-nginx/nginx.conf /etc/elk/nginx/nginx_main.conf /opt/bcmt/config/bcmt-nginx/nginx/nginx.conf'}}", "name": "tc_Nginx_WEB-01-0070", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0dd8a437-1016-42ec-b4cf-09bf97f30811", "code": "tc_Nginx_WEB-01-0080\n [Documentation] Configure NGINX log files to rotated and compressed\n [Tags] security Nginx WEB-01-0080\n FOR ${node_name} IN @{manage_master_names}\n ${result} Run Command On Nodes Return String ${nodename} (ls /etc/logrotate.d/nginx >> /dev/null 2>&1 && echo yes) || echo no\n log ${result}\n should contain ${result} yes\n END", "settings": "{}", "variables": "{}", "name": "tc_Nginx_WEB-01-0080", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "15519aa2-0407-4e5e-bc61-00c86335623d", "code": "tc_Nginx_WEB-01-0090\n [Documentation] Slave of NCS ANSSI-05-0003 - WEB-01-0090 - Configure all NGINX TLS servers\n [Tags] security Nginx WEB-01-0090 tls ANSSI-05-0003\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_protocols\\\\s*TLSv1.3 TLSv1.2.*;$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_protocols\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0090", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cc241c4d-4cfd-4ef4-8e1d-0f5a9cf4a5a4", "code": "tc_Nginx_WEB-01-0100\n [Documentation] Configure NGINX Online Certificate Status Protocol (OCSP)\n [Tags] security Nginx WEB-01-0100\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_stapling on;.*\\\\n(.*ssl_stapling_verify on;)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_stapling\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0100", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "31dbf883-cb89-4e53-9559-2f7d0fe705ec", "code": "tc_Nginx_WEB-01-0110\n [Documentation] Enable NGINX HTTP Strict Transport Security (HSTS)\n [Tags] security Nginx WEB-01-0110\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*add_header Strict-Transport-Security \\\\\"max-age=(1576[89]\\\\d{3}|157[7-9]\\\\d{4}|15[89]\\\\d{5}|1[6-9]\\\\d{6}|[2-9]\\\\d{7}|[1-9]\\\\d{8,});\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} Strict-Transport-Security\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0110", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dd71276c-447e-4b6a-8559-c14de43c71b5", "code": "tc_Nginx_WEB-01-0120\n [Documentation] Disable NGINX session resumption\n [Tags] security Nginx WEB-01-0120\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_session_tickets off.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_session_tickets\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0120", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "40b4d2a6-bbfd-4b16-a5cb-5470f950bdb8", "code": "tc_Nginx_WEB-01-0130\n [Documentation] Set NGINX timeout values for reading the client header and body\n [Tags] security Nginx WEB-01-0130\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*client_body_timeout (10|[1-9])s?;.*$\\\\n(.*client_header_timeout (10|[1-9])s?;.*$)' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} client_header_timeout\n should contain ${result} client_body_timeout\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0130", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c27572af-80d3-4096-bae9-2b839a2b2ebe", "code": "tc_Nginx_WEB-01-0150\n [Documentation] Set NGINX maximum buffer size for URIs\n [Tags] security Nginx WEB-01-0150\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*large_client_header_buffers.\\\\d{1,3}\\\\s+\\\\d{1,3}k.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} large_client_header_buffers\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0150", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ab8c70d1-bf6c-4e16-9636-ecbf3afdd4ed", "code": "tc_Nginx_WEB-01-0160\n [Documentation] Set NGINX X-Frame-Options header\n [Tags] security Nginx WEB-01-0160\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '\\\\s*add_header X-Frame-Options \\\\\"SAMEORIGIN\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} add_header X-Frame-Options\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0160", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "567d756c-ba59-4e84-ac38-129bfa7183ce", "code": "tc_Nginx_WEB-01-0170\n [Documentation] Set NGINX X-Content-Type-Options header\n [Tags] security Nginx WEB-01-0170\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*add_header X-Content-Type-Options \\\\\"nosniff\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} add_header X-Content-Type-Options\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0170", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d6843160-8163-4b1d-b4af-02972e73ef40", "code": "tc_Nginx_WEB-01-0180\n [Documentation] Set NGINX X-Xss-Protection header\n [Tags] security Nginx WEB-01-0180\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Pozi '^\\\\s*add_header X-Xss-Protection \\\\\"1; mode=block\\\\\";.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} add_header X-Xss-Protection ignore_case=True\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0180", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c33e8130-faeb-4905-8f85-ae7b0253c91e", "code": "tc_Nginx_WEB-01-0190\n [Documentation] Set NGINX keepalive_timeout to {{ nginx_keepalive_timeout_value }}s\n [Tags] security Nginx WEB-01-0190\n FOR ${node_name} IN @{manage_master_names}\n FOR ${path} IN @{included_paths}\n log ${path}\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*keepalive_timeout\\\\s+(10|[1-9])\\\\;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} keepalive_timeout\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0190", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "9eca228d-7560-49a3-82df-0d78a9717db5", "code": "tc_Nginx_WEB-01-0200\n [Documentation] Restrict access to NGINX files and directories\n [Tags] security Nginx WEB-01-0200\n FOR ${node_name} IN @{manage_master_names}\n\n ${nginx_certs_files} Run Command On Nodes Return String ${nodename} sudo getfacl -R /etc/nginx/certs | grep 'user::.*\\ngroup::.*\\nother::.*'\n ${bcmt-nginx_certs_files} Run Command On Nodes Return String ${nodename} sudo getfacl -R /opt/bcmt/config/bcmt-nginx/certs | grep 'user::.*\\ngroup::.*\\nother::.*'\n log ${nginx_certs_files}\n log ${bcmt-nginx_certs_files}\n ${certs_files} catenate ${nginx_certs_files} ${bcmt-nginx_certs_files}\n log ${certs_files}\n #check user\n ${user} =\tGet Lines Matching Regexp\t${certs_files}\t^user::(?!r--).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${certs_files}\t^group::(?!---).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${certs_files}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n END", "settings": "{}", "variables": "{}", "name": "tc_Nginx_WEB-01-0200", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "42f674f0-1dc2-499e-a6e4-802fc5ce503c", "code": "tc_Nginx_WEB-01-0210\n [Documentation] Create custom Diffie-Hellman parameters\n [Tags] security Nginx WEB-01-0210\n FOR ${node_name} IN @{manage_master_names}\n\n ${nginx_result} Run Command On Nodes Return String ${nodename} (ls /etc/nginx/certs/dhparam.pem >> /dev/null 2>&1 && echo yes) || echo no\n log ${nginx_result}\n should contain ${nginx_result} yes\n\n ${bcmt-nginx_result} Run Command On Nodes Return String ${nodename} (ls /opt/bcmt/config/bcmt-nginx/certs/dhparam.pem >> /dev/null 2>&1 && echo yes) || echo no\n log ${bcmt-nginx_result}\n should contain ${bcmt-nginx_result} yes\n\n ${nginx_dhparam} Run Command On Nodes Return String ${nodename} sudo getfacl /etc/nginx/certs/dhparam.pem | grep 'user::.*\\ngroup::.*\\nother::.*'\n ${bcmt-nginx_dhparam} Run Command On Nodes Return String ${nodename} sudo getfacl /opt/bcmt/config/bcmt-nginx/certs/dhparam.pem | grep 'user::.*\\ngroup::.*\\nother::.*'\n log ${nginx_dhparam}\n log ${bcmt-nginx_dhparam}\n ${dhparam_files} catenate ${nginx_dhparam} ${bcmt-nginx_dhparam}\n log ${dhparam_files}\n #check user\n ${user} =\tGet Lines Matching Regexp\t${dhparam_files}\t^user::(?!r--).*\n log ${user}\n Should Be Empty ${user}\n\n # check group\n ${group} =\tGet Lines Matching Regexp\t${dhparam_files}\t^group::(?!---).*\n log ${group}\n Should Be Empty ${group}\n\n #check other\n ${other} =\tGet Lines Matching Regexp\t${dhparam_files}\t^other::(?!---).*\n log ${other}\n Should Be Empty ${other}\n\n FOR ${path} IN @{included_paths}\n log ${path}\n Continue For Loop If '${path}'=='/etc/elk/nginx/nginx.conf'\n Continue For Loop If '${path}'=='/opt/nokia/guest-img-nginx/guest-img-nginx.conf'\n ${result} Run Command On Nodes Return String ${nodename} sudo grep -Poz '^\\\\s*ssl_dhparam\\\\s*\\/etc\\/nginx\\/certs\\/dhparam.pem;.*$' ${path}\n log ${result}\n ${temp}= Get Lines Containing String ${result} No such file or directory\n log ${temp}\n Continue For Loop If '${temp}'!=''\n should contain ${result} ssl_dhparam\n END\n END", "settings": "{}", "variables": "{'included_paths': {'text': '@{included_paths} /data0/podman/storage/volumes/nginx_etc_vol/_data/sites-enabled/cbis_manager.conf /opt/nokia/guest-img-nginx/guest-img-nginx.conf /etc/elk/nginx/nginx.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/bcmt-registry.conf /opt/bcmt/config/bcmt-nginx/nginx/conf.d/chart-repo.conf'}}", "name": "tc_Nginx_WEB-01-0210", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "60a5e368-55cd-43dd-a4f8-b78a15062446", "code": "suite_setup\n setup.suite_setup\n Get_Manage_And_Master_Names", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "41562e68-bd91-4c69-9cf6-c6cbc0b2cd8c", "code": "suite_teardown\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "suite_teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "3bf079e7-931c-4709-b32a-4b08b07fc6cc", "code": "Get_Manage_And_Master_Names\n ${cluster_name}= node.get_management_cluster_name\n log ${cluster_name}\n ${inven}= node.get_inventory_dict ${cluster_name}\n log ${inven}\n ${names_manager}= node.get_manager_node_list ${inven}\n log ${names_manager}\n ${names_master}= node.get_master_node_list ${inven}\n log ${names_master}\n Set Global Variable ${names_manager} ${names_manager}\n Set Global Variable ${names_master} ${names_master}\n ${manage_master_names}= Combine Lists ${names_manager} ${names_master}\n ${manage_master_names} Remove Duplicates ${manage_master_names}\n log ${manage_master_names}\n FOR ${item} IN @{manage_master_names}\n log ${item}\n END\n Set Global Variable @{manage_master_names} @{manage_master_names}", "settings": "{}", "variables": "{}", "name": "Get_Manage_And_Master_Names", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_nginx.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "492c07d1-bdaa-4225-aa79-d0f96c545c80", "code": "*** Settings ***\nDocumentation Miscellaneous security hardening\n\nTest Timeout 30 min\nDefault Tags security hardening_misc\n\nLibrary String\nResource ../../resource/common.robot\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n\n*** Test Cases ***\n\ntc_MISC-01-0100\n [Documentation] TC for hardening MISC-01-0100 - Enable Spectre & Meltdown protection\n ... Based on architecture one of PTI/RETP/IBRS will be failing\n\n ${worker_list} Get Node Names random_nodes=${false}\n FOR ${worker} IN @{worker_list}\n ${grub_cfg} Run Command On Nodes Return String ${worker} cat /boot/grub2/grub.cfg\n Run Keyword And Continue On Failure Should Not Match Regexp ${grub_cfg} spectre_v2=off nopti noibrs noibpb\n ${pti_en} Run Command On Nodes Return String ${worker} sudo cat /sys/kernel/debug/x86/pti_enabled\n Run Keyword And Continue On Failure Should Be Equal And Strip Newline ${pti_en} 1\n ${retp_en} Run Command On Nodes Return String ${worker} sudo cat /sys/kernel/debug/x86/retp_enabled\n Run Keyword And Continue On Failure Should Be Equal And Strip Newline ${retp_en} 1\n ${ibrs_en} Run Command On Nodes Return String ${worker} sudo cat /sys/kernel/debug/x86/ibrs_enabled\n Run Keyword And Continue On Failure Should Be Equal And Strip Newline ${ibrs_en} 1\n END\n\ntc_certificate_alarm\n [Documentation] TC for hardening certificate_alarm - Create an alarm if certificate is about to expire\n\n ${master_list} Get Node Names pr_name=master random_nodes=${false}\n\n # name: Create certificate alarms log file on the 'Undercloud' or 'Manage'\n ${cert_txt} Run Command On Manage Return String ls /var/log/zabbix/uccertexpire.txt\n Run Keyword And Continue On Failure Should Not Be Empty ${cert_txt}\n \n # name: Create certificate alarms log file on the 'Controller' or 'Master'\n # name: copy create_cert_exp_alarm_oc.sh to 'controller' or 'Master'\n # name: Add create_cert_exp_alarm_oc.sh script to crontab\n FOR ${master} IN @{master_list}\n ${result} Run Command On Nodes Return String ${master} ls /var/log/zabbix/oc_cert_expire.txt\n Run Keyword And Continue On Failure Should Not Be Empty ${result}\n ${cert_oc_sh} Run Command On Nodes Return String ${master} ls /usr/local/bin/create_cert_exp_alarm_oc.sh\n Run Keyword And Continue On Failure Should Not Be Empty ${cert_oc_sh}\n ${cron_oc} Run Command On Nodes Return String ${master} sudo cat /var/spool/cron/root\n Run Keyword And Continue On Failure Should Match Regexp ${cron_oc} (?m)^@daily sh /usr/local/bin/create_cert_exp_alarm_oc.sh$\n END\n\n # name: copy create_cert_exp_alarm_uc.sh to /usr/local/bin\n ${cert_uc_sh} Run Command On Manage Return String ls /usr/local/bin/create_cert_exp_alarm_uc.sh\n Run Keyword And Continue On Failure Should Not Be Empty ${cert_uc_sh}\n # name: Add create_cert_exp_alarm_uc.sh script to crontab\n ${cron_uc} Run Command On Manage Return String sudo cat /var/spool/cron/root\n Run Keyword And Continue On Failure Should Match Regexp ${cron_uc} (?m)^@daily sh /usr/local/bin/create_cert_exp_alarm_uc.sh$\n\n\n*** Keywords ***\n\nShould Be Equal And Strip Newline\n [Arguments] ${result} ${expected}\n ${stripped} Strip String ${result} characters=\\n\n Should Be Equal As Strings ${stripped} ${expected}\n", "name": "suites/security/hardening_misc.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_misc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6f7a55df-2f10-46c2-a0a6-127b2ad97ae8", "code": "tc_MISC-01-0100\n [Documentation] TC for hardening MISC-01-0100 - Enable Spectre & Meltdown protection\n ... Based on architecture one of PTI/RETP/IBRS will be failing\n\n ${worker_list} Get Node Names random_nodes=${false}\n FOR ${worker} IN @{worker_list}\n ${grub_cfg} Run Command On Nodes Return String ${worker} cat /boot/grub2/grub.cfg\n Run Keyword And Continue On Failure Should Not Match Regexp ${grub_cfg} spectre_v2=off nopti noibrs noibpb\n ${pti_en} Run Command On Nodes Return String ${worker} sudo cat /sys/kernel/debug/x86/pti_enabled\n Run Keyword And Continue On Failure Should Be Equal And Strip Newline ${pti_en} 1\n ${retp_en} Run Command On Nodes Return String ${worker} sudo cat /sys/kernel/debug/x86/retp_enabled\n Run Keyword And Continue On Failure Should Be Equal And Strip Newline ${retp_en} 1\n ${ibrs_en} Run Command On Nodes Return String ${worker} sudo cat /sys/kernel/debug/x86/ibrs_enabled\n Run Keyword And Continue On Failure Should Be Equal And Strip Newline ${ibrs_en} 1\n END", "settings": "{}", "variables": "{}", "name": "tc_MISC-01-0100", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_misc.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b37b85eb-2728-43e5-91ea-f1a4177473cc", "code": "tc_certificate_alarm\n [Documentation] TC for hardening certificate_alarm - Create an alarm if certificate is about to expire\n\n ${master_list} Get Node Names pr_name=master random_nodes=${false}\n\n # name: Create certificate alarms log file on the 'Undercloud' or 'Manage'\n ${cert_txt} Run Command On Manage Return String ls /var/log/zabbix/uccertexpire.txt\n Run Keyword And Continue On Failure Should Not Be Empty ${cert_txt}\n \n # name: Create certificate alarms log file on the 'Controller' or 'Master'\n # name: copy create_cert_exp_alarm_oc.sh to 'controller' or 'Master'\n # name: Add create_cert_exp_alarm_oc.sh script to crontab", "settings": "{}", "variables": "{}", "name": "tc_certificate_alarm", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_misc.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "c7f49d00-6272-4f8e-bc69-f20d68c40649", "code": "*** Settings ***\nDocumentation NCS Security Hardening\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\n\nResource ../../resource/ping.robot\n\n\nSuite Setup suite_setup\nSuite Teardown Teardown Env\n\n\n*** Variables ***\n\n\n\n*** Test Cases ***\ntc_ANSSI_01_0410\n [Documentation] Kernel hardening - ANSSI-01-0410 Kernel network hardening\n [Tags] production ncsci security hardening kernel\n\n @{param_list}= Create List net.ipv4.tcp_rfc1337\\ =\\ 1 net.ipv6.conf.all.router_solicitations\\ =\\ 0\n ... net.ipv6.conf.default.router_solicitations\\ =\\ 0 net.ipv6.conf.all.accept_ra_rtr_pref\\ =\\ 0\n ... net.ipv6.conf.default.accept_ra_rtr_pref\\ =\\ 0 net.ipv6.conf.all.accept_ra_pinfo\\ =\\ 0\n ... net.ipv6.conf.default.accept_ra_pinfo\\ =\\ 0 net.ipv6.conf.all.accept_ra_defrtr\\ =\\ 0\n ... net.ipv6.conf.default.accept_ra_defrtr\\ =\\ 0 net.ipv6.conf.all.autoconf\\ =\\ 0\n ... net.ipv6.conf.default.autoconf\\ =\\ 0 net.ipv6.conf.all.max_addresses\\ =\\ 1\n ... net.ipv6.conf.default.max_addresses\\ =\\ 1\n\n FOR ${nodename} IN @{nodenamelist}\n ${sysctl_content}= Run Command On Nodes ${nodename} sudo sysctl -a\n check_list_items ${sysctl_content} @{param_list}\n END\n\n\ntc_ANSSI_01_0420\n [Documentation] Kernel hardening - ANSSI-01-0420 Kernel system hardening\n [Tags] production ncsci security hardening kernel\n\n @{param_list}= Create List kernel.sysrq\\ =\\ 0 vm.mmap_min_addr\\ =\\ 65536\n ... kernel.pid_max\\ =\\ 65536 kernel.kptr_restrict\\ =\\ 1 kernel.dmesg_restrict\\ =\\ 1\n ... kernel.perf_event_paranoid\\ =\\ 2 kernel.perf_event_max_sample_rate\\ =\\ 1\n ... kernel.perf_cpu_time_max_percent\\ =\\ 1\n\n FOR ${nodename} IN @{nodenamelist}\n ${sysctl_content}= Run Command On Nodes ${nodename} sudo sysctl -a\n check_list_items ${sysctl_content} @{param_list}\n END\n\n\ntc_ANSSI_01_0430\n [Documentation] Kernel hardening - ANSSI-01-0430 Kernel umask sysconfig hardening\n [Tags] production ncsci security hardening kernel\n\n FOR ${nodename} IN @{nodenamelist}\n ${perm}= Run Command On Nodes ${nodename} sudo stat -c '%a' /etc/sysconfig/init\n Run Keyword And Continue On Failure Should Contain ${perm.strip()} 750\n END\n\n\ntc_ANSSI_kernel_23\n [Documentation] Kernel hardening - ANSSI deny usage of ptrace\n [Tags] production ncsci security hardening kernel\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} getsebool deny_ptrace\n Run Keyword And Continue On Failure Should Contain ${content.strip()} on\n END\n\n\n*** Keywords ***\nsuite_setup\n Setup Env\n ${lst}= node.get_name_list\n Set Suite Variable ${nodenamelist} ${lst}\n\ncheck_list_items\n [Arguments] ${content} @{list}\n FOR ${item} IN @{list}\n Run Keyword And Continue On Failure Should Contain ${content} ${item}\n END\n", "name": "suites/security/hardening_kernel.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0e601c63-d061-4c33-bc9e-32c5ef4135d2", "code": "tc_ANSSI_01_0410\n [Documentation] Kernel hardening - ANSSI-01-0410 Kernel network hardening\n [Tags] production ncsci security hardening kernel\n\n @{param_list}= Create List net.ipv4.tcp_rfc1337\\ =\\ 1 net.ipv6.conf.all.router_solicitations\\ =\\ 0\n ... net.ipv6.conf.default.router_solicitations\\ =\\ 0 net.ipv6.conf.all.accept_ra_rtr_pref\\ =\\ 0\n ... net.ipv6.conf.default.accept_ra_rtr_pref\\ =\\ 0 net.ipv6.conf.all.accept_ra_pinfo\\ =\\ 0\n ... net.ipv6.conf.default.accept_ra_pinfo\\ =\\ 0 net.ipv6.conf.all.accept_ra_defrtr\\ =\\ 0\n ... net.ipv6.conf.default.accept_ra_defrtr\\ =\\ 0 net.ipv6.conf.all.autoconf\\ =\\ 0\n ... net.ipv6.conf.default.autoconf\\ =\\ 0 net.ipv6.conf.all.max_addresses\\ =\\ 1\n ... net.ipv6.conf.default.max_addresses\\ =\\ 1\n\n FOR ${nodename} IN @{nodenamelist}\n ${sysctl_content}= Run Command On Nodes ${nodename} sudo sysctl -a\n check_list_items ${sysctl_content} @{param_list}\n END", "settings": "{}", "variables": "{}", "name": "tc_ANSSI_01_0410", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3a882383-ff6a-449b-a33d-a0d9ba12f414", "code": "tc_ANSSI_01_0420\n [Documentation] Kernel hardening - ANSSI-01-0420 Kernel system hardening\n [Tags] production ncsci security hardening kernel\n\n @{param_list}= Create List kernel.sysrq\\ =\\ 0 vm.mmap_min_addr\\ =\\ 65536\n ... kernel.pid_max\\ =\\ 65536 kernel.kptr_restrict\\ =\\ 1 kernel.dmesg_restrict\\ =\\ 1\n ... kernel.perf_event_paranoid\\ =\\ 2 kernel.perf_event_max_sample_rate\\ =\\ 1\n ... kernel.perf_cpu_time_max_percent\\ =\\ 1\n\n FOR ${nodename} IN @{nodenamelist}\n ${sysctl_content}= Run Command On Nodes ${nodename} sudo sysctl -a\n check_list_items ${sysctl_content} @{param_list}\n END", "settings": "{}", "variables": "{}", "name": "tc_ANSSI_01_0420", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b48314cb-c255-4de7-9a86-e61224a79b2a", "code": "tc_ANSSI_01_0430\n [Documentation] Kernel hardening - ANSSI-01-0430 Kernel umask sysconfig hardening\n [Tags] production ncsci security hardening kernel\n\n FOR ${nodename} IN @{nodenamelist}\n ${perm}= Run Command On Nodes ${nodename} sudo stat -c '%a' /etc/sysconfig/init\n Run Keyword And Continue On Failure Should Contain ${perm.strip()} 750\n END", "settings": "{}", "variables": "{}", "name": "tc_ANSSI_01_0430", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "af22b7cb-bd6d-4515-a3e3-8824a08c0d46", "code": "tc_ANSSI_kernel_23\n [Documentation] Kernel hardening - ANSSI deny usage of ptrace\n [Tags] production ncsci security hardening kernel\n\n FOR ${nodename} IN @{nodenamelist}\n ${content}= Run Command On Nodes ${nodename} getsebool deny_ptrace\n Run Keyword And Continue On Failure Should Contain ${content.strip()} on\n END", "settings": "{}", "variables": "{}", "name": "tc_ANSSI_kernel_23", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "1993e95e-373b-4ffe-a3ee-0b197658da25", "code": "suite_setup\n Setup Env\n ${lst}= node.get_name_list\n Set Suite Variable ${nodenamelist} ${lst}", "settings": "{}", "variables": "{}", "name": "suite_setup", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c69f18d5-60b6-4051-b756-399f80bcb752", "code": "check_list_items\n [Arguments] ${content} @{list}\n FOR ${item} IN @{list}\n Run Keyword And Continue On Failure Should Contain ${content} ${item}\n END", "settings": "{}", "variables": "{}", "name": "check_list_items", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/hardening_kernel.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "8f1746a3-5a5c-4ff2-8f44-b109f8019feb", "code": "*** Settings ***\nDocumentation Dummy case\n\nTest Timeout 30 min\n\n# common libraries\nLibrary Selenium2Library timeout=10 min\nLibrary XvfbRobot\nLibrary String\nResource ../../resource/common.robot\n\nResource ../../resource/ping.robot\n\n\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n\n*** Variables ***\n\n\n\n*** Test Cases ***\n\n# ping nodes\n\ntest_ping_nodes\n [Documentation] Ping all ncs cluster nodes\n [Tags] production ncsci\n ${nodenamelist}= node.get_name_list\n Log ${nodenamelist}\n FOR ${nodename} IN @{nodenamelist}\n ${private_oam_ip}= node.get_private_oam_ip ${nodename}\n Run Keyword And Continue On Failure ping.node ${private_oam_ip}\n END\n\n\nDummy\n [Documentation] TC for checking if executing commands on ncs work at all\n\n ${output}= Run Command On Deployment Server ps -aux\n Log ${output}\n\n ${output}= Run Command On Controller ps -aux\n Log ${output}\n\n ${output}= Run Command On Nodes security-security-cloud-allinone-1 ps -aux\n Log ${output}\n\n\n\n*** Keywords ***\n\n", "name": "suites/security/dummy.robot", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/dummy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0bcc2a90-8ed1-496d-8590-4b8345211a3f", "code": "test_ping_nodes\n [Documentation] Ping all ncs cluster nodes\n [Tags] production ncsci\n ${nodenamelist}= node.get_name_list\n Log ${nodenamelist}\n FOR ${nodename} IN @{nodenamelist}\n ${private_oam_ip}= node.get_private_oam_ip ${nodename}\n Run Keyword And Continue On Failure ping.node ${private_oam_ip}\n END", "settings": "{}", "variables": "{}", "name": "test_ping_nodes", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/dummy.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "aa812730-a071-43a2-b1c5-a092abf3407d", "code": "Dummy\n [Documentation] TC for checking if executing commands on ncs work at all\n\n ${output}= Run Command On Deployment Server ps -aux\n Log ${output}\n\n ${output}= Run Command On Controller ps -aux\n Log ${output}\n\n ${output}= Run Command On Nodes security-security-cloud-allinone-1 ps -aux\n Log ${output}", "settings": "{}", "variables": "{}", "name": "Dummy", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/security/dummy.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "78cd8f20-c5f0-4974-be06-2c227cf1f212", "code": "*** Settings ***\nDocumentation The Test Suite Checks The ELK Functionality on NCS\n\nForce Tags ncsrndci\n\nResource ../../resource/setup.robot\nResource ../../resource/node.robot\nResource ../../resource/common.robot\nLibrary JSONLibrary\nLibrary DateTime\nLibrary Collections\nLibrary String\n\nSuite Setup Setup Suite Tests\nSuite Teardown Teardown Env\n\n*** Test Cases ***\nverify_elasticsearch_cluster_nodes_local\n [Documentation] Verify That All the Manage/Monitoring Nodes Have Joined the Elasticsearch Cluster in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n\n ${resp}= common.Run Command On Manage ${command}\n ${json_dict} JSONLibrary.Convert String to JSON\t ${resp}\n Log ${json_dict}\n ${elk_node} Collections.Get From Dictionary ${json_dict} number_of_nodes\n\n ${elk_cluster_state}= Run Keyword If '${elk_node}'=='${MONITORING_NODES_NUMBER}'\n ... Set variable ${TRUE}\n ... ELSE\n ... Set Variable ${FALSE}\n\n Should Be Equal ${elk_cluster_state} ${TRUE} Some of The Nodes Didn't Joined The Cluster values=False\n\nverify_elasticsearch_cluster_status_local\n [Documentation] Verify That Elasticsearch Cluster is Healthy in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n\n ${resp}= common.Run Command On Manage ${command}\n ${json_dict} JSONLibrary.Convert String to JSON\t ${resp}\n Log ${json_dict}\n ${elk_state}= Collections.Get From Dictionary ${json_dict} status\n ${elk_node} Collections.Get From Dictionary ${json_dict} number_of_nodes\n\n ${elk_cluster_state}= Run Keyword If '${elk_node}'>='3' and '${elk_state}'=='green'\n ... Set Variable ${TRUE}\n ... ELSE IF '${elk_node}'=='1' and '${elk_state}'=='yellow'\n ... Set Variable ${TRUE}\n ... ELSE\n ... Set Variable ${FALSE}\n\n Should Be Equal ${elk_cluster_state} ${TRUE} Elastisearch Cluster is Not Healthy values=False\n\nverify_kibana_accessibility_local\n [Documentation] Verify That Kibana is Running and Accessible in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n ${resp}= common.Run Command On Manage sudo curl https://${EXTERNAL_MANAGEMENT_VIP}:5602/kibana_status\n ${json_dict} JSONLibrary.Convert String to JSON\t ${resp}\n Log ${json_dict}\n ${kibana_state_status}= Collections.Get From Dictionary ${json_dict} status\n ${kibana_state_overall}= Collections.Get From Dictionary ${kibana_state_status} overall\n ${kibana_state}= Collections.Get From Dictionary ${kibana_state_overall} title\n\n Should Be Equal ${kibana_state} Green Can't Access Kibana, it's Not Running values=False\n\nverify_elk_containers_services_local\n [Documentation] Verify That ELK containers and Services are Created on The Right Nodes in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n container_should_run_on_managers elk-elasticsearch\n container_should_run_on_managers elk-kibana\n container_should_run_on_managers cbis-nginx-kibana\n\n service_should_run_on_managers container-elk-elasticsearch\n service_should_run_on_managers container-elk-kibana\n service_should_run_on_managers container-cbis-nginx-kibana\n\n container_should_run_on_every_node gs_elk_logstash\n container_should_run_on_every_node gs_elk_metricbeat\n\n service_should_run_on_every_node container-gs_elk_logstash\n service_should_run_on_every_node container-gs_elk_metricbeat\n\nverify_elasticsearch_indices_created_local\n [Documentation] Verify That Elasticsearch Indices Are Created in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n ${date}= DateTime.Get Current Date result_format=%Y.%m.%d\n Log ${date}\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${date}\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${date}\n\n ${resp}= common.Run Command On Manage ${command}\n Log ${resp}\n\n Should Contain ${resp} cloud- Couldn't Find cloud-* Index values=False\n Should Contain ${resp} audit- Couldn't Find audit-* Index values=False\n Should Contain ${resp} metricbeat- Couldn't Find metricbeat-* Index values=False\n Should Contain ${resp} ceph- Couldn't Find ceph-* Index values=False\n Should Contain ${resp} fluentd- Couldn't Find fluentd-* Index values=False\n ${status} ${value}= Run Keyword And Ignore Error ${resp} ipmitool- Couldn't Find ipmitool-* Index (Skip if Failed) values=False\n Run Keyword If \"${status}\"==\"FAIL\" Log Couldn't Find ipmitool-* Index (Skip if Failed)\n Run Keyword If \"${status}\"==\"FAIL\" Log To Console \\n\\n\\tCouldn't Find ipmitool-* Index (Skip if Failed)\\n\n\nverify_elk_curator_local\n [Documentation] Verify That ElK Curator is Removing Old Indices in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n curator_should_run_on_managers elk-curator\n\n ${date}= DateTime.Get Current Date result_format=%Y.%m.%d\n Log ${date}\n Log ${ELK_KEEP_DATA}\n\n ${keep_data_date}= DateTime.Subtract Time From Date ${date} ${ELK_KEEP_DATA} days\n ${keep_data_date_formated}= DateTime.Convert Date ${keep_data_date} result_format=%Y.%m.%d\n Log ${keep_data_date_formated}\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${keep_data_date_formated} | wc -l\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${keep_data_date_formated} | wc -l\n\n ${resp}= common.Run Command On Manage ${command}\n Log ${resp}\n\n ${elk_curator_state}= Run Keyword If '${resp}'=='0'\n ... Set variable ${TRUE}\n ... ELSE\n ... Set Variable ${FALSE}\n\n Should Be Equal ${elk_curator_state} ${TRUE} Curator isn't removing old indices values=False\n\nverify_elk_containers_services_remote\n [Documentation] Verify That ELK containers and Services are Created on The Right Nodes in Case of Remote ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='local' Skip ELK Deployment Type is Local\n\n container_should_run_on_managers elk-logstash\n service_should_run_on_every_node filebeat\n\n\nverify_logs_are_sent_to_rsyslog_server_remote\n [Documentation] Verify That Logstash is Sending The Logs to The Rsyslog Serves in Case of Remote ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='local' Skip ELK Deployment Type is Local\n\n ${command}= Set Variable sudo yum list installed |grep tcpdump | wc -l\n ${tcpdump_result}= common.Run Command On Manage ${command}\n IF '${tcpdump_result}'=='0'\n ${command}= Set Variable sudo yum install tcpdump -y\n ${result}= common.Run Command On Manage ${command}\n Log ${result}\n END\n\n ${rsyslog_ip_number} Set Variable 0\n ${rsyslog_ip_valid} Set Variable 0\n FOR ${rsyslog_ip} IN @{ELK_RSYSLOG_SERVER}\n ${rsyslog_ip_decode}= String.Encode String To Bytes\t ${rsyslog_ip} ASCII errors=ignore\n ${rsyslog_ip_number}= Evaluate ${rsyslog_ip_number}+1\n Log ${rsyslog_ip_number}\n\n ${command}= Set Variable sudo timeout 7s tcpdump -i any -nn -s0 -vv port 514 and host ${rsyslog_ip_decode} 2>/dev/null | grep ${rsyslog_ip_decode}\n ${rsyslog_logs}= common.Run Command On Manage ${command}\n Log ${rsyslog_logs}\n\n ${check_log_sent}= Run Keyword and Return Status should not be empty ${rsyslog_logs}\n IF \"${check_log_sent}\"==\"${TRUE}\"\n ${rsyslog_ip_valid}= Evaluate ${rsyslog_ip_valid}+1\n Log ${rsyslog_ip_valid}\n END\n Log ${rsyslog_ip_valid}\n END\n\n IF '${tcpdump_result}'=='0'\n ${command}= Set Variable sudo yum remove tcpdump -y\n ${result}= common.Run Command On Manage ${command}\n Log ${result}\n END\n\n Should Be Equal As Integers ${rsyslog_ip_number} ${rsyslog_ip_valid} Logstash isn't Sending Logs to All Rsyslogs values=False\n\npostcase_cleanup\n [Documentation] Clean up objects created in this test suite\n setup.suite_cleanup\n\n\n*** Keywords ***\nSetup Suite Tests\n Setup Env\n collect_setup_data\n\ncollect_setup_data\n ${manager_cluster_name}= node.get_management_cluster_name\n ${inventory}= node.get_inventory_dict ${manager_cluster_name}\n Set Suite Variable ${inventory} ${inventory}\n ${cluster_manager_type}= Set Variable ${inventory['all']['vars']['central_management']['management_type']}\n ${internal_vip}= Set Variable ${inventory['all']['vars']['internal_monitoring_vip']}\n ${external_vip}= Set Variable ${inventory['all']['vars']['external_monitoring_vip']}\n ${deploy_elk}= Set Variable ${inventory['all']['vars']['openstack_deployment']['deploy_elk']}\n ${elk_deploy_type}= Set Variable ${inventory['all']['vars']['openstack_deployment']['elk_deployment_type']}\n ${elk_keep_data}= Set Variable ${inventory['all']['vars']['openstack_deployment']['elk_keep_data']}\n ${elk_rsyslog_server}= Set Variable ${inventory['all']['vars']['openstack_deployment']['rsyslog_servers']}\n ${monitoring_number} ${monitoring_ips}= get_monitoring_nodes_number_ip\n Set Suite Variable ${MONITORING_NODES_NUMBER} ${monitoring_number}\n Set Suite Variable ${MONITORING_NODES_IPS} ${monitoring_ips}\n Set Suite Variable ${SETUP_INSTALLATION_TYPE} ${cluster_manager_type}\n Set Suite Variable ${INTERNAL_MANAGEMENT_VIP} ${internal_vip}\n Set Suite Variable ${EXTERNAL_MANAGEMENT_VIP} ${external_vip}\n Set Suite Variable ${DEPLOY_ELK_STATE} ${deploy_elk}\n Set Suite Variable ${DEPLOY_ELK_TYPE} ${elk_deploy_type}\n Set Suite Variable ${ELK_KEEP_DATA} ${elk_keep_data}\n Set Suite Variable ${ELK_RSYSLOG_SERVER} ${elk_rsyslog_server}\n\nget_monitoring_nodes_number_ip\n [Documentation] Get The Manager/Monitoring Nodes Count and IPs\n ${manage_monitoring_nodes}= Create List\n FOR ${child} IN @{inventory['Monitor']['children']}\n FOR ${node} IN @{inventory['${child}']['hosts']}\n ${node_ip}= Set Variable ${inventory['_meta']['hostvars']['${node}']['ansible_host']}\n Append To List ${manage_monitoring_nodes} ${node_ip}\n END\n END\n ${expected_count}= Get length ${manage_monitoring_nodes}\n [Return] ${expected_count} ${manage_monitoring_nodes}\n\ncontainer_should_run_on_managers\n [Documentation] Check if the Given Container is Running on the Manager/Monitoring Nodes\n [Arguments] ${container}\n FOR ${node} IN @{MONITORING_NODES_IPS}\n container_should_run_on_node ${node} ${container}\n END\n\ncontainer_should_run_on_node\n [Documentation] Check if the Given Container is Running on the Given Node\n [Arguments] ${node} ${container}\n ${cmd}= Set Variable sudo podman ps | grep '${container}' | wc -l\n ${output}= common.Run Command On Nodes ${node} ${cmd}\n ${str}= String.Strip String ${output}\n Should Be Equal As Strings ${str} 1 \"${container}\" Container isn't Running on \"${node}\" values=False\n\ncontainer_should_run_on_every_node\n [Documentation] Check if the Given Contianer is Running on All Nodes\n [Arguments] ${container}\n ${node_name_list}= node.get_node_name_list\n\n FOR ${node} IN @{node_name_list}\n ${node_ip}= get_node_ip ${node}\n container_should_run_on_node ${node_ip} ${container}\n END\n\nservice_should_run_on_managers\n [Documentation] Check if the Given Service is Running on the Manager/Monitoring Nodes\n [Arguments] ${service}\n service_should_run_on_node ${service} ${MONITORING_NODES_IPS}\n\nservice_should_run_on_node\n [Documentation] Check if the Given Service is Running on the Given Nodes\n [Arguments] ${service} ${node_list}\n ${cmd}= Set Variable sudo systemctl status ${service} | grep running\n\n FOR ${node} IN @{node_list}\n ${service_running}= common.Run Command On Nodes And Return All Fields ${node} ${cmd}\n Should Be Equal As Strings ${service_running}[2] 0 \"${service}\" Service isn't Running on \"${node}\" values=False\n END\n\nservice_should_run_on_every_node\n [Documentation] Check if the Given Service is Running on All Nodes\n [Arguments] ${service}\n ${node_ip_list}= Create List\n ${node_name_list}= node.get_node_name_list\n\n FOR ${node} IN @{node_name_list}\n ${node_ip}= get_node_ip ${node}\n Append To List ${node_ip_list} ${node_ip}\n END\n service_should_run_on_node ${service} ${node_ip_list}\n\ncurator_should_run_on_managers\n [Documentation] Check if elk-curator Container is working on The Manager/Monitoring Nodes\n [Arguments] ${container}\n FOR ${manager} IN @{MONITORING_NODES_IPS}\n check_curator_container_on_node ${manager} ${container}\n check_curator_crontab_on_node ${manager} ${container}\n END\n\ncheck_curator_container_on_node\n [Documentation] Check if elk-curator Container is deployed on The Manager/Monitoring Nodes\n [Arguments] ${node} ${container}\n ${cmd}= Set Variable sudo podman ps -a | grep '${container}' | wc -l\n ${output}= common.Run Command On Nodes ${node} ${cmd}\n ${str}= String.Strip String ${output}\n Should Be Equal As Strings ${str} 1 Curator Container Can't be found on \"${node}\" values=False\n\ncheck_curator_crontab_on_node\n [Documentation] Check if 'elk-curator' cronjob is on The Manager/Monitoring Nodes\n [Arguments] ${node} ${container}\n ${cmd}= Set Variable sudo crontab -l | grep '${container}' | wc -l\n ${output}= common.Run Command On Nodes ${node} ${cmd}\n ${str}= String.Strip String ${output}\n Should Be Equal As Strings ${str} 1 Curator Cronjob Can't be found on \"${node}\" values=False\n\nget_node_ip\n [Documentation] Get The IP For The Given Node Name\n [Arguments] ${node_name}\n ${command}= Set Variable openstack cbis cm -S all -f json | grep ${node_name} -A 1\n ${resp}= common.Run Command On Manage ${command}\n ${json_dict}= Set Variable {${resp}}\n ${json_dict} Evaluate json.loads(\"\"\"${json_dict}\"\"\") json\n ${node_ip} Collections.Get From Dictionary ${json_dict} Provisioning\n [Return] ${node_ip}\n", "name": "suites/rnd/verify_elk_functionality.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f0af7a67-43e5-4fa5-b007-d1115e9cbacd", "code": "verify_elasticsearch_cluster_nodes_local\n [Documentation] Verify That All the Manage/Monitoring Nodes Have Joined the Elasticsearch Cluster in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n\n ${resp}= common.Run Command On Manage ${command}\n ${json_dict} JSONLibrary.Convert String to JSON\t ${resp}\n Log ${json_dict}\n ${elk_node} Collections.Get From Dictionary ${json_dict} number_of_nodes\n\n ${elk_cluster_state}= Run Keyword If '${elk_node}'=='${MONITORING_NODES_NUMBER}'\n ... Set variable ${TRUE}\n ... ELSE\n ... Set Variable ${FALSE}\n\n Should Be Equal ${elk_cluster_state} ${TRUE} Some of The Nodes Didn't Joined The Cluster values=False", "settings": "{'JSONLibrary': {'text': 'Library JSONLibrary'}, 'Collections': {'text': 'Library Collections'}}", "variables": "{}", "name": "verify_elasticsearch_cluster_nodes_local", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8fa87c9e-7d33-4098-96dd-7f46193dc8b8", "code": "verify_elasticsearch_cluster_status_local\n [Documentation] Verify That Elasticsearch Cluster is Healthy in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cluster/health?pretty\n\n ${resp}= common.Run Command On Manage ${command}\n ${json_dict} JSONLibrary.Convert String to JSON\t ${resp}\n Log ${json_dict}\n ${elk_state}= Collections.Get From Dictionary ${json_dict} status\n ${elk_node} Collections.Get From Dictionary ${json_dict} number_of_nodes\n\n ${elk_cluster_state}= Run Keyword If '${elk_node}'>='3' and '${elk_state}'=='green'\n ... Set Variable ${TRUE}\n ... ELSE IF '${elk_node}'=='1' and '${elk_state}'=='yellow'\n ... Set Variable ${TRUE}\n ... ELSE\n ... Set Variable ${FALSE}\n\n Should Be Equal ${elk_cluster_state} ${TRUE} Elastisearch Cluster is Not Healthy values=False", "settings": "{'JSONLibrary': {'text': 'Library JSONLibrary'}, 'Collections': {'text': 'Library Collections'}}", "variables": "{}", "name": "verify_elasticsearch_cluster_status_local", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "212c090a-3f75-4158-89d4-1016ac24658d", "code": "verify_kibana_accessibility_local\n [Documentation] Verify That Kibana is Running and Accessible in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n ${resp}= common.Run Command On Manage sudo curl https://${EXTERNAL_MANAGEMENT_VIP}:5602/kibana_status\n ${json_dict} JSONLibrary.Convert String to JSON\t ${resp}\n Log ${json_dict}\n ${kibana_state_status}= Collections.Get From Dictionary ${json_dict} status\n ${kibana_state_overall}= Collections.Get From Dictionary ${kibana_state_status} overall\n ${kibana_state}= Collections.Get From Dictionary ${kibana_state_overall} title\n\n Should Be Equal ${kibana_state} Green Can't Access Kibana, it's Not Running values=False", "settings": "{'JSONLibrary': {'text': 'Library JSONLibrary'}, 'Collections': {'text': 'Library Collections'}}", "variables": "{}", "name": "verify_kibana_accessibility_local", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c04cc430-3297-4666-bd77-1351db970403", "code": "verify_elk_containers_services_local\n [Documentation] Verify That ELK containers and Services are Created on The Right Nodes in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n container_should_run_on_managers elk-elasticsearch\n container_should_run_on_managers elk-kibana\n container_should_run_on_managers cbis-nginx-kibana\n\n service_should_run_on_managers container-elk-elasticsearch\n service_should_run_on_managers container-elk-kibana\n service_should_run_on_managers container-cbis-nginx-kibana\n\n container_should_run_on_every_node gs_elk_logstash\n container_should_run_on_every_node gs_elk_metricbeat\n\n service_should_run_on_every_node container-gs_elk_logstash\n service_should_run_on_every_node container-gs_elk_metricbeat", "settings": "{}", "variables": "{}", "name": "verify_elk_containers_services_local", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8d8fc92f-deb8-4807-9c56-c29fc57d55c9", "code": "verify_elasticsearch_indices_created_local\n [Documentation] Verify That Elasticsearch Indices Are Created in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n ${date}= DateTime.Get Current Date result_format=%Y.%m.%d\n Log ${date}\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${date}\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${date}\n\n ${resp}= common.Run Command On Manage ${command}\n Log ${resp}\n\n Should Contain ${resp} cloud- Couldn't Find cloud-* Index values=False\n Should Contain ${resp} audit- Couldn't Find audit-* Index values=False\n Should Contain ${resp} metricbeat- Couldn't Find metricbeat-* Index values=False\n Should Contain ${resp} ceph- Couldn't Find ceph-* Index values=False\n Should Contain ${resp} fluentd- Couldn't Find fluentd-* Index values=False\n ${status} ${value}= Run Keyword And Ignore Error ${resp} ipmitool- Couldn't Find ipmitool-* Index (Skip if Failed) values=False\n Run Keyword If \"${status}\"==\"FAIL\" Log Couldn't Find ipmitool-* Index (Skip if Failed)\n Run Keyword If \"${status}\"==\"FAIL\" Log To Console \\n\\n\\tCouldn't Find ipmitool-* Index (Skip if Failed)\\n", "settings": "{'DateTime': {'text': 'Library DateTime'}}", "variables": "{}", "name": "verify_elasticsearch_indices_created_local", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0985427b-9b99-422e-af9a-821db1e6d659", "code": "verify_elk_curator_local\n [Documentation] Verify That ElK Curator is Removing Old Indices in Case of Local ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='remote' Skip ELK Deployment Type is Remote\n\n curator_should_run_on_managers elk-curator\n\n ${date}= DateTime.Get Current Date result_format=%Y.%m.%d\n Log ${date}\n Log ${ELK_KEEP_DATA}\n\n ${keep_data_date}= DateTime.Subtract Time From Date ${date} ${ELK_KEEP_DATA} days\n ${keep_data_date_formated}= DateTime.Convert Date ${keep_data_date} result_format=%Y.%m.%d\n Log ${keep_data_date_formated}\n\n ${command}= Run Keyword If '${SETUP_INSTALLATION_TYPE}'=='central'\n ... Set Variable sudo curl -k -u elastic:K1bana@user https://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${keep_data_date_formated} | wc -l\n ... ELSE\n ... Set Variable sudo curl -k http://${INTERNAL_MANAGEMENT_VIP}:9201/_cat/indices?v 2> /dev/null | grep ${keep_data_date_formated} | wc -l\n\n ${resp}= common.Run Command On Manage ${command}\n Log ${resp}\n\n ${elk_curator_state}= Run Keyword If '${resp}'=='0'\n ... Set variable ${TRUE}\n ... ELSE\n ... Set Variable ${FALSE}\n\n Should Be Equal ${elk_curator_state} ${TRUE} Curator isn't removing old indices values=False", "settings": "{'DateTime': {'text': 'Library DateTime'}}", "variables": "{}", "name": "verify_elk_curator_local", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b9a3b238-5ac6-4c74-bb9d-09efd62f3e35", "code": "verify_elk_containers_services_remote\n [Documentation] Verify That ELK containers and Services are Created on The Right Nodes in Case of Remote ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='local' Skip ELK Deployment Type is Local\n\n container_should_run_on_managers elk-logstash\n service_should_run_on_every_node filebeat", "settings": "{}", "variables": "{}", "name": "verify_elk_containers_services_remote", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "360df244-da77-4068-94b0-d34a8bd0db04", "code": "verify_logs_are_sent_to_rsyslog_server_remote\n [Documentation] Verify That Logstash is Sending The Logs to The Rsyslog Serves in Case of Remote ELK\n Run Keyword If '${DEPLOY_ELK_STATE}'=='${FALSE}' Skip ELK is Not Enabled\n Run Keyword If '${DEPLOY_ELK_TYPE}'=='local' Skip ELK Deployment Type is Local\n\n ${command}= Set Variable sudo yum list installed |grep tcpdump | wc -l\n ${tcpdump_result}= common.Run Command On Manage ${command}\n IF '${tcpdump_result}'=='0'\n ${command}= Set Variable sudo yum install tcpdump -y\n ${result}= common.Run Command On Manage ${command}\n Log ${result}\n END\n\n ${rsyslog_ip_number} Set Variable 0\n ${rsyslog_ip_valid} Set Variable 0\n FOR ${rsyslog_ip} IN @{ELK_RSYSLOG_SERVER}\n ${rsyslog_ip_decode}= String.Encode String To Bytes\t ${rsyslog_ip} ASCII errors=ignore\n ${rsyslog_ip_number}= Evaluate ${rsyslog_ip_number}+1\n Log ${rsyslog_ip_number}\n\n ${command}= Set Variable sudo timeout 7s tcpdump -i any -nn -s0 -vv port 514 and host ${rsyslog_ip_decode} 2>/dev/null | grep ${rsyslog_ip_decode}\n ${rsyslog_logs}= common.Run Command On Manage ${command}\n Log ${rsyslog_logs}\n\n ${check_log_sent}= Run Keyword and Return Status should not be empty ${rsyslog_logs}\n IF \"${check_log_sent}\"==\"${TRUE}\"\n ${rsyslog_ip_valid}= Evaluate ${rsyslog_ip_valid}+1\n Log ${rsyslog_ip_valid}\n END\n Log ${rsyslog_ip_valid}\n END\n\n IF '${tcpdump_result}'=='0'\n ${command}= Set Variable sudo yum remove tcpdump -y\n ${result}= common.Run Command On Manage ${command}\n Log ${result}\n END\n\n Should Be Equal As Integers ${rsyslog_ip_number} ${rsyslog_ip_valid} Logstash isn't Sending Logs to All Rsyslogs values=False", "settings": "{}", "variables": "{}", "name": "verify_logs_are_sent_to_rsyslog_server_remote", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "37f98b4a-0dd8-4734-bedd-892b102c7b29", "code": "postcase_cleanup\n [Documentation] Clean up objects created in this test suite\n setup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "75944c93-4624-416c-952f-0565d6c2f6e9", "code": "Setup Suite Tests\n Setup Env\n collect_setup_data", "settings": "{}", "variables": "{}", "name": "Setup Suite Tests", "documentation": "", "imports_file_locations": "{'../../resource/common.robot': 'resource/common.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "86f110fb-b5c6-4797-acbf-98239da6cfca", "code": "collect_setup_data\n ${manager_cluster_name}= node.get_management_cluster_name\n ${inventory}= node.get_inventory_dict ${manager_cluster_name}\n Set Suite Variable ${inventory} ${inventory}\n ${cluster_manager_type}= Set Variable ${inventory['all']['vars']['central_management']['management_type']}\n ${internal_vip}= Set Variable ${inventory['all']['vars']['internal_monitoring_vip']}\n ${external_vip}= Set Variable ${inventory['all']['vars']['external_monitoring_vip']}\n ${deploy_elk}= Set Variable ${inventory['all']['vars']['openstack_deployment']['deploy_elk']}\n ${elk_deploy_type}= Set Variable ${inventory['all']['vars']['openstack_deployment']['elk_deployment_type']}\n ${elk_keep_data}= Set Variable ${inventory['all']['vars']['openstack_deployment']['elk_keep_data']}\n ${elk_rsyslog_server}= Set Variable ${inventory['all']['vars']['openstack_deployment']['rsyslog_servers']}\n ${monitoring_number} ${monitoring_ips}= get_monitoring_nodes_number_ip\n Set Suite Variable ${MONITORING_NODES_NUMBER} ${monitoring_number}\n Set Suite Variable ${MONITORING_NODES_IPS} ${monitoring_ips}\n Set Suite Variable ${SETUP_INSTALLATION_TYPE} ${cluster_manager_type}\n Set Suite Variable ${INTERNAL_MANAGEMENT_VIP} ${internal_vip}\n Set Suite Variable ${EXTERNAL_MANAGEMENT_VIP} ${external_vip}\n Set Suite Variable ${DEPLOY_ELK_STATE} ${deploy_elk}\n Set Suite Variable ${DEPLOY_ELK_TYPE} ${elk_deploy_type}\n Set Suite Variable ${ELK_KEEP_DATA} ${elk_keep_data}\n Set Suite Variable ${ELK_RSYSLOG_SERVER} ${elk_rsyslog_server}", "settings": "{}", "variables": "{}", "name": "collect_setup_data", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "5b56dcf5-548c-410a-b902-7b6242de9401", "code": "get_monitoring_nodes_number_ip\n [Documentation] Get The Manager/Monitoring Nodes Count and IPs\n ${manage_monitoring_nodes}= Create List\n FOR ${child} IN @{inventory['Monitor']['children']}\n FOR ${node} IN @{inventory['${child}']['hosts']}\n ${node_ip}= Set Variable ${inventory['_meta']['hostvars']['${node}']['ansible_host']}\n Append To List ${manage_monitoring_nodes} ${node_ip}\n END\n END\n ${expected_count}= Get length ${manage_monitoring_nodes}\n [Return] ${expected_count} ${manage_monitoring_nodes}\n\ncontainer_should_run_on_managers\n [Documentation] Check if the Given Container is Running on the Manager/Monitoring Nodes\n [Arguments] ${container}\n FOR ${node} IN @{MONITORING_NODES_IPS}\n container_should_run_on_node ${node} ${container}\n END", "settings": "{}", "variables": "{}", "name": "get_monitoring_nodes_number_ip", "documentation": "${manage_monitoring_nodes}= Create List", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b30d4b98-538f-42cc-b864-fc5823da3228", "code": "container_should_run_on_node\n [Documentation] Check if the Given Container is Running on the Given Node\n [Arguments] ${node} ${container}\n ${cmd}= Set Variable sudo podman ps | grep '${container}' | wc -l\n ${output}= common.Run Command On Nodes ${node} ${cmd}\n ${str}= String.Strip String ${output}\n Should Be Equal As Strings ${str} 1 \"${container}\" Container isn't Running on \"${node}\" values=False", "settings": "{'String': {'text': 'Library String'}}", "variables": "{}", "name": "container_should_run_on_node", "documentation": "[Arguments] ${node} ${container}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "47fb4ff3-f82b-4af0-83a7-b5b3a7e00296", "code": "container_should_run_on_every_node\n [Documentation] Check if the Given Contianer is Running on All Nodes\n [Arguments] ${container}\n ${node_name_list}= node.get_node_name_list\n\n FOR ${node} IN @{node_name_list}\n ${node_ip}= get_node_ip ${node}\n container_should_run_on_node ${node_ip} ${container}\n END", "settings": "{}", "variables": "{}", "name": "container_should_run_on_every_node", "documentation": "[Arguments] ${container}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "3aeead98-d1f5-470c-8ad4-1a2c3b55929f", "code": "service_should_run_on_managers\n [Documentation] Check if the Given Service is Running on the Manager/Monitoring Nodes\n [Arguments] ${service}\n service_should_run_on_node ${service} ${MONITORING_NODES_IPS}", "settings": "{}", "variables": "{}", "name": "service_should_run_on_managers", "documentation": "[Arguments] ${service}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "930f4917-4765-4b23-8e9e-1b589200a3d2", "code": "service_should_run_on_node\n [Documentation] Check if the Given Service is Running on the Given Nodes\n [Arguments] ${service} ${node_list}\n ${cmd}= Set Variable sudo systemctl status ${service} | grep running\n\n FOR ${node} IN @{node_list}\n ${service_running}= common.Run Command On Nodes And Return All Fields ${node} ${cmd}\n Should Be Equal As Strings ${service_running}[2] 0 \"${service}\" Service isn't Running on \"${node}\" values=False\n END", "settings": "{}", "variables": "{}", "name": "service_should_run_on_node", "documentation": "[Arguments] ${service} ${node_list}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "0e28ceee-6a8a-4df9-b1c0-271a659e0f1b", "code": "service_should_run_on_every_node\n [Documentation] Check if the Given Service is Running on All Nodes\n [Arguments] ${service}\n ${node_ip_list}= Create List\n ${node_name_list}= node.get_node_name_list\n\n FOR ${node} IN @{node_name_list}\n ${node_ip}= get_node_ip ${node}\n Append To List ${node_ip_list} ${node_ip}\n END\n service_should_run_on_node ${service} ${node_ip_list}", "settings": "{}", "variables": "{}", "name": "service_should_run_on_every_node", "documentation": "[Arguments] ${service}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a80181a5-435e-4352-a595-3d59e4a167e8", "code": "curator_should_run_on_managers\n [Documentation] Check if elk-curator Container is working on The Manager/Monitoring Nodes\n [Arguments] ${container}\n FOR ${manager} IN @{MONITORING_NODES_IPS}\n check_curator_container_on_node ${manager} ${container}\n check_curator_crontab_on_node ${manager} ${container}\n END", "settings": "{}", "variables": "{}", "name": "curator_should_run_on_managers", "documentation": "[Arguments] ${container}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c5dd78f5-9e36-4da9-ae4f-2be6155e2879", "code": "check_curator_container_on_node\n [Documentation] Check if elk-curator Container is deployed on The Manager/Monitoring Nodes\n [Arguments] ${node} ${container}\n ${cmd}= Set Variable sudo podman ps -a | grep '${container}' | wc -l\n ${output}= common.Run Command On Nodes ${node} ${cmd}\n ${str}= String.Strip String ${output}\n Should Be Equal As Strings ${str} 1 Curator Container Can't be found on \"${node}\" values=False", "settings": "{'String': {'text': 'Library String'}}", "variables": "{}", "name": "check_curator_container_on_node", "documentation": "[Arguments] ${node} ${container}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b4157736-3e2b-40cb-a394-84496d83e55c", "code": "check_curator_crontab_on_node\n [Documentation] Check if 'elk-curator' cronjob is on The Manager/Monitoring Nodes\n [Arguments] ${node} ${container}\n ${cmd}= Set Variable sudo crontab -l | grep '${container}' | wc -l\n ${output}= common.Run Command On Nodes ${node} ${cmd}\n ${str}= String.Strip String ${output}\n Should Be Equal As Strings ${str} 1 Curator Cronjob Can't be found on \"${node}\" values=False", "settings": "{'String': {'text': 'Library String'}}", "variables": "{}", "name": "check_curator_crontab_on_node", "documentation": "[Arguments] ${node} ${container}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "76c18478-710e-487a-8388-a162b929d827", "code": "get_node_ip\n [Documentation] Get The IP For The Given Node Name\n [Arguments] ${node_name}\n ${command}= Set Variable openstack cbis cm -S all -f json | grep ${node_name} -A 1\n ${resp}= common.Run Command On Manage ${command}\n ${json_dict}= Set Variable {${resp}}\n ${json_dict} Evaluate json.loads(\"\"\"${json_dict}\"\"\") json\n ${node_ip} Collections.Get From Dictionary ${json_dict} Provisioning", "settings": "{'Collections': {'text': 'Library Collections'}}", "variables": "{}", "name": "get_node_ip", "documentation": "[Arguments] ${node_name}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/verify_elk_functionality.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "1a863035-b1e9-473b-a59d-5ea0752a2a6f", "code": "*** Settings ***\n\nDocumentation Ticket: NCSDEV-11991, NCSDEV-11997, NCSDEV-11996\n... The test upload new root ca.\n... send API to start pod with image that signed. (the pod expected to start)\n... and send API to start pod with image that unsigned at all. (the pod not expected to start)\n... TEAM: CBIS_NCS_Automation_Tools\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n${image_name} cent7py3\n${sigtest_pod} sigtest-pod\n${tenant_new_pw} goNokiaNCS123$\n${tenant_ns} robot-11997test\n${tenant_name} robot-11997test\n${tenant_config_file} 11997_tenant.json\n${tenant_config_file_24_11} 11997_tenant_24_11.json\n\n${sigstore_path} /opt/bcmt/storage/sigstore/\n\n*** Test Cases ***\nprecase_setup\n\tsetup.precase_setup\n\tinternal_set_variables target_version=cbis-24.11.0 target_build=88\n\nprecase_login\n\tInternal_check_if_case_is_valid\n\tlogin_to_ncs_cli\n\nCreate_tenant\n\tInternal_check_if_case_is_valid\n\tRun Keyword If ${S_IS_GREATER_THAN_24_11} create_tenant_with_config config_file=${tenant_config_file_24_11}\n\t... ELSE create_tenant_with_config config_file=${tenant_config_file}\n image.get ${image_name}\n save_image_and_add_to_tenant\n\nadd_unsigned_image_to_bcmt_registry\n\t[Documentation] add unsigned image to the bcmt registry\n\tInternal_check_if_case_is_valid\n ${is_image_unsigned} is_image_unsigned img_name=robot-${image_name}\n Should Be True ${is_image_unsigned}\n\nchoose_signed_image_from_the_env\n\t[Documentation] take random image name (signed_image)\n\tInternal_check_if_case_is_valid\n\t${signed_images} get_signed_images_list_from_bcmt_registry\n\t${image_dict}= Evaluate random.choice(${signed_images}) modules=random\n\t${image_dict_keys} Get Dictionary Keys ${image_dict}\n\t${image} Set Variable ${image_dict_keys[0]}\n\t${tag} Get From Dictionary ${image_dict} ${image}\n\tSet Suite Variable ${S_signed_image_name} ${image}\n\tSet Suite Variable ${S_signed_image_tag} ${tag}\n\nupload_trustroot\n\tInternal_check_if_case_is_valid\n\t${crt_path} check_the_crt_file_exist\n\tWait Until Keyword Succeeds 5x 60s upload_ca_trustroot_with_cli crt_path=${crt_path}\n\ntest_image_policy_warn\n\tInternal_check_if_case_is_valid\n\tchange_cluster_image_policy policy=warn\n\tcreate_pod_based_test_image\n\t... pod_name=${sigtest_pod}1\n\t... ns=${tenant_ns} img_name=robot-${image_name}\n\tcreate_pod_based_test_image\n\t... pod_name=${sigtest_pod}3\n\t... ns=${tenant_ns} img_name=${S_signed_image_name} img_tag=${S_signed_image_tag}\n\ntest_image_policy_enforce\n\tInternal_check_if_case_is_valid\n\tchange_cluster_image_policy policy=enforce\n\tRun Keyword And Expect Error *\n\t... create_pod_based_test_image\n\t... pod_name=${sigtest_pod}2\n\t... ns=${tenant_ns} img_name=robot-${image_name}\n\tcreate_pod_based_test_image\n\t... pod_name=${sigtest_pod}4\n\t... ns=${tenant_ns} img_name=${S_signed_image_name} img_tag=${S_signed_image_tag}\n\npostcase_cleanup\n\tInternal_check_if_case_is_valid\n\tdelete_test_image img_name=${image_name}\n\tdelete_files\n\tlogin_to_ncs_cli\n\ttenant.delete tenant_name=${tenant_name}\n\tssh.close_all_connections\n\n*** Keywords ***\nclose_test_connection\n\t[Arguments] ${conn}\n\tssh.close_connection ${conn}\n\nprint_tenant_ns_current_config\n\t${content} ssh.send_command ${S_CONN} sudo kubectl get ns ${tenant_ns} -o yaml\n Log ${content}\n\nlogin_to_ncs_cli\n\tssh.send_command ${S_CONN} sudo ncs user login --username='${S_NCM_USERNAME}' --password='${S_NCM_PASSWORD}'\n\tSleep 1s\n\ncheck_the_crt_file_exist\n\t[Documentation] check the crt file for the trustroot exist, if exist return the path of the file\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${S_CONN} sudo ls ${sigstore_path}/ | grep \".crt\"\n Should Be Equal As Integers ${code} 0 there is no .crt file in ${sigstore_path}\n ${std_out} Strip String ${std_out}\n ${path_crt} Set Variable ${sigstore_path}${std_out}\n [Return] ${path_crt}\n\nupload_ca_trustroot_with_cli\n\t[Arguments] ${crt_path}\n\tlogin_to_ncs_cli\n\t${resp} ssh.send_command ${S_CONN} sudo ncs trustroot add --cert_path ${crt_path}\n\t${resp} Convert to Lower Case ${resp}\n\tShould Contain ${resp} ok\n\tprint_tenant_ns_current_config\n\nget_signed_images_list_from_bcmt_registry\n\t${images} ssh.send_command ${S_CONN} sudo podman images --digests | grep -E \"bcmt-registry:5000\" | grep -v REPOSITORY | awk '{print \\\\$1, \\\\$2}' | grep -v robot\n\t${signed_images} Create List\n\t${lines} Split To Lines ${images}\n FOR ${line} IN @{lines}\n \t${split_line} Split String ${line} ${SPACE}\n \t${image_REPOSITORY} Set Variable ${split_line[0]}\n \t${image_TAG} Set Variable ${split_line[1]}\n \t${image_REPOSITORY} Strip String ${image_REPOSITORY}\n \t${image_TAG} Strip String ${image_TAG}\n \t${image_name} Remove String ${image_REPOSITORY} bcmt-registry:5000/\n \t${image_info} Create Dictionary ${image_name}=${image_TAG}\n \t${is_image_unsinged} is_image_unsigned ${image_name}\n \tRun Keyword If ${is_image_unsinged} is False Append to List ${signed_images} ${image_info}\n END\n\t[Return] ${signed_images}\n\nchange_cluster_image_policy\n\t[Arguments] ${policy}\n\t${change_policy} Set Variable sudo ncs clusterimagepolicy --mode=${policy}\n\t${login_command} Set Variable sudo ncs user login --username=${S_NCM_USERNAME} --password=${S_NCM_PASSWORD}\n\tssh.send_command ${S_CONN} ${login_command} && ${change_policy}\n\tprint_tenant_ns_current_config\n\ncreate_pod_based_test_image\n\t[Arguments] ${pod_name} ${ns} ${img_name} ${img_tag}=latest\n\t${scp} ssh.open_scp_connection_to_controller\n\t${resource_quotas} ssh.send_command ${S_CONN} sudo kubectl get resourcequotas --namespace ${ns}\n\tLog ${resource_quotas}\n\tssh.scp_file_to_host ${scp} 24/testcase_config_files/software_integrity_tests/sigtest_pod.yaml /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|name: POD_NAME_PLACEHOLDER|name: ${pod_name}|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|namespace: NAMESPACE_PLACEHOLDER|namespace: ${ns}|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|name: IMG_NAME_PLACEHOLDER|name: robot-image-sig|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|image: REG_IMG_NAME_PLACEHOLDER|image: bcmt-registry:5000/${img_name}:${img_tag}|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo kubectl apply -f /tmp/sigtest_pod.yaml\n\t${yaml_content} ssh.send_command ${S_CONN} sudo cat /tmp/sigtest_pod.yaml\n\tLog ${yaml_content}\n\tprint_tenant_ns_current_config\n\tWait Until Keyword Succeeds 60x 5s pod.is_status_running ${pod_name} namespace=${ns}\n ${resource_quotas} ssh.send_command ${S_CONN} sudo kubectl get resourcequotas --namespace ${ns}\n\tLog ${resource_quotas}\n\tpod.delete full_pod_name=${pod_name} namespace=${ns}\n\nis_image_unsigned\n\t[Arguments] ${img_name}\n\t${cmd} Set Variable sudo curl -s -X GET https://bcmt-registry:5000/v2/${img_name}/tags/list | jq\n\t${output} ssh.send_command ${S_CONN} ${cmd}\n\t${output_dict} Convert Json To Dict ${output}\n\t${tags} Get From Dictionary ${output_dict} tags\n\tReturn From Keyword If \"${tags}\"==\"None\" ${TRUE}\n\tFOR ${tag} IN @{tags}\n\t\tReturn From Keyword If \"sig\" in \"${tag}\" ${FALSE}\n\tEND\n\t[Return] ${TRUE}\n\n\n#### Tenant Keywords ####\ncreate_tenant_with_config\n\t[Arguments] ${config_file}\n\t${scp} ssh.open_scp_connection_to_controller\n\tssh.scp_file_to_host ${scp} 24/testcase_config_files/software_integrity_tests/${config_file} /tmp/${config_file}\n\tssh.send_command ${S_CONN} sudo ncs tenant create --config /tmp/${config_file}\n\nlogin_to_tenant\n\t${tenant_conn} ssh.open_connection_to_controller\n\t${reset_pw} Set Variable sudo ncs user login --username=robot-11997test-admin --password=NCS@default_k8s\n\t${login} Set Variable sudo ncs user login --username=robot-11997test-admin --password=${tenant_new_pw}\n\t${reset_password} ssh.send_command ${tenant_conn} ${reset_pw}\n\tssh.send_command ${tenant_conn} ${reset_password}${tenant_new_pw}\n\tssh.send_command ${tenant_conn} ${login}\n\t[Return] ${tenant_conn}\n\nsave_image_and_add_to_tenant\n\t${save_image} Set Variable sudo podman save bcmt-registry:5000/robot-${image_name}:latest -o /tmp/test_image.tar\n\t${add_image_to_tenant} Set Variable sudo ncs tenant-app-resource image add --tenant_name ${tenant_name} --file_path /tmp/test_image.tar\n\t${tenant_conn} login_to_tenant\n\tssh.send_command ${tenant_conn} ${save_image}\n\tssh.send_command ${tenant_conn} sudo ncs user login --username=robot-11997test-admin --password=${tenant_new_pw} && ${add_image_to_tenant}\n\tprint_tenant_ns_current_config\n\nget_image_id\n\t[Arguments] ${image_name}\n ${image_info} ssh.send_command ${S_CONN} sudo podman images | grep ${image_name}\n ${image_id} Split String ${image_info}\n [Return] ${image_id[2]}\n\nchange_tenant_signature_check\n\t[Arguments] ${tnt_name} ${enable}\n\t${signature_check} Set Variable sudo ncs signature check --tenant_name ${tnt_name} --tenant_mode ${enable}\n\t${login_command} Set Variable sudo ncs user login --username=${S_NCM_USERNAME} --password=${S_NCM_PASSWORD}\n\tssh.send_command ${S_CONN} ${login_command} && ${signature_check}\n\tprint_tenant_ns_current_config\n\n##### Cleanup Keywords #####\ndelete_files\n\t${tenant_tmp_file} Run Keyword If ${S_IS_GREATER_THAN_24_11} Set Variable /tmp/${tenant_config_file_24_11}\n\t... ELSE Set Variable /tmp/${tenant_config_file}\n\t${files} Create List ${tenant_tmp_file} /tmp/${sigtest_pod}.yaml /tmp/test_image.tar\n\tFOR ${file} IN @{files}\n\t\tssh.send_command ${S_CONN} sudo rm -rf ${file}\n\tEND\n\ndelete_test_image\n\t[Arguments] ${img_name}\n\tssh.send_command ${S_CONN} yes | sudo ncs app-resource image delete --keywords ${img_name}\n\tssh.send_command ${S_CONN} sudo podman rmi bcmt-registry:5000/robot-${img_name}\n\ninternal_check_if_case_is_valid\n [Documentation] Check if configuration is supported.\n Run Keyword If \"${S_IS_ACCEPTED_SKIP_TM}\"==\"${TRUE}\" Set_accepted_skip_TM_flag\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If \"${S_ONLY_SUPPORTED_CENTRAL}\"==\"${TRUE}\" and \"${S_IS_CENTRAL}\"==\"${FALSE}\" This case is supported only in central installation\n Skip If \"${S_IS_CURRECT_VERSION}\"==\"${FALSE}\" The NCS version of this setup not supported\n\ninternal_set_variables\n [Arguments] ${target_version}=cbis-23.10.0 ${target_build}=616 ${only_supported_centrel}=${FALSE} ${set_accepted_skip_TM}=${True}\n Set Suite Variable ${S_IS_ACCEPTED_SKIP_TM} ${set_accepted_skip_TM}\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n # Check if environment is ncs version 23.5 or above\n ${is_currect_version} config.Is_current_NCS_sw_build_greater_than ${target_version} ${target_build}\n Set Suite Variable ${S_IS_CURRECT_VERSION} ${is_currect_version}\n # Check if environment suppurted with central\n ${is_central} config.is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n Set Suite Variable ${S_ONLY_SUPPORTED_CENTRAL} ${only_supported_centrel}\n # open connection to controller (edge cluster)\n ${conn} ssh.open_connection_to_controller\n Set Suite Variable ${S_CONN} ${conn}\n # Set NCS Portal Variables\n ${ncm_rest_api_username}= config.ncm_rest_api_username\n ${ncm_rest_api_password}= config.ncm_rest_api_password\n Set Suite Variable ${S_NCM_USERNAME} ${ncm_rest_api_username}\n Set Suite Variable ${S_NCM_PASSWORD} ${ncm_rest_api_password}\n ${is_greater_than_24_11} config.is_current_NCS_sw_build_greater_than cbis-24.11.0\n Set Suite Variable ${S_IS_GREATER_THAN_24_11} ${is_greater_than_24_11}", "name": "suites/rnd/Software_Integrity_tests.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "89123b84-0d00-4623-a630-9a5543b60f71", "code": "precase_setup\n\tsetup.precase_setup\n\tinternal_set_variables target_version=cbis-24.11.0 target_build=88", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "04ab7d7a-9e95-4972-a436-97c3b7f12832", "code": "precase_login\n\tInternal_check_if_case_is_valid\n\tlogin_to_ncs_cli", "settings": "{}", "variables": "{}", "name": "precase_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f29dc88c-071e-4e4f-a677-3ba5402d9802", "code": "Create_tenant\n\tInternal_check_if_case_is_valid\n\tRun Keyword If ${S_IS_GREATER_THAN_24_11} create_tenant_with_config config_file=${tenant_config_file_24_11}\n\t... ELSE create_tenant_with_config config_file=${tenant_config_file}\n image.get ${image_name}\n save_image_and_add_to_tenant", "settings": "{}", "variables": "{'tenant_config_file_24_11': {'text': '${tenant_config_file_24_11} 11997_tenant_24_11.json'}, 'tenant_config_file': {'text': '${tenant_config_file} 11997_tenant.json'}, 'image_name': {'text': '${image_name} cent7py3'}}", "name": "Create_tenant", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7b0a15a7-b060-479f-ac93-9c12b8b61934", "code": "add_unsigned_image_to_bcmt_registry\n\t[Documentation] add unsigned image to the bcmt registry\n\tInternal_check_if_case_is_valid\n ${is_image_unsigned} is_image_unsigned img_name=robot-${image_name}\n Should Be True ${is_image_unsigned}", "settings": "{}", "variables": "{'image_name': {'text': '${image_name} cent7py3'}}", "name": "add_unsigned_image_to_bcmt_registry", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c552e1b4-9a04-4edc-944e-baf00e334598", "code": "choose_signed_image_from_the_env\n\t[Documentation] take random image name (signed_image)\n\tInternal_check_if_case_is_valid\n\t${signed_images} get_signed_images_list_from_bcmt_registry\n\t${image_dict}= Evaluate random.choice(${signed_images}) modules=random\n\t${image_dict_keys} Get Dictionary Keys ${image_dict}\n\t${image} Set Variable ${image_dict_keys[0]}\n\t${tag} Get From Dictionary ${image_dict} ${image}\n\tSet Suite Variable ${S_signed_image_name} ${image}\n\tSet Suite Variable ${S_signed_image_tag} ${tag}", "settings": "{'random': {'text': 'Library random'}}", "variables": "{}", "name": "choose_signed_image_from_the_env", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "5748f466-b79a-4b84-a6ec-e99e1be7a4a0", "code": "upload_trustroot\n\tInternal_check_if_case_is_valid\n\t${crt_path} check_the_crt_file_exist\n\tWait Until Keyword Succeeds 5x 60s upload_ca_trustroot_with_cli crt_path=${crt_path}", "settings": "{}", "variables": "{}", "name": "upload_trustroot", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "08e85cf9-83e3-4e33-95a1-5b7d964acfd6", "code": "test_image_policy_warn\n\tInternal_check_if_case_is_valid\n\tchange_cluster_image_policy policy=warn\n\tcreate_pod_based_test_image\n\t... pod_name=${sigtest_pod}1\n\t... ns=${tenant_ns} img_name=robot-${image_name}\n\tcreate_pod_based_test_image\n\t... pod_name=${sigtest_pod}3\n\t... ns=${tenant_ns} img_name=${S_signed_image_name} img_tag=${S_signed_image_tag}", "settings": "{}", "variables": "{'sigtest_pod': {'text': '${sigtest_pod} sigtest-pod'}, 'image_name': {'text': '${image_name} cent7py3'}}", "name": "test_image_policy_warn", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1f4193e1-21cf-43b8-bfb9-97a77f6af113", "code": "test_image_policy_enforce\n\tInternal_check_if_case_is_valid\n\tchange_cluster_image_policy policy=enforce\n\tRun Keyword And Expect Error *\n\t... create_pod_based_test_image\n\t... pod_name=${sigtest_pod}2\n\t... ns=${tenant_ns} img_name=robot-${image_name}\n\tcreate_pod_based_test_image\n\t... pod_name=${sigtest_pod}4\n\t... ns=${tenant_ns} img_name=${S_signed_image_name} img_tag=${S_signed_image_tag}", "settings": "{}", "variables": "{'sigtest_pod': {'text': '${sigtest_pod} sigtest-pod'}, 'image_name': {'text': '${image_name} cent7py3'}}", "name": "test_image_policy_enforce", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0cac63b4-548a-43dc-a606-319bf67553e2", "code": "postcase_cleanup\n\tInternal_check_if_case_is_valid\n\tdelete_test_image img_name=${image_name}\n\tdelete_files\n\tlogin_to_ncs_cli\n\ttenant.delete tenant_name=${tenant_name}\n\tssh.close_all_connections", "settings": "{}", "variables": "{'image_name': {'text': '${image_name} cent7py3'}, 'tenant_name': {'text': '${tenant_name} robot-11997test'}}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c339d3c2-90b8-41fc-a361-90d808f6ba1b", "code": "close_test_connection\n\t[Arguments] ${conn}\n\tssh.close_connection ${conn}", "settings": "{}", "variables": "{}", "name": "close_test_connection", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8fe87e7c-6d50-4a2d-bd9a-297d4b679dd6", "code": "print_tenant_ns_current_config\n\t${content} ssh.send_command ${S_CONN} sudo kubectl get ns ${tenant_ns} -o yaml\n Log ${content}", "settings": "{}", "variables": "{}", "name": "print_tenant_ns_current_config", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8bf08209-b682-40da-ad74-dc9efaeb6b14", "code": "login_to_ncs_cli\n\tssh.send_command ${S_CONN} sudo ncs user login --username='${S_NCM_USERNAME}' --password='${S_NCM_PASSWORD}'\n\tSleep 1s", "settings": "{}", "variables": "{}", "name": "login_to_ncs_cli", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "ad209089-5473-4120-80c9-ed255a292c1e", "code": "check_the_crt_file_exist\n\t[Documentation] check the crt file for the trustroot exist, if exist return the path of the file\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${S_CONN} sudo ls ${sigstore_path}/ | grep \".crt\"\n Should Be Equal As Integers ${code} 0 there is no .crt file in ${sigstore_path}\n ${std_out} Strip String ${std_out}\n ${path_crt} Set Variable ${sigstore_path}${std_out}\n [Return] ${path_crt}\n\nupload_ca_trustroot_with_cli\n\t[Arguments] ${crt_path}\n\tlogin_to_ncs_cli\n\t${resp} ssh.send_command ${S_CONN} sudo ncs trustroot add --cert_path ${crt_path}\n\t${resp} Convert to Lower Case ${resp}\n\tShould Contain ${resp} ok\n\tprint_tenant_ns_current_config", "settings": "{}", "variables": "{'sigstore_path': {'text': '${sigstore_path} /opt/bcmt/storage/sigstore/'}}", "name": "check_the_crt_file_exist", "documentation": "${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${S_CONN} sudo ls ${sigstore_path}/ | grep \".crt\"", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4c11841e-4a96-4917-9fe4-541df9771a6e", "code": "get_signed_images_list_from_bcmt_registry\n\t${images} ssh.send_command ${S_CONN} sudo podman images --digests | grep -E \"bcmt-registry:5000\" | grep -v REPOSITORY | awk '{print \\\\$1, \\\\$2}' | grep -v robot\n\t${signed_images} Create List\n\t${lines} Split To Lines ${images}\n FOR ${line} IN @{lines}\n \t${split_line} Split String ${line} ${SPACE}\n \t${image_REPOSITORY} Set Variable ${split_line[0]}\n \t${image_TAG} Set Variable ${split_line[1]}\n \t${image_REPOSITORY} Strip String ${image_REPOSITORY}\n \t${image_TAG} Strip String ${image_TAG}\n \t${image_name} Remove String ${image_REPOSITORY} bcmt-registry:5000/\n \t${image_info} Create Dictionary ${image_name}=${image_TAG}\n \t${is_image_unsinged} is_image_unsigned ${image_name}\n \tRun Keyword If ${is_image_unsinged} is False Append to List ${signed_images} ${image_info}\n END\n\t[Return] ${signed_images}\n\nchange_cluster_image_policy\n\t[Arguments] ${policy}\n\t${change_policy} Set Variable sudo ncs clusterimagepolicy --mode=${policy}\n\t${login_command} Set Variable sudo ncs user login --username=${S_NCM_USERNAME} --password=${S_NCM_PASSWORD}\n\tssh.send_command ${S_CONN} ${login_command} && ${change_policy}\n\tprint_tenant_ns_current_config", "settings": "{}", "variables": "{'image_name': {'text': '${image_name} cent7py3'}}", "name": "get_signed_images_list_from_bcmt_registry", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9bef0827-68e0-45f3-ab25-3c1c6d2c7614", "code": "create_pod_based_test_image\n\t[Arguments] ${pod_name} ${ns} ${img_name} ${img_tag}=latest\n\t${scp} ssh.open_scp_connection_to_controller\n\t${resource_quotas} ssh.send_command ${S_CONN} sudo kubectl get resourcequotas --namespace ${ns}\n\tLog ${resource_quotas}\n\tssh.scp_file_to_host ${scp} 24/testcase_config_files/software_integrity_tests/sigtest_pod.yaml /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|name: POD_NAME_PLACEHOLDER|name: ${pod_name}|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|namespace: NAMESPACE_PLACEHOLDER|namespace: ${ns}|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|name: IMG_NAME_PLACEHOLDER|name: robot-image-sig|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo sed -i 's|image: REG_IMG_NAME_PLACEHOLDER|image: bcmt-registry:5000/${img_name}:${img_tag}|' /tmp/sigtest_pod.yaml\n\tssh.send_command ${S_CONN} sudo kubectl apply -f /tmp/sigtest_pod.yaml\n\t${yaml_content} ssh.send_command ${S_CONN} sudo cat /tmp/sigtest_pod.yaml\n\tLog ${yaml_content}\n\tprint_tenant_ns_current_config\n\tWait Until Keyword Succeeds 60x 5s pod.is_status_running ${pod_name} namespace=${ns}\n ${resource_quotas} ssh.send_command ${S_CONN} sudo kubectl get resourcequotas --namespace ${ns}\n\tLog ${resource_quotas}\n\tpod.delete full_pod_name=${pod_name} namespace=${ns}", "settings": "{}", "variables": "{}", "name": "create_pod_based_test_image", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8be1056f-d7df-4a61-b216-f1128b693f04", "code": "is_image_unsigned\n\t[Arguments] ${img_name}\n\t${cmd} Set Variable sudo curl -s -X GET https://bcmt-registry:5000/v2/${img_name}/tags/list | jq\n\t${output} ssh.send_command ${S_CONN} ${cmd}\n\t${output_dict} Convert Json To Dict ${output}\n\t${tags} Get From Dictionary ${output_dict} tags\n\tReturn From Keyword If \"${tags}\"==\"None\" ${TRUE}\n\tFOR ${tag} IN @{tags}\n\t\tReturn From Keyword If \"sig\" in \"${tag}\" ${FALSE}\n\tEND\n\t[Return] ${TRUE}\n\n\n#### Tenant Keywords ####", "settings": "{}", "variables": "{}", "name": "is_image_unsigned", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "520856cc-dcaf-4f94-b4e1-58f5563ac1c2", "code": "create_tenant_with_config\n\t[Arguments] ${config_file}\n\t${scp} ssh.open_scp_connection_to_controller\n\tssh.scp_file_to_host ${scp} 24/testcase_config_files/software_integrity_tests/${config_file} /tmp/${config_file}\n\tssh.send_command ${S_CONN} sudo ncs tenant create --config /tmp/${config_file}", "settings": "{}", "variables": "{}", "name": "create_tenant_with_config", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c4900b15-e1a2-476b-808d-523441b74667", "code": "login_to_tenant\n\t${tenant_conn} ssh.open_connection_to_controller\n\t${reset_pw} Set Variable sudo ncs user login --username=robot-11997test-admin --password=NCS@default_k8s\n\t${login} Set Variable sudo ncs user login --username=robot-11997test-admin --password=${tenant_new_pw}\n\t${reset_password} ssh.send_command ${tenant_conn} ${reset_pw}\n\tssh.send_command ${tenant_conn} ${reset_password}${tenant_new_pw}\n\tssh.send_command ${tenant_conn} ${login}\n\t[Return] ${tenant_conn}\n\nsave_image_and_add_to_tenant\n\t${save_image} Set Variable sudo podman save bcmt-registry:5000/robot-${image_name}:latest -o /tmp/test_image.tar\n\t${add_image_to_tenant} Set Variable sudo ncs tenant-app-resource image add --tenant_name ${tenant_name} --file_path /tmp/test_image.tar\n\t${tenant_conn} login_to_tenant\n\tssh.send_command ${tenant_conn} ${save_image}\n\tssh.send_command ${tenant_conn} sudo ncs user login --username=robot-11997test-admin --password=${tenant_new_pw} && ${add_image_to_tenant}\n\tprint_tenant_ns_current_config", "settings": "{}", "variables": "{'tenant_new_pw': {'text': '${tenant_new_pw} goNokiaNCS123$\\n${tenant_ns} robot-11997test'}, 'image_name': {'text': '${image_name} cent7py3'}, 'tenant_name': {'text': '${tenant_name} robot-11997test'}}", "name": "login_to_tenant", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4eb8286f-50c4-4d64-b395-2ec3c462c66a", "code": "get_image_id\n\t[Arguments] ${image_name}\n ${image_info} ssh.send_command ${S_CONN} sudo podman images | grep ${image_name}\n ${image_id} Split String ${image_info}\n [Return] ${image_id[2]}\n\nchange_tenant_signature_check\n\t[Arguments] ${tnt_name} ${enable}\n\t${signature_check} Set Variable sudo ncs signature check --tenant_name ${tnt_name} --tenant_mode ${enable}\n\t${login_command} Set Variable sudo ncs user login --username=${S_NCM_USERNAME} --password=${S_NCM_PASSWORD}\n\tssh.send_command ${S_CONN} ${login_command} && ${signature_check}\n\tprint_tenant_ns_current_config\n\n##### Cleanup Keywords #####", "settings": "{}", "variables": "{'image_name': {'text': '${image_name} cent7py3'}}", "name": "get_image_id", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "739da52c-87b7-41c3-a85c-c7da95a86e21", "code": "delete_files\n\t${tenant_tmp_file} Run Keyword If ${S_IS_GREATER_THAN_24_11} Set Variable /tmp/${tenant_config_file_24_11}\n\t... ELSE Set Variable /tmp/${tenant_config_file}\n\t${files} Create List ${tenant_tmp_file} /tmp/${sigtest_pod}.yaml /tmp/test_image.tar\n\tFOR ${file} IN @{files}\n\t\tssh.send_command ${S_CONN} sudo rm -rf ${file}\n\tEND", "settings": "{}", "variables": "{'tenant_config_file_24_11': {'text': '${tenant_config_file_24_11} 11997_tenant_24_11.json'}, 'tenant_config_file': {'text': '${tenant_config_file} 11997_tenant.json'}, 'sigtest_pod': {'text': '${sigtest_pod} sigtest-pod'}}", "name": "delete_files", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "950411a5-efb7-4cf7-b84d-07f5ca122783", "code": "delete_test_image\n\t[Arguments] ${img_name}\n\tssh.send_command ${S_CONN} yes | sudo ncs app-resource image delete --keywords ${img_name}\n\tssh.send_command ${S_CONN} sudo podman rmi bcmt-registry:5000/robot-${img_name}", "settings": "{}", "variables": "{}", "name": "delete_test_image", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4dd734df-cf84-43e3-a388-d98affb6b59c", "code": "internal_check_if_case_is_valid\n [Documentation] Check if configuration is supported.\n Run Keyword If \"${S_IS_ACCEPTED_SKIP_TM}\"==\"${TRUE}\" Set_accepted_skip_TM_flag\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If \"${S_ONLY_SUPPORTED_CENTRAL}\"==\"${TRUE}\" and \"${S_IS_CENTRAL}\"==\"${FALSE}\" This case is supported only in central installation\n Skip If \"${S_IS_CURRECT_VERSION}\"==\"${FALSE}\" The NCS version of this setup not supported", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "Run Keyword If \"${S_IS_ACCEPTED_SKIP_TM}\"==\"${TRUE}\" Set_accepted_skip_TM_flag", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "eda1b7e3-5415-45be-be20-1e5484ab82f8", "code": "internal_set_variables\n [Arguments] ${target_version}=cbis-23.10.0 ${target_build}=616 ${only_supported_centrel}=${FALSE} ${set_accepted_skip_TM}=${True}\n Set Suite Variable ${S_IS_ACCEPTED_SKIP_TM} ${set_accepted_skip_TM}\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n # Check if environment is ncs version 23.5 or above\n ${is_currect_version} config.Is_current_NCS_sw_build_greater_than ${target_version} ${target_build}\n Set Suite Variable ${S_IS_CURRECT_VERSION} ${is_currect_version}\n # Check if environment suppurted with central\n ${is_central} config.is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n Set Suite Variable ${S_ONLY_SUPPORTED_CENTRAL} ${only_supported_centrel}\n # open connection to controller (edge cluster)\n ${conn} ssh.open_connection_to_controller\n Set Suite Variable ${S_CONN} ${conn}\n # Set NCS Portal Variables\n ${ncm_rest_api_username}= config.ncm_rest_api_username\n ${ncm_rest_api_password}= config.ncm_rest_api_password\n Set Suite Variable ${S_NCM_USERNAME} ${ncm_rest_api_username}\n Set Suite Variable ${S_NCM_PASSWORD} ${ncm_rest_api_password}\n ${is_greater_than_24_11} config.is_current_NCS_sw_build_greater_than cbis-24.11.0\n Set Suite Variable ${S_IS_GREATER_THAN_24_11} ${is_greater_than_24_11}", "settings": "{}", "variables": "{}", "name": "internal_set_variables", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/Software_Integrity_tests.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "eb872976-67ca-4d14-b506-efb24a078642", "code": "*** Settings ***\nDocumentation Create two pods and run ping between them\nForce Tags\nTest Timeout 10 min\n\nResource ../../resource/middleware.robot\nResource ../../resource/ssh.robot\nResource ../../resource/namespace.robot\nResource ../../resource/pod.robot\nResource ../../resource/setup.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Variables ***\n${C_TEST_POD_NAME} ${C_POD_PREFIX}-podcase\n${C_TEST_NAMESPACE_NAME} ${C_POD_PREFIX}-podcase\n\n\n*** Test Cases ***\n# preparation for the case -------------------------------------------------------------------------\nprecase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n setup.ncm_rest_api_login\n\nprecase_ssh_keys\n\tssh.setup_keys\n\n# actual test case -------------------------------------------------------------------------\nCreate namespace\n ${namespace_name} ${namespace}= namespace.create ${C_TEST_NAMESPACE_NAME}\n Set Suite Variable ${S_NAMESPACE_NAME} ${namespace_name}\n\nCreate first pod\n ${full_pod_name} ${pod}= pod.create ${C_TEST_POD_NAME} image=cent7py3 container_name_test_case_part=abc namespace=${S_NAMESPACE_NAME}\n Set Suite Variable ${S_FULLPOD_NAME} ${full_pod_name}\n\nGet IP address of first pod\n ${pod}= pod.get ${S_FULL_POD_NAME} namespace=${S_NAMESPACE_NAME}\n ${rsp}= pod.read_podIP ${pod}\n Set Suite Variable ${S_TEST_POD_IP_ADDRESS} ${rsp}\n\nCreate second pod\n ${full_pod_name} ${pod}= pod.create ${C_TEST_POD_NAME}-2 image=cent7py3 container_name_test_case_part=abc namespace=${S_NAMESPACE_NAME}\n Set Suite Variable ${S_FULLPOD_NAME_2} ${full_pod_name}\n\nGet IP address of second pod\n ${pod}= pod.get ${S_FULL_POD_NAME_2} namespace=${S_NAMESPACE_NAME}\n ${rsp}= pod.read_podIP ${pod}\n Set Suite Variable ${S_TEST_POD_IP_ADDRESS_2} ${rsp}\n\nPing first pod from second pod\n pod.send_command_to_pod ${S_NAMESPACE_NAME} ${S_FULLPOD_NAME_2} ping -c 1 ${S_TEST_POD_IP_ADDRESS}\n\nPing second pod from first pod\n pod.send_command_to_pod ${S_NAMESPACE_NAME} ${S_FULLPOD_NAME} ping -c 1 ${S_TEST_POD_IP_ADDRESS_2}\n\n# namespace and pods will be deleted automatically during cleanup\n\n# post actions for the case -------------------------------------------------------------------------\npostcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n setup.suite_cleanup\n", "name": "suites/rnd/simple_ping_between_two_pods.robot", "imports_file_locations": "{'../../resource/middleware.robot': 'resource/middleware.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/namespace.robot': 'resource/namespace.robot', '../../resource/pod.robot': 'resource/pod.robot', '../../resource/setup.robot': 'resource/setup.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "52de8168-2250-4f1c-9951-703a3cffd7f0", "code": "precase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n setup.ncm_rest_api_login", "settings": "{}", "variables": "{}", "name": "precase_ncm_rest_api_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7bcb8df9-10fc-4c44-a9c5-f251986e16ba", "code": "precase_ssh_keys\n\tssh.setup_keys\n\n# actual test case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "precase_ssh_keys", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b1bd079c-b936-44e0-8ef9-9dce289ed258", "code": "Create namespace\n ${namespace_name} ${namespace}= namespace.create ${C_TEST_NAMESPACE_NAME}\n Set Suite Variable ${S_NAMESPACE_NAME} ${namespace_name}", "settings": "{}", "variables": "{'C_TEST_NAMESPACE_NAME': {'text': '${C_TEST_NAMESPACE_NAME} ${C_POD_PREFIX}-podcase'}}", "name": "Create namespace", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "48bfa47e-522d-47dd-a6ec-bb1ead5edcea", "code": "Create first pod\n ${full_pod_name} ${pod}= pod.create ${C_TEST_POD_NAME} image=cent7py3 container_name_test_case_part=abc namespace=${S_NAMESPACE_NAME}\n Set Suite Variable ${S_FULLPOD_NAME} ${full_pod_name}", "settings": "{}", "variables": "{'C_TEST_POD_NAME': {'text': '${C_TEST_POD_NAME} ${C_POD_PREFIX}-podcase'}}", "name": "Create first pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4b9022c5-6429-423e-925f-9d7b77627902", "code": "Get IP address of first pod\n ${pod}= pod.get ${S_FULL_POD_NAME} namespace=${S_NAMESPACE_NAME}\n ${rsp}= pod.read_podIP ${pod}\n Set Suite Variable ${S_TEST_POD_IP_ADDRESS} ${rsp}", "settings": "{}", "variables": "{}", "name": "Get IP address of first pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cd81f0fe-4b8a-4e69-aaad-e9a288c2551c", "code": "Create second pod\n ${full_pod_name} ${pod}= pod.create ${C_TEST_POD_NAME}-2 image=cent7py3 container_name_test_case_part=abc namespace=${S_NAMESPACE_NAME}\n Set Suite Variable ${S_FULLPOD_NAME_2} ${full_pod_name}", "settings": "{}", "variables": "{'C_TEST_POD_NAME': {'text': '${C_TEST_POD_NAME} ${C_POD_PREFIX}-podcase'}}", "name": "Create second pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d6e021d9-73e3-46a5-a4fb-f1e8026afc21", "code": "Get IP address of second pod\n ${pod}= pod.get ${S_FULL_POD_NAME_2} namespace=${S_NAMESPACE_NAME}\n ${rsp}= pod.read_podIP ${pod}\n Set Suite Variable ${S_TEST_POD_IP_ADDRESS_2} ${rsp}", "settings": "{}", "variables": "{}", "name": "Get IP address of second pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c360b087-e943-4d34-9596-38ba723728c9", "code": "Ping first pod from second pod\n pod.send_command_to_pod ${S_NAMESPACE_NAME} ${S_FULLPOD_NAME_2} ping -c 1 ${S_TEST_POD_IP_ADDRESS}", "settings": "{}", "variables": "{}", "name": "Ping first pod from second pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0e38a546-5248-4cae-8e24-bfeb732ad048", "code": "Ping second pod from first pod\n pod.send_command_to_pod ${S_NAMESPACE_NAME} ${S_FULLPOD_NAME} ping -c 1 ${S_TEST_POD_IP_ADDRESS_2}\n\n# namespace and pods will be deleted automatically during cleanup\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "Ping second pod from first pod", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b63b9706-f20f-4079-93b5-d043090f7ca4", "code": "postcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n setup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/simple_ping_between_two_pods.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "ff8952f9-b7f9-43d6-a330-eb8923e346ea", "code": "*** Settings ***\n\n\nResource ../../resource/setup.robot\nResource ../../resource/check.robot\n\nSuite Setup setup.Suite_setup\nSuite Teardown setup.Suite_teardown\n\n*** Test Cases ***\n\nprecase\n setup.Precase_setup\n\npre_test_cases\n check.Wait_until_cluster_gets_stable 10 30", "name": "suites/rnd/pre_test_stabilize_cluster.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/pre_test_stabilize_cluster.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "5ab6387a-dd71-4b69-b176-4df113bd7c85", "code": "precase\n setup.Precase_setup", "settings": "{}", "variables": "{}", "name": "precase", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/pre_test_stabilize_cluster.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1ab40b8d-230f-4c10-822a-cb7758366b5f", "code": "pre_test_cases\n check.Wait_until_cluster_gets_stable 10 30", "settings": "{}", "variables": "{}", "name": "pre_test_cases", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/pre_test_stabilize_cluster.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "8b7312d8-aec5-43ef-a52c-39e966c24f90", "code": "*** Settings ***\nLibrary ../../resource/PythonFunctionsPostUpgrade.py\nLibrary BuiltIn\nLibrary Collections\n\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/config.robot\nResource ../../resource/check.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n [Tags] production pre_upgrade\n ssh.close_all_connections\n setup.precase_setup\n\nprecase_cluster_status\n\t[Documentation] Check cluster status before the case, e.g verify all the pods running\n\t[Tags] production pre_upgrade\n\tcheck.precase_cluster_status\n\nPre_Upgrade_Verification_Test1\n\t[Documentation] NCSDEV-14776 - Check pre upgrade values in config files\n\t[Tags] production pre_upgrade\n\t${tested_fields}= Create List caas_external\n Verify Values In Config Files keys=${tested_fields}\n\npostcase_cleanup\n\t[Documentation] Clean-up all robot objects that was created during cases\n\t[Tags] production pre_upgrade\n\tsetup.suite_cleanup\n\npostcase_cluster_status\n\t[Documentation] Check cluster status after the case, e.g verify all the pods running\n\t[Tags] production pre_upgrade\n\tcheck.postcase_cluster_status\n\n*** Keywords ***\n# ------------------------------------------------------------------\n# ====================== Test Cases Keywords =======================\n# ------------------------------------------------------------------\nVerify Values In Config Files\n\t[Arguments] ${keys}\n\t${is_central}= config.is_centralized_installation\n\t${cluster_conf_path}= Set Variable /opt/install/data/cbis-clusters/${S_CLUSTER_NAME}/cluster_config.yaml\n\tIF ${is_central}\n\t\t${hostname}= internal_get_hostname\n\t\tconfig.centralsite_name hostname=${hostname}\n\t\t${central_conf_path}= Set Variable /opt/install/data/cbis-clusters/${S_CENTRALSITE_NAME}/cluster_config.yaml\n\t\tinternal_check_keys_in_config config_path=${central_conf_path} keys=${keys}\n\tEND\n\tinternal_check_keys_in_config config_path=${cluster_conf_path} keys=${keys}\n\nSave Disk By-Path in File\n ${is_greater_than_24_11}= config.is_current_NCS_sw_build_greater_than target_build=cbis-24.11.0\n Skip If not ${is_greater_than_24_11} Test is Compatible for 24.11 and above!\n\t${test_file_name}= Set Variable /tmp/pre_upgrade_disk_labels.txt\n\t${pre_upgrade_disk_labels}= ceph.get_disk_labels\n\t${conn}= ssh.open_connection_to_deployment_server\n\t${is_file_already_exist}= check.check_file_exist ${test_file_name} ${conn}\n\tIF ${is_file_already_exist}\n\t\tLog to Console File already exist, deleting older file version!\n\t\tssh.send_command ${conn} sudo rm ${test_file_name}\n END\n\t${create_pre_file}= Set Variable echo '${pre_upgrade_disk_labels}' > ${test_file_name}\n\tssh.send_command ${conn} ${create_pre_file}\n\n# ------------------------------------------------------------------\n# ====================== Internal Keywords ===========================\n# ------------------------------------------------------------------\ninternal_check_keys_in_config\n [Arguments] ${config_path} ${keys}\n ${conn}= ssh.open_connection_to_deployment_server\n ${cluster_conf_yaml}= ssh.send_command ${conn} sudo cat ${config_path}\n ${cluster_conf_dict}= Evaluate yaml.safe_load(\"\"\"${cluster_conf_yaml}\"\"\") yaml\n FOR ${key} IN @{keys}\n ${is_key_found}= Find Key In Dict ${cluster_conf_dict} ${key}\n Run Keyword If not ${is_key_found} Fail ${key} value was not found in ${config_path}\n END\n\ninternal_get_hostname\n\t${conn}= ssh.open_connection_to_deployment_server\n\t${hostname}= ssh.send_command ${conn} hostname\n\t[Return] ${hostname}", "name": "suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/config.robot': 'resource/config.robot', '../../resource/check.robot': 'resource/check.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e4123a7e-73c2-4524-8ea0-5439d4a6915a", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n [Tags] production pre_upgrade\n ssh.close_all_connections\n setup.precase_setup", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "16d810c1-0278-4366-a926-ee416ae98dd7", "code": "precase_cluster_status\n\t[Documentation] Check cluster status before the case, e.g verify all the pods running\n\t[Tags] production pre_upgrade\n\tcheck.precase_cluster_status", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1ba5b767-dd4a-4523-96ac-1c7fab0202fa", "code": "Pre_Upgrade_Verification_Test1\n\t[Documentation] NCSDEV-14776 - Check pre upgrade values in config files\n\t[Tags] production pre_upgrade\n\t${tested_fields}= Create List caas_external\n Verify Values In Config Files keys=${tested_fields}", "settings": "{}", "variables": "{}", "name": "Pre_Upgrade_Verification_Test1", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "2f504d23-9c5a-4f5e-a5d6-2c9caec08670", "code": "postcase_cleanup\n\t[Documentation] Clean-up all robot objects that was created during cases\n\t[Tags] production pre_upgrade\n\tsetup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0bfb5632-0617-4696-832e-51f049b22375", "code": "postcase_cluster_status\n\t[Documentation] Check cluster status after the case, e.g verify all the pods running\n\t[Tags] production pre_upgrade\n\tcheck.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a40ba87c-e008-4eea-afbf-6e750c2081c7", "code": "Verify Values In Config Files\n\t[Arguments] ${keys}\n\t${is_central}= config.is_centralized_installation\n\t${cluster_conf_path}= Set Variable /opt/install/data/cbis-clusters/${S_CLUSTER_NAME}/cluster_config.yaml\n\tIF ${is_central}\n\t\t${hostname}= internal_get_hostname\n\t\tconfig.centralsite_name hostname=${hostname}\n\t\t${central_conf_path}= Set Variable /opt/install/data/cbis-clusters/${S_CENTRALSITE_NAME}/cluster_config.yaml\n\t\tinternal_check_keys_in_config config_path=${central_conf_path} keys=${keys}\n\tEND\n\tinternal_check_keys_in_config config_path=${cluster_conf_path} keys=${keys}", "settings": "{}", "variables": "{}", "name": "Verify Values In Config Files", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b7fd8dac-4c1c-415a-a711-c2df9b7ea86b", "code": "Save Disk By-Path in File\n ${is_greater_than_24_11}= config.is_current_NCS_sw_build_greater_than target_build=cbis-24.11.0\n Skip If not ${is_greater_than_24_11} Test is Compatible for 24.11 and above!\n\t${test_file_name}= Set Variable /tmp/pre_upgrade_disk_labels.txt\n\t${pre_upgrade_disk_labels}= ceph.get_disk_labels\n\t${conn}= ssh.open_connection_to_deployment_server\n\t${is_file_already_exist}= check.check_file_exist ${test_file_name} ${conn}\n\tIF ${is_file_already_exist}\n\t\tLog to Console File already exist, deleting older file version!\n\t\tssh.send_command ${conn} sudo rm ${test_file_name}\n END\n\t${create_pre_file}= Set Variable echo '${pre_upgrade_disk_labels}' > ${test_file_name}\n\tssh.send_command ${conn} ${create_pre_file}\n\n# ------------------------------------------------------------------\n# ====================== Internal Keywords ===========================\n# ------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "Save Disk By-Path in File", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "05e1e10a-757b-4448-b828-826ecd272f7e", "code": "internal_check_keys_in_config\n [Arguments] ${config_path} ${keys}\n ${conn}= ssh.open_connection_to_deployment_server\n ${cluster_conf_yaml}= ssh.send_command ${conn} sudo cat ${config_path}\n ${cluster_conf_dict}= Evaluate yaml.safe_load(\"\"\"${cluster_conf_yaml}\"\"\") yaml\n FOR ${key} IN @{keys}\n ${is_key_found}= Find Key In Dict ${cluster_conf_dict} ${key}\n Run Keyword If not ${is_key_found} Fail ${key} value was not found in ${config_path}\n END", "settings": "{'yaml': {'text': 'Library yaml'}}", "variables": "{}", "name": "internal_check_keys_in_config", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "506308f5-07cf-4e56-8702-cb928a75404e", "code": "internal_get_hostname\n\t${conn}= ssh.open_connection_to_deployment_server\n\t${hostname}= ssh.send_command ${conn} hostname", "settings": "{}", "variables": "{}", "name": "internal_get_hostname", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Pre_Upgrade_Verification_Tests.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "6de2b69d-abd2-453f-b3c1-35b7efc9b8ff", "code": "*** Settings ***\nTest Timeout 60 min\n\nLibrary ../../resource/PythonFunctionsPostUpgrade.py\nLibrary BuiltIn\nLibrary Collections\n\n\nResource NCSFM-8345_Check_Ceph_Fast_Pool.robot\nResource NCSDEV-8430_validate_ncs_versions.robot\nResource NCSDEV-8182_validate_HPE_Primera_fix.robot\nResource ../../ncsdev/resource/sysctl.robot\nResource ../../resource/setup.robot\nResource ../../resource/common.robot\nResource ../../resource/ssh.robot\nResource ../../resource/config.robot\nResource ../../resource/node.robot\nResource ../../resource/ncsManagerOperations.robot\nResource ../../resource/check.robot\nResource ../../resource/helm.robot\nResource ../helpers/validate_ISTIO.robot\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Test Cases ***\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n [Tags] production post_upgrade\n ssh.close_all_connections\n setup.precase_setup\n\nPost_Upgrade_Verification_Test1\n [Documentation] NCSFM-8500 Tests that 'Module signature appended' is being set for all files on each node and that kernel version\n ... is the same for all nodes\n [Tags] production post_upgrade\n [Teardown] Teardown_Post_Upgrade_Verification_Test1\n validate_kernal_RPMs_are_signed\n\nPost_Upgrade_Verification_Test2\n [Documentation] NCSFM-8017 Tests that the passwords are encrypted in installation files\n [Tags] production post_upgrade\n Password_encryption_check\n\nPost_Upgrade_Verification_Test3\n [Documentation] NCSFM-8345 Tests that validate ceph osd tree\n [Tags] production post_upgrade\n ceph_fast_pool_check\n\nPost_Upgrade_Verification_Test4\n [Documentation] NCSDEV-7714 Tests that mellanox cards exist and mellanox upgraded to required version\n [Tags] production post_upgrade\n validate_mellanox_ofed_version\n\nPost_Upgrade_Verification_Test5\n [Documentation] NCSDEV-7745 Tests that after upgrade all boolean are boolean and not changed to strings\n [Tags] production post_upgrade\n validate_boolean_as_strings_in_user_config\n\nPost_Upgrade_Verification_Test6\n [Documentation] NCSFM-7811 Tests the that the limits in gatekeeper are removed after patch\n [Tags] production post_upgrade\n Check_getKeeper_limit_removed\n\n## The test case not relavent to ncs24\n#Post_Upgrade_Verification_Test7\n# [Documentation] NCSDEV-8161 validate if the env ZBX_CACHESIZE found in zabbix proxy config file\n# ... (only for central installation and version 23.5 and above)\n# [Tags] production post_upgrade\n# Check_zabbix_proxy_mysql_env_values\n\nPost_Upgrade_Verification_Test8\n [Documentation] NCSDEV-8182 validate that the pods from patch NCSFM-7993-patch have no missing info\n [Tags] production post_upgrade\n NCSDEV-8182_validate_HPE_Primera_fix_check\n\nPost_Upgrade_Verification_Test9\n [Documentation] NCSDEV-8430 validate the product and the bcmt versions of all the clusters are the same\n [Tags] production post_upgrade\n NCSDEV-8430_validate_ncs_versions_test\n\nPost_Upgrade_Verification_Test10\n [Documentation] NCSDEV-8682 Checking that there is a timeout that comes before the openstack command\n [Tags] production post_upgrade\n Check_timeout_exist_before_the_openstack_command\n\nPost_Upgrade_Verification_Test11\n [Documentation] CBISDEV-4287 Automation Test for Reinstall NCS manager operation with this script 'install_cbis_manager.py'\n [Tags] production post_upgrade\n [Timeout] 30m\n Check_NCS_Manager_Reinstall\n\nPost_Upgrade_Verification_Test12\n [Documentation] NCSDEV-9167 give warning on 0.0.0.0 listening addresses in ncs\n [Tags] production post_upgrade\n check.Check if sshd listen On Wildcard\n\nPost_Upgrade_Verification_Test13\n [Documentation] NCSDEV-9880 Tests that after upgrade all integers are integers and not changed to strings\n [Tags] production post_upgrade\n check.validate_integer_instead_of_strings\n\nPost_Upgrade_Verification_Test14\n\t[Documentation] NCSDEV-10582, check the ncs helm 3 does not work as ncs-administrator without sudo\n [Tags] production post_upgrade\n helm.check_the_ncs_helm3\n\nPost_Upgrade_Verification_Test15\n\t[Documentation] NCSDEV-12815, Checks on all managers that aide file has been updated to aide.db.gz and aide.db.new.gz is not exist\n [Tags] production post_upgrade\n Check_aide_file\n\nPost_Upgrade_Verification_Test16\n\t[Documentation] NCSDEV-13474, verify selinux permissions on files /opt/cni(/.*)\n\t[Tags] production post_upgrade\n\tCheck_selinux_perm_in_all_master_nodes\n\nPost_Upgrade_Verification_Test17\n\t[Documentation] NCSDEV-14429, verify kombu package version is higher than 5.3.3\n\t[Tags] production post_upgrade\n\ttest_check_kombu_package_version\n\nPost_Upgrade_Verification_Test18\n\t[Documentation] NCSDEV-14440, check that above rhel7 and NCS24.11 above sysctl params not exist\n\t[Tags] production post_upgrade\n\tCheck_above_RHEL7_sysctl_param_not_exist\n\nPost_Upgrade_Verification_Test19\n\t[Documentation] Verfiy all central nodes has 1 osd\n\t[Tags] production post_upgrade\n check_central_nodes_osds\n\nPost_Upgrade_Verification_Test20\n [Documentation] NCSDEV-14718, check that post upgrade there is No operations with Partial status\n\t[Tags] production post_upgrade\n\ttest_post_upgrade_operation_statuses\n\nPost_Upgrade_Verification_Test21\n [Documentation] NCSDEV-14784, check grub parameters exist and that disk labels not changed during upgrade\n [Tags] production post_upgrade\n test_disk_sync_in_grub_params\n\npostcase\n\t[Documentation] Check cluster status after the case, e.g verify all the pods running\n\tcheck.postcase_cluster_status\n\n*** Keywords ***\n# ------------------------------------------------------------------\n# ====================== Test Cases Keywords =======================\n# ------------------------------------------------------------------\n\n\nvalidate_kernal_RPMs_are_signed\n [Documentation] Runs on each node checks that module signature appended is set and checks kernel version same on each node\n # ================ Preperation ================== #\n ${is_central}= config.is_centralized_installation\n IF ${is_central}\n ${conn} ssh.open_connection_to_deployment_server\n ${scp} ssh.open_scp_connection_to_deployment_server\n ELSE\n ${conn} ssh.open_connection_to_controller\n ${scp} ssh.open_scp_connection_to_controller\n END\n ${path} Set Variable /tmp\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/check_kernal.sh /tmp/check_kernal.sh\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/unsigned_kernals.sh /tmp/unsigned_kernals.sh\n ${command} Set Variable sudo uname -r\n ${current_kernel} ssh.send_command ${conn} ${command}\n @{node_list}= node.get_name_list\n Log ${node_list}\n Log to console ${node_list}\n # ============= Check kernel version same on each node ============= #\n FOR ${node} IN @{node_list}\n Log to console starting ${node}\n ${conn} ssh.open_connection_to_node ${node}\n ${resp}= ssh.send_command ${conn} ${command}\n ${status}= Run Keyword And Return Status Strings Are Equal ${resp} ${current_kernel}\n IF ${status}==${TRUE}\n Continue For Loop\n ELSE\n Exit For Loop\n Log kernel version is not the same for all nodes , node that dont have the same version is ${node}\n END\n END\n # ============ Create list of all unsigned kernel files ============= #\n ${unsignedkernals_list} Create List\n @{ip_node_list} node.get_IPs_list\n FOR ${node} IN @{ip_node_list}\n ### Send Script file to Node\n Log to console starting move file to ${node}\n Log to console moving file started\n IF ${is_central}\n ssh.send_command_to_centralsitemanager scp -o StrictHostKeyChecking=no /tmp/check_kernal.sh ${node}:/tmp/\n ssh.send_command_to_centralsitemanager scp -o StrictHostKeyChecking=no /tmp/unsigned_kernals.sh ${node}:/tmp/\n ELSE\n ${conn_controller} ssh.open_connection_to_controller\n ssh.send_command ${conn_controller} scp -o StrictHostKeyChecking=no /tmp/check_kernal.sh ${node}:/tmp\n ssh.send_command ${conn_controller} scp -o StrictHostKeyChecking=no /tmp/unsigned_kernals.sh ${node}:/tmp\n END\n ${conn} ssh.open_connection_to_node ${node}\n ssh.send_command ${conn} sudo dos2unix /tmp/check_kernal.sh\n ssh.send_command ${conn} sudo dos2unix /tmp/unsigned_kernals.sh\n ${result}= ssh.send_command ${conn} sudo sh /tmp/check_kernal.sh\n Log to console ${result}\n ${is_unsigned_kernals} ssh.send_command ${conn} sudo sh /tmp/unsigned_kernals.sh\n IF \"${is_unsigned_kernals}\"==\"pass\"\n Continue For Loop\n ELSE\n Append To List ${unsignedkernals_list} ${is_unsigned_kernals}\n END\n Log to console finished moving to next node\n END\n Log ${unsignedkernals_list}\n Should Be Empty ${unsignedkernals_list}\n\nCheck_above_RHEL7_sysctl_param_not_exist\n\t${is_NCS_24_11} config.is_NCS_24_11\n\tSkip If ${is_NCS_24_11} is False msg=Test Is Compatible for 24.11 and above, Skipping!\n\t${sysctl_params} Create List fs.may_detach_mounts\n\t${is_central} config.is_centralized_installation\n\t${os_version} sysctl.get_current_os_version is_central=${is_central}\n ${central_nodes} Run Keyword If ${is_central} node.get_centralsitemanager_nodes_name_list\n ... ELSE Create List\n ${k8s_nodes} node.get_node_name_list\n ${node_list} Combine Lists ${central_nodes} ${k8s_nodes}\n\tSkip If ${os_version}[0] <= 7 msg=Test is only for RHEL version number above 7!\n FOR ${sysctl_param} IN @{sysctl_params}\n \t${is_exist} ${detected_nodes} sysctl.check_sysctl_param_not_exist sysctl_param=${sysctl_param} node_list=${node_list}\n \tRun Keyword If ${is_exist} Fail The Following Nodes: ${detected_nodes} contain ${sysctl_param} as sysctl param, Failed!\n END\n\nTeardown_Post_Upgrade_Verification_Test1\n\t# Delete the uncompressed file module.ko\n\t@{ip_node_list} node.get_IPs_list\n\tFOR ${ip} IN @{ip_node_list}\n\t\t${conn} ssh.open_connection_to_node ${ip}\n\t\tssh.send_command ${conn} sudo rm -rf /tmp/robot_test/\n\tEND\n\nCheck_getKeeper_limit_removed\n [Documentation] Checks if the values of the key=limits in gatekeeper_values.yml are None\n ${gate_keeper_list}= Create List\n @{master_nodes_list}= Get_control_name_list\n log ${master_nodes_list}\n FOR ${master_node} IN @{master_nodes_list}\n ${conn}= Open_connection_to_node ${master_node}\n ${is_node_all_in_one}= Is Node All In One ${master_node}\n IF not ${is_node_all_in_one}\n ${is_not_limited}= Is Not Limited ${conn}\n IF not ${is_not_limited}\n Append To List ${gate_keeper_list} ${master_node}\n END\n END\n Close_connection ${conn}\n END\n Run Keyword If ${gate_keeper_list} Fail this master nodes are limited: ${gate_keeper_list}\n\npassword_encryption_check\n [Documentation] Check on Manager node wether passwords on location /opt/install/data/cbis-clusters/ are encrypted\n ... exeption_files- an inside dictionary the key is the name of the file and the values are the names of the password put \\ou between every password to divide in the list\n # Check if the setup is valid -------------------------------------\n Internal_check_prereqs cbis-23.10.0 536\n internal_check_if_case_is_valid\n NCS_22.12 And Above Skip Check\n ${file_path}= Evaluate \"/opt/install/data/cbis-clusters/\"\n ${execption_files}= Create Dictionary All \"cluster_password\":\\!55oulinux_nacmaudit_password:\\!55ou\"linux_nacmaudit_password\":\\!55ou cm-data.json All\\!55ou cm_temp_backup All\\!55ou storage_csi_config.json \"cluster_password\":\\!55ou\n ${execption_files}= NCS_23.5 And Above Disable Exception ${execption_files}\n ${conn}= Set Connection If Central\n# ${conn}= Open_connection_to_controller\n ${file_paths_List}= Get Directory File Path List ${conn} ${file_path}\n ${file_fault_dict}= Get Passwords which Are Not Encrypted In Dictionary ${conn} ${file_paths_List} ${execption_files}\n ${fault_dict_counter}= Get Length ${file_fault_dict}\n ssh.Close_connection ${conn}\n Run Keyword If ${fault_dict_counter} > 0 Fail passwords could be not encrypted in ${file_fault_dict}\n\nceph_fast_pool_check\n NCSFM-8345_Check_Ceph_Fast_Pool.Setup\n NCSFM-8345_Check_Ceph_Fast_Pool.check_roots_exist_test\n NCSFM-8345_Check_Ceph_Fast_Pool.check_userConfig_hosts_eq_cephTree_hosts_test\n NCSFM-8345_Check_Ceph_Fast_Pool.check_devices_in_cephTree_test\n NCSFM-8345_Check_Ceph_Fast_Pool.TearDown\n\n\nvalidate_mellanox_ofed_version\n [Documentation] Checks that mellanox cards exists then check its version\n ${conn} ssh.open_connection_to_controller\n ${version_dict} Create Dictionary 22.100.12=5.7 23.10.0=5.8 24.7.0=23.10 24.11.0=23.10 25.7.0=24.10\n Log ${version_dict}\n\n ${cluster_name} config.get_ncs_cluster_name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n ${v_b} config.info_ncs_version\n ${v_b_split} Split String ${v_b} -\n ${ncs_version} Set Variable ${v_b_split}[0]\n\n ${required_ofed_version} Get From Dictionary ${version_dict} ${ncs_version}\n Log ${required_ofed_version}\n\n ${ofed_package} Set Variable ofed_info -s\n ${ofed_version} Set Variable ofed_info -n\n ${package} ssh.send_command ${conn} ${ofed_package}\n ${version} ssh.send_command ${conn} ${ofed_version}\n\n ${command} Set Variable sudo /usr/sbin/lspci -D | grep Mellanox | wc -l\n ${num_of_cards} ssh.send_command ${conn} ${command}\n Log ${num_of_cards}\n\n IF ${num_of_cards}>0\n ${version_status} Run Keyword And Return Status Should Contain ${version} ${required_ofed_version}\n ${package_status} Run Keyword And Return Status Should Contain ${package} ${required_ofed_version}\n Run Keyword If ${version_status}==${TRUE} and ${package_status}==${TRUE} Pass Execution All mellanox cards are upgraded to required version\n ... ELSE Fail Mellanox cards are not upgraded to required version\n ELSE\n Skip\n END\n\nvalidate_boolean_as_strings_in_user_config\n [Documentation] validate all boolean are not changed to strings in all fields of user_config.yaml\n check.validate_boolean_as_strings\n\nCheck_zabbix_proxy_mysql_env_values\n # Check if the setup is valid -------------------------------------\n Internal_check_prereqs cbis-23.5.0 248 ${TRUE}\n internal_check_if_case_is_valid\n # SET VAIRABLES -------------------------------------\n ${cmd} Set Variable sudo cat /etc/zabbix/container-zabbix-proxy-mysql-env-values.env\n ${env} Set Variable ZBX_CACHESIZE\n ${env_regex} Set Variable ZBX_CACHESIZE=[0-9]*M\n\n ${conn}= ssh.open_connection_to_controller\n ${output}= ssh.send_command ${conn} ${cmd}\n @{split_output} Split To Lines ${output}\n ${is_env_exist} Get Regexp Matches ${output} ${env_regex}\n Should Be True \"${is_env_exist}\"!=\"[]\" ${env} isn't found!\n\n FOR ${line} IN @{split_output}\n @{split_line} Split String ${line} =\n Continue For Loop If \"${env}\"!=\"${split_line}[0]\"\n ${size} Evaluate \"${split_line}[1]\"\n ${size} Strip String ${size}\n ${size} Remove String ${size} M\n Should Be True ${size}>=1024 ${size}M should be greater then 1024M or equal\n END\n\nCheck_timeout_exist_before_the_openstack_command\n # Check if the setup is valid\n Internal_check_prereqs cbis-23.5.0 359\n internal_check_if_case_is_valid\n ${cmd} Set Variable sudo cat /opt/install/data/.bm_env\n # Check if the env is config5\n ${is_central}= Is_centralized_installation\n ${conn} Run Keyword If ${is_central} == ${True} ssh.open_connection_to_deployment_server\n ... ELSE ssh.open_connection_to_controller\n ${output}= ssh.send_command ${conn} ${cmd}\n Log ${output}\n ssh.close_connection ${conn}\n ${match} Get Regexp Matches ${output} (timeout \\\\d+ )openstack cbis cm -S all -c HostName -c Provisioning -f value\n Log ${match}\n Length Should Be ${match} 1 timeout with a number doesn't found\n\n\nCheck_NCS_Manager_Reinstall\n [Documentation] automatic tets for ncs manager reinstall\n Internal_check_prereqs cbis-24.7.0 275\n internal_check_if_case_is_valid # Check if the setup is valid for 24.7\n ${conn}= Open_connection_to_node ${G_NCM_DEPLOYMENT_SERVER_IP}\n ${hostname}= ssh.send_command ${conn} hostname -s\n ${cluster_name} config.central_deployment_cloud_name\n ${is_ipv6} config.is_ipv6_installation\n IF ${is_ipv6}\n ${ext_ip}= get_node_external_oam_ip_v6 node=${hostname} cluster_name=${cluster_name}\n ${baseurl}= Evaluate \"https://\"+\"[${ext_ip}]\"+\"/\"\n ELSE\n \t${ext_ip}= get_node_external_oam_ip node=${hostname} cluster_name=${cluster_name}\n ${baseurl}= Evaluate \"https://\"+\"${ext_ip}:9443\"+\"/\"\n END\n ${supported_versions} config.get_controller_current_ncs_version\n ${pre_upgrade_supported_versions} Set Variable If \"${supported_versions}\"==\"24.11.0\" 24.7.0 24.11.0\n ${mode}= config.ncs_config_mode\n ${cmd}= Run Keyword If \"${mode}\"==\"config5\" Set Variable sudo sh -c 'cd /root/cbis && python /root/cbis/install_cbis_manager.py -v \"${pre_upgrade_supported_versions},${supported_versions}\" -r -u ${G_NCS_MANAGER_REST_API_USERNAME} -p ${G_NCS_MANAGER_REST_API_PASSWORD} -i ${ext_ip}'\n ... ELSE Set Variable sudo sh -c 'cd /root/cbis && python /root/cbis/install_cbis_manager.py -r -u ${G_NCS_MANAGER_REST_API_USERNAME} -p ${G_NCS_MANAGER_REST_API_PASSWORD} -i ${ext_ip}'\n ${output}= ssh.send_command ${conn} ${cmd}\n Close Connection ${conn}\n Log ${output}\n Should Match Regexp ${output} NCS Manager check passed successfully\n Wait Until Keyword Succeeds 5x 60s Login_to_NCS_Manager_main_page ${baseurl}\n\nCheck_aide_file\n\t[Documentation] Checks on all managers that aide file has been updated to aide.db.gz and aide.db.new.gz is not exist\n\t${is_central} config.is_centralized_installation\n ${control_nodes} node.get_control_name_list\n ${central_nodes} Run Keyword If ${is_central} node.get_centralsitemanager_nodes_name_list\n ... ELSE Create List\n ${nodes} Combine Lists ${control_nodes} ${central_nodes}\n FOR ${node} IN @{nodes}\n ${conn} ssh.open_connection_to_node ${node}\n ${files} ssh.send_command ${conn} sudo ls -lrt /var/lib/aide\n ${is_contain_new_gz} Run Keyword And Return Status Should Contain ${files} aide.db.new.gz\n ${is_contain_updated_gz} Run Keyword And Return Status Should Contain ${files} aide.db.gz\n Run Keyword And Warn On Failure\n ... Run Keyword If ${is_contain_new_gz} is True and ${is_contain_updated_gz} is False Fail msg=aide.db.new.tgz is exist and the file was not updated successfully in ${node}\n ... ELSE IF ${is_contain_new_gz} is True and ${is_contain_updated_gz} is True Fail msg=aide.db.new.tgz and aide.db.gz both exist! in ${node}\n ... ELSE IF ${is_contain_new_gz} is False and ${is_contain_updated_gz} is False Fail msg=aide.db.new.tgz and aide.db.gz not exist! in ${node}\n ... ELSE IF ${is_contain_new_gz} is False and ${is_contain_updated_gz} is True Log to Console aide.db.gz is exist, OK!\n END\n\nCheck_selinux_perm_in_all_master_nodes\n ${master_nodes} node.get_control_name_list\n\tFOR ${master} IN @{master_nodes}\n ${node_ip}= node.get_oam_ip ${master}\n ${conn}= ssh.open_connection_to_node ${node_ip}\n ${selinux_labels}= ssh.send_command ${conn} sudo ls -lZUa /opt/cni/* | grep -v 'total [0-9]\\\\*'\n ssh.close_connection ${conn}\n ${selinux_labels_dict} validate_ISTIO.convert_selinux_labels_to_dict ${selinux_labels}\n Log ${selinux_labels_dict}\n ${selinux_labels} Get Dictionary Keys ${selinux_labels_dict}\n FOR ${file} IN @{selinux_labels}\n \t${file_info} Get From Dictionary ${selinux_labels_dict} ${file}\n \t${selinux_value} Get From Dictionary ${file_info} SELinux\n \t${split_selinux} Split String ${selinux_value} :\n \t${selinux_permission} Set Variable ${split_selinux[-2]}\n \tShould Be Equal As Strings ${selinux_permission} usr_t The file ${file} have no selinux permission usr_t\n END\n END\n\ncheck_central_nodes_osds\n\t${is_central}= config.is_centralized_installation\n\tSkip If not ${is_central}\n\t${central_nodes}= node.get_centralsitemanager_nodes_name_list\n ${conn}= ssh.open_connection_to_deployment_server\n ${central_osds_data}= ssh.send_command ${conn} sudo ceph osd tree -f json | jq '.nodes | map(select(.type == \"host\") | {name, osds: [ .children[] ] })'\n ${all_central_osds}= Create List\n ${central_osds_data}= Convert Json To Dict ${central_osds_data}\n FOR ${central_node} IN @{central_nodes}\n \tFOR ${central_osd_data} IN @{central_osds_data}\n ${central_node_name}= Get From Dictionary ${central_osd_data} name\n IF '${central_node_name}' == '${central_node}'\n \t${osds}= Get From Dictionary ${central_osd_data} osds\n \t${num_of_osds}= Get Length ${osds}\n Append To List ${all_central_osds} ${osds}\n \tShould Be True ${num_of_osds} == 1 There is more than 1 osd in ${central_node}!\n ELSE\n \tContinue For Loop\n END\n END\n END\n ${all_central_osds}= Evaluate [osd for sublist in ${all_central_osds} for osd in sublist]\n ${num_all_osds}= Get Length ${all_central_osds}\n ${num_of_nodes}= Get Length ${central_nodes}\n Should Be True ${num_all_osds} == ${num_of_nodes} Number of osds is not equal to number of nodes!\n\n\n# ------------------------------------------------------------------\n# ====================== Public Keywords ===========================\n# ------------------------------------------------------------------\n\nNCS_22.12 And Above Skip Check\n [Documentation] skips test if Env is not v22.12\n ${is_ncs_22_12_above}= config.Is_current_NCS_sw_build_greater_than NCS-22.100.12\n log ${is_ncs_22_12_above}\n Skip If not ${is_ncs_22_12_above} the Env is not of verison 22_12 or above\n\nNCS_23.5 And Above disable exception\n [Documentation] Changes exception dictionary for version 23.5 and above\n [Arguments] ${exception_dict}\n ${is_ncs_23_5_above}= config.Is_current_NCS_sw_build_greater_than NCS-23.5.0\n log ${is_ncs_23_5_above}\n IF ${is_ncs_23_5_above}\n ${exception_dict}= Create Dictionary cm-data.json All\\!55ou cm_temp_backup All\\!55ou storage_csi_config.json \"cluster_password\":\\!55ou\n END\n [Return] ${exception_dict}\n\nSet Connection If Central\n [Documentation] return the connection type if Env is central or not\n ${is_central}= config.Is_centralized_installation\n IF ${is_central} == ${True}\n ${conn}= ssh.open_connection_to_deployment_server\n ELSE\n ${conn}= ssh.Open_connection_to_controller\n END\n [Return] ${conn}\n\nGet Directory Files In List\n [Documentation] Gets the file names in a path as a list\n ... conn- connection to node\n ... file_path- the file path in a certain machine\n [Arguments] ${conn} ${file_path}\n ${command}= Evaluate \"sudo ls ${file_path}\"\n ${files}= ssh.Send_command ${conn} ${command}\n ${files_list}= Split String ${files}\n log ${files_list}\n [Return] @{files_list}\n\nGet Directory File Path List\n [Documentation] Gets the file paths for files in a path as a list\n ... conn- connection to node\n ... file_path- the file path in a certain machine\n [Arguments] ${conn} ${file_path}\n ${files_list}= Get Directory Files In List ${conn} ${file_path}\n ${files_list_len}= Get Length ${files_list}\n FOR ${index} IN RANGE ${files_list_len}\n Set List Value ${files_list} ${index} ${file_path}${files_list}[${index}]\n END\n [Return] ${files_list}\n\nGet Paths With Files Dictionary\n [Documentation] Gets the file names in directories file paths as a dictonary to the parent file\n ... conn- connection to node\n ... files_paths_list - list of directories file paths\n [Arguments] ${conn} ${files_paths_list}\n ${password_files_dict}= Create Dictionary\n FOR ${file_path} IN @{files_paths_list}\n ${passwordFilesDirectory_list}= Get Directory Files In List ${conn} ${file_path}\n Set To Dictionary ${password_files_dict} ${file_path} ${passwordFilesDirectory_list}\n END\n [Return] ${password_files_dict}\n\nCreate a List Inside A Dictionary With Devider\n [Documentation] creates a list foreach key in dictionary when a clear devider is given\n ... dict- dictionary\n ... devider- string devider between elements for the lists\n [Arguments] ${dict} ${devider}\n ${dict_list}= Create Dictionary\n @{keys}= Get Dictionary Keys ${dict}\n FOR ${key} IN @{keys}\n ${string}= Evaluate ${dict}\\[\"${key}\"]\n ${list}= Split String ${string} ${devider}\n Remove Values From List ${list} ${EMPTY}\n Set To Dictionary ${dict_list} ${key} ${list}\n END\n [Return] ${dict_list}\n\n\nAppend from List to List\n [Documentation] appends elemnts from one list to another\n ... main_list- recives a list that element will be appended to\n ... secondy_list- recives a list that its element will be appended\n [Arguments] ${main_list} ${secondy_list} ${no_dupes}=${FALSE}\n FOR ${secondry_element} IN @{secondy_list}\n IF ${no_dupes}\n ${is_in_list}= Is String In List ${secondry_element} ${main_list}\n IF not ${is_in_list}\n Append To List ${main_list} ${secondry_element}\n END\n ELSE\n Append To List ${main_list} ${secondry_element}\n END\n END\n\nCheck If File In Exception List\n [Documentation] returns a bool if a file name is in the exception list and returns the lists of exception passwords\n ... file_name- current file name being iterated over\n [Arguments] ${file_name} ${exception_dict}\n ${exception_passwords_list}= Create List\n ${exceptions_dict_list}= Create a List Inside A Dictionary With Devider ${exception_dict} \\!55ou\n ${exceptions_keys}= Get Dictionary Keys ${exceptions_dict_list}\n ${exception_present}= Set Variable ${FALSE}\n FOR ${exception_key} IN @{exceptions_keys}\n ${exception_present}= String In String ${exception_key} ${file_name}\n Exit For Loop If ${exception_present}\n END\n ${is_All}= Evaluate \"All\" in \"${exceptions_keys}\"\n IF ${exception_present}\n ${passwords_list}= Evaluate ${exceptions_dict_list}\\[\"${file_name}\"]\n Append From List To List ${exception_passwords_list} ${passwords_list} ${TRUE}\n END\n IF ${is_All}\n ${passwords_list}= Evaluate ${exceptions_dict_list}\\[\"All\"]\n Append From List To List ${exception_passwords_list} ${passwords_list} ${TRUE}\n ${exception_present} Set Variable ${TRUE}\n END\n\n [Return] ${exception_passwords_list} ${exception_present}\n\n\nGet Passwords which Are Not Encrypted In Dictionary\n [Documentation] Gets a dictionary with with file names and passwords which are not encrypted\n ... conn- connection to node\n ... files_paths_list- list of directories file paths\n ... exeption_files- important to put \\ou after every value for it to considred part of a list\n [Arguments] ${conn} ${file_paths_List} ${exceptions_dict}\n ${password_files_dict}= Get Paths With Files Dictionary ${conn} ${file_paths_List}\n ${file_fault_dict}= Create Dictionary\n @{dict_file_names}= Get Dictionary Keys ${password_files_dict}\n FOR ${file_path} IN @{dict_file_names}\n ${fault_dict}= Create Dictionary\n @{password_files_list}= Evaluate ${password_files_dict}\\[\"${file_path}\"]\n FOR ${password_file} IN @{password_files_list}\n IF (\"json\" in \"${password_file}\" or \"yaml\" in \"${password_file}\")\n ${exception_passwords_list} ${exception_present}= Check If File In Exception List ${password_file} ${exceptions_dict}\n Exit For Loop If ${exception_present}\n ${password_file_content} ${err} ${code}= ssh.send_command_and_return_rc ${conn} sudo cat ${file_path}/${password_file} | grep password\n IF ${code} == 0\n ${is_all_in_passwords}= Is String In List All ${exception_passwords_list}\n Continue For Loop If ${is_all_in_passwords}\n ${content_list}= Split String ${password_file_content} ${\\n}\n Remove Empty From List ${content_list}\n log ${content_list}\n ${fault_list}= Check Invalid Encryption ${content_list} [pP]ass[a-z\" _\\\\\\\\]*: ${exception_passwords_list} ${exception_present}\n ${len_fault_list}= Get Length ${fault_list}\n IF ${len_fault_list} > 0\n Set To Dictionary ${fault_dict} ${password_file} ${fault_list}\n END\n END\n END\n log ${fault_dict}\n END\n ${len_fault_dict}= Get Length ${fault_dict}\n IF ${len_fault_dict} > 0\n Set To Dictionary ${file_fault_dict} ${file_path} ${fault_dict}\n END\n END\n [Return] ${file_fault_dict}\n\n\nis Node All in one\n [Documentation] returns if the node given as parameters is all in one node\n ... nodename= node name to be checked if all in one node\n [Arguments] ${nodename}\n ${is_control}= Is_control ${nodename}\n ${is_edge}= Is_edge ${nodename}\n ${is_worker}= Is_worker ${nodename}\n ${is_storage}= Is_storage ${nodename}\n Return From Keyword If ${is_control} and ${is_edge} and ${is_worker} and ${is_storage} ${TRUE}\n [Return] ${FALSE}\n\nIs Not Limited\n [Documentation] returns if gatekeeper is limited\n ... conn= node connection\n [Arguments] ${conn}\n ${std_out} ${std_err} ${code}= Send_command_and_return_rc ${conn} sudo kubectl get deployment -n gatekeeper-system gatekeeper-controller-manager -o yaml | grep limits\n Return From Keyword If ${code}== 0 ${FALSE}\n ${std_out} ${std_err} ${code}= Send_command_and_return_rc ${conn} kubectl get deployment -n gatekeeper-system gatekeeper-audit -o yaml | grep limits\n Return From Keyword If ${code}== 0 ${FALSE}\n [Return] ${TRUE}\n\ntest_check_kombu_package_version\n\t[Documentation] NCSDEV-14429 verifying the kombu version\n\t${version_higher_than} Set Variable 5.3.3\n ${get_cbis_manager_container_id} Set Variable sudo podman ps --format '{{.ID}} {{.Names}}' | grep cbis-manager | awk '{{print \\$1}}'\n ${conn} ssh.open_connection_to_deployment_server\n ${cbis_manager_container_id} ssh.send_command ${conn} ${get_cbis_manager_container_id}\n Run Keyword If '${cbis_manager_container_id}' == '${EMPTY}' Fail msg=cbis_manager container id not found! Fail!\n ${get_kombu_version} Set Variable bash -c 'sudo podman exec -it ${cbis_manager_container_id} pip list | grep kombu' | awk '{{print \\$2}}'\n ${current_kombu_version} ssh.send_command ${conn} ${get_kombu_version}\n ${version_higher_than} Evaluate tuple(map(int, \"${version_higher_than}\".split(\".\")))\n ${current_kombu_version} Evaluate tuple(map(int, \"${current_kombu_version}\".split(\".\")))\n Should Be True ${current_kombu_version} > ${version_higher_than} msg=Kombu Package version is lower than ${version_higher_than}, Failed!\n\ntest_post_upgrade_operation_statuses\n\t${is_central} config.is_centralized_installation\n ${conn} ssh.open_connection_to_deployment_server\n ${hostname} ssh.send_command ${conn} hostname\n IF ${is_central}\n \tconfig.centralsite_name ${hostname}\n \t${cluster_name} Set Variable ${S_CENTRALSITE_NAME}\n ELSE\n \t${cluster_name} config.get_ncs_cluster_name\n END\n ${cmd} Set Variable sudo podman exec redis redis-cli -n 7 --raw get upgrade:${cluster_name}:saved_internals > /tmp/upgrade_statuses.json\n ${get_upgrade_statuses} ssh.send_command ${conn} ${cmd}\n ${upgrade_statuses_json} ssh.send_command ${conn} sudo cat /tmp/upgrade_statuses.json\n ${upgrade_statuses_dict} Convert Json To Dict ${upgrade_statuses_json}\n # fetch upgrade steps\n ${upgrade_steps} Set Variable ${upgrade_statuses_dict}[status][steps]\n Set Suite Variable ${PRE_VERIFY_RAN} ${FALSE}\n FOR ${u} IN @{upgrade_steps}\n \tContinue For Loop If ${PRE_VERIFY_RAN} and \"${u['step']}\" == \"NcsMidVerifyStep\"\n \tIF \"${u['step']}\" == \"NcsPreUpgradeVerify\"\n \t\tSet Suite Variable ${PRE_VERIFY_RAN} ${TRUE}\n \tEND\n \t${step_status} Get From Dictionary ${u} step_status\n \tShould Be True \"${step_status}\" == \"SUCCESS\"\n END\n # fetch upgrade general cluster steps\n ${cluster_operations_data} Set Variable ${upgrade_statuses_dict}[${cluster_name}]\n FOR ${d} IN @{cluster_operations_data}\n \tLog ${cluster_operations_data}[${d}]\n \t${info} Set Variable ${cluster_operations_data}[${d}]\n \t${status_paths} Find Key In Dict ${info} status\n FOR ${path} IN @{status_paths}\n \t${status}= Set Variable ${EMPTY}\n \tFOR ${p} IN @{path}\n \t\t${is_first}= Get Index From List ${path} ${p}\n \t\t${status}= Run Keyword If ${is_first} == 0 Get From Dictionary ${info} ${p}\n \t\t ... ELSE Get From Dictionary ${status} ${p}\n \tEND\n \tShould Be True \"${status}\" == \"SUCCESS\"\n END\n END\n\ntest_disk_sync_in_grub_params\n ${is_greater_than_24_11}= config.is_current_NCS_sw_build_greater_than target_build=cbis-24.11.0 build_nbr=205\n Skip If not ${is_greater_than_24_11} Test is Compatible for 24.11 and above!\n ${conn}= ssh.open_connection_to_deployment_server\n # check that parameter is active\n ${get_cmdline}= Set Variable sudo cat /proc/cmdline\n ${cmdline}= ssh.send_command ${conn} ${get_cmdline}\n Should Contain ${cmdline} sd_mod.probe=sync msg=sd_mod sync paramter is not active!\n ${boot_mode}= internal_get_boot_mode\n IF \"${boot_mode}\" == \"uefi\"\n # check that paramater is exist for future boots\n ${get_grub_conf}= Set Variable sudo cat /etc/default/grub | grep GRUB_CMDLINE_LINUX\n ${grub_conf}= ssh.send_command ${conn} ${get_grub_conf}\n Should Contain ${grub_conf} sd_mod.probe=sync msg=sd_mod sync paramter is not exist for future boots!\n END\n\n# ------------------------------------------------------------------\n# ====================== Internal Keywords ===========================\n# ------------------------------------------------------------------\n\ninternal_check_prereqs\n [Arguments] ${target_version}=cbis-23.5.0 ${target_build}=1 ${only_supported_centrel}=${FALSE} ${set_accepted_skip_TM}=${True}\n Set Suite Variable ${S_IS_ACCEPTED_SKIP_TM} ${set_accepted_skip_TM}\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n # Check if environment is ncs version 23.5 or above\n ${is_currect_version} config.Is_current_NCS_sw_build_greater_than ${target_version} ${target_build}\n Set Suite Variable ${S_IS_CURRECT_VERSION} ${is_currect_version}\n # Check if environment suppurted with central\n ${is_central} config.is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n Set Suite Variable ${S_ONLY_SUPPORTED_CENTRAL} ${only_supported_centrel}\n\ninternal_check_if_case_is_valid\n [Documentation] Check if configuration is supported.\n Run Keyword If \"${S_IS_ACCEPTED_SKIP_TM}\"==\"${TRUE}\" Set_accepted_skip_TM_flag\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If \"${S_ONLY_SUPPORTED_CENTRAL}\"==\"${TRUE}\" and \"${S_IS_CENTRAL}\"==\"${FALSE}\" This case is supported only in central installation\n Skip If \"${S_IS_CURRECT_VERSION}\"==\"${FALSE}\" The NCS version of this setup not supported\n\ninternal_get_boot_mode\n\t${conn}= ssh.open_connection_to_deployment_server\n\t${stdout} ${err} ${code}= ssh.send_command_and_return_rc ${conn} sudo ls -lrt /sys/firmware/efi/\n Return From Keyword If ${code} != 0 bios\n [Return] uefi", "name": "suites/rnd/NCS_Post_Upgrade_Verification_tests.robot", "imports_file_locations": "{'NCSFM-8345_Check_Ceph_Fast_Pool.robot': 'suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot', 'NCSDEV-8430_validate_ncs_versions.robot': 'suites/rnd/NCSDEV-8430_validate_ncs_versions.robot', 'NCSDEV-8182_validate_HPE_Primera_fix.robot': 'suites/rnd/NCSDEV-8182_validate_HPE_Primera_fix.robot', '../../ncsdev/resource/sysctl.robot': 'ncsdev/resource/sysctl.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/common.robot': 'resource/common.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/config.robot': 'resource/config.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/ncsManagerOperations.robot': 'resource/ncsManagerOperations.robot', '../../resource/check.robot': 'resource/check.robot', '../../resource/helm.robot': 'resource/helm.robot', '../helpers/validate_ISTIO.robot': 'suites/helpers/validate_ISTIO.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "257e0a53-69a5-4859-b8e6-2829cf2ee05c", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n [Tags] production post_upgrade\n ssh.close_all_connections\n setup.precase_setup", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3bcc00de-8bf3-4eb4-9186-77a7115880dd", "code": "Post_Upgrade_Verification_Test1\n [Documentation] NCSFM-8500 Tests that 'Module signature appended' is being set for all files on each node and that kernel version\n ... is the same for all nodes\n [Tags] production post_upgrade\n [Teardown] Teardown_Post_Upgrade_Verification_Test1\n validate_kernal_RPMs_are_signed", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test1", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "17d1611d-9887-48f9-9a27-3f437bf25c20", "code": "Post_Upgrade_Verification_Test2\n [Documentation] NCSFM-8017 Tests that the passwords are encrypted in installation files\n [Tags] production post_upgrade\n Password_encryption_check", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test2", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f37f070f-311b-47c1-be41-9f2127302490", "code": "Post_Upgrade_Verification_Test3\n [Documentation] NCSFM-8345 Tests that validate ceph osd tree\n [Tags] production post_upgrade\n ceph_fast_pool_check", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test3", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "48879e5a-6876-4aab-b7d0-ed4b35484160", "code": "Post_Upgrade_Verification_Test4\n [Documentation] NCSDEV-7714 Tests that mellanox cards exist and mellanox upgraded to required version\n [Tags] production post_upgrade\n validate_mellanox_ofed_version", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test4", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "5de7dab9-cdad-4770-97c3-2fc052903566", "code": "Post_Upgrade_Verification_Test5\n [Documentation] NCSDEV-7745 Tests that after upgrade all boolean are boolean and not changed to strings\n [Tags] production post_upgrade\n validate_boolean_as_strings_in_user_config", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test5", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "360dd022-8eaf-43fe-8228-b8ec44f8a26a", "code": "Post_Upgrade_Verification_Test6\n [Documentation] NCSFM-7811 Tests the that the limits in gatekeeper are removed after patch\n [Tags] production post_upgrade\n Check_getKeeper_limit_removed\n\n## The test case not relavent to ncs24\n#Post_Upgrade_Verification_Test7\n# [Documentation] NCSDEV-8161 validate if the env ZBX_CACHESIZE found in zabbix proxy config file\n# ... (only for central installation and version 23.5 and above)\n# [Tags] production post_upgrade\n# Check_zabbix_proxy_mysql_env_values", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test6", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3843c82c-0f73-4869-b640-c5b2557087c6", "code": "Post_Upgrade_Verification_Test8\n [Documentation] NCSDEV-8182 validate that the pods from patch NCSFM-7993-patch have no missing info\n [Tags] production post_upgrade\n NCSDEV-8182_validate_HPE_Primera_fix_check", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test8", "documentation": "", "imports_file_locations": "{'NCSDEV-8182_validate_HPE_Primera_fix.robot': 'suites/rnd/NCSDEV-8182_validate_HPE_Primera_fix.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "312379fd-2ef9-4048-8b11-011ef47cc997", "code": "Post_Upgrade_Verification_Test9\n [Documentation] NCSDEV-8430 validate the product and the bcmt versions of all the clusters are the same\n [Tags] production post_upgrade\n NCSDEV-8430_validate_ncs_versions_test", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test9", "documentation": "", "imports_file_locations": "{'NCSDEV-8430_validate_ncs_versions.robot': 'suites/rnd/NCSDEV-8430_validate_ncs_versions.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "53e11c73-47c8-4a9d-b31c-aaf18f3f128d", "code": "Post_Upgrade_Verification_Test10\n [Documentation] NCSDEV-8682 Checking that there is a timeout that comes before the openstack command\n [Tags] production post_upgrade\n Check_timeout_exist_before_the_openstack_command", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test10", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4bd521e8-0d15-413c-9fed-27ffce28d35c", "code": "Post_Upgrade_Verification_Test11\n [Documentation] CBISDEV-4287 Automation Test for Reinstall NCS manager operation with this script 'install_cbis_manager.py'\n [Tags] production post_upgrade\n [Timeout] 30m\n Check_NCS_Manager_Reinstall", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test11", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c0bb4329-e9a3-449f-9b78-84dc704b14ff", "code": "Post_Upgrade_Verification_Test12\n [Documentation] NCSDEV-9167 give warning on 0.0.0.0 listening addresses in ncs\n [Tags] production post_upgrade\n check.Check if sshd listen On Wildcard", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test12", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dc2e9a0d-465c-48f7-886b-ed14dfb4d55b", "code": "Post_Upgrade_Verification_Test13\n [Documentation] NCSDEV-9880 Tests that after upgrade all integers are integers and not changed to strings\n [Tags] production post_upgrade\n check.validate_integer_instead_of_strings", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test13", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a5e97f43-00b4-4ae2-8bc6-b0206b87ec1d", "code": "Post_Upgrade_Verification_Test14\n\t[Documentation] NCSDEV-10582, check the ncs helm 3 does not work as ncs-administrator without sudo\n [Tags] production post_upgrade\n helm.check_the_ncs_helm3", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test14", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "43c6dc1a-f5b5-40e0-ad3d-87a1c652c389", "code": "Post_Upgrade_Verification_Test15\n\t[Documentation] NCSDEV-12815, Checks on all managers that aide file has been updated to aide.db.gz and aide.db.new.gz is not exist\n [Tags] production post_upgrade\n Check_aide_file", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test15", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "767ad642-d530-4674-8a4a-3e0f3f73411a", "code": "Post_Upgrade_Verification_Test16\n\t[Documentation] NCSDEV-13474, verify selinux permissions on files /opt/cni(/.*)\n\t[Tags] production post_upgrade\n\tCheck_selinux_perm_in_all_master_nodes", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test16", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c904bde7-58ea-499d-80d7-fddda2092d05", "code": "Post_Upgrade_Verification_Test17\n\t[Documentation] NCSDEV-14429, verify kombu package version is higher than 5.3.3\n\t[Tags] production post_upgrade\n\ttest_check_kombu_package_version", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test17", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "71e1852d-a60f-48d8-ba96-bfe6803a626d", "code": "Post_Upgrade_Verification_Test18\n\t[Documentation] NCSDEV-14440, check that above rhel7 and NCS24.11 above sysctl params not exist\n\t[Tags] production post_upgrade\n\tCheck_above_RHEL7_sysctl_param_not_exist", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test18", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a1686757-158d-4332-a9a5-c02b83143318", "code": "Post_Upgrade_Verification_Test19\n\t[Documentation] Verfiy all central nodes has 1 osd\n\t[Tags] production post_upgrade\n check_central_nodes_osds", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test19", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7129f5f4-2e61-47a7-8ca8-ceedaceecb60", "code": "Post_Upgrade_Verification_Test20\n [Documentation] NCSDEV-14718, check that post upgrade there is No operations with Partial status\n\t[Tags] production post_upgrade\n\ttest_post_upgrade_operation_statuses", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test20", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b78ce4d5-a5b7-4af3-b282-79544899fc77", "code": "Post_Upgrade_Verification_Test21\n [Documentation] NCSDEV-14784, check grub parameters exist and that disk labels not changed during upgrade\n [Tags] production post_upgrade\n test_disk_sync_in_grub_params", "settings": "{}", "variables": "{}", "name": "Post_Upgrade_Verification_Test21", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "de07e859-7b3a-4ac1-8faa-4402f8956a3f", "code": "postcase\n\t[Documentation] Check cluster status after the case, e.g verify all the pods running\n\tcheck.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCS_Post_Upgrade_Verification_tests.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "1f144ae9-a286-4f2e-b401-b2f4cb059517", "code": "*** Settings ***\nDocumentation The test checks a couple of tests:\n ... 1. Verify that password stored by CM can not read by others\n ... 2. Verify that /opt/install/data/cbis-clusters/ not readable for others.\n ... 3. Verify that permission for /opt/install/temp_files/ is cbis-admin for group, and nginx user for owner.\nForce Tags ncsrndci\nTest Timeout 10 min\nResource ../../resource/middleware.robot\nResource ../../resource/setup.robot\nResource ../../resource/common.robot\nResource ../../resource/config.robot\nSuite Setup Setup Env\nSuite Teardown Teardown Env\n\n*** Test Cases ***\nprecase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n setup.Precase_setup\n setup.ncm_rest_api_login\n\nprerequisites\n\t${is_baremetal_installation}= config.is_baremetal_installation\n Skip If \"${is_baremetal_installation}\"==\"${FALSE}\" only in baremetal installation\n ${is_24.11_and_greater}= config.is_current_NCS_sw_build_greater_than cbis-24.11.0 137\n Set Suite Variable ${S_IS_NCS24.11} ${is_24.11_and_greater}\n\ncheck_config_files_are_not_readable\n\t${is_NCS25_7}= config.is_NCS_25_7\n ${cmd1} = Set Variable find /opt/install/data/cbis-clusters/\n ${cmd2} = Set Variable grep -E \"json$|yml$|yaml$\"\n ${cmd3} = Set Variable xargs ls -l\n ${cmd4} = Set Variable grep -v \"\\\\-\\\\-\\\\-.\"\n ${list_world_readable_files} = Run Keyword If ${is_NCS25_7} Set Variable ${cmd1} | ${cmd2}\n ... ELSE Set Variable ${cmd1} | ${cmd2} | ${cmd3} | ${cmd4}\n ${readable_cbis_cluster_files} = Run Command On Manage Return String ${list_world_readable_files} 1\n ${readable_files_list} Split To Lines ${readable_cbis_cluster_files}\n # remove all the files with \"Permission denied\"\n ${readable_cbis_cluster_files} Create List\n FOR ${readable_file} IN @{readable_files_list}\n \t${is_permission_denied} Run Keyword And Return Status Should Match Regexp ${readable_file} Permission denied\n \tRun Keyword If ${is_permission_denied}==${False} Append To List ${readable_cbis_cluster_files} ${readable_file}\n END\n Should Be Empty ${readable_cbis_cluster_files} files in /opt/install/data/cbis-clusters/ readable for others\n\ncheck_config_files_owners\n\tSkip If not ${S_IS_NCS24.11} This case is supported for ncs24.11 and above\n ${path_to_check} Set Variable /opt/install/temp_files/\n ${conn} ssh.open_connection_to_deployment_server\n\t${cmd_for_nginx_user} Set Variable sudo podman top cbis-manager_nginx huser user | grep nginx | head -n 1 | awk '{print \\$1}'\n\t${nginx_user_name} ssh.send_command ${conn} ${cmd_for_nginx_user}\n ${current_owner} get_file_permission ${conn} ${path_to_check} %U\n ${is_nginx_user} Run Keyword And Return Status Should Be Equal As Strings ${current_owner} ${nginx_user_name}\n ${is_UNKNOWN_user} Run Keyword If not ${is_nginx_user} Run Keyword And Return Status Should Be Equal As Strings ${current_owner} UNKNOWN\n ... ELSE Set Variable ${False}\n ssh.close_connection ${conn}\n Run Keyword If ${is_UNKNOWN_user} Run Keyword And Warn On Failure Fail the owner of ${path_to_check} is UNKNOWN user [UNKONWN is user id that is unkonwn to the host]\n\ncheck_config_files_groups\n\tSkip If not ${S_IS_NCS24.11} This case is supported for ncs24.11 and above\n ${path_to_check} Set Variable /opt/install/temp_files/\n ${conn} ssh.open_connection_to_deployment_server\n ${current_group} get_file_permission ${conn} ${path_to_check} %G\n Should Be Equal As Strings ${current_group} cbis-admin\n ssh.close_connection ${conn}\n\ncheck_get_cm_data_can_not_be_used_by_anybody\n ${cmd1} = Set Variable\n ... /usr/lib/python3.6/site-packages/cmframework/bin/get_cm_data > /tmp/empty_cmdata;\n ${cmd2} = Set Variable grep \"linux_cbisadmin_password\" /tmp/*cmdata;\n ${cmd3} = Set Variable rm -rf /tmp/*cmdata\n ${password_in_cmdata} = Set Variable ${cmd1}${cmd2}${cmd3}\n\n ${manager_cluster_name} = get_management_cluster_name\n ${inventory} = get_inventory_dict ${manager_cluster_name}\n ${managers} = get_manager_node_list ${inventory}\n ${random_manager_node} = Evaluate\n ... random.choice(${managers}) modules=random\n\n ${rv} = Run Command On Nodes Return String ${random_manager_node} ${password_in_cmdata}\n Should Not Contain ${rv} linux_cbisadmin_password\n\npostcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n setup.suite_cleanup\n\n\n*** Keywords ***\nget_file_permission\n\t[Arguments] ${conn} ${path_to_file} ${format}\n ${cmd} Set Variable sudo stat -c \"${format}\" ${path_to_file}\n ${result} ssh.send_command ${conn} ${cmd}\n ${result} Strip String ${result}\n [Return] ${result}\n", "name": "suites/rnd/NCSFM_2030_security_cm_data_permission.robot", "imports_file_locations": "{'../../resource/middleware.robot': 'resource/middleware.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/common.robot': 'resource/common.robot', '../../resource/config.robot': 'resource/config.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cf288f25-d35b-4af1-885e-9014a12bd7d3", "code": "precase_ncm_rest_api_login\n [Documentation] NCM rest api login needed to access the api in coming robot test cases\n setup.Precase_setup\n setup.ncm_rest_api_login", "settings": "{}", "variables": "{}", "name": "precase_ncm_rest_api_login", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "257f791b-4fd8-4dea-9085-3485bc6cdaa5", "code": "prerequisites\n\t${is_baremetal_installation}= config.is_baremetal_installation\n Skip If \"${is_baremetal_installation}\"==\"${FALSE}\" only in baremetal installation\n ${is_24.11_and_greater}= config.is_current_NCS_sw_build_greater_than cbis-24.11.0 137\n Set Suite Variable ${S_IS_NCS24.11} ${is_24.11_and_greater}", "settings": "{}", "variables": "{}", "name": "prerequisites", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dbe3fe24-c2ff-4ae6-8c21-af3c3f8252b3", "code": "check_config_files_are_not_readable\n\t${is_NCS25_7}= config.is_NCS_25_7\n ${cmd1} = Set Variable find /opt/install/data/cbis-clusters/\n ${cmd2} = Set Variable grep -E \"json$|yml$|yaml$\"\n ${cmd3} = Set Variable xargs ls -l\n ${cmd4} = Set Variable grep -v \"\\\\-\\\\-\\\\-.\"\n ${list_world_readable_files} = Run Keyword If ${is_NCS25_7} Set Variable ${cmd1} | ${cmd2}\n ... ELSE Set Variable ${cmd1} | ${cmd2} | ${cmd3} | ${cmd4}\n ${readable_cbis_cluster_files} = Run Command On Manage Return String ${list_world_readable_files} 1\n ${readable_files_list} Split To Lines ${readable_cbis_cluster_files}\n # remove all the files with \"Permission denied\"\n ${readable_cbis_cluster_files} Create List\n FOR ${readable_file} IN @{readable_files_list}\n \t${is_permission_denied} Run Keyword And Return Status Should Match Regexp ${readable_file} Permission denied\n \tRun Keyword If ${is_permission_denied}==${False} Append To List ${readable_cbis_cluster_files} ${readable_file}\n END\n Should Be Empty ${readable_cbis_cluster_files} files in /opt/install/data/cbis-clusters/ readable for others", "settings": "{}", "variables": "{}", "name": "check_config_files_are_not_readable", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b082cf4d-9f11-454c-a000-86219419ebdd", "code": "check_config_files_owners\n\tSkip If not ${S_IS_NCS24.11} This case is supported for ncs24.11 and above\n ${path_to_check} Set Variable /opt/install/temp_files/\n ${conn} ssh.open_connection_to_deployment_server\n\t${cmd_for_nginx_user} Set Variable sudo podman top cbis-manager_nginx huser user | grep nginx | head -n 1 | awk '{print \\$1}'\n\t${nginx_user_name} ssh.send_command ${conn} ${cmd_for_nginx_user}\n ${current_owner} get_file_permission ${conn} ${path_to_check} %U\n ${is_nginx_user} Run Keyword And Return Status Should Be Equal As Strings ${current_owner} ${nginx_user_name}\n ${is_UNKNOWN_user} Run Keyword If not ${is_nginx_user} Run Keyword And Return Status Should Be Equal As Strings ${current_owner} UNKNOWN\n ... ELSE Set Variable ${False}\n ssh.close_connection ${conn}\n Run Keyword If ${is_UNKNOWN_user} Run Keyword And Warn On Failure Fail the owner of ${path_to_check} is UNKNOWN user [UNKONWN is user id that is unkonwn to the host]", "settings": "{}", "variables": "{}", "name": "check_config_files_owners", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "bedbfbac-2784-4121-8c82-d354e04ea4bc", "code": "check_config_files_groups\n\tSkip If not ${S_IS_NCS24.11} This case is supported for ncs24.11 and above\n ${path_to_check} Set Variable /opt/install/temp_files/\n ${conn} ssh.open_connection_to_deployment_server\n ${current_group} get_file_permission ${conn} ${path_to_check} %G\n Should Be Equal As Strings ${current_group} cbis-admin\n ssh.close_connection ${conn}", "settings": "{}", "variables": "{}", "name": "check_config_files_groups", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "511b8067-ec64-467b-9537-d14f0a83639e", "code": "check_get_cm_data_can_not_be_used_by_anybody\n ${cmd1} = Set Variable\n ... /usr/lib/python3.6/site-packages/cmframework/bin/get_cm_data > /tmp/empty_cmdata;\n ${cmd2} = Set Variable grep \"linux_cbisadmin_password\" /tmp/*cmdata;\n ${cmd3} = Set Variable rm -rf /tmp/*cmdata\n ${password_in_cmdata} = Set Variable ${cmd1}${cmd2}${cmd3}\n\n ${manager_cluster_name} = get_management_cluster_name\n ${inventory} = get_inventory_dict ${manager_cluster_name}\n ${managers} = get_manager_node_list ${inventory}\n ${random_manager_node} = Evaluate\n ... random.choice(${managers}) modules=random\n\n ${rv} = Run Command On Nodes Return String ${random_manager_node} ${password_in_cmdata}\n Should Not Contain ${rv} linux_cbisadmin_password", "settings": "{}", "variables": "{}", "name": "check_get_cm_data_can_not_be_used_by_anybody", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7b7b36a3-e358-4e4a-abe9-0219734c9268", "code": "postcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n setup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "55118f8b-4f7e-41ad-a733-82272a855dba", "code": "get_file_permission\n\t[Arguments] ${conn} ${path_to_file} ${format}\n ${cmd} Set Variable sudo stat -c \"${format}\" ${path_to_file}\n ${result} ssh.send_command ${conn} ${cmd}\n ${result} Strip String ${result}", "settings": "{}", "variables": "{}", "name": "get_file_permission", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM_2030_security_cm_data_permission.robot" }, { "element_type": "resource", "project_name": "NCS", "uuid": "a22da8a8-a673-4d97-a75a-b917bbddf11a", "code": "*** Settings ***\n\nDocumentation NCSFM-8345 - CBIS_NCS_Automation_Tools\n... Validate ceph osd tree\n... Check 1: Roots fast and default or common exist and not empty\n... Check 2: The devices from ceph volume equel to devices of user input\n... Check 3: The hosts in user_config file equal to hosts in ceph osd tree\n\nLibrary Collections\nLibrary String\nLibrary BuiltIn\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/node.robot\nResource ../../resource/ceph.robot\n\n#Suite Setup Setup\n#Suite Teardown TearDown\n\n*** Variables ***\n## The following vairebles config in Setup\n#${S_CEPH_TREE} = list of nodes in ceph ods tree\n#${S_CLUSTER_NAME} = cluster name\n#${S_USER_CONFIG_FILE_NAME} = path to user_config.yaml\n#${S_PROVISION_PATH} = path to provision-inv.json\n\n#*** Test Cases ***\n#Check Roots Exist\n# check_roots_exist_test\n#\n#Check UC Hosts Equal CephOsdTree Hosts\n# check_userConfig_hosts_eq_cephTree_hosts_test\n#\n#Check Devices In CephOsdTree\n# check_devices_in_cephTree_test\n\n\n*** Keywords ***\nSetup\n setup.suite_setup\n setup.precase_setup\n NCSFM-8345_Check_Ceph_Fast_Pool.internal_check_prereqs ### internal_check_prereqs and internal_check_if_case_is_valid can be run before\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n ${conn}= ssh.Open_connection_to_controller\n Set Suite Variable ${S_CONN} ${conn}\n\n ${cluster_name} config.get_ncs_cluster_name\n ${osdtree} ceph.osd_tree_dict\n ${list_nodes} Get From Dictionary ${osdtree} nodes\n Log ${list_nodes}\n\n Set Suite Variable ${S_CEPH_TREE} ${list_nodes}\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n Set Suite Variable ${S_USER_CONFIG_PATH} /opt/install/data/cbis-clusters/${S_CLUSTER_NAME}/user_config.yaml\n Set Suite Variable ${S_PROVISION_PATH} /opt/install/data/cbis-clusters/${S_CLUSTER_NAME}/provision-inv.json\n\nTearDown\n [Documentation] Cleanup any possible object this robot suite might have created\n ssh.close_connection ${S_CONN}\n Run Keyword If ${S_IS_CENTRAL}==${True} ssh.close_connection ${S_DEPL_CONN}\n setup.suite_teardown\n\ninternal_check_prereqs\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n # Check if the env is config5\n ${is_central}= Is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n IF ${is_central} == ${True}\n ${depl_conn}= ssh.open_connection_to_deployment_server\n Set Suite Variable ${S_DEPL_CONN} ${depl_conn}\n END\n\n # Check ceph health\n ${ceph_health} ceph.health\n Should Be Equal ${ceph_health} HEALTH_OK\n\n# ====== ceph volume kewords ======\n\nGet devices from ceph volume\n [Documentation] Get list of devices by host name and osd id from command ceph-volume...\n [Arguments] ${host} ${osd_id}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${int_prov_ip}= node.get_node_provisioning_network_ip ${host} ${S_CLUSTER_NAME}\n ${conn} ssh.open_connection_to_node ${int_prov_ip}\n ${output}= send_command ${conn} sudo ceph-volume lvm list --format=json\n Log ${output}\n\n ${dict_conv_output} Convert Json To Dict ${output}\n Log ${dict_conv_output}\n ${osd_list} Get From Dictionary ${dict_conv_output} ${osd_id} # get the list of osd according '${osd_id}' key\n ${devices} Get From Dictionary ${osd_list[0]} devices # get list of devices\n ssh.close_connection ${conn}\n [Return] ${devices}\n\nGet osd from ceph volume\n [Documentation] Get list of osds id from command ceph-volume...\n [Arguments] ${host}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${int_prov_ip}= node.get_node_provisioning_network_ip ${host} ${S_CLUSTER_NAME}\n Fail\n ${conn} ssh.open_connection_to_node ${int_prov_ip}\n ${output}= send_command ${conn} sudo ceph-volume lvm list --format=json\n Log ${output}\n\n ${dict_conv_output} Convert Json To Dict ${output}\n Log ${dict_conv_output}\n ${osds} Get Dictionary Keys ${dict_conv_output}\n [Return] ${osds}\n\n# ====== test cases kewords ======\n\ncheck_roots_exist_test\n [Documentation] Check if all the roots exist and not empty\n\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n ${roots_ids} Get roots ids from ceph tree\n ${count_roots} Get Length ${roots_ids}\n ${is} Is_fast_pool_enable\n\n IF ${is}==${True}\n ${fast_exist} Check root exist fast\n ${common_exist} Check root exist common\n Should Be Equal As Integers ${count_roots} 2\n IF ${fast_exist} and ${common_exist}\n FOR ${root_id} IN @{roots_ids}\n ${children} Get Children Names From Ceph Tree ${root_id}\n Should Not Be Empty ${children} The root is empty\n END\n ELSE\n Fail one of the roots not exsit\n END\n ELSE\n ${default_exist} Check Root Exist default\n Should Be Equal As Integers ${count_roots} 1\n IF ${default_exist}\n ${children} Get Children Names From Ceph Tree ${roots_ids[0]}\n Should Not Be Empty ${children} The root default is empty\n ELSE\n Fail The root default not exist\n END\n END\n\ncheck_userConfig_hosts_eq_cephTree_hosts_test\n [Documentation] Check if the hosts according by hosts groups with fast pool in user_config.yaml\n ... compare to hosts in ceph osd tree\n\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n # ======= If fast pool enable, Check the fast root ========\n ${is} Is_fast_pool_enable\n IF ${is}==${True}\n ${groups} Get Host Groups With Fast_pool\n ${hosts_userConfig} Create List # accorfing user_config file\n ${fast_root} Get Dict By Name From Ceph Tree fast\n ${fast_root_id} Get From Dictionary ${fast_root} id\n ${hosts_cephTree} Get Children Names From Ceph Tree ${fast_root_id}\n Should Not Be Empty ${hosts_cephTree} the root fast is empty\n\n # get hosts according the hosts groups in user_config_file\n FOR ${group} IN @{groups}\n ${hosts} Get Hosts By Group ${group}\n FOR ${host} IN @{hosts}\n Append To List ${hosts_userConfig} ${host}\n END\n END\n Log ${hosts_userConfig}\n Log ${hosts_cephTree}\n\n # compare between hosts from ceph osd tree and hosts from user config\n FOR ${host} IN @{hosts_cephTree}\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n Should Contain ${hosts_userConfig} ${host}\n END\n END\n\n # ======= Check the defalut root ========\n ${groups} Get host groups without fast_pool\n ${hosts_userConfig} Create List # accorfing user_config file\n ${root} Run Keyword If ${is}==${True}\n ... Get Dict By Name From Ceph Tree common\n ... ELSE Get Dict By Name From Ceph Tree default\n ${root_id} Get From Dictionary ${root} id\n ${hosts_cephTree} Get Children Names From Ceph Tree ${root_id}\n Should Not Be Empty ${hosts_cephTree} the root default or common is empty\n\n # get hosts according the hosts groups in user_config_file\n FOR ${group} IN @{groups}\n ${hosts} Get Hosts By Group ${group}\n FOR ${host} IN @{hosts}\n Append To List ${hosts_userConfig} ${host}\n END\n END\n Log ${hosts_userConfig}\n Log ${hosts_cephTree}\n\n # compare between hosts from ceph osd tree and hosts from user config\n FOR ${host} IN @{hosts_cephTree}\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n Should Contain ${hosts_userConfig} ${host}\n END\n\ncheck_devices_in_cephTree_test\n [Documentation] Check if the devices from osd tree equal to devices from user config\n\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n # ======= If fast pool enable, Check the fast root ========\n ${is_enabled} Is_fast_pool_enable\n IF ${is_enabled}==${True}\n\n ${fast_root} Get Dict By Name From Ceph Tree fast\n ${fast_root_id} Get From Dictionary ${fast_root} id\n ${hosts_ids} Get children ids from ceph tree ${fast_root_id}\n Should Not Be Empty ${hosts_ids} the root fast is empty\n ${devices_cephTree} Create List # save the devices according to osds in the host in ceph tree\n\n # get from every host the osd from ceph osd tree\n FOR ${host_id} IN @{hosts_ids}\n ${host} Get Dict By Id From Ceph Tree ${host_id}\n ${host_name} Get From Dictionary ${host} name\n Log ${host_name}\n ${children_ids} Get Children Ids From Ceph Tree ${host_id}\n Log ${children_ids}\n FOR ${osd_id} IN @{children_ids}\n ${osd_id} Evaluate \"${osd_id}\"\n ${devices} Get Devices From Ceph Volume ${host_name} ${osd_id}\n # get the devices from osd to list \"devices_cephTree\"\n FOR ${device} IN @{devices}\n Run Keyword If '${device}' not in @{devices_cephTree} Append To List ${devices_cephTree} ${device}\n END\n END\n ${devices_dict} Get Devices From User Config ${host_name} ${True}\n ${devices_userCon} Get From Dictionary ${devices_dict} fast_pool_devices\n Log ${devices_cephTree}\n Log ${devices_userCon}\n FOR ${device} IN @{devices_cephTree}\n Should Contain ${devices_userCon} ${device}\n END\n END\n END\n\n # ======= Check the defalut root ========\n ${root} Run Keyword If ${is_enabled}==${True}\n ... Get Dict By Name From Ceph Tree common\n ... ELSE Get Dict By Name From Ceph Tree default\n ${root_id} Get From Dictionary ${root} id\n ${hosts_ids} Get Children ids From Ceph Tree ${root_id}\n Should Not Be Empty ${hosts_ids} the root default or common is empty\n\n # get from every host the osd from ceph osd tree\n ${devices_cephTree} Create List\n FOR ${host_id} IN @{hosts_ids}\n ${host} Get Dict By Id From Ceph Tree ${host_id}\n ${host_name} Get From Dictionary ${host} name\n Log ${host_name}\n ${children_ids} Get Children Ids From Ceph Tree ${host_id}\n Log ${children_ids}\n FOR ${osd_id} IN @{children_ids}\n ${osd_id} Evaluate \"${osd_id}\"\n ${devices} Get Devices From Ceph Volume ${host_name} ${osd_id}\n # get the devices from osd to list \"devices_cephTree\"\n FOR ${device} IN @{devices}\n Run Keyword If '${device}' not in @{devices_cephTree} Append To List ${devices_cephTree} ${device}\n END\n END\n\n ${devices_dict} Get Devices From User Config ${host_name}\n ${devices_userCon} Get From Dictionary ${devices_dict} devices\n Log ${devices_cephTree}\n Log ${devices_userCon}\n FOR ${device} IN @{devices_cephTree}\n Should Contain ${devices_userCon} ${device}\n END\n END\n\n# ====== user_config kewords ======\n\nGet host groups with fast_pool\n [Documentation] Get all the host groups with key enable_fast_pool and the value is \"true\"\n ... The data from user_config file\n\n ${groups} Create List\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n\n # in hostGroup_config, for every host groups,\n # check if the key \"enable_fast_pool\" exist\n FOR ${hostGroup_key} IN @{hostGroup_config}\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup_key}\n ${hostGroup_dict_keys} Get Dictionary Keys ${hostGroup_dict}\n Log ${hostGroup_dict_keys}\n\n IF 'enable_fast_pool' in @{hostGroup_dict_keys}\n ${is_enable} Get From Dictionary ${hostGroup_dict} enable_fast_pool\n Run Keyword If ${is_enable}==${True} Append To List ${groups} ${hostGroup_key}\n END\n END\n [Return] ${groups}\n\nGet host groups without fast_pool\n [Documentation] Get all the host groups with devices without fast_pool (the host group can be contain devices with fast pool)\n ... The data from user_config file\n\n ${groups} Create List\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n\n # in hostGroup_config, for every host groups,\n # check if the key \"enable_fast_pool\" exist and devices that not fast pool exist\n FOR ${hostGroup_key} IN @{hostGroup_config}\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup_key}\n ${hostGroup_dict_keys} Get Dictionary Keys ${hostGroup_dict}\n Log ${hostGroup_dict_keys}\n\n IF 'enable_fast_pool' in @{hostGroup_dict_keys}\n ${is_group_enable} Get From Dictionary ${hostGroup_dict} enable_fast_pool\n ${hosts} Get Hosts By Group ${hostGroup_key}\n FOR ${host} IN @{hosts}\n &{devices_dict} Get devices from user config ${host} ${is_group_enable}\n @{devices} Get From Dictionary ${devices_dict} devices\n ${is_contain_devices} Run Keyword And Return Status\n ... Should Not Be Empty ${devices} the host group not contain devices\n ${is_exist} Run Keyword And Return Status Should Contain Match ${groups} ${hostGroup_key}\n Run Keyword If ${is_contain_devices}==${True} and ${is_exist}==${False} Append To List ${groups} ${hostGroup_key}\n END\n END\n END\n [Return] ${groups}\n\nGet all host groups\n [Documentation] Get all the host groups with key enable_fast_pool\n ... The data from user_config file\n\n ${groups} Create List\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n\n # in hostGroup_config, for every host groups,\n # check if the key \"enable_fast_pool\" exist\n FOR ${hostGroup_key} IN @{hostGroup_config}\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup_key}\n ${hostGroup_dict_keys} Get Dictionary Keys ${hostGroup_dict}\n Log ${hostGroup_dict_keys}\n\n IF 'enable_fast_pool' in @{hostGroup_dict_keys}\n Append To List ${groups} ${hostGroup_key}\n END\n END\n [Return] ${groups}\n\nis_fast_pool_enable\n [Documentation] Return true if we have hosts group with ceph fast pool\n\n ${groups} Get Host Groups With Fast_pool\n Return From Keyword If ${groups} ${True}\n [Return] ${False}\n\nGet devices from user config\n [Documentation] Get dictionary of devices and fast_pool_devices by host name from user config (=input from user)\n [Arguments] ${host} ${fast_pool_enabled}=${False}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${hostGroup} Get Group By Host ${host}\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup}\n\n ${devices_dict} Create Dictionary\n ${storage_config} Get From Dictionary ${hostGroup_dict} storage_config\n # get the devices according if fast pool enable\n IF ${fast_pool_enabled}\n ${fast_pool_devices} Get From Dictionary ${hostGroup_dict} fast_pool_device\n Log ${fast_pool_devices}\n Set To Dictionary ${devices_dict} fast_pool_devices ${fast_pool_devices}\n END\n ${storage_config} Get From Dictionary ${storage_config} ceph\n ${storage_config} Get From Dictionary ${storage_config} profile\n ${storage_config} Get From Dictionary ${storage_config} params\n ${osds} Get From Dictionary ${storage_config} osds\n ${devices} Get From Dictionary ${osds} devices\n Log ${devices}\n\n ${devices_dict} Set To Dictionary ${devices_dict} devices ${devices}\n [Return] ${devices_dict}\n\n# ===== ceph osd tree keywords ======\n\nGet dict by id from ceph tree\n [Documentation] Get first dictionary by the key \"id\"\n ... from ceph osd tree\n [Arguments] ${id}\n\n FOR ${node} IN @{S_CEPH_TREE}\n ${id_from_list} Get From Dictionary ${node} id\n Return From Keyword If ${id_from_list}==${id} ${node}\n END\n Log The id ${id} not found in the list of nodes\n\nGet dict by name from ceph tree\n [Documentation] Get the first dictionary by the key \"name\"\n ... from ceph osd tree\n [Arguments] ${name_node}\n\n FOR ${node} IN @{S_CEPH_TREE}\n ${name} Get From Dictionary ${node} name\n Return From Keyword If \"${name}\" in \"${name_node}\" ${node}\n END\n Log The name ${name_node} not found in the list of nodes\n\nGet roots ids from ceph tree\n [Documentation] Get list of roots ids, from ceph osd tree\n\n ${list} Create List\n FOR ${dict} IN @{S_CEPH_TREE}\n ${type} Get From Dictionary ${dict} type\n ${id} Get From Dictionary ${dict} id\n Run Keyword If \"${type}\"==\"root\" Append To List ${list} ${id}\n END\n Log ${list}\n [Return] ${list}\n\nGet children names from ceph tree\n [Documentation] Get names of children of specific host name from ceph osd tree\n [Arguments] ${host_id}\n\n ${names} Create List\n ${father_node} Get Dict By Id From Ceph Tree ${host_id}\n IF ${father_node}!=${None}\n ${children} Get From Dictionary ${father_node} children\n\n FOR ${id} IN @{children}\n ${son_node} Get dict by id from ceph tree ${id}\n ${name_of_child} Get From Dictionary ${son_node} name\n Append to List ${names} ${name_of_child}\n END\n END\n [Return] ${names}\n\nGet children ids from ceph tree\n [Documentation] Get ids of children of specific host name from ceph osd tree\n [Arguments] ${host_id}\n\n ${ids} Create List\n ${father_node} Get Dict By Id From Ceph Tree ${host_id}\n IF ${father_node}!=${None}\n ${ids} Get From Dictionary ${father_node} children\n END\n [Return] ${ids}\n\nCheck root exist\n [Documentation] Check if root exist, the keyword get name of root\n [Arguments] ${root_name}\n\n FOR ${dict} IN @{S_CEPH_TREE}\n ${type} Get From Dictionary ${dict} type\n IF \"${type}\"==\"root\"\n ${name} Get From Dictionary ${dict} name\n Return From Keyword If \"${name}\"==\"${root_name}\" ${True}\n END\n END\n [Return] ${False}\n\n# ===== provision-inv kewords ======\n\nGet Hosts by Group\n [Documentation] Get hosts by the host group from file \"provision-inv.json\"\n [Arguments] ${group}\n\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_PROVISION_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_PROVISION_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Json To Dict ${output}\n Log ${dict_conv_output}\n ${group} Evaluate \"${group}\"+\"-hostgroup\"\n Log ${group}\n ${group_dict} Get From Dictionary ${dict_conv_output} ${group} # if the keywords fail its mean the host group not exsit in provision_inv file\n ${hosts} Get From Dictionary ${group_dict} hosts\n [Return] ${hosts}\n\nGet Group by Host\n [Documentation] Get host group by the host\n [Arguments] ${host}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${groups} Get All Host Groups\n FOR ${group} IN @{groups}\n ${hosts} Get Hosts By Group ${group}\n Return From Keyword If '${host}' in @{hosts} ${group}\n END\n\n Log The host not found in any host group", "name": "suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/ceph.robot': 'resource/ceph.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "640c1953-b02c-4dad-89e9-6172014d1da9", "code": "Setup\n setup.suite_setup\n setup.precase_setup\n NCSFM-8345_Check_Ceph_Fast_Pool.internal_check_prereqs ### internal_check_prereqs and internal_check_if_case_is_valid can be run before\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n ${conn}= ssh.Open_connection_to_controller\n Set Suite Variable ${S_CONN} ${conn}\n\n ${cluster_name} config.get_ncs_cluster_name\n ${osdtree} ceph.osd_tree_dict\n ${list_nodes} Get From Dictionary ${osdtree} nodes\n Log ${list_nodes}\n\n Set Suite Variable ${S_CEPH_TREE} ${list_nodes}\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n Set Suite Variable ${S_USER_CONFIG_PATH} /opt/install/data/cbis-clusters/${S_CLUSTER_NAME}/user_config.yaml\n Set Suite Variable ${S_PROVISION_PATH} /opt/install/data/cbis-clusters/${S_CLUSTER_NAME}/provision-inv.json", "settings": "{}", "variables": "{}", "name": "Setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "29f986fb-3886-4149-9b41-5c85a343c416", "code": "TearDown\n [Documentation] Cleanup any possible object this robot suite might have created\n ssh.close_connection ${S_CONN}\n Run Keyword If ${S_IS_CENTRAL}==${True} ssh.close_connection ${S_DEPL_CONN}\n setup.suite_teardown", "settings": "{}", "variables": "{}", "name": "TearDown", "documentation": "ssh.close_connection ${S_CONN}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "284818c1-cf10-4069-88a9-222267d37afa", "code": "internal_check_prereqs\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n # Check if the env is config5\n ${is_central}= Is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n IF ${is_central} == ${True}\n ${depl_conn}= ssh.open_connection_to_deployment_server\n Set Suite Variable ${S_DEPL_CONN} ${depl_conn}\n END\n\n # Check ceph health\n ${ceph_health} ceph.health\n Should Be Equal ${ceph_health} HEALTH_OK\n\n# ====== ceph volume kewords ======", "settings": "{}", "variables": "{}", "name": "internal_check_prereqs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8a62a985-f6fb-46cb-a960-2563f347fb5d", "code": "Get devices from ceph volume\n [Documentation] Get list of devices by host name and osd id from command ceph-volume...\n [Arguments] ${host} ${osd_id}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${int_prov_ip}= node.get_node_provisioning_network_ip ${host} ${S_CLUSTER_NAME}\n ${conn} ssh.open_connection_to_node ${int_prov_ip}\n ${output}= send_command ${conn} sudo ceph-volume lvm list --format=json\n Log ${output}\n\n ${dict_conv_output} Convert Json To Dict ${output}\n Log ${dict_conv_output}\n ${osd_list} Get From Dictionary ${dict_conv_output} ${osd_id} # get the list of osd according '${osd_id}' key\n ${devices} Get From Dictionary ${osd_list[0]} devices # get list of devices\n ssh.close_connection ${conn}\n [Return] ${devices}\n\nGet osd from ceph volume\n [Documentation] Get list of osds id from command ceph-volume...\n [Arguments] ${host}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${int_prov_ip}= node.get_node_provisioning_network_ip ${host} ${S_CLUSTER_NAME}\n Fail\n ${conn} ssh.open_connection_to_node ${int_prov_ip}\n ${output}= send_command ${conn} sudo ceph-volume lvm list --format=json\n Log ${output}\n\n ${dict_conv_output} Convert Json To Dict ${output}\n Log ${dict_conv_output}\n ${osds} Get Dictionary Keys ${dict_conv_output}\n [Return] ${osds}\n\n# ====== test cases kewords ======", "settings": "{}", "variables": "{}", "name": "Get devices from ceph volume", "documentation": "[Arguments] ${host} ${osd_id}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "bc2d6dbe-9454-46b7-a13b-dcfeca2da9b4", "code": "check_roots_exist_test\n [Documentation] Check if all the roots exist and not empty\n\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n ${roots_ids} Get roots ids from ceph tree\n ${count_roots} Get Length ${roots_ids}\n ${is} Is_fast_pool_enable\n\n IF ${is}==${True}\n ${fast_exist} Check root exist fast\n ${common_exist} Check root exist common\n Should Be Equal As Integers ${count_roots} 2\n IF ${fast_exist} and ${common_exist}\n FOR ${root_id} IN @{roots_ids}\n ${children} Get Children Names From Ceph Tree ${root_id}\n Should Not Be Empty ${children} The root is empty\n END\n ELSE\n Fail one of the roots not exsit\n END\n ELSE\n ${default_exist} Check Root Exist default\n Should Be Equal As Integers ${count_roots} 1\n IF ${default_exist}\n ${children} Get Children Names From Ceph Tree ${roots_ids[0]}\n Should Not Be Empty ${children} The root default is empty\n ELSE\n Fail The root default not exist\n END\n END", "settings": "{}", "variables": "{}", "name": "check_roots_exist_test", "documentation": "Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d261fd82-29cf-4bb2-8387-df5c829f946b", "code": "check_userConfig_hosts_eq_cephTree_hosts_test\n [Documentation] Check if the hosts according by hosts groups with fast pool in user_config.yaml\n ... compare to hosts in ceph osd tree\n\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n # ======= If fast pool enable, Check the fast root ========\n ${is} Is_fast_pool_enable\n IF ${is}==${True}\n ${groups} Get Host Groups With Fast_pool\n ${hosts_userConfig} Create List # accorfing user_config file\n ${fast_root} Get Dict By Name From Ceph Tree fast\n ${fast_root_id} Get From Dictionary ${fast_root} id\n ${hosts_cephTree} Get Children Names From Ceph Tree ${fast_root_id}\n Should Not Be Empty ${hosts_cephTree} the root fast is empty\n\n # get hosts according the hosts groups in user_config_file\n FOR ${group} IN @{groups}\n ${hosts} Get Hosts By Group ${group}\n FOR ${host} IN @{hosts}\n Append To List ${hosts_userConfig} ${host}\n END\n END\n Log ${hosts_userConfig}\n Log ${hosts_cephTree}\n\n # compare between hosts from ceph osd tree and hosts from user config\n FOR ${host} IN @{hosts_cephTree}\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n Should Contain ${hosts_userConfig} ${host}\n END\n END\n\n # ======= Check the defalut root ========\n ${groups} Get host groups without fast_pool\n ${hosts_userConfig} Create List # accorfing user_config file\n ${root} Run Keyword If ${is}==${True}\n ... Get Dict By Name From Ceph Tree common\n ... ELSE Get Dict By Name From Ceph Tree default\n ${root_id} Get From Dictionary ${root} id\n ${hosts_cephTree} Get Children Names From Ceph Tree ${root_id}\n Should Not Be Empty ${hosts_cephTree} the root default or common is empty\n\n # get hosts according the hosts groups in user_config_file\n FOR ${group} IN @{groups}\n ${hosts} Get Hosts By Group ${group}\n FOR ${host} IN @{hosts}\n Append To List ${hosts_userConfig} ${host}\n END\n END\n Log ${hosts_userConfig}\n Log ${hosts_cephTree}\n\n # compare between hosts from ceph osd tree and hosts from user config\n FOR ${host} IN @{hosts_cephTree}\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n Should Contain ${hosts_userConfig} ${host}\n END", "settings": "{}", "variables": "{}", "name": "check_userConfig_hosts_eq_cephTree_hosts_test", "documentation": "compare to hosts in ceph osd tree", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d68a3537-af92-43dd-9ca8-e2064d3d4563", "code": "check_devices_in_cephTree_test\n [Documentation] Check if the devices from osd tree equal to devices from user config\n\n Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment\n\n # ======= If fast pool enable, Check the fast root ========\n ${is_enabled} Is_fast_pool_enable\n IF ${is_enabled}==${True}\n\n ${fast_root} Get Dict By Name From Ceph Tree fast\n ${fast_root_id} Get From Dictionary ${fast_root} id\n ${hosts_ids} Get children ids from ceph tree ${fast_root_id}\n Should Not Be Empty ${hosts_ids} the root fast is empty\n ${devices_cephTree} Create List # save the devices according to osds in the host in ceph tree\n\n # get from every host the osd from ceph osd tree\n FOR ${host_id} IN @{hosts_ids}\n ${host} Get Dict By Id From Ceph Tree ${host_id}\n ${host_name} Get From Dictionary ${host} name\n Log ${host_name}\n ${children_ids} Get Children Ids From Ceph Tree ${host_id}\n Log ${children_ids}\n FOR ${osd_id} IN @{children_ids}\n ${osd_id} Evaluate \"${osd_id}\"\n ${devices} Get Devices From Ceph Volume ${host_name} ${osd_id}\n # get the devices from osd to list \"devices_cephTree\"\n FOR ${device} IN @{devices}\n Run Keyword If '${device}' not in @{devices_cephTree} Append To List ${devices_cephTree} ${device}\n END\n END\n ${devices_dict} Get Devices From User Config ${host_name} ${True}\n ${devices_userCon} Get From Dictionary ${devices_dict} fast_pool_devices\n Log ${devices_cephTree}\n Log ${devices_userCon}\n FOR ${device} IN @{devices_cephTree}\n Should Contain ${devices_userCon} ${device}\n END\n END\n END\n\n # ======= Check the defalut root ========\n ${root} Run Keyword If ${is_enabled}==${True}\n ... Get Dict By Name From Ceph Tree common\n ... ELSE Get Dict By Name From Ceph Tree default\n ${root_id} Get From Dictionary ${root} id\n ${hosts_ids} Get Children ids From Ceph Tree ${root_id}\n Should Not Be Empty ${hosts_ids} the root default or common is empty\n\n # get from every host the osd from ceph osd tree\n ${devices_cephTree} Create List\n FOR ${host_id} IN @{hosts_ids}\n ${host} Get Dict By Id From Ceph Tree ${host_id}\n ${host_name} Get From Dictionary ${host} name\n Log ${host_name}\n ${children_ids} Get Children Ids From Ceph Tree ${host_id}\n Log ${children_ids}\n FOR ${osd_id} IN @{children_ids}\n ${osd_id} Evaluate \"${osd_id}\"\n ${devices} Get Devices From Ceph Volume ${host_name} ${osd_id}\n # get the devices from osd to list \"devices_cephTree\"\n FOR ${device} IN @{devices}\n Run Keyword If '${device}' not in @{devices_cephTree} Append To List ${devices_cephTree} ${device}\n END\n END\n\n ${devices_dict} Get Devices From User Config ${host_name}\n ${devices_userCon} Get From Dictionary ${devices_dict} devices\n Log ${devices_cephTree}\n Log ${devices_userCon}\n FOR ${device} IN @{devices_cephTree}\n Should Contain ${devices_userCon} ${device}\n END\n END\n\n# ====== user_config kewords ======", "settings": "{}", "variables": "{}", "name": "check_devices_in_cephTree_test", "documentation": "Skip If ${S_IS_BAREMETAL_INSTALLATION}==${False} The test support only with baremetal environment", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e0801c5e-28de-4e8d-a140-d50052e80557", "code": "Get host groups with fast_pool\n [Documentation] Get all the host groups with key enable_fast_pool and the value is \"true\"\n ... The data from user_config file\n\n ${groups} Create List\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n\n # in hostGroup_config, for every host groups,\n # check if the key \"enable_fast_pool\" exist\n FOR ${hostGroup_key} IN @{hostGroup_config}\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup_key}\n ${hostGroup_dict_keys} Get Dictionary Keys ${hostGroup_dict}\n Log ${hostGroup_dict_keys}\n\n IF 'enable_fast_pool' in @{hostGroup_dict_keys}\n ${is_enable} Get From Dictionary ${hostGroup_dict} enable_fast_pool\n Run Keyword If ${is_enable}==${True} Append To List ${groups} ${hostGroup_key}\n END\n END\n [Return] ${groups}\n\nGet host groups without fast_pool\n [Documentation] Get all the host groups with devices without fast_pool (the host group can be contain devices with fast pool)\n ... The data from user_config file\n\n ${groups} Create List\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n\n # in hostGroup_config, for every host groups,\n # check if the key \"enable_fast_pool\" exist and devices that not fast pool exist\n FOR ${hostGroup_key} IN @{hostGroup_config}\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup_key}\n ${hostGroup_dict_keys} Get Dictionary Keys ${hostGroup_dict}\n Log ${hostGroup_dict_keys}\n\n IF 'enable_fast_pool' in @{hostGroup_dict_keys}\n ${is_group_enable} Get From Dictionary ${hostGroup_dict} enable_fast_pool\n ${hosts} Get Hosts By Group ${hostGroup_key}\n FOR ${host} IN @{hosts}\n &{devices_dict} Get devices from user config ${host} ${is_group_enable}\n @{devices} Get From Dictionary ${devices_dict} devices\n ${is_contain_devices} Run Keyword And Return Status\n ... Should Not Be Empty ${devices} the host group not contain devices\n ${is_exist} Run Keyword And Return Status Should Contain Match ${groups} ${hostGroup_key}\n Run Keyword If ${is_contain_devices}==${True} and ${is_exist}==${False} Append To List ${groups} ${hostGroup_key}\n END\n END\n END\n [Return] ${groups}\n\nGet all host groups\n [Documentation] Get all the host groups with key enable_fast_pool\n ... The data from user_config file\n\n ${groups} Create List\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n\n # in hostGroup_config, for every host groups,\n # check if the key \"enable_fast_pool\" exist\n FOR ${hostGroup_key} IN @{hostGroup_config}\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup_key}\n ${hostGroup_dict_keys} Get Dictionary Keys ${hostGroup_dict}\n Log ${hostGroup_dict_keys}\n\n IF 'enable_fast_pool' in @{hostGroup_dict_keys}\n Append To List ${groups} ${hostGroup_key}\n END\n END\n [Return] ${groups}\n\nis_fast_pool_enable\n [Documentation] Return true if we have hosts group with ceph fast pool\n\n ${groups} Get Host Groups With Fast_pool\n Return From Keyword If ${groups} ${True}\n [Return] ${False}\n\nGet devices from user config\n [Documentation] Get dictionary of devices and fast_pool_devices by host name from user config (=input from user)\n [Arguments] ${host} ${fast_pool_enabled}=${False}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${hostGroup} Get Group By Host ${host}\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_USER_CONFIG_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_USER_CONFIG_PATH}\n Log ${output}\n ${dict_conv_output} Convert Yaml To Dict With Loader ${output}\n Log ${dict_conv_output}\n ${cbis_key} Get From Dictionary ${dict_conv_output} CBIS\n ${hostGroup_config} Get From Dictionary ${cbis_key} host_group_config\n ${hostGroup_dict} Get From Dictionary ${hostGroup_config} ${hostGroup}\n\n ${devices_dict} Create Dictionary\n ${storage_config} Get From Dictionary ${hostGroup_dict} storage_config\n # get the devices according if fast pool enable\n IF ${fast_pool_enabled}\n ${fast_pool_devices} Get From Dictionary ${hostGroup_dict} fast_pool_device\n Log ${fast_pool_devices}\n Set To Dictionary ${devices_dict} fast_pool_devices ${fast_pool_devices}\n END\n ${storage_config} Get From Dictionary ${storage_config} ceph\n ${storage_config} Get From Dictionary ${storage_config} profile\n ${storage_config} Get From Dictionary ${storage_config} params\n ${osds} Get From Dictionary ${storage_config} osds\n ${devices} Get From Dictionary ${osds} devices\n Log ${devices}\n\n ${devices_dict} Set To Dictionary ${devices_dict} devices ${devices}\n [Return] ${devices_dict}\n\n# ===== ceph osd tree keywords ======", "settings": "{}", "variables": "{}", "name": "Get host groups with fast_pool", "documentation": "The data from user_config file", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "3dbef2aa-0cb6-488e-b8f5-4e0689e7204d", "code": "Get dict by id from ceph tree\n [Documentation] Get first dictionary by the key \"id\"\n ... from ceph osd tree\n [Arguments] ${id}\n\n FOR ${node} IN @{S_CEPH_TREE}\n ${id_from_list} Get From Dictionary ${node} id\n Return From Keyword If ${id_from_list}==${id} ${node}\n END\n Log The id ${id} not found in the list of nodes", "settings": "{}", "variables": "{}", "name": "Get dict by id from ceph tree", "documentation": "from ceph osd tree", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9fb202e3-af97-44ee-816a-4cf9b9ebd071", "code": "Get dict by name from ceph tree\n [Documentation] Get the first dictionary by the key \"name\"\n ... from ceph osd tree\n [Arguments] ${name_node}\n\n FOR ${node} IN @{S_CEPH_TREE}\n ${name} Get From Dictionary ${node} name\n Return From Keyword If \"${name}\" in \"${name_node}\" ${node}\n END\n Log The name ${name_node} not found in the list of nodes", "settings": "{}", "variables": "{}", "name": "Get dict by name from ceph tree", "documentation": "from ceph osd tree", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "fa63adfd-953c-4649-bf32-4b017c6b424b", "code": "Get roots ids from ceph tree\n [Documentation] Get list of roots ids, from ceph osd tree\n\n ${list} Create List\n FOR ${dict} IN @{S_CEPH_TREE}\n ${type} Get From Dictionary ${dict} type\n ${id} Get From Dictionary ${dict} id\n Run Keyword If \"${type}\"==\"root\" Append To List ${list} ${id}\n END\n Log ${list}\n [Return] ${list}\n\nGet children names from ceph tree\n [Documentation] Get names of children of specific host name from ceph osd tree\n [Arguments] ${host_id}\n\n ${names} Create List\n ${father_node} Get Dict By Id From Ceph Tree ${host_id}\n IF ${father_node}!=${None}\n ${children} Get From Dictionary ${father_node} children\n\n FOR ${id} IN @{children}\n ${son_node} Get dict by id from ceph tree ${id}\n ${name_of_child} Get From Dictionary ${son_node} name\n Append to List ${names} ${name_of_child}\n END\n END\n [Return] ${names}\n\nGet children ids from ceph tree\n [Documentation] Get ids of children of specific host name from ceph osd tree\n [Arguments] ${host_id}\n\n ${ids} Create List\n ${father_node} Get Dict By Id From Ceph Tree ${host_id}\n IF ${father_node}!=${None}\n ${ids} Get From Dictionary ${father_node} children\n END\n [Return] ${ids}\n\nCheck root exist\n [Documentation] Check if root exist, the keyword get name of root\n [Arguments] ${root_name}\n\n FOR ${dict} IN @{S_CEPH_TREE}\n ${type} Get From Dictionary ${dict} type\n IF \"${type}\"==\"root\"\n ${name} Get From Dictionary ${dict} name\n Return From Keyword If \"${name}\"==\"${root_name}\" ${True}\n END\n END\n [Return] ${False}\n\n# ===== provision-inv kewords ======", "settings": "{}", "variables": "{}", "name": "Get roots ids from ceph tree", "documentation": "${list} Create List", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9a7ae54c-ce36-4499-bcc4-45a557dbeb50", "code": "Get Hosts by Group\n [Documentation] Get hosts by the host group from file \"provision-inv.json\"\n [Arguments] ${group}\n\n ${output} Run Keyword If ${S_IS_CENTRAL}==${False}\n ... ssh.send_command ${S_CONN} sudo cat ${S_PROVISION_PATH}\n ... ELSE ssh.send_command ${S_DEPL_CONN} sudo cat ${S_PROVISION_PATH}\n\n Log ${output}\n ${dict_conv_output} Convert Json To Dict ${output}\n Log ${dict_conv_output}\n ${group} Evaluate \"${group}\"+\"-hostgroup\"\n Log ${group}\n ${group_dict} Get From Dictionary ${dict_conv_output} ${group} # if the keywords fail its mean the host group not exsit in provision_inv file\n ${hosts} Get From Dictionary ${group_dict} hosts\n [Return] ${hosts}\n\nGet Group by Host\n [Documentation] Get host group by the host\n [Arguments] ${host}\n\n # verify the host not contain any of this: common-, fast-\n ${host} Replace String Using Regexp ${host} common- ${EMPTY}\n ${host} Replace String Using Regexp ${host} fast- ${EMPTY}\n\n ${groups} Get All Host Groups\n FOR ${group} IN @{groups}\n ${hosts} Get Hosts By Group ${group}\n Return From Keyword If '${host}' in @{hosts} ${group}\n END\n\n Log The host not found in any host group", "settings": "{}", "variables": "{}", "name": "Get Hosts by Group", "documentation": "[Arguments] ${group}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSFM-8345_Check_Ceph_Fast_Pool.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "de4828ec-55d5-48c9-b4d0-317a4f694cf7", "code": "*** Settings ***\nDocumentation TA= [NCSDEV-9992]\n ... Test steps :\n ... 1. precase steps + check reqs + cluster status\n ... 2. Create test namespace + create multus network\n ... 3. Create 2 pods on edge node and verify ping between them\n ... 4. Scale Out + Scale In / Scale In Edge node, depends if there is not Inuse IPMI address\n ... 5. Create 2 pods on new edge node\n ... 6. Do network change by creating dummy network for edge host group\n ... 7. Validate that Ping between 2 pods are working\n ... 8. Postcase cleanup + Postcase cluster status\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/namespace.robot\nResource ../../resource/pod.robot\nResource ../../resource/check.robot\nResource ../../resource/ping.robot\nResource ../../resource/network.robot\nResource ../../resource/scale.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n${C_TEST_POD_IMAGE} cent7withtools\n${C_TEST_NAMESPACE_NAME} multus-vlan\n\n*** Test Cases ***\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n # mandatory\n setup.precase_setup\n Set Suite Variable ${S_PASS} ${FALSE}\n ${ipmi_list} Get IPMI List\n Log ${ipmi_list}\n ${ipmi_addr} Get unused IPMI address ${ipmi_list}\n Set Suite Variable ${S_IPMI_ADDRESS} ${ipmi_addr}\n ${is_scale_needed} Is Scale in Needed\n Set Suite Variable ${S_SKIP_SCALE_IN} ${is_scale_needed}\n\ncheck_case_requirements\n [Documentation] Check that Multus is enable and minimum two worker nodes available\n ${pass} ${msg}= check_prereqs\n Set Suite Variable ${S_PASS} ${pass}\n Set Suite Variable ${S_MSG} ${msg}\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n check.precase_cluster_status\n\n# Step 1 -> Create new namespace + Create Networks + Attach it to edge\ncreate_namespace\n [Documentation] Create namespace for this test\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n ${namespace_name} ${namespace}= namespace.create ${C_TEST_NAMESPACE_NAME}\n Set Suite Variable ${S_NAMESPACE_NAME} robot-multus-vlan-namespace\n\ncreate_multus_network\n [Documentation] Create multus network to created namespace\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n # Get networks from configuration file and do needed convertions\n ${subnet_1}= network.get_external_caas\n ${subnet_2}= network.get_external_caas\n Log ${subnet_1}\n Log ${subnet_2}\n ${range_net_1}= network.get_range ${subnet_1}[SUBNET]\n Log ${range_net_1}\n ${range_net_2}= network.get_range ${subnet_2}[SUBNET]\n Log ${range_net_2}\n\n #Create two multus vlan networks\n ${net_1} ${net_data_1}= network.create_multus_network_attachment\n ... 1\n ... namespace=${S_NAMESPACE_NAME}\n ... gateway=${subnet_1}[GATEWAY]\n ... range=${range_net_1}\n ... vlan_id=${subnet_1}[VLAN]\n ... driver_type=ipvlan\n ... routes=${subnet_2}[SUBNET]\n\n Log ${net_1} ${net_data_1}\n\n Set Suite Variable ${S_NETWORK_NAME_1} ${net_1}\n Set Suite Variable ${S_SUBNET1_GW} ${subnet_1}[GATEWAY]\n attach_ingress_egress_network_to_edge_hostgroup ${S_NETWORK_NAME_1}\n\n# Step 2 -> Create 2 multus ipvlan pods\ncreate_pods\n [Documentation] Create basic pod to created namespace\n #Pass Execution If \"${S_PASS}\"==\"${TRUE}\" ${S_MSG}\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\n ${d}= Create Dictionary\n ... k8spspallowedusers=psp-pods-allowed-user-ranges\n ... k8spspallowprivilegeescalationcontainer=psp-allow-privilege-escalation-container\n ... k8spspseccomp=psp-seccomp\n ... k8spspcapabilities=psp-pods-capabilities\n ... k8spspreadonlyrootfilesystem=psp-readonlyrootfilesystem\n\n ${name_pod_1} ${f_pod_1}= pod.create\n ... vlan-1\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n #... node_name=${S_MULTUS_WORKER_LIST}[0]\n\n ${name_pod_2} ${f_pod_2}= pod.create\n ... vlan-2\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n #... node_name=${S_MULTUS_WORKER_LIST}[1]\n #... special_spec=is_worker true\n\n Set Suite Variable ${S_POD_NAME_1} ${name_pod_1}\n Set Suite Variable ${S_POD_DATA_1} ${f_pod_1}\n Set Suite Variable ${S_POD_NAME_2} ${name_pod_2}\n Set Suite Variable ${S_POD_DATA_2} ${f_pod_2}\n\nGet pod ip and node\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\n ${pod_data}= pod.get ${S_POD_NAME_1} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_1} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_1} ${nodeName}\n\n ${pod_data}= pod.get ${S_POD_NAME_2} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_2} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_2} ${nodeName}\n\n# Step 3 -> Verify ping is working\nVerify ping between pods\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n Verify ping between pods ${S_POD_NAME_1} ${S_POD_NAME_2} ${S_POD_IP_1} ${S_POD_IP_2} ${S_SUBNET1_GW}\n\n# Step 4 -> In Case of Unused IPMI Using it to Scale-Out new edge node\nprecase_get_scale_out_status\n [Documentation] check scale-out status and state before the scale-out.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n scale.check_if_scaleOut_active_after_api\n ${scale_out_isActive_befor_test}= ncsManagerOperations.get_cluster_bm_scale_out_isActive\n Should be equal as strings ${scale_out_isActive_befor_test} False\n\nget_Edge_Host_Group\n [Documentation] getting the Host_Group\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n ${host_group_data}= ncsManagerOperations.get_host_group_operations_bm_data\n ${host_group_data1}= Get Value From Json ${host_group_data} $.content\n Log ${host_group_data1} formatter=repr\n\n ${get_hostgroups_dictionary}= Get Value From Json ${host_group_data1}[0] $.hostgroups\n ${dict_keys} Get Dictionary Keys ${get_hostgroups_dictionary}[0]\n Log ${dict_keys}\n FOR ${hg} IN @{dict_keys}\n \t${lower_hg} Convert To Lower Case ${hg}\n \tRun Keyword If \"edge\" in \"${lower_hg}\"\n \t... \tSet Suite Variable ${S_HOST_GROUP_FOR_JSON} ${hg}\n END\n\n Set Suite Variable ${S_HOST_GROUPS_JSON_ORIG} ${get_hostgroups_dictionary}[0]\n\nget_info_and_create_json_payload\n [Documentation] construct the json payload for scale-out\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n scale.create_json_payload_for_scale_out ${S_HOST_GROUP_FOR_JSON} ${S_IPMI_ADDRESS} ${S_HOST_GROUPS_JSON_ORIG}\n\ncall_scale_out_api\n [Documentation] send the scale-out API and check the progress of the operation and wait until the process has finished.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n scale.scale_out_api_rest_call ${S_SCALE_OUT_PAYLOAD_JSON}\n\ncheck_new_node_added\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n\tLog ${S_EDGES_MULTUS_LIST}\n\t${NEW_EDGE_MULTUS_LIST} node.get_multus_edge_name_list\n\t${NEW_EDGE_NODE_NAME} get new edge node ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\tSet Suite Variable ${S_NEW_EDGE_NODE_NAME} ${NEW_EDGE_NODE_NAME}\n\tShould Not Be Equal ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\n# Scale in + Scale Out\n# Scale in edge node\nprecase_scale_in_steps\n Log ${S_EDGES_MULTUS_LIST}\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.selecting_node_for_scale_and_ipmi_address ${S_EDGES_MULTUS_LIST}\n Log ${S_SCALED_NODE_NAME},${S_SCALED_NODE_IPMI_ADDRESS},${S_SCALED_NODE_HOST_GROUP_NAME}\n\nprecase_get_host_group_for_json\n [Documentation] getting the Host_Group of the tested node within the format of the UI as the JSON expecting it.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n ${ui_host_group_name}= scale.get_ui_format_of_host_group_for_scale_out_json ${S_SCALED_NODE_HOST_GROUP_NAME}\n Set Suite Variable ${S_HOST_GROUP_FOR_JSON} ${ui_host_group_name}\n Log to console \\nHostgroup_name: ${ui_host_group_name}\n\ncreate_json_payload_and_scale_in\n [Documentation] construct the json payload for scale in and add to a suite Variable.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.create_json_payload_for_scale_in ${S_SCALED_NODE_NAME} ${S_HOST_GROUP_FOR_JSON}\n\nsend_scale_in_apiCall\n [Documentation] send the scale-in API and check the progress of the operation and wait until the process finished.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.scale_in_api_rest_call ${S_SCALE_IN_PAYLOAD_JSON}\n\nvalidate_node_is_not_exist_in_node_list\n [Documentation] validate the scale-in node name not exist in the node-list after the scale-in.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.validate_node_is_not_exist_in_node_list ${S_SCALED_NODE_NAME}\n\nvalidate_scale_in_status_after_finished\n [Documentation] validate the scale-in state and status are finished after the scale-in.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n ${scale_in_isActive_befor_test} ${scale_in_state_befor_test}= scale.check_if_scaleIn_active_after_api\n Should Be Equal ${scale_in_state_befor_test} SUCCESS\n\npostcase_scale_in_cluster_checks\n [Documentation] Check cluster after the scale-in test case and before scale-out test case.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.scale_checks\n\n# Scale out edge node\nprecase_get_scale_out_status_2\n [Documentation] check scale-out status and state before the scale-out.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.check_if_scaleOut_active_after_api\n ${scale_out_isActive_befor_test}= ncsManagerOperations.get_cluster_bm_scale_out_isActive\n Should be equal as strings ${scale_out_isActive_befor_test} False\n\nget_Host_Group\n [Documentation] getting the Host_Group\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n ${host_group_data}= ncsManagerOperations.get_host_group_operations_bm_data\n ${host_group_data1}= Get Value From Json ${host_group_data} $.content\n Log ${host_group_data1} formatter=repr\n\n ${get_hostgroups_dictionary}= Get Value From Json ${host_group_data1}[0] $.hostgroups\n Set Suite Variable ${S_HOST_GROUPS_JSON_ORIG} ${get_hostgroups_dictionary}[0]\n\nget_info_and_create_json_payload_2\n [Documentation] construct the json payload for scale-out\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.create_json_payload_for_scale_out ${S_HOST_GROUP_FOR_JSON} ${S_SCALED_NODE_IPMI_ADDRESS} ${S_HOST_GROUPS_JSON_ORIG}\n\nsend_scaleOut_API_call\n [Documentation] send the scale-out API and check the progress of the operation and wait until the process has finished.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.scale_out_api_rest_call ${S_SCALE_OUT_PAYLOAD_JSON}\n\ncheck_new_node_added_2\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\tLog ${S_EDGES_MULTUS_LIST}\n\t${NEW_EDGE_MULTUS_LIST} node.get_multus_edge_name_list\n\t${NEW_EDGE_NODE_NAME} get new edge node ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\tSet Suite Variable ${S_NEW_EDGE_NODE_NAME} ${NEW_EDGE_NODE_NAME}\n\tShould Not Be Equal ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\n# Create 2 pods on new node\ncreate_pods_on_new_node\n\t[Documentation] Create basic pod to created namespace\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n ${d}= Create Dictionary\n ... k8spspallowedusers=psp-pods-allowed-user-ranges\n ... k8spspallowprivilegeescalationcontainer=psp-allow-privilege-escalation-container\n ... k8spspseccomp=psp-seccomp\n ... k8spspcapabilities=psp-pods-capabilities\n ... k8spspreadonlyrootfilesystem=psp-readonlyrootfilesystem\n\n ${name_pod_3} ${f_pod_3}= pod.create\n ... vlan-3\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n ... node_name=${S_NEW_EDGE_NODE_NAME}\n\n ${name_pod_4} ${f_pod_4}= pod.create\n ... vlan-4\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n ... node_name=${S_NEW_EDGE_NODE_NAME}\n\n Set Suite Variable ${S_POD_NAME_3} ${name_pod_3}\n Set Suite Variable ${S_POD_DATA_3} ${f_pod_3}\n Set Suite Variable ${S_POD_NAME_4} ${name_pod_4}\n Set Suite Variable ${S_POD_DATA_4} ${f_pod_4}\n\nGet_new_pods_ip_and_node\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n ${pod_data}= pod.get ${S_POD_NAME_1} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_3} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_3} ${nodeName}\n\n ${pod_data}= pod.get ${S_POD_NAME_2} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_4} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_4} ${nodeName}\n\nVerify ping between new pods\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Verify ping between pods ${S_POD_NAME_3} ${S_POD_NAME_4} ${S_POD_IP_3} ${S_POD_IP_4} ${S_SUBNET1_GW}\n\n# Create dummy network and verify ping is working\ncreate_dummy_network\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\t#ncsManagerRestApi.create_new_caas_network ${S_CLUSTER_NAME}\n\t${json} ${subnet} Update Post Install changes robotvlan\n Log ${json}\n ncsManagerOperations.post_add_bm_configuration_data ${json}\n common.Wait For Operation To Finish add_bm_configuration\n attach_ingress_egress_network_to_edge_hostgroup robotvlan\n\nVerify ping again after network change\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\tVerify ping between pods ${S_POD_NAME_3} ${S_POD_NAME_4} ${S_POD_IP_3} ${S_POD_IP_4} ${S_SUBNET1_GW}\n\n# post actions for the case -------------------------------------------------------------------------\npostcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n [Tags] test1 test6\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n setup.suite_cleanup\n\npostcase_cluster_status\n [Documentation] Check cluster status after the case\n [Tags] test1x\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n check.postcase_cluster_status\n\n*** Keywords ***\ncheck_prereqs\n\t${is_baremetal_installation}= config.is_baremetal_installation\n return from keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" ${TRUE} Case is supported in baremetal installations only\n # Check if Calico is active\n ${r}= network.is_active_multus\n Log is multus active: ${r}\n ${edges} node.get_multus_edge_name_list\n ${workers}= node.get_multus_workers_list\n Set Suite Variable ${S_MULTUS_WORKER_LIST} ${workers}\n Set Suite Variable ${S_EDGES_MULTUS_LIST} ${edges}\n\n ${worker_l} Get Length ${workers}\n ${edge_l} Get Length ${edges}\n\n ${sum_of_multus_nodes} Evaluate ${worker_l} + ${edge_l}\n ${is_multus_nodes} Run Keyword If ${sum_of_multus_nodes}<2 Set Variable ${FALSE}\n ... ELSE Set Variable ${TRUE}\n\n ${fail_case} Run Keyword If \"${r}\"==\"${FALSE}\" Set Variable ${TRUE}\n ... ELSE IF \"${is_multus_nodes}\"==\"${FALSE}\" Set Variable ${TRUE}\n ... ELSE Set Variable ${FALSE}\n ${msg}= Set Variable NSC setup doesn't meet requirements \\n\\nCase Requirements:\\n\\t - Multus must be active\\n\\t - minimum 2 edge nodes available: \\n\\nNCS Setup:\\n\\tis Multus active: ${r}\\n\\tNumber of edge nodes available: ${sum_of_multus_nodes}\\n\n Set Suite Variable ${S_MSG} ${msg}\n\n ${pass}= Run Keyword If \"${fail_case}\"==\"${TRUE}\" Set Variable ${TRUE}\n ... ELSE IF \"${fail_case}\"==\"${FALSE}\" Set Variable ${FALSE}\n\n ${networks}= config.ncm_external_caas_networks\n IF \"${networks}\"==\"\"\n ${pass}= Set Variable ${TRUE}\n ${msg}= Set Variable External CaaS networks not defined in SUT. Skip Case\\n\\n\n END\n\n [Return] ${pass} ${msg}\n\nVerify ping between pods\n\t[Arguments] ${pod_name1} ${pod_name2} ${pod_ip1} ${pod_ip2} ${subnet}\n ${cmd}= Set Variable if \"${S_IS_IPV6}\" == \"${FALSE}\" arping -c 4 -A -I net1 ${pod_name1}\n Run Keyword if \"${S_IS_IPV6}\" == \"${FALSE}\" pod.send_command_to_pod ${S_NAMESPACE_NAME} ${pod_name1} ${cmd}\n ${cmd}= Set Variable if \"${S_IS_IPV6}\" == \"${FALSE}\" arping -c 4 -A -I net1 ${pod_name2}\n Run Keyword if \"${S_IS_IPV6}\" == \"${FALSE}\" pod.send_command_to_pod ${S_NAMESPACE_NAME} ${pod_name2} ${cmd}\n\n Run Keyword if \"${S_IS_IPV6}\" == \"${TRUE}\" Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name1} ${subnet} namespace=${S_NAMESPACE_NAME}\n Run Keyword if \"${S_IS_IPV6}\" == \"${TRUE}\" Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name2} ${subnet} namespace=${S_NAMESPACE_NAME}\n\n Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name1} ${pod_ip1} namespace=${S_NAMESPACE_NAME}\n Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name2} ${pod_ip2} namespace=${S_NAMESPACE_NAME}\n\nGet IPMI List\n\t${cluster_name} setup.setup_ncs_centralsite_name\n\t${is_central} config.is_centralized_installation\n\t${file_path} Set Variable /opt/management/manager/logs\n\tIF ${is_central}\n\t\t${conn} ssh.open_connection_to_deployment_server\n ELSE\n\t\t${conn} ssh.open_connection_to_controller\n\tEND\n\t${ipmi_output} ssh.send_command ${conn} sudo cat ${file_path}/${cluster_name}/$(sudo ls ${file_path}/${cluster_name}/ |grep installation) |grep computed\n\t${pattern} Set Variable 'computed': \\\\[.*?(\\\\[*\\\\])\n\t${ipmi_addresses} Get Regexp Matches ${ipmi_output} ${pattern}\n\tLog ${ipmi_addresses}\n\t${split} Split String ${ipmi_addresses[0]} :${SPACE}\n\t${ipmi_list} Evaluate list(${split[1]})\n\t[Return] ${ipmi_list}\n\nGet unused IPMI address\n\t[Arguments] ${ipmi_list}\n\t${is_central} config.is_centralized_installation\n\tIF ${is_central}\n\t\t${conn} ssh.open_connection_to_deployment_server\n ELSE\n ${conn} ssh.open_connection_to_controller\n END\n ${openstack_r} ssh.send_command ${conn} sudo -E openstack cbis cm -S all -c HostName -c IPMI -f value\n ${lines} Split to Lines ${openstack_r}\n FOR ${ipmi} IN @{ipmi_list}\n ${s} Run Keyword And Return Status Should Contain ${openstack_r} ${ipmi}\n Return From Keyword If \"${s}\" == \"${FALSE}\" ${ipmi}\n ... ELSE Return From Keyword ${NONE}\n END\n\nis scale in needed\n\t${ipmi_list} Get IPMI List\n\t${ipmi} Get not inuse IPMI Address ${ipmi_list}\n ${is_needed} Run Keyword If ${ipmi}==${NONE} Set Variable ${TRUE}\n ... ELSE Set Variable ${FALSE}\n [Return] ${is_needed}\n\nget new edge node\n\t[Arguments] ${NEW_EDGE_MULTUS_LIST} ${EDGES_MULTUS_LIST}\n ${result} Create List\n FOR ${item} IN @{NEW_EDGE_MULTUS_LIST}\n Run Keyword If '${item}' not in @{EDGES_MULTUS_LIST} Append To List ${result} ${item}\n END\n [Return] ${result}\n\nCreate New Caas Network\n [Documentation] Create caas network json\n [Arguments] ${caas_network} ${cluster_name} ${FSS} ${ipvlan}\n ${tempjson}= Catenate\n ... {\n ... \"content\": {\n ... \"general\": {\n ... \"common\": {\n ... \"CBIS:cluster_deployment:cluster_config:fabric_manager:fabric_manager\": \"${FSS}\"\n ... }\n ... },\n ... \"overcloud\": {\n ... \"optional-general\": {\n ... \"CBIS:openstack_deployment:prompt_format\": \"Legacy\"\n ... },\n ... \"storage\": {\n ... \"CBIS:storage:mon_allow_pool_delete\": false,\n ... \"CBIS:storage:mon_clock_drift_allowed\": 0.05\n ... },\n ... \"global_storage_parameters\": {\n ... \"default_storageclass\": \"csi-cephrbd\",\n ... \"iscsid_configurations\": [\n ... {\n ... \"parameter_key\": \"node.session.timeo.replacement_timeout\",\n ... \"parameter_value\": 120,\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"node.conn[0].timeo.login_timeout\",\n ... \"parameter_value\": 15,\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"node.conn[0].timeo.logout_timeout\",\n ... \"parameter_value\": 15,\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"node.conn[0].timeo.noop_out_interval\",\n ... \"parameter_value\": 5,\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"node.conn[0].timeo.noop_out_timeout\",\n ... \"parameter_value\": 5,\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"node.session.err_timeo.abort_timeout\",\n ... \"parameter_value\": 15,\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"node.session.err_timeo.lu_reset_timeout\",\n ... \"parameter_value\": 30,\n ... \"action\": \"initial\"\n ... }\n ... ],\n ... \"multipath_configurations\": [\n ... {\n ... \"parameter_key\": \"no_path_retry\",\n ... \"parameter_value\": 18,\n ... \"parameter_vendor\": \"3PARdata\",\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"fast_io_fail_tmo\",\n ... \"parameter_value\": 10,\n ... \"parameter_vendor\": \"3PARdata\",\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"no_path_retry\",\n ... \"parameter_value\": 12,\n ... \"parameter_vendor\": \"DGC\",\n ... \"action\": \"initial\"\n ... },\n ... {\n ... \"parameter_key\": \"fast_io_fail_tmo\",\n ... \"parameter_value\": 15,\n ... \"parameter_vendor\": \"DGC\",\n ... \"action\": \"initial\"\n ... }\n ... ]\n ... }\n ... },\n ... \"caas_external\": {\n ... \"ext2\": {\n ... \"ext2_ip_stack_type\": [\n ... \"IPv4\"\n ... ],\n ... \"ext2_network_address\": \"10.37.187.64/26\",\n ... \"ext2_network_vlan\": 711,\n ... \"ext2_mtu\": 9000,\n ... \"ext2_preexist\": true\n ... },\n ... \"ext1\": {\n ... \"ext1_ip_stack_type\": [\n ... \"IPv4\"\n ... ],\n ... \"ext1_network_address\": \"10.37.187.32/27\",\n ... \"ext1_network_vlan\": 710,\n ... \"ext1_mtu\": 9000,\n ... \"ext1_preexist\": true\n ... },\n ... \"${caas_network}\": {\n ... \"${caas_network}_ip_stack_type\": [\n ... \"IPv4\"\n ... ],\n ... \"${caas_network}_network_address\": \"192.168.100.0/24\",\n ... \"${caas_network}_network_vlan\": ${ipvlan},\n ... \"${caas_network}_set_network_range\": true,\n ... \"${caas_network}_ip_network_range_start\": \"192.168.100.5\",\n ... \"${caas_network}_ip_network_range_end\": \"192.168.100.100\",\n ... \"${caas_network}_enable_mtu\": true\n ... }\n ... },\n ... \"caas_subnets\": {},\n ... \"caas_physnets\": {},\n ... \"external_storages\": {},\n ... \"cluster\": {\n ... \"cluster_basic\": {\n ... \"CBIS:cluster_deployment:cluster_config:external_ntpservers\": [\n ... \"10.171.8.4\"\n ... ],\n ... \"CBIS:cluster_deployment:cluster_config:external_dns\": [\n ... \"10.171.10.1\"\n ... ]\n ... },\n ... \"cluster_advanced\": {\n ... \"CBIS:cluster_deployment:cluster_config:wireguard_enable\": false\n ... },\n ... \"log_forwarding\": {\n ... \"CBIS:cluster_deployment:fluentd_app\": []\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${cluster_name}\"\n ... ]\n ... }\n ... }\n ${input_dictionary}= Evaluate json.loads(\"\"\"${tempjson}\"\"\") json\n [Return] ${input_dictionary} 192.168.100.0\n\nattach_ingress_egress_network_to_edge_hostgroup\n\t[Arguments] ${network_name} ${cluster_name}=${S_CLUSTER_NAME}\n\t${edge_node} node.get_edge_name_list\n\t${node_hg} node.get_node_host_group_name ${edge_node[0]}\n\tIF '${node_hg}' == 'edgebm'\n\t\t${node_hg} set variable EdgeBM\n\tEND\n\t# fetch networks mapped\n ${orig_hostgroup_data}= Catenate\n ... {\n ... \"content\":{\n ... \"hostgroups\":{\n ... \"${node_hg}\":{\n ... \"CBIS:host_group_config:${node_hg}:tuned_profile\":\"throughput-performance\",\n ... \"CBIS:host_group_config:${node_hg}:irq_pinning_mode\":\"custom-numa\",\n ... \"CBIS:host_group_config:${node_hg}:cpu_isolation_scheme\":1,\n ... \"CBIS:host_group_config:${node_hg}:custom_nics\":false,\n ... \"CBIS:host_group_config:${node_hg}:edge_generic_caas_per_port_config\":[\n ... {\n ... \"caas_external\":[\n ... \"${network_name}\"\n ... ],\n ... \"edge_port_name\":\"nic_2_bond\",\n ... \"action\":\"initial\"\n ... }\n ... ],\n ... \"CBIS:host_group_config:${node_hg}:enable_cpu_pool\":false,\n ... \"CBIS:host_group_config:${node_hg}:hypervisor_dedicated_cpus\":4,\n ... \"CBIS:host_group_config:${node_hg}:cpu_isolation_numa_0\":-1,\n ... \"CBIS:host_group_config:${node_hg}:cpu_isolation_numa_1\":-1\n ... }\n ... }\n ... },\n ... \"metadata\":{\n ... \"clusters\":[\n ... \"${cluster_name}\"\n ... ]\n ... }\n ... }\n ${json} Evaluate json.loads(\"\"\"${orig_hostgroup_data}\"\"\") json\n Log ${json}\n # add network mapping to the hostgroup\n ncsManagerOperations.post_host_group_operations_bm_data ${json}\n ncsManagerOperations.wait_for_operation_to_finish host_group_operations_bm\n\nUpdate Post Install changes\n\t[Arguments] ${vlan_name}\n\tGenerate Vlan\n\t${status} Run Keyword Check Fss Connect\n\t${json} ${subnet} create new caas network ${vlan_name} ${S_CLUSTER_NAME} None ${generated_vlan}\n\tIF ${status}\n\t\t${json} ${subnet} create new caas network ${vlan_name} ${S_CLUSTER_NAME} FSS_Connect ${generated_vlan}\n\t\tReturn From Keyword ${json} ${subnet}\n END\n [Return] ${json} ${subnet}\n\nCheck fss connect\n\t${add_bm_config}= ncsManagerOperations.get_add_bm_configuration_data\n\tLog ${add_bm_config}\n\t${add_bm_config} Convert to String ${add_bm_config}\n ${regex} Get Regexp Matches ${add_bm_config} FSS_Connect\n\t${is_contain_fss} Run Keyword And Return Status Should Not Be Empty ${regex}\n\t[Return] ${is_contain_fss}\n\nGet vlans\n\t${conn} ssh.open_connection_to_controller\n\t${resp} ssh.send_command ${conn} sudo ip address show | grep vlan\n ${vlans} Split to Lines ${resp}\n Remove from list ${vlans} 0\n ${vlans_list} Create List\n FOR ${vlan} IN @{vlans}\n \t${regex} Get Regexp Matches ${vlan} vlan[0-9]*\n \tLog ${regex}\n \tAppend to List ${vlans_list} ${regex[0]}\n END\n ${vlans_list} Evaluate set(${vlans_list})\n ${vlans_numbers} Create List\n\tFOR ${vlan} IN @{vlans_list}\n\t\t${vlan_number} Split String ${vlan} vlan\n\t\tAppend to List ${vlans_numbers} ${vlan_number[-1]}\n\tEND\n log ${vlans_numbers}\n [Return] ${vlans_numbers}\n\nGenerate vlan\n\t${vlans_list}= Get vlans\n ${chosen_vlan} Set Variable\n ${random_number} Evaluate random.randint(1, 99) random\n Log to console check ${random_number}\n Run Keyword If '${random_number}' in @{vlans_list} Generate Vlan\n ... ELSE Run Keyword Set Suite Variable ${generated_vlan} ${random_number}\n [Return] ${generated_vlan}", "name": "suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/namespace.robot': 'resource/namespace.robot', '../../resource/pod.robot': 'resource/pod.robot', '../../resource/check.robot': 'resource/check.robot', '../../resource/ping.robot': 'resource/ping.robot', '../../resource/network.robot': 'resource/network.robot', '../../resource/scale.robot': 'resource/scale.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "af565bef-4e93-4611-8b6b-7b3ac771eda2", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\n # mandatory\n setup.precase_setup\n Set Suite Variable ${S_PASS} ${FALSE}\n ${ipmi_list} Get IPMI List\n Log ${ipmi_list}\n ${ipmi_addr} Get unused IPMI address ${ipmi_list}\n Set Suite Variable ${S_IPMI_ADDRESS} ${ipmi_addr}\n ${is_scale_needed} Is Scale in Needed\n Set Suite Variable ${S_SKIP_SCALE_IN} ${is_scale_needed}", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6a75349f-5aad-4f76-ae69-32502e740d4b", "code": "check_case_requirements\n [Documentation] Check that Multus is enable and minimum two worker nodes available\n ${pass} ${msg}= check_prereqs\n Set Suite Variable ${S_PASS} ${pass}\n Set Suite Variable ${S_MSG} ${msg}", "settings": "{}", "variables": "{}", "name": "check_case_requirements", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f19157db-1a2d-4a2d-8e97-d535ff1063ce", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n check.precase_cluster_status\n\n# Step 1 -> Create new namespace + Create Networks + Attach it to edge", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "30c53333-28e9-48f9-9382-4a54031527ea", "code": "create_namespace\n [Documentation] Create namespace for this test\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n ${namespace_name} ${namespace}= namespace.create ${C_TEST_NAMESPACE_NAME}\n Set Suite Variable ${S_NAMESPACE_NAME} robot-multus-vlan-namespace", "settings": "{}", "variables": "{'C_TEST_NAMESPACE_NAME': {'text': '${C_TEST_NAMESPACE_NAME} multus-vlan'}}", "name": "create_namespace", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ed869da9-e00a-43e9-a83a-7bace8b3f492", "code": "create_multus_network\n [Documentation] Create multus network to created namespace\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n # Get networks from configuration file and do needed convertions\n ${subnet_1}= network.get_external_caas\n ${subnet_2}= network.get_external_caas\n Log ${subnet_1}\n Log ${subnet_2}\n ${range_net_1}= network.get_range ${subnet_1}[SUBNET]\n Log ${range_net_1}\n ${range_net_2}= network.get_range ${subnet_2}[SUBNET]\n Log ${range_net_2}\n\n #Create two multus vlan networks\n ${net_1} ${net_data_1}= network.create_multus_network_attachment\n ... 1\n ... namespace=${S_NAMESPACE_NAME}\n ... gateway=${subnet_1}[GATEWAY]\n ... range=${range_net_1}\n ... vlan_id=${subnet_1}[VLAN]\n ... driver_type=ipvlan\n ... routes=${subnet_2}[SUBNET]\n\n Log ${net_1} ${net_data_1}\n\n Set Suite Variable ${S_NETWORK_NAME_1} ${net_1}\n Set Suite Variable ${S_SUBNET1_GW} ${subnet_1}[GATEWAY]\n attach_ingress_egress_network_to_edge_hostgroup ${S_NETWORK_NAME_1}\n\n# Step 2 -> Create 2 multus ipvlan pods", "settings": "{}", "variables": "{}", "name": "create_multus_network", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "5ea2f3be-2f4f-4dd8-837c-28d051736e41", "code": "create_pods\n [Documentation] Create basic pod to created namespace\n #Pass Execution If \"${S_PASS}\"==\"${TRUE}\" ${S_MSG}\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\n ${d}= Create Dictionary\n ... k8spspallowedusers=psp-pods-allowed-user-ranges\n ... k8spspallowprivilegeescalationcontainer=psp-allow-privilege-escalation-container\n ... k8spspseccomp=psp-seccomp\n ... k8spspcapabilities=psp-pods-capabilities\n ... k8spspreadonlyrootfilesystem=psp-readonlyrootfilesystem\n\n ${name_pod_1} ${f_pod_1}= pod.create\n ... vlan-1\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n #... node_name=${S_MULTUS_WORKER_LIST}[0]\n\n ${name_pod_2} ${f_pod_2}= pod.create\n ... vlan-2\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n #... node_name=${S_MULTUS_WORKER_LIST}[1]\n #... special_spec=is_worker true\n\n Set Suite Variable ${S_POD_NAME_1} ${name_pod_1}\n Set Suite Variable ${S_POD_DATA_1} ${f_pod_1}\n Set Suite Variable ${S_POD_NAME_2} ${name_pod_2}\n Set Suite Variable ${S_POD_DATA_2} ${f_pod_2}", "settings": "{}", "variables": "{'C_TEST_POD_IMAGE': {'text': '${C_TEST_POD_IMAGE} cent7withtools'}}", "name": "create_pods", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ce00e1ba-cf3b-4463-a2ab-54aec2334782", "code": "Get pod ip and node\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\n ${pod_data}= pod.get ${S_POD_NAME_1} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_1} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_1} ${nodeName}\n\n ${pod_data}= pod.get ${S_POD_NAME_2} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_2} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_2} ${nodeName}\n\n# Step 3 -> Verify ping is working", "settings": "{}", "variables": "{}", "name": "Get pod ip and node", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "29a1da04-39bb-4aa1-8602-283d6a8b5307", "code": "Verify ping between pods\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n Verify ping between pods ${S_POD_NAME_1} ${S_POD_NAME_2} ${S_POD_IP_1} ${S_POD_IP_2} ${S_SUBNET1_GW}\n\n# Step 4 -> In Case of Unused IPMI Using it to Scale-Out new edge node", "settings": "{}", "variables": "{}", "name": "Verify ping between pods", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "45f79ad9-5219-46f5-a070-4f5ae89a43c0", "code": "precase_get_scale_out_status\n [Documentation] check scale-out status and state before the scale-out.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n scale.check_if_scaleOut_active_after_api\n ${scale_out_isActive_befor_test}= ncsManagerOperations.get_cluster_bm_scale_out_isActive\n Should be equal as strings ${scale_out_isActive_befor_test} False", "settings": "{}", "variables": "{}", "name": "precase_get_scale_out_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "82f2f110-6bcd-4c78-8694-9200e38618dc", "code": "get_Edge_Host_Group\n [Documentation] getting the Host_Group\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n ${host_group_data}= ncsManagerOperations.get_host_group_operations_bm_data\n ${host_group_data1}= Get Value From Json ${host_group_data} $.content\n Log ${host_group_data1} formatter=repr\n\n ${get_hostgroups_dictionary}= Get Value From Json ${host_group_data1}[0] $.hostgroups\n ${dict_keys} Get Dictionary Keys ${get_hostgroups_dictionary}[0]\n Log ${dict_keys}\n FOR ${hg} IN @{dict_keys}\n \t${lower_hg} Convert To Lower Case ${hg}\n \tRun Keyword If \"edge\" in \"${lower_hg}\"\n \t... \tSet Suite Variable ${S_HOST_GROUP_FOR_JSON} ${hg}\n END\n\n Set Suite Variable ${S_HOST_GROUPS_JSON_ORIG} ${get_hostgroups_dictionary}[0]", "settings": "{}", "variables": "{}", "name": "get_Edge_Host_Group", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "df491a43-7b5a-4ac5-b8b0-c7f0408d6acd", "code": "get_info_and_create_json_payload\n [Documentation] construct the json payload for scale-out\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n scale.create_json_payload_for_scale_out ${S_HOST_GROUP_FOR_JSON} ${S_IPMI_ADDRESS} ${S_HOST_GROUPS_JSON_ORIG}", "settings": "{}", "variables": "{}", "name": "get_info_and_create_json_payload", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "56f96dd0-5299-4c05-a339-c1a127f721a1", "code": "call_scale_out_api\n [Documentation] send the scale-out API and check the progress of the operation and wait until the process has finished.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n scale.scale_out_api_rest_call ${S_SCALE_OUT_PAYLOAD_JSON}", "settings": "{}", "variables": "{}", "name": "call_scale_out_api", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1a491271-fd0d-4bc3-9ae3-5c989e5c90cd", "code": "check_new_node_added\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${TRUE}\" scale in is needed will run scale in -> scale out\n\tLog ${S_EDGES_MULTUS_LIST}\n\t${NEW_EDGE_MULTUS_LIST} node.get_multus_edge_name_list\n\t${NEW_EDGE_NODE_NAME} get new edge node ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\tSet Suite Variable ${S_NEW_EDGE_NODE_NAME} ${NEW_EDGE_NODE_NAME}\n\tShould Not Be Equal ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\n# Scale in + Scale Out\n# Scale in edge node", "settings": "{}", "variables": "{}", "name": "check_new_node_added", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0a78e0f7-5314-48db-86ba-e9cff55479b3", "code": "precase_scale_in_steps\n Log ${S_EDGES_MULTUS_LIST}\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.selecting_node_for_scale_and_ipmi_address ${S_EDGES_MULTUS_LIST}\n Log ${S_SCALED_NODE_NAME},${S_SCALED_NODE_IPMI_ADDRESS},${S_SCALED_NODE_HOST_GROUP_NAME}", "settings": "{}", "variables": "{}", "name": "precase_scale_in_steps", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1c07dd9a-189b-45a0-9d0d-726792260cbf", "code": "precase_get_host_group_for_json\n [Documentation] getting the Host_Group of the tested node within the format of the UI as the JSON expecting it.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n ${ui_host_group_name}= scale.get_ui_format_of_host_group_for_scale_out_json ${S_SCALED_NODE_HOST_GROUP_NAME}\n Set Suite Variable ${S_HOST_GROUP_FOR_JSON} ${ui_host_group_name}\n Log to console \\nHostgroup_name: ${ui_host_group_name}", "settings": "{}", "variables": "{}", "name": "precase_get_host_group_for_json", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b6e5884d-db85-41e8-8114-54f9370bfbc8", "code": "create_json_payload_and_scale_in\n [Documentation] construct the json payload for scale in and add to a suite Variable.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.create_json_payload_for_scale_in ${S_SCALED_NODE_NAME} ${S_HOST_GROUP_FOR_JSON}", "settings": "{}", "variables": "{}", "name": "create_json_payload_and_scale_in", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a530f820-b2fc-4d7f-8448-35cb43648641", "code": "send_scale_in_apiCall\n [Documentation] send the scale-in API and check the progress of the operation and wait until the process finished.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.scale_in_api_rest_call ${S_SCALE_IN_PAYLOAD_JSON}", "settings": "{}", "variables": "{}", "name": "send_scale_in_apiCall", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d4d0bf2d-5835-4ba0-a37f-c114096c96f1", "code": "validate_node_is_not_exist_in_node_list\n [Documentation] validate the scale-in node name not exist in the node-list after the scale-in.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.validate_node_is_not_exist_in_node_list ${S_SCALED_NODE_NAME}", "settings": "{}", "variables": "{}", "name": "validate_node_is_not_exist_in_node_list", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e29dd0a7-4174-4188-9024-205866f0c0e1", "code": "validate_scale_in_status_after_finished\n [Documentation] validate the scale-in state and status are finished after the scale-in.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n ${scale_in_isActive_befor_test} ${scale_in_state_befor_test}= scale.check_if_scaleIn_active_after_api\n Should Be Equal ${scale_in_state_befor_test} SUCCESS", "settings": "{}", "variables": "{}", "name": "validate_scale_in_status_after_finished", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ece77d33-dfe2-4f00-91ca-997c469bd3fc", "code": "postcase_scale_in_cluster_checks\n [Documentation] Check cluster after the scale-in test case and before scale-out test case.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.scale_checks\n\n# Scale out edge node", "settings": "{}", "variables": "{}", "name": "postcase_scale_in_cluster_checks", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "910faaaa-10ad-4a1b-887d-dd97a0200270", "code": "precase_get_scale_out_status_2\n [Documentation] check scale-out status and state before the scale-out.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.check_if_scaleOut_active_after_api\n ${scale_out_isActive_befor_test}= ncsManagerOperations.get_cluster_bm_scale_out_isActive\n Should be equal as strings ${scale_out_isActive_befor_test} False", "settings": "{}", "variables": "{}", "name": "precase_get_scale_out_status_2", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c1001f7c-e44a-48c7-8383-d50e2606ecdd", "code": "get_Host_Group\n [Documentation] getting the Host_Group\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n ${host_group_data}= ncsManagerOperations.get_host_group_operations_bm_data\n ${host_group_data1}= Get Value From Json ${host_group_data} $.content\n Log ${host_group_data1} formatter=repr\n\n ${get_hostgroups_dictionary}= Get Value From Json ${host_group_data1}[0] $.hostgroups\n Set Suite Variable ${S_HOST_GROUPS_JSON_ORIG} ${get_hostgroups_dictionary}[0]", "settings": "{}", "variables": "{}", "name": "get_Host_Group", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "98b1feb8-82be-48f9-b3d6-500ccb69e262", "code": "get_info_and_create_json_payload_2\n [Documentation] construct the json payload for scale-out\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.create_json_payload_for_scale_out ${S_HOST_GROUP_FOR_JSON} ${S_SCALED_NODE_IPMI_ADDRESS} ${S_HOST_GROUPS_JSON_ORIG}", "settings": "{}", "variables": "{}", "name": "get_info_and_create_json_payload_2", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ed9d65ab-b172-4fb2-a91a-fb1897054fdd", "code": "send_scaleOut_API_call\n [Documentation] send the scale-out API and check the progress of the operation and wait until the process has finished.\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Skip if \"${S_SKIP_SCALE_IN}\" == \"${FALSE}\"\n scale.scale_out_api_rest_call ${S_SCALE_OUT_PAYLOAD_JSON}", "settings": "{}", "variables": "{}", "name": "send_scaleOut_API_call", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "27fb361f-c0fc-4306-96e2-b8bd9c53a886", "code": "check_new_node_added_2\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\tLog ${S_EDGES_MULTUS_LIST}\n\t${NEW_EDGE_MULTUS_LIST} node.get_multus_edge_name_list\n\t${NEW_EDGE_NODE_NAME} get new edge node ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\tSet Suite Variable ${S_NEW_EDGE_NODE_NAME} ${NEW_EDGE_NODE_NAME}\n\tShould Not Be Equal ${NEW_EDGE_MULTUS_LIST} ${S_EDGES_MULTUS_LIST}\n\n# Create 2 pods on new node", "settings": "{}", "variables": "{}", "name": "check_new_node_added_2", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "247e223d-b2f0-43c8-9eeb-4d90746b20dc", "code": "create_pods_on_new_node\n\t[Documentation] Create basic pod to created namespace\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n ${d}= Create Dictionary\n ... k8spspallowedusers=psp-pods-allowed-user-ranges\n ... k8spspallowprivilegeescalationcontainer=psp-allow-privilege-escalation-container\n ... k8spspseccomp=psp-seccomp\n ... k8spspcapabilities=psp-pods-capabilities\n ... k8spspreadonlyrootfilesystem=psp-readonlyrootfilesystem\n\n ${name_pod_3} ${f_pod_3}= pod.create\n ... vlan-3\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n ... node_name=${S_NEW_EDGE_NODE_NAME}\n\n ${name_pod_4} ${f_pod_4}= pod.create\n ... vlan-4\n ... interface=multi\n ... namespace=${S_NAMESPACE_NAME}\n ... network_type=multus\n ... network_name=${S_NETWORK_NAME_1}\n ... image=${C_TEST_POD_IMAGE}\n ... affinity=antiaffinity\n ... special_spec=ncs.nokia.com/group: EdgeBM\n ... constrains_to_exclude=${d}\n ... node_name=${S_NEW_EDGE_NODE_NAME}\n\n Set Suite Variable ${S_POD_NAME_3} ${name_pod_3}\n Set Suite Variable ${S_POD_DATA_3} ${f_pod_3}\n Set Suite Variable ${S_POD_NAME_4} ${name_pod_4}\n Set Suite Variable ${S_POD_DATA_4} ${f_pod_4}", "settings": "{}", "variables": "{'C_TEST_POD_IMAGE': {'text': '${C_TEST_POD_IMAGE} cent7withtools'}}", "name": "create_pods_on_new_node", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "71dfbb76-a431-4469-ab4e-2ea9fd3c2590", "code": "Get_new_pods_ip_and_node\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n ${pod_data}= pod.get ${S_POD_NAME_1} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_3} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_3} ${nodeName}\n\n ${pod_data}= pod.get ${S_POD_NAME_2} namespace=${S_NAMESPACE_NAME}\n ${pod_ip}= pod.read_podIP_by_network_name ${pod_data} ${S_NETWORK_NAME_1}\n Set Suite Variable ${S_POD_IP_4} ${pod_ip}[0]\n ${nodeName}= pod.read_nodeName ${pod_data}\n Set Suite Variable ${S_POD_NODE_4} ${nodeName}", "settings": "{}", "variables": "{}", "name": "Get_new_pods_ip_and_node", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b142fe0b-3d85-49fe-9ba8-19a19a95cfc5", "code": "Verify ping between new pods\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n Verify ping between pods ${S_POD_NAME_3} ${S_POD_NAME_4} ${S_POD_IP_3} ${S_POD_IP_4} ${S_SUBNET1_GW}\n\n# Create dummy network and verify ping is working", "settings": "{}", "variables": "{}", "name": "Verify ping between new pods", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1af03f13-1f87-43ac-8b11-38e4fc7527b4", "code": "create_dummy_network\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\t#ncsManagerRestApi.create_new_caas_network ${S_CLUSTER_NAME}\n\t${json} ${subnet} Update Post Install changes robotvlan\n Log ${json}\n ncsManagerOperations.post_add_bm_configuration_data ${json}\n common.Wait For Operation To Finish add_bm_configuration\n attach_ingress_egress_network_to_edge_hostgroup robotvlan", "settings": "{}", "variables": "{}", "name": "create_dummy_network", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e08d2f14-5faf-4301-bd8e-a6de0dd56ec6", "code": "Verify ping again after network change\n\tRun Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n\tVerify ping between pods ${S_POD_NAME_3} ${S_POD_NAME_4} ${S_POD_IP_3} ${S_POD_IP_4} ${S_SUBNET1_GW}\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "Verify ping again after network change", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e6a9bd2e-690a-486a-a22b-c24a5815f88f", "code": "postcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created\n [Tags] test1 test6\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n setup.suite_cleanup", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1604655a-a86d-4e3d-a72d-0db64fe55788", "code": "postcase_cluster_status\n [Documentation] Check cluster status after the case\n [Tags] test1x\n Run Keyword If \"${S_PASS}\"==\"${TRUE}\" Skip ${S_MSG}\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "0df8238d-10ba-4526-9076-b7b1d4c40eb5", "code": "check_prereqs\n\t${is_baremetal_installation}= config.is_baremetal_installation\n return from keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" ${TRUE} Case is supported in baremetal installations only\n # Check if Calico is active\n ${r}= network.is_active_multus\n Log is multus active: ${r}\n ${edges} node.get_multus_edge_name_list\n ${workers}= node.get_multus_workers_list\n Set Suite Variable ${S_MULTUS_WORKER_LIST} ${workers}\n Set Suite Variable ${S_EDGES_MULTUS_LIST} ${edges}\n\n ${worker_l} Get Length ${workers}\n ${edge_l} Get Length ${edges}\n\n ${sum_of_multus_nodes} Evaluate ${worker_l} + ${edge_l}\n ${is_multus_nodes} Run Keyword If ${sum_of_multus_nodes}<2 Set Variable ${FALSE}\n ... ELSE Set Variable ${TRUE}\n\n ${fail_case} Run Keyword If \"${r}\"==\"${FALSE}\" Set Variable ${TRUE}\n ... ELSE IF \"${is_multus_nodes}\"==\"${FALSE}\" Set Variable ${TRUE}\n ... ELSE Set Variable ${FALSE}\n ${msg}= Set Variable NSC setup doesn't meet requirements \\n\\nCase Requirements:\\n\\t - Multus must be active\\n\\t - minimum 2 edge nodes available: \\n\\nNCS Setup:\\n\\tis Multus active: ${r}\\n\\tNumber of edge nodes available: ${sum_of_multus_nodes}\\n\n Set Suite Variable ${S_MSG} ${msg}\n\n ${pass}= Run Keyword If \"${fail_case}\"==\"${TRUE}\" Set Variable ${TRUE}\n ... ELSE IF \"${fail_case}\"==\"${FALSE}\" Set Variable ${FALSE}\n\n ${networks}= config.ncm_external_caas_networks\n IF \"${networks}\"==\"\"\n ${pass}= Set Variable ${TRUE}\n ${msg}= Set Variable External CaaS networks not defined in SUT. Skip Case\\n\\n\n END\n\n [Return] ${pass} ${msg}\n\nVerify ping between pods\n\t[Arguments] ${pod_name1} ${pod_name2} ${pod_ip1} ${pod_ip2} ${subnet}\n ${cmd}= Set Variable if \"${S_IS_IPV6}\" == \"${FALSE}\" arping -c 4 -A -I net1 ${pod_name1}\n Run Keyword if \"${S_IS_IPV6}\" == \"${FALSE}\" pod.send_command_to_pod ${S_NAMESPACE_NAME} ${pod_name1} ${cmd}\n ${cmd}= Set Variable if \"${S_IS_IPV6}\" == \"${FALSE}\" arping -c 4 -A -I net1 ${pod_name2}\n Run Keyword if \"${S_IS_IPV6}\" == \"${FALSE}\" pod.send_command_to_pod ${S_NAMESPACE_NAME} ${pod_name2} ${cmd}\n\n Run Keyword if \"${S_IS_IPV6}\" == \"${TRUE}\" Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name1} ${subnet} namespace=${S_NAMESPACE_NAME}\n Run Keyword if \"${S_IS_IPV6}\" == \"${TRUE}\" Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name2} ${subnet} namespace=${S_NAMESPACE_NAME}\n\n Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name1} ${pod_ip1} namespace=${S_NAMESPACE_NAME}\n Wait until keyword succeeds 30x 2s ping.from_pod ${pod_name2} ${pod_ip2} namespace=${S_NAMESPACE_NAME}", "settings": "{}", "variables": "{}", "name": "check_prereqs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "722af729-c494-4217-9770-989aea600fb4", "code": "Get IPMI List\n\t${cluster_name} setup.setup_ncs_centralsite_name\n\t${is_central} config.is_centralized_installation\n\t${file_path} Set Variable /opt/management/manager/logs\n\tIF ${is_central}\n\t\t${conn} ssh.open_connection_to_deployment_server\n ELSE\n\t\t${conn} ssh.open_connection_to_controller\n\tEND\n\t${ipmi_output} ssh.send_command ${conn} sudo cat ${file_path}/${cluster_name}/$(sudo ls ${file_path}/${cluster_name}/ |grep installation) |grep computed\n\t${pattern} Set Variable 'computed': \\\\[.*?(\\\\[*\\\\])\n\t${ipmi_addresses} Get Regexp Matches ${ipmi_output} ${pattern}\n\tLog ${ipmi_addresses}\n\t${split} Split String ${ipmi_addresses[0]} :${SPACE}\n\t${ipmi_list} Evaluate list(${split[1]})\n\t[Return] ${ipmi_list}\n\nGet unused IPMI address\n\t[Arguments] ${ipmi_list}\n\t${is_central} config.is_centralized_installation\n\tIF ${is_central}\n\t\t${conn} ssh.open_connection_to_deployment_server\n ELSE\n ${conn} ssh.open_connection_to_controller\n END\n ${openstack_r} ssh.send_command ${conn} sudo -E openstack cbis cm -S all -c HostName -c IPMI -f value\n ${lines} Split to Lines ${openstack_r}\n FOR ${ipmi} IN @{ipmi_list}\n ${s} Run Keyword And Return Status Should Contain ${openstack_r} ${ipmi}\n Return From Keyword If \"${s}\" == \"${FALSE}\" ${ipmi}\n ... ELSE Return From Keyword ${NONE}\n END", "settings": "{}", "variables": "{}", "name": "Get IPMI List", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b239d66a-5651-407c-804d-beb91ca48f60", "code": "is scale in needed\n\t${ipmi_list} Get IPMI List\n\t${ipmi} Get not inuse IPMI Address ${ipmi_list}\n ${is_needed} Run Keyword If ${ipmi}==${NONE} Set Variable ${TRUE}\n ... ELSE Set Variable ${FALSE}\n [Return] ${is_needed}\n\nget new edge node\n\t[Arguments] ${NEW_EDGE_MULTUS_LIST} ${EDGES_MULTUS_LIST}\n ${result} Create List", "settings": "{}", "variables": "{}", "name": "is scale in needed", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9992_ingress_multus_network_outage.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "a32a26ca-b31b-42ff-b520-a48c28c9fac6", "code": "*** Settings ***\nDocumentation 1. run WA for post upgrade tenant constraints missing\n ... 2. Create tenant\n ... 3. Create Namespace\n ... 4. Verify that they created succssefully\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\nprecase\n [Documentation] Runs precase setup\n setup.precase_setup\n\nstep1_run_WA\n [Documentation] Run the missing constraints creation .sh\n Run Recreate_missing_constraints.sh\n\nstep2_create_tenant_and_namespace\n [Documentation] Creates tenant + namespace\n Create_tenant\n Create_new_namespace_for_tenant\n\nstep3_verfiy_creation\n [Documentation] Check that they created successfully\n Check_tenant_created\n Check_namespace_created\n\nstep4_remove_tenant_and_namespace\n [Documentation] Removes the tenant and namespace\n Remove_tenant_and_namepsace\n\n*** Keywords ***\nRun recreate_missing_constraints.sh\n ${ncs_version} ${build_number}= config.installed_ncs_sw_package\n IF \"${ncs_version}\"==\"23.10.0\"\n \t RETURN\n ELSE\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/recreate_missing_constraints.sh /tmp/recreate_missing_constraints.sh\n ${conn} ssh.open_connection_to_controller\n ${resp} ${err} ${code} ssh.send_command_and_return_rc ${conn} sudo sh /tmp/recreate_missing_constraints.sh\n Should Be Equal As Integers ${code} 0\n END\n\ncreate_tenant\n ${name} Set Variable 9991tenant\n Log to console tenant creation started\n ${tenant_name} tenant.create ${name}\n Log to console tenant creation finished\n Set Suite Variable ${S_TENANT_NAME} ${tenant_name}\n\ncreate_new_namespace_for_tenant\n ${ns_name} Set Variable 9991ns\n Log to console namespace creation started\n tenant.create_tenant_namespace ${ns_name} ${S_TENANT_NAME}\n Log to console namespace creation finished\n Set Suite Variable ${S_TENANT_NAMESPACE} ${S_TENANT_NAME}-${ns_name}-ns\n\ncheck_tenant_created\n ${names} tenant.list\n Should Contain ${names} ${S_TENANT_NAME} tenant was not created\n\ncheck_namespace_created\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl get ns\n Should Contain ${resp} ${S_TENANT_NAMESPACE} ns was not created\n\nremove_tenant_and_namepsace\n tenant.delete ${S_TENANT_NAME}\n\n\n\n\n", "name": "suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "df809180-122d-4182-970e-887181c7432a", "code": "precase\n [Documentation] Runs precase setup\n setup.precase_setup", "settings": "{}", "variables": "{}", "name": "precase", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f30899f1-bf5b-45c5-813e-acfb7c5fa8e2", "code": "step1_run_WA\n [Documentation] Run the missing constraints creation .sh\n Run Recreate_missing_constraints.sh", "settings": "{}", "variables": "{}", "name": "step1_run_WA", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a8869896-ec4f-41e4-81a8-bb62aedcf92c", "code": "step2_create_tenant_and_namespace\n [Documentation] Creates tenant + namespace\n Create_tenant\n Create_new_namespace_for_tenant", "settings": "{}", "variables": "{}", "name": "step2_create_tenant_and_namespace", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8b49e7bc-01b4-454a-9168-128c48e4c854", "code": "step3_verfiy_creation\n [Documentation] Check that they created successfully\n Check_tenant_created\n Check_namespace_created", "settings": "{}", "variables": "{}", "name": "step3_verfiy_creation", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "aebe2d58-5355-487a-a1f6-0e0ed1bf3190", "code": "step4_remove_tenant_and_namespace\n [Documentation] Removes the tenant and namespace\n Remove_tenant_and_namepsace", "settings": "{}", "variables": "{}", "name": "step4_remove_tenant_and_namespace", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8dcff07c-8194-440e-8eb1-19926e7eac3b", "code": "Run recreate_missing_constraints.sh\n ${ncs_version} ${build_number}= config.installed_ncs_sw_package\n IF \"${ncs_version}\"==\"23.10.0\"\n \t RETURN\n ELSE\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/recreate_missing_constraints.sh /tmp/recreate_missing_constraints.sh\n ${conn} ssh.open_connection_to_controller\n ${resp} ${err} ${code} ssh.send_command_and_return_rc ${conn} sudo sh /tmp/recreate_missing_constraints.sh\n Should Be Equal As Integers ${code} 0\n END", "settings": "{}", "variables": "{}", "name": "Run recreate_missing_constraints.sh", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "136a7701-150a-4b61-8e09-b2f4d1dd4850", "code": "create_tenant\n ${name} Set Variable 9991tenant\n Log to console tenant creation started\n ${tenant_name} tenant.create ${name}\n Log to console tenant creation finished\n Set Suite Variable ${S_TENANT_NAME} ${tenant_name}", "settings": "{}", "variables": "{}", "name": "create_tenant", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "bff9f42e-7db4-4d13-a3cc-66593b4eefd3", "code": "create_new_namespace_for_tenant\n ${ns_name} Set Variable 9991ns\n Log to console namespace creation started\n tenant.create_tenant_namespace ${ns_name} ${S_TENANT_NAME}\n Log to console namespace creation finished\n Set Suite Variable ${S_TENANT_NAMESPACE} ${S_TENANT_NAME}-${ns_name}-ns", "settings": "{}", "variables": "{}", "name": "create_new_namespace_for_tenant", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "22be3d6a-68d2-4cf8-9319-bd75ea995ce5", "code": "check_tenant_created\n ${names} tenant.list\n Should Contain ${names} ${S_TENANT_NAME} tenant was not created", "settings": "{}", "variables": "{}", "name": "check_tenant_created", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8d137806-cd75-4f57-b994-f2120c61e777", "code": "check_namespace_created\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl get ns\n Should Contain ${resp} ${S_TENANT_NAMESPACE} ns was not created", "settings": "{}", "variables": "{}", "name": "check_namespace_created", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c8d86b22-5d4b-4e31-91ec-b9459c65d960", "code": "remove_tenant_and_namepsace\n tenant.delete ${S_TENANT_NAME}", "settings": "{}", "variables": "{}", "name": "remove_tenant_and_namepsace", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9991_check_tenant_constraint_failure.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "14c60e1c-1e31-4efc-a675-e34600a71bfb", "code": "*** Settings ***\n\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/config.robot\n\nSuite Setup setup.Suite_setup\nSuite Teardown setup.Suite_teardown\n\n*** Variables ***\n\n${T_HARBOR_VERSION} 1.22.0\n${T_TESTED_IMAGE} citm/citm-nginx-server\n\n*** Test Cases ***\nPrecase_test_setup\n setup.Precase_setup\n\ncheck_harbor_version\n [Documentation] checks if the harbor version is higher or equal to ${T_HARBOR_VERSION}\n ${is_NCS_24_11_and_above} Is_current_NCS_sw_build_greater_than NCS-24.11.0 0\n ${harbor_pod_list}= Get_harbor_list\n FOR ${harbor_pod} IN @{harbor_pod_list}\n ${harbor_version}= Run Keyword If ${is_NCS_24_11_and_above} get_harbor_image_version_from_bcmt-registry ${harbor_pod} ${T_TESTED_IMAGE}\n ... ELSE get_harbor_version ${harbor_pod}\n ${is_harbor_version_bigger}= Is_current_harbor_build_greater_than ${T_HARBOR_VERSION} ${harbor_version}\n Should Be True ${is_harbor_version_bigger} harbor version lesser than ${T_HARBOR_VERSION}, NCSFM-9782 might be present\n END\n\n*** Keywords ***\nget_harbor_list\n [Documentation] get a list of all harbor pods\n ${conn}= ssh.Open_connection_to_controller\n ${harbor_pods_list}= Create List\n ${harbor_pods}= ssh.Send_command ${conn} sudo kubectl get pod -n ncms |egrep 'harbor-nginx|portal'\n ${harbor_pods}= Split To Lines ${harbor_pods}\n FOR ${harbor_pod_info} IN @{harbor_pods}\n ${pod_info}= Split String ${harbor_pod_info}\n ${pod_name}= Set Variable ${pod_info}[0]\n Append To List ${harbor_pods_list} ${pod_name}\n END\n ssh.Close_connection ${conn}\n [Return] ${harbor_pods_list}\n\nget_harbor_version\n [Documentation] gets the harbor pod version\n [Arguments] ${harbor_pod}\n ${conn}= ssh.Open_connection_to_controller\n ${harbor_info}= ssh.Send_command ${conn} sudo kubectl describe pod ${harbor_pod} -n ncms | grep Image: | grep rocky8\n ${harbor_version} get_harbor_version_from_info\n ssh.Close_connection ${conn}\n [Return] ${harbor_version}\n\nget_harbor_version_from_info\n\t[Arguments] ${harbor_info}\n ${harbor_info_items}= Split To Lines ${harbor_info}\n ${harbor_version_long}= Set Variable ${harbor_info_items}[0]\n ${harbor_version_cut}= Split String ${harbor_version_long} :\n ${harbor_version_short}= Set Variable ${harbor_version_cut}[-1]\n ${harbor_versions}= Split String ${harbor_version_short} -\n ${harbor_version}= Set Variable ${harbor_versions}[0]\n [Return] ${harbor_version}\n\nis_current_harbor_build_greater_than\n [Documentation] Check if harbor build release/version is greater or equal than given as parameter.\n ... KW return True if current NCS build is greater or equal than given as parameter. False if not\n ... Build can be given as parameter:\n ... target_build=1.22.0 current_build=1.22.0 check_bigger_only=FALSE result= true\n ... target_build=1.22.0 current_build=1.22.0 check_bigger_only=TRUE result= false\n ... target_build=1.24.0 current_build=1.22.0 check_bigger_only=FALSE result= true\n ... target_build=1.22.1 current_build=1.25.0 check_bigger_only=FALSE result= false\n [Arguments] ${target_build} ${current_build} ${check_bigger_only}=${FALSE}\n ${c_v_list}= Split String ${current_build} .\n ${t_v_list}= Split String ${target_build} .\n ${c_len}= Get Length ${c_v_list}\n ${t_len}= Get Length ${t_v_list}\n IF ${c_len} < ${t_len}\n ${for_loop_size}= Set Variable ${c_len}\n ELSE\n ${for_loop_size}= Set Variable ${t_len}\n END\n\n FOR ${index} IN RANGE ${for_loop_size}\n ${num_from_currect}= Get From List ${c_v_list} ${index}\n ${num_from_target}= Get From List ${t_v_list} ${index}\n ${num_from_currect}= Convert To Number ${num_from_currect}\n ${num_from_target}= Convert To Number ${num_from_target}\n Return From Keyword If ${num_from_currect} > ${num_from_target} ${TRUE}\n Return From Keyword If ${num_from_currect} < ${num_from_target} ${FALSE}\n END\n IF ${c_len} > ${t_len}\n FOR ${c_index} IN RANGE ${t_len} ${c_len}\n ${num_from_c}= Get From List ${c_v_list} ${c_index}\n ${num_from_c}= Convert To Number ${num_from_c}\n Return From Keyword If ${num_from_c}!=0 ${TRUE}\n END\n ELSE IF ${c_len} < ${t_len}\n FOR ${t_index} IN RANGE ${c_len} ${t_len}\n ${num_from_t}= Get From List ${t_v_list} ${t_index}\n ${num_from_t}= Convert To Number ${num_from_t}\n Return From Keyword If ${num_from_t}!=0 ${FALSE}\n END\n END\n Return From Keyword If not ${check_bigger_only} ${TRUE}\n [Return] ${FALSE}\n\ncheck_tested_image_exist\n [Arguments] ${harbor_pod}\n\t${conn} ssh.open_connection_to_controller\n\t${check_tested_image_exist} Set Variable sudo kubectl get po -n ncms ${harbor_pod} -o json | jq '.spec.containers[].image, .spec.initContainers[].image'\n\t${harbor_images} ssh.send_command ${conn} ${check_tested_image_exist}\n\t${existed_images} Split to Lines ${harbor_images}\n\t${is_citm_nginx_image_exist} Set Variable ${FALSE}\n\tFOR ${image} IN @{existed_images}\n\t\t${regex} Get Regexp Matches ${image} ${T_TESTED_IMAGE}\n\t\tIF ${regex}\n\t\t\t${is_citm_nginx_image_exist} Set Variable ${TRUE}\n\t\t\tExit For Loop\n\t\tEND\n\tEND\n Should Be True ${is_citm_nginx_image_exist}\n\nget_harbor_image_version_from_bcmt-registry\n\t[Arguments] ${harbor_pod} ${image_name}\n\tcheck_tested_image_exist ${harbor_pod}\n ${get_image_details} Set Variable sudo ncs app-resource image list --image_name ${image_name}\n ${conn} ssh.open_connection_to_controller\n ${image_details} ssh.send_command ${conn} ${get_image_details}\n ${image_details} Convert Json To Dict ${image_details}\n ${repo} Get From Dictionary ${image_details} repo\n ${image_version} Set Variable ${repo}[0][1]\n ${harbor_version} get_harbor_version_from_info ${image_version}\n [Return] ${harbor_version}\n", "name": "suites/rnd/NCSDEV-9983_check_harbor_version.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/config.robot': 'resource/config.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9983_check_harbor_version.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6841f95a-ff90-488f-b30c-63ac40c3d57f", "code": "Precase_test_setup\n setup.Precase_setup", "settings": "{}", "variables": "{}", "name": "Precase_test_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9983_check_harbor_version.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "335a7455-8869-45b1-b38a-02d1a6ca7267", "code": "check_harbor_version\n [Documentation] checks if the harbor version is higher or equal to ${T_HARBOR_VERSION}\n ${is_NCS_24_11_and_above} Is_current_NCS_sw_build_greater_than NCS-24.11.0 0\n ${harbor_pod_list}= Get_harbor_list\n FOR ${harbor_pod} IN @{harbor_pod_list}\n ${harbor_version}= Run Keyword If ${is_NCS_24_11_and_above} get_harbor_image_version_from_bcmt-registry ${harbor_pod} ${T_TESTED_IMAGE}\n ... ELSE get_harbor_version ${harbor_pod}\n ${is_harbor_version_bigger}= Is_current_harbor_build_greater_than ${T_HARBOR_VERSION} ${harbor_version}\n Should Be True ${is_harbor_version_bigger} harbor version lesser than ${T_HARBOR_VERSION}, NCSFM-9782 might be present\n END", "settings": "{}", "variables": "{'T_HARBOR_VERSION': {'text': '${T_HARBOR_VERSION} 1.22.0'}, 'T_TESTED_IMAGE': {'text': '${T_TESTED_IMAGE} citm/citm-nginx-server'}}", "name": "check_harbor_version", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9983_check_harbor_version.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "27c5f006-8ad0-45f7-9652-489dbbc5a704", "code": "get_harbor_list\n [Documentation] get a list of all harbor pods\n ${conn}= ssh.Open_connection_to_controller\n ${harbor_pods_list}= Create List\n ${harbor_pods}= ssh.Send_command ${conn} sudo kubectl get pod -n ncms |egrep 'harbor-nginx|portal'\n ${harbor_pods}= Split To Lines ${harbor_pods}", "settings": "{}", "variables": "{}", "name": "get_harbor_list", "documentation": "${conn}= ssh.Open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9983_check_harbor_version.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "433e850a-6c22-47e0-9fcd-d24879fbdab9", "code": "*** Settings ***\nResource ../../resource/setup.robot\nLibrary Collections\nLibrary String\nLibrary OperatingSystem\nLibrary BuiltIn\nLibrary String\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\nPrecase steps\n\t[Documentation] Runs precase setup and set variables\n\tsetup.precase_setup\n\t${cluster_name} set cluster name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}\n\nConfigure Rsyslog\n\t[Documentation] Set master 0 as rsyslog server and Enable Log forwarding via API request check that finished successfully\n\tSet Master0 as Rsyslog server\n Configure Rsyslog on Machine\n Create rsyslog server ${S_CLUSTER_NAME}\n Wait Until Keyword Succeeds 40x 20s Check log forwarding finished ${S_CLUSTER_NAME}\n\nTest Storage send logs\n\t[Documentation] Test checks that rsyslog server is receiving logs from Storage node\n\tWait Until Keyword Succeeds 40x 20s Check Storage Send Logs To Rsyslog\n\n*** Keywords ***\nConfigure Rsyslog on Machine\n\t[Documentation] Edits the rsyslog.conf file to enable Rsyslog server\n\t${conn} ssh.open_connection_to_node ${S_RSYSLOG_IP}\n\t${rsyslog_conf} ssh.send_command ${conn} sudo cat /etc/rsyslog.conf\n ${rsyslog_conf_lines} Split to Lines ${rsyslog_conf}\n\n ${ncs_version} ${build_number}= config.installed_ncs_sw_package\n# ${line_to_search} Set Variable $InputTCPServerRun 514\n\n ${line_to_search} Set Variable input(type=\"imtcp\" port=\"514\")\n # Finds the line number of the searched line\n ${line_number} Set Variable\n FOR ${line} IN @{rsyslog_conf_lines}\n \t${status} ${msg} Run Keyword And Ignore Error Should Contain \"${line}\" \"#${line_to_search}\"\n \tIF \"${status}\"==\"FAIL\"\n \t\t${status} ${msg} Run Keyword And Ignore Error Should Contain \"${line}\" \"#${line_to_search}${SPACE}\"\n END\n\n \tIF \"${status}\"==\"PASS\"\n \t\t${index} Get Index From List ${rsyslog_conf_lines} ${line}\n ${line_number} Set Variable ${index}\n ELSE\n \tContinue For Loop\n END\n END\n\n IF \"${line_number}\"==\"${EMPTY}\"\n \tFail line ${line_to_search} was not found, rsyslog configuration file is corrupted\n END\n # Slice list from start to line number + 1\n ${slice1_in_line} Evaluate ${line_number} + 1\n ${slice1} Get Slice From List ${rsyslog_conf_lines} 0 ${slice1_in_line}\n Log ${slice1}\n\n IF \"${ncs_version}\"==\"24.7.0\"\n ${lines_to_insert} Create List\n ... ${SPACE}\n ... module(load=\"imudp\")\n ... input(type=\"imudp\" port=\"514\")\n ... module(load=\"imtcp\")\n ... input(type=\"imtcp\" port=\"514\")\n ... $template RemoteLogs,\"/var/log/remote/%HOSTNAME%/%PROGRAMNAME%.log\"\n ... *.* ?RemoteLogs\n ... & ~\n ... ${SPACE}\n ELSE\n ${lines_to_insert} Create List\n ... ${SPACE}\n ... $ModLoad imudp\n ... $UDPServerRun 514\n ... $ModLoad imtcp\n ... $InputTCPServerRun 514\n ... $template RemoteLogs,\"/var/log/remote/%HOSTNAME%/%PROGRAMNAME%.log\"\n ... *.* ?RemoteLogs\n ... & ~\n ... ${SPACE}\n END\n # Slice list from line number + 2 to end\n ${slice2_in_line} Evaluate ${line_number} + 2\n ${slice2} Get Slice From List ${rsyslog_conf_lines} ${slice2_in_line} end=-1\n Log ${slice2}\n # Combine lists and convert list into string\n ${configured_rsyslog} Combine Lists ${slice1} ${lines_to_insert} ${slice2}\n Log ${configured_rsyslog}\n ${configured_rsyslog_file} Set Variable\n FOR ${line} IN @{configured_rsyslog}\n \t${configured_rsyslog_file} Catenate ${configured_rsyslog_file} ${\\n}${line}\n END\n Log ${configured_rsyslog_file}\n\n # Create New configuration File\n Create File 23/suites/rnd/rsyslog.conf ${configured_rsyslog_file}\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 23/suites/rnd/rsyslog.conf /tmp/rsyslog.conf\n ## Convert to unix file\n ssh.send_command ${conn} sudo dos2unix /tmp/rsyslog.conf\n # Change file permissions\n ssh.send_command ${conn} sudo chmod 644 /tmp/rsyslog.conf\n ssh.send_command ${conn} sudo chown root:root /tmp/rsyslog.conf\n ssh.send_command ${conn} sudo mv /tmp/rsyslog.conf /etc/rsyslog.conf\n # Restart Service\n ssh.send_command ${conn} sudo systemctl restart rsyslog\n Log to Console let rsyslog come up fully\n Sleep 5min\n\nSet Master0 as Rsyslog server\n\t${is_central} config.is_centralized_installation\n\tIF ${is_central}\n\t\t${conn} ssh.open_connection_to_deployment_server\n ELSE\n \t${conn} ssh.open_connection_to_controller\n END\n ${controllers}= node.get_control_name_list\n ${first_control} Set Variable ${controllers[0]}\n IF \"allinone\" in \"${first_control}\"\n \t${masters} ssh.send_command ${conn} sudo -E openstack cbis cm -S all -c HostName -c Provisioning -f value | grep allinone\n ELSE\n ${masters} ssh.send_command ${conn} sudo -E openstack cbis cm -S all -c HostName -c Provisioning -f value | grep master\n END\n ${lines} Split to Lines ${masters}\n ${masters_Dict} Create Dictionary\n FOR ${line} IN @{lines}\n \t${master_info} Split String ${line} ${SPACE}\n \tSet to Dictionary ${masters_dict} ${master_info[0]}=${master_info[1]}\n END\n ${rsyslog_server_ip} Set Variable\n FOR ${master} IN @{masters_Dict}\n IF \"0\" in \"${master}\"\n \t\t${rsyslog_server_ip} Set variable ${masters_dict}[${master}]\n ELSE\n \tContinue For Loop\n END\n END\n Log ${rsyslog_server_ip}\n Set Suite Variable ${S_RSYSLOG_IP} ${rsyslog_server_ip}\n [Return] ${S_RSYSLOG_IP}\n\nCreate rsyslog server\n\t[Arguments] ${cluster_name} ${deployment_type}=remote ${keep_data}=5 ${rsyslog_server}=${S_RSYSLOG_IP}\n\t${ncs_version} ${build_number}= config.installed_ncs_sw_package\n\tIF \"${ncs_version}\"==\"24.7.0\" and \"${deployment_type}\"==\"remote\"\n\t\t${payload}= Catenate\n\t ... {\n ... \"content\": {\n ... \"log_forwarding_management_main\": {\n ... \"log_forwarding_management_params\": {\n ... \"CBIS:openstack_deployment:ssc_deployment_type\": \"${deployment_type}\",\n ... \"CBIS:openstack_deployment:rsyslog_servers\": [\"${rsyslog_server}\"]\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${cluster_name}\"\n ... ]\n ... }\n ... }\n ELSE IF \"${deployment_type}\"==\"remote\"\n \t${payload}= Catenate\n\t ... {\n ... \"content\": {\n ... \"log_forwarding_management_main\": {\n ... \"log_forwarding_management_params\": {\n ... \"CBIS:openstack_deployment:elk_deployment_type\": \"${deployment_type}\",\n ... \"CBIS:openstack_deployment:rsyslog_servers\": [\"${rsyslog_server}\"]\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${cluster_name}\"\n ... ]\n ... }\n ... }\n END\n\n IF \"${ncs_version}\"==\"23.10.0\" and \"${deployment_type}\"==\"local\"\n ${payload}= Catenate\n ... {\n ... \"content\": {\n ... \"log_forwarding_management_main\": {\n ... \"log_forwarding_management_params\": {\n ... \"CBIS:openstack_deployment:ssc_deployment_type\": \"${deployment_type}\",\n ... \"CBIS:openstack_deployment:ssc_disk\": \"sdb\",\n ... \"CBIS:openstack_deployment:ssc_keep_data\": ${keep_data},\n ... \"CBIS:openstack_deployment:rsyslog_servers\": [\"${rsyslog_server}\"]\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${cluster_name}\"\n ... ]\n ... }\n ... }\n ELSE IF \"${deployment_type}\"==\"local\"\n ${payload}= Catenate\n ... {\n ... \"content\": {\n ... \"log_forwarding_management_main\": {\n ... \"log_forwarding_management_params\": {\n ... \"CBIS:openstack_deployment:elk_deployment_type\": \"${deployment_type}\",\n ... \"CBIS:openstack_deployment:elk_disk\": \"sdb\",\n ... \"CBIS:openstack_deployment:elk_keep_data\": ${keep_data},\n ... \"CBIS:openstack_deployment:rsyslog_servers\": [\"${rsyslog_server}\"]\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${cluster_name}\"\n ... ]\n ... }\n ... }\n END\n\n ${json} Evaluate json.loads(\"\"\"${payload}\"\"\") json\n Log ${json}\n ${output_dictionary}= internal_ncs_manager_post /api/log_forwarding_management_bm/deploy ${json}\n ${res}= Collections.Get From Dictionary ${output_dictionary} status\n [Return] ${json}\n\ncheck log forwarding finished\n [Documentation] Check check_local_log_forwarding_management_isActive completes\n [Arguments] ${cluster_name} ${state}=${FALSE}\n ${local_log_forwarding_management_isActive_check}= ncsManagerOperations.get_log_forwarding_management_bm_isActive ${cluster_name}\n Should Be Equal ${local_log_forwarding_management_isActive_check} ${state} log forwarding not finished yet\n\nCheck Storage send logs to rsyslog\n Sleep 2m let rsyslog server load logs fully\n ${conn} ssh.open_connection_to_node ${S_RSYSLOG_IP}\n ${resp} ssh.send_command ${conn} sudo grep -rni 'storagebm' * /var/log/remote/ | head -10\n Should Not Be Empty ${resp} Logs are not sent to rsyslog server from storage\n\nSet Cluster Name\n ${is_central} config.is_centralized_installation\n\tIF ${is_central}\n\t\t${cluster_name} setup.setup_ncs_centralsite_name\n ELSE\n setup.setup_ncs_cluster_name\n Return From Keyword ${S_CLUSTER_NAME}\n END\n [Return] ${cluster_name}\n", "name": "suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3433a523-5939-47d5-9dfb-e92073ea6264", "code": "Precase steps\n\t[Documentation] Runs precase setup and set variables\n\tsetup.precase_setup\n\t${cluster_name} set cluster name\n Set Suite Variable ${S_CLUSTER_NAME} ${cluster_name}", "settings": "{}", "variables": "{}", "name": "Precase steps", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f338a9a0-04e0-4542-b560-dae80146bace", "code": "Configure Rsyslog\n\t[Documentation] Set master 0 as rsyslog server and Enable Log forwarding via API request check that finished successfully\n\tSet Master0 as Rsyslog server\n Configure Rsyslog on Machine\n Create rsyslog server ${S_CLUSTER_NAME}\n Wait Until Keyword Succeeds 40x 20s Check log forwarding finished ${S_CLUSTER_NAME}", "settings": "{}", "variables": "{}", "name": "Configure Rsyslog", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b897405f-f5b7-4d7b-80b9-a65168da75e8", "code": "Test Storage send logs\n\t[Documentation] Test checks that rsyslog server is receiving logs from Storage node\n\tWait Until Keyword Succeeds 40x 20s Check Storage Send Logs To Rsyslog", "settings": "{}", "variables": "{}", "name": "Test Storage send logs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2dac59dd-7a54-46fa-bda0-3a9ce17d06b7", "code": "Configure Rsyslog on Machine\n\t[Documentation] Edits the rsyslog.conf file to enable Rsyslog server\n\t${conn} ssh.open_connection_to_node ${S_RSYSLOG_IP}\n\t${rsyslog_conf} ssh.send_command ${conn} sudo cat /etc/rsyslog.conf\n ${rsyslog_conf_lines} Split to Lines ${rsyslog_conf}\n\n ${ncs_version} ${build_number}= config.installed_ncs_sw_package\n# ${line_to_search} Set Variable $InputTCPServerRun 514\n\n ${line_to_search} Set Variable input(type=\"imtcp\" port=\"514\")\n # Finds the line number of the searched line\n ${line_number} Set Variable\n FOR ${line} IN @{rsyslog_conf_lines}\n \t${status} ${msg} Run Keyword And Ignore Error Should Contain \"${line}\" \"#${line_to_search}\"\n \tIF \"${status}\"==\"FAIL\"\n \t\t${status} ${msg} Run Keyword And Ignore Error Should Contain \"${line}\" \"#${line_to_search}${SPACE}\"\n END\n\n \tIF \"${status}\"==\"PASS\"\n \t\t${index} Get Index From List ${rsyslog_conf_lines} ${line}\n ${line_number} Set Variable ${index}\n ELSE\n \tContinue For Loop\n END\n END\n\n IF \"${line_number}\"==\"${EMPTY}\"\n \tFail line ${line_to_search} was not found, rsyslog configuration file is corrupted\n END\n # Slice list from start to line number + 1\n ${slice1_in_line} Evaluate ${line_number} + 1\n ${slice1} Get Slice From List ${rsyslog_conf_lines} 0 ${slice1_in_line}\n Log ${slice1}\n\n IF \"${ncs_version}\"==\"24.7.0\"\n ${lines_to_insert} Create List\n ... ${SPACE}\n ... module(load=\"imudp\")\n ... input(type=\"imudp\" port=\"514\")\n ... module(load=\"imtcp\")\n ... input(type=\"imtcp\" port=\"514\")\n ... $template RemoteLogs,\"/var/log/remote/%HOSTNAME%/%PROGRAMNAME%.log\"\n ... *.* ?RemoteLogs\n ... & ~\n ... ${SPACE}\n ELSE\n ${lines_to_insert} Create List\n ... ${SPACE}\n ... $ModLoad imudp\n ... $UDPServerRun 514\n ... $ModLoad imtcp\n ... $InputTCPServerRun 514\n ... $template RemoteLogs,\"/var/log/remote/%HOSTNAME%/%PROGRAMNAME%.log\"\n ... *.* ?RemoteLogs\n ... & ~\n ... ${SPACE}\n END\n # Slice list from line number + 2 to end\n ${slice2_in_line} Evaluate ${line_number} + 2\n ${slice2} Get Slice From List ${rsyslog_conf_lines} ${slice2_in_line} end=-1\n Log ${slice2}\n # Combine lists and convert list into string\n ${configured_rsyslog} Combine Lists ${slice1} ${lines_to_insert} ${slice2}\n Log ${configured_rsyslog}\n ${configured_rsyslog_file} Set Variable\n FOR ${line} IN @{configured_rsyslog}\n \t${configured_rsyslog_file} Catenate ${configured_rsyslog_file} ${\\n}${line}\n END\n Log ${configured_rsyslog_file}\n\n # Create New configuration File\n Create File 23/suites/rnd/rsyslog.conf ${configured_rsyslog_file}\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 23/suites/rnd/rsyslog.conf /tmp/rsyslog.conf\n ## Convert to unix file\n ssh.send_command ${conn} sudo dos2unix /tmp/rsyslog.conf\n # Change file permissions\n ssh.send_command ${conn} sudo chmod 644 /tmp/rsyslog.conf\n ssh.send_command ${conn} sudo chown root:root /tmp/rsyslog.conf\n ssh.send_command ${conn} sudo mv /tmp/rsyslog.conf /etc/rsyslog.conf\n # Restart Service\n ssh.send_command ${conn} sudo systemctl restart rsyslog\n Log to Console let rsyslog come up fully\n Sleep 5min", "settings": "{}", "variables": "{}", "name": "Configure Rsyslog on Machine", "documentation": "${conn} ssh.open_connection_to_node ${S_RSYSLOG_IP}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "531bcbca-be98-414a-b118-3ccd4fccd14e", "code": "Set Master0 as Rsyslog server\n\t${is_central} config.is_centralized_installation\n\tIF ${is_central}\n\t\t${conn} ssh.open_connection_to_deployment_server\n ELSE\n \t${conn} ssh.open_connection_to_controller\n END\n ${controllers}= node.get_control_name_list\n ${first_control} Set Variable ${controllers[0]}\n IF \"allinone\" in \"${first_control}\"\n \t${masters} ssh.send_command ${conn} sudo -E openstack cbis cm -S all -c HostName -c Provisioning -f value | grep allinone\n ELSE\n ${masters} ssh.send_command ${conn} sudo -E openstack cbis cm -S all -c HostName -c Provisioning -f value | grep master\n END\n ${lines} Split to Lines ${masters}\n ${masters_Dict} Create Dictionary\n FOR ${line} IN @{lines}\n \t${master_info} Split String ${line} ${SPACE}\n \tSet to Dictionary ${masters_dict} ${master_info[0]}=${master_info[1]}\n END\n ${rsyslog_server_ip} Set Variable", "settings": "{}", "variables": "{}", "name": "Set Master0 as Rsyslog server", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9881_check_storage_sendLogs_to_rsyslog.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "9d479df9-bc52-4385-9735-ff4bcb189ec6", "code": "*** Settings ***\nResource ../../resource/setup.robot\nResource ../../resource/ncsManagerOperations.robot\nResource ../../infra/ncsManagerRestApi.robot\nResource ../../ncsdev/resource/dns_ntp_validation.robot\nResource ../../resource/ncsManagerSecurity.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n@{OPTIONS_FOR_PASSWORDS} @goNokiaNCS123\n\n*** Test Cases ***\nPrecase steps\n [Documentation] Precase setup + Sets variables for TCs\n setup.Precase_setup\n setup.setup_ncs_centralsite_name\n Set NCS User And Password\n ${V} ${B} config.installed_ncs_sw_package\n ${V_B} Set Variable ${V}-${B}\n Set Suite Variable ${S_V_B} ${V_B}\n\nChange the number of the old passwords that can not be used\n\t[Documentation] Change the number of the old passwords that can not be used to 1 for NCS Portal passwoed\n ${num_pw_policy} Get the Number of Password discarded record\n Set Suite Variable ${S_ORIGINAL_NUM_OF_PW_DISCARDED_RECORD} ${num_pw_policy}\n Pass Execution If \"${num_pw_policy}\"==\"1\" the password policy valid for the test case\n Change the Number of Password discarded record new_num_pw_policy=1 username=${S_NCS_USERNAME} password=${S_NCS_PASSWORD}\n\nChange Password With Different patterns\n [Documentation] Changes passswords with different pattern that includes special characters such as (!@#$%^&*_?.()=+~{}/|-)\n ${old_pw} Set Variable ${S_NCS_PASSWORD}\n FOR ${pw} IN @{OPTIONS_FOR_PASSWORDS}\n \t${new_pw} Set Variable ${pw}\n Start Changing Password Process ${old_pw} ${new_pw}\n Verify Changing Password Finished\n Verify New Password Changed On Redis ${new_pw}\n Login to NCS Portal ${S_NCS_USERNAME} ${new_pw}\n ${old_pw} Set Variable ${pw}\n END\n Set Suite Variable ${S_OLD_PW} ${old_pw}\n\nEdit DNS after Change Password\n\tinternal_check_if_dns_exist\n\t${dns_list1} ${dns_list2} internal_set_dns_to_update\n\t${current_dns_list} internal_get_current_dns_list ${S_OLD_PW}\n # make sure to update with new ips and not already used ips\n ${result}= Run Keyword If \"\"\"${dns_list2}\"\"\" == \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list1}\n ... ELSE IF \"\"\"${dns_list2}\"\"\" != \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list2}\n ... ELSE IF \"\"\"${dns_list1}\"\"\" != \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list1}\n ... ELSE IF \"\"\"${dns_list1}\"\"\" == \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list2}\n\nRevert to Original Password\n # change the pw to original\n Start Changing Password Process ${S_OLD_PW} ${S_NCS_PASSWORD}\n Verify Changing Password Finished\n\nChange to Original number of old passwords that can not be used\n\tChange the Number of Password discarded record new_num_pw_policy=${S_ORIGINAL_NUM_OF_PW_DISCARDED_RECORD} username=${S_NCS_USERNAME} password=${S_NCS_PASSWORD}\n\n*** Keywords ***\nGet the Number of Password discarded record\n\t${conn} ssh.open_connection_to_controller\n ${passwoed_policy_resp} ssh.send_command ${conn} ncs user password-policy get | grep password_discarded_record_num\n ssh.close_connection ${conn}\n ${split_passwoed_policy_resp} Split String ${passwoed_policy_resp} ${SPACE}\n ${num_pw_policy} Set Variable ${split_passwoed_policy_resp[-1]}\n ${num_pw_policy} Remove String ${num_pw_policy} ,\n ${num_pw_policy} Strip String ${num_pw_policy}\n [Return] ${num_pw_policy}\n\nChange the Number of Password discarded record\n\t[Arguments] ${new_num_pw_policy} ${username} ${password}\n\t${conn} ssh.open_connection_to_controller\n\tssh.send_command ${conn} sudo ncs user login --username=${username} --password=${password}\n ssh.send_command ${conn} sudo ncs user password-policy set --password_discarded_record_num ${new_num_pw_policy}\n ssh.close_connection ${conn}\n ${current_num_pw_policy} Get the Number of Password discarded record\n Should Be Equal As Integers ${current_num_pw_policy} ${new_num_pw_policy} The password policy has not changed\n\n\nStart Changing password process\n [Documentation] Starts the user management process via API\n [Arguments] ${old_pw} ${pw}\n Log ${S_NCS_USERNAME},${old_pw},${pw},${S_CENTRALSITE_NAME},${S_V_B}\n Change Password ${S_NCS_USERNAME} ${old_pw} ${pw} ${S_CENTRALSITE_NAME} ${S_V_B}\n Wait Until Keyword Succeeds 3x 20s Check if user managerment is Active ${S_CENTRALSITE_NAME}\n Log To Console Changing password operation started...\n\nVerify Changing password finished\n [Documentation] Verifying that operation finished successfully\n Wait Until Keyword Succeeds 10x 60s Check if user management finished ${S_CENTRALSITE_NAME}\n\nSet NCS User and Password\n [Documentation] Set NCS Credentials as variables\n ${ncs_username} Set Variable ${G_NCM_REST_API_USERNAME}\n ${ncs_password} Set Variable ${G_NCM_REST_API_PASSWORD}\n Set Suite Variable ${S_NCS_USERNAME} ${ncs_username}\n Set Suite Variable ${S_NCS_PASSWORD} ${ncs_password}\n\nLogin to NCS Portal\n [Documentation] Login with the NCS Portal Credentials\n [Arguments] ${username} ${password}\n ${ncm_baseurl}= config.ncm_rest_api_base_url\n ${login}= ncmRestApi.login ${ncm_baseurl} ${username} ${password}\n\nCheck if user managerment is Active\n [Documentation] Checks if user management operation is active\n [Arguments] ${clustername}\n ${resp} ncsManagerOperations.get_security_user_management_bm_isActive ${clustername}\n Should Be Equal As Strings ${resp} ${TRUE} user management operation is not active\n\nCheck if user management finished\n [Documentation] Checks if user management operation has finished\n [Arguments] ${clustername}\n ${resp}= ncsManagerOperations.get_security_user_management_bm_state ${clustername}\n ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${clustername}\n Log ${log}\n Run Keyword If \"${resp}\" == \"FAIL\" Fatal Error changing password operation failed!\n Should Be Equal As Strings ${resp} SUCCESS changing password failed\n\nChange Password\n [Documentation] Updates the current password with new one\n [Arguments] ${username} ${old_pw} ${new_pw} ${clustername} ${version_build}\n ${json}= Catenate\n ... {\n ... \"content\": {\n ... \"security_user_management_create_user\": {\n ... \"create_user_parameters\": {\n ... \"create_cbis_manager_user\": false,\n ... \"create_operator_user\": false,\n ... \"create_admin_user\": false\n ... },\n ... \"create_remote_ncs_user_parameters\": {\n ... \"create_remote_ncs_user\": false\n ... }\n ... },\n ... \"security_user_management_delete_user\": {\n ... \"delete_user_parameters\": {\n ... \"delete_cbis_manager_user\": false,\n ... \"delete_operator_user\": false,\n ... \"delete_admin_user\": false\n ... },\n ... \"delete_remote_user_parameters\": {\n ... \"delete_remote_ncs_user\": false\n ... }\n ... },\n ... \"security_user_management_password_udpate\": {\n ... \"password_update_parameters\": {\n ... \"update_cbis_manager_user\": false,\n ... \"update_linux_user_password\": false,\n ... \"update_grafana_user_pwd\": false,\n ... \"update_dashboards_user_pwd\": false\n ... },\n ... \"password_update_remote_ncs_user_parameters\": {\n ... \"update_remote_ncs_user\": true,\n ... \"update_remote_ncs_user_name_value\": \"${username}\",\n ... \"update_remote_ncs_user_current_pwd_value\": \"${old_pw}\",\n ... \"update_remote_ncs_user_pwd_value\": \"${new_pw}\"\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${clustername}\"\n ... ]\n ... },\n ... \"version\": \"${version_build}\",\n ... \"name\": \"security_user_management_bm\"\n ... }\n ${input_dict} Evaluate json.loads(\"\"\"${json}\"\"\") json\n ${output_dict} ncsManagerRestApi.internal_ncs_manager_post /api/security_user_management_bm/deploy ${input_dict}\n [Return] ${output_dict}\n\nverify new password changed on redis\n\t[Arguments] ${new_password}\n\t${cluster_name} config.get_ncs_cluster_name\n\t${conn} ssh.open_connection_to_deployment_server\n\t${python_version} ssh.send_command ${conn} python --version\n\t${python_version} Evaluate \"${python_version}\".split()[-1].split(\".\")[0:2]\n\t${python_v_number} Evaluate '.'.join(${python_version})\n\t${python_v} Set Variable python${python_v_number}\n\t${redis_pw} ssh.send_command ${conn} python /usr/lib/${python_v}/site-packages/cbis_common/credis.py --db 7 --cmd hget cbis:ncs:cluster:${cluster_name} admin_pwd\n\tShould Be Equal ${redis_pw} ${new_password} password has not updated on redis!\n\ncheck_sh_finished\n ${status}= ncsManagerSecurity.get_security_hardening_bm_state_cm\n Log ${status}\n Should Not Be Equal ${status} IN_PROGRESS\n\ncheck_sh_success\n ${status}= ncsManagerSecurity.get_security_hardening_bm_state_cm\n Log ${status}\n Should Be Equal ${status} SUCCESS SH not finished successfully, check the log from /var/log/cbis/${S_CENTRALSITE_NAME}/security_hardening.log\n\ninternal_passwd_reuse\n [Documentation] RHEL-07-010240 / CIS-5.3.3 - Password cannot be reused for 5 generations\n [Arguments] ${node}\n internal_check_if_case_is_valid\n ${cmd}= Set Variable sudo grep -r 'remember=4' /etc/pam.d/password-auth\n ${node_ip}= node.get_centralsitemanager_node_oam_ip_address ${node}\n ${output}= ssh.send_command_to_centralsitemanager ${cmd} 0 ${node_ip}\n Log ${output}\n ${state}= String.Get Regexp Matches ${output} remember=4\n Log ${state}\n Should Not Be Empty ${state} wrong pass expiry info\n ${cmd}= Set Variable sudo grep -r 'remember=4' /etc/pam.d/system-auth\n ${node_ip}= node.get_centralsitemanager_node_oam_ip_address ${node}\n ${output}= ssh.send_command_to_centralsitemanager ${cmd} 0 ${node_ip}\n Log ${output}\n ${state}= String.Get Regexp Matches ${output} remember=4\n Log ${state}\n Should Not Be Empty ${state} wrong passwd reuse amount\n\ninternal_check_if_dns_exist\n ${T_DNS_1} ${T_DNS_2} Get_dns_variables\n Skip If '${T_DNS_1}' == '${EMPTY}' and '${T_DNS_2}' == '${EMPTY}' msg=DNS and NTP Servers are not set!\n\ninternal_set_dns_to_update\n #Option 1\n ${dns_ips}= Create List ${T_DNS_1} ${T_DNS_2}\n ${dns_ips}= evaluate sorted(${dns_ips})\n #Option 2\n ${dns_ips_2}= Create List ${T_DNS_1}\n ${dns_ips_2}= evaluate sorted(${dns_ips_2})\n [Return] ${dns_ips} ${dns_ips_2}\n\ninternal_get_current_dns_list\n [Documentation] fetch dns list from etcd\n [Arguments] ${new_pw}\n ${login} Set Variable sudo ncs user login --username ${S_NCS_USERNAME} --password ${new_pw}\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} ${login}\n ${system_dns_servers}= service.internal_read_dns_servers\n Log ${system_dns_servers}\n ${splited_ips}= Split String ${system_dns_servers} ,\n ${splited_ips_sorted}= evaluate sorted(${splited_ips})\n [Return] ${splited_ips_sorted}\n\ninternal_update_dns\n [Documentation] Update DNS\n [Arguments] ${dns_ips_list}\n ${is_NCS_24_11_above}= config.Is_current_NCS_sw_build_greater_than cbis-24.11.0\n ${add_bm_config}= ncsManagerOperations.get_add_bm_configuration_data\n IF ${is_NCS_24_11_above}\n ${add_bm_config_dns} Update Value To Json ${add_bm_config} $.content.cluster.cluster_basic.\"CBIS:cluster_deployment:cluster_config:external_dns\"[0].forward_ips ${dns_ips_list}\n ncsManagerOperations.post_add_bm_configuration_data ${add_bm_config_dns}\n Log ${add_bm_config_dns}\n ELSE\n ${dns_info}= Create Dictionary CBIS:cluster_deployment:cluster_config:external_dns ${dns_ips_list}\n Set To Dictionary ${add_bm_config['content']['cluster']} cluster_basic ${dns_info}\n ncsManagerOperations.post_add_bm_configuration_data ${add_bm_config}\n Log ${add_bm_config}\n END\n Wait For Operation To Finish DNS add_bm_configuration\n\nWait For Operation To Finish DNS\n [Documentation] Waits for given operation to finish and after done it validates its log to check it was finished successfully.\n [Arguments] ${operation} ${expected_log_message}=*** Flow Finished successfully ***\n Sleep 10 sec\n Wait Until Keyword Succeeds 10 min 10 sec Operation Should Not Be Active DNS ${operation}\n ${log}= Run Keyword ncsManagerOperations.get_${operation}_log\n Should Contain ${log} ${expected_log_message}\n\nOperation Should Not Be Active DNS\n [Documentation] Checks if given operation is not active (running) anymore.\n [Arguments] ${operation}\n ${active}= Run Keyword ncsManagerOperations.get_${operation}_isActive\n Should Not Be True ${active}\n", "name": "suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ncsManagerOperations.robot': 'resource/ncsManagerOperations.robot', '../../infra/ncsManagerRestApi.robot': 'infra/ncsManagerRestApi.robot', '../../ncsdev/resource/dns_ntp_validation.robot': 'ncsdev/resource/dns_ntp_validation.robot', '../../resource/ncsManagerSecurity.robot': 'resource/ncsManagerSecurity.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1ef556cd-82c8-44cf-a44e-fc7d50d75df1", "code": "Precase steps\n [Documentation] Precase setup + Sets variables for TCs\n setup.Precase_setup\n setup.setup_ncs_centralsite_name\n Set NCS User And Password\n ${V} ${B} config.installed_ncs_sw_package\n ${V_B} Set Variable ${V}-${B}\n Set Suite Variable ${S_V_B} ${V_B}", "settings": "{}", "variables": "{}", "name": "Precase steps", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dcf0830b-468e-4afd-813b-e89248012b17", "code": "Change the number of the old passwords that can not be used\n\t[Documentation] Change the number of the old passwords that can not be used to 1 for NCS Portal passwoed\n ${num_pw_policy} Get the Number of Password discarded record\n Set Suite Variable ${S_ORIGINAL_NUM_OF_PW_DISCARDED_RECORD} ${num_pw_policy}\n Pass Execution If \"${num_pw_policy}\"==\"1\" the password policy valid for the test case\n Change the Number of Password discarded record new_num_pw_policy=1 username=${S_NCS_USERNAME} password=${S_NCS_PASSWORD}", "settings": "{}", "variables": "{}", "name": "Change the number of the old passwords that can not be used", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f9711b4b-b046-460f-95f5-7f1a2f337f39", "code": "Change Password With Different patterns\n [Documentation] Changes passswords with different pattern that includes special characters such as (!@#$%^&*_?.()=+~{}/|-)\n ${old_pw} Set Variable ${S_NCS_PASSWORD}\n FOR ${pw} IN @{OPTIONS_FOR_PASSWORDS}\n \t${new_pw} Set Variable ${pw}\n Start Changing Password Process ${old_pw} ${new_pw}\n Verify Changing Password Finished\n Verify New Password Changed On Redis ${new_pw}\n Login to NCS Portal ${S_NCS_USERNAME} ${new_pw}\n ${old_pw} Set Variable ${pw}\n END\n Set Suite Variable ${S_OLD_PW} ${old_pw}", "settings": "{}", "variables": "{'OPTIONS_FOR_PASSWORDS': {'text': '@{OPTIONS_FOR_PASSWORDS} @goNokiaNCS123'}}", "name": "Change Password With Different patterns", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0e84cc69-c105-45c5-bd7c-0b6637febee0", "code": "Edit DNS after Change Password\n\tinternal_check_if_dns_exist\n\t${dns_list1} ${dns_list2} internal_set_dns_to_update\n\t${current_dns_list} internal_get_current_dns_list ${S_OLD_PW}\n # make sure to update with new ips and not already used ips\n ${result}= Run Keyword If \"\"\"${dns_list2}\"\"\" == \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list1}\n ... ELSE IF \"\"\"${dns_list2}\"\"\" != \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list2}\n ... ELSE IF \"\"\"${dns_list1}\"\"\" != \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list1}\n ... ELSE IF \"\"\"${dns_list1}\"\"\" == \"\"\"${current_dns_list}\"\"\"\n ... Internal_update_dns dns_ips_list=${dns_list2}", "settings": "{}", "variables": "{}", "name": "Edit DNS after Change Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "39a829a2-9381-472b-ac5f-2fd346ec4c30", "code": "Revert to Original Password\n # change the pw to original\n Start Changing Password Process ${S_OLD_PW} ${S_NCS_PASSWORD}\n Verify Changing Password Finished", "settings": "{}", "variables": "{}", "name": "Revert to Original Password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "7c9eff73-0034-4f54-a5db-9e64651af815", "code": "Change to Original number of old passwords that can not be used\n\tChange the Number of Password discarded record new_num_pw_policy=${S_ORIGINAL_NUM_OF_PW_DISCARDED_RECORD} username=${S_NCS_USERNAME} password=${S_NCS_PASSWORD}", "settings": "{}", "variables": "{}", "name": "Change to Original number of old passwords that can not be used", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "5bc9184a-b330-4114-a4e3-93d1a80c54ce", "code": "Get the Number of Password discarded record\n\t${conn} ssh.open_connection_to_controller\n ${passwoed_policy_resp} ssh.send_command ${conn} ncs user password-policy get | grep password_discarded_record_num\n ssh.close_connection ${conn}\n ${split_passwoed_policy_resp} Split String ${passwoed_policy_resp} ${SPACE}\n ${num_pw_policy} Set Variable ${split_passwoed_policy_resp[-1]}\n ${num_pw_policy} Remove String ${num_pw_policy} ,\n ${num_pw_policy} Strip String ${num_pw_policy}\n [Return] ${num_pw_policy}\n\nChange the Number of Password discarded record\n\t[Arguments] ${new_num_pw_policy} ${username} ${password}\n\t${conn} ssh.open_connection_to_controller\n\tssh.send_command ${conn} sudo ncs user login --username=${username} --password=${password}\n ssh.send_command ${conn} sudo ncs user password-policy set --password_discarded_record_num ${new_num_pw_policy}\n ssh.close_connection ${conn}\n ${current_num_pw_policy} Get the Number of Password discarded record\n Should Be Equal As Integers ${current_num_pw_policy} ${new_num_pw_policy} The password policy has not changed", "settings": "{}", "variables": "{}", "name": "Get the Number of Password discarded record", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b67f0e29-9a53-4edf-ab5b-72bae2071061", "code": "Start Changing password process\n [Documentation] Starts the user management process via API\n [Arguments] ${old_pw} ${pw}\n Log ${S_NCS_USERNAME},${old_pw},${pw},${S_CENTRALSITE_NAME},${S_V_B}\n Change Password ${S_NCS_USERNAME} ${old_pw} ${pw} ${S_CENTRALSITE_NAME} ${S_V_B}\n Wait Until Keyword Succeeds 3x 20s Check if user managerment is Active ${S_CENTRALSITE_NAME}\n Log To Console Changing password operation started...", "settings": "{}", "variables": "{}", "name": "Start Changing password process", "documentation": "[Arguments] ${old_pw} ${pw}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e44aef22-c546-4fa4-9de8-c96f7a8bf745", "code": "Verify Changing password finished\n [Documentation] Verifying that operation finished successfully\n Wait Until Keyword Succeeds 10x 60s Check if user management finished ${S_CENTRALSITE_NAME}", "settings": "{}", "variables": "{}", "name": "Verify Changing password finished", "documentation": "Wait Until Keyword Succeeds 10x 60s Check if user management finished ${S_CENTRALSITE_NAME}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "96a24c1c-21dc-4408-bf1f-4088b43f1f80", "code": "Set NCS User and Password\n [Documentation] Set NCS Credentials as variables\n ${ncs_username} Set Variable ${G_NCM_REST_API_USERNAME}\n ${ncs_password} Set Variable ${G_NCM_REST_API_PASSWORD}\n Set Suite Variable ${S_NCS_USERNAME} ${ncs_username}\n Set Suite Variable ${S_NCS_PASSWORD} ${ncs_password}", "settings": "{}", "variables": "{}", "name": "Set NCS User and Password", "documentation": "${ncs_username} Set Variable ${G_NCM_REST_API_USERNAME}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "51d40b1c-42fa-4923-b5a8-e79336e66fff", "code": "Login to NCS Portal\n [Documentation] Login with the NCS Portal Credentials\n [Arguments] ${username} ${password}\n ${ncm_baseurl}= config.ncm_rest_api_base_url\n ${login}= ncmRestApi.login ${ncm_baseurl} ${username} ${password}", "settings": "{}", "variables": "{}", "name": "Login to NCS Portal", "documentation": "[Arguments] ${username} ${password}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "eb6d5dd3-2ce8-4ad6-a1e0-9326d4fd1d4f", "code": "Check if user managerment is Active\n [Documentation] Checks if user management operation is active\n [Arguments] ${clustername}\n ${resp} ncsManagerOperations.get_security_user_management_bm_isActive ${clustername}\n Should Be Equal As Strings ${resp} ${TRUE} user management operation is not active", "settings": "{}", "variables": "{}", "name": "Check if user managerment is Active", "documentation": "[Arguments] ${clustername}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "06996be3-ec96-4ded-9a92-9944a9307f19", "code": "Check if user management finished\n [Documentation] Checks if user management operation has finished\n [Arguments] ${clustername}\n ${resp}= ncsManagerOperations.get_security_user_management_bm_state ${clustername}\n ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${clustername}\n Log ${log}\n Run Keyword If \"${resp}\" == \"FAIL\" Fatal Error changing password operation failed!\n Should Be Equal As Strings ${resp} SUCCESS changing password failed", "settings": "{}", "variables": "{}", "name": "Check if user management finished", "documentation": "[Arguments] ${clustername}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "6bb2cf52-de30-487f-aef0-f315a0287f8d", "code": "Change Password\n [Documentation] Updates the current password with new one\n [Arguments] ${username} ${old_pw} ${new_pw} ${clustername} ${version_build}\n ${json}= Catenate\n ... {\n ... \"content\": {\n ... \"security_user_management_create_user\": {\n ... \"create_user_parameters\": {\n ... \"create_cbis_manager_user\": false,\n ... \"create_operator_user\": false,\n ... \"create_admin_user\": false\n ... },\n ... \"create_remote_ncs_user_parameters\": {\n ... \"create_remote_ncs_user\": false\n ... }\n ... },\n ... \"security_user_management_delete_user\": {\n ... \"delete_user_parameters\": {\n ... \"delete_cbis_manager_user\": false,\n ... \"delete_operator_user\": false,\n ... \"delete_admin_user\": false\n ... },\n ... \"delete_remote_user_parameters\": {\n ... \"delete_remote_ncs_user\": false\n ... }\n ... },\n ... \"security_user_management_password_udpate\": {\n ... \"password_update_parameters\": {\n ... \"update_cbis_manager_user\": false,\n ... \"update_linux_user_password\": false,\n ... \"update_grafana_user_pwd\": false,\n ... \"update_dashboards_user_pwd\": false\n ... },\n ... \"password_update_remote_ncs_user_parameters\": {\n ... \"update_remote_ncs_user\": true,\n ... \"update_remote_ncs_user_name_value\": \"${username}\",\n ... \"update_remote_ncs_user_current_pwd_value\": \"${old_pw}\",\n ... \"update_remote_ncs_user_pwd_value\": \"${new_pw}\"\n ... }\n ... }\n ... },\n ... \"metadata\": {\n ... \"clusters\": [\n ... \"${clustername}\"\n ... ]\n ... },\n ... \"version\": \"${version_build}\",\n ... \"name\": \"security_user_management_bm\"\n ... }\n ${input_dict} Evaluate json.loads(\"\"\"${json}\"\"\") json\n ${output_dict} ncsManagerRestApi.internal_ncs_manager_post /api/security_user_management_bm/deploy ${input_dict}\n [Return] ${output_dict}\n\nverify new password changed on redis\n\t[Arguments] ${new_password}\n\t${cluster_name} config.get_ncs_cluster_name\n\t${conn} ssh.open_connection_to_deployment_server\n\t${python_version} ssh.send_command ${conn} python --version\n\t${python_version} Evaluate \"${python_version}\".split()[-1].split(\".\")[0:2]\n\t${python_v_number} Evaluate '.'.join(${python_version})\n\t${python_v} Set Variable python${python_v_number}\n\t${redis_pw} ssh.send_command ${conn} python /usr/lib/${python_v}/site-packages/cbis_common/credis.py --db 7 --cmd hget cbis:ncs:cluster:${cluster_name} admin_pwd\n\tShould Be Equal ${redis_pw} ${new_password} password has not updated on redis!", "settings": "{}", "variables": "{}", "name": "Change Password", "documentation": "[Arguments] ${username} ${old_pw} ${new_pw} ${clustername} ${version_build}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e2929091-c9a9-44a2-a40a-50da88ada37b", "code": "check_sh_finished\n ${status}= ncsManagerSecurity.get_security_hardening_bm_state_cm\n Log ${status}\n Should Not Be Equal ${status} IN_PROGRESS", "settings": "{}", "variables": "{}", "name": "check_sh_finished", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f7d34feb-ee81-4769-9874-77cf5f277461", "code": "check_sh_success\n ${status}= ncsManagerSecurity.get_security_hardening_bm_state_cm\n Log ${status}\n Should Be Equal ${status} SUCCESS SH not finished successfully, check the log from /var/log/cbis/${S_CENTRALSITE_NAME}/security_hardening.log", "settings": "{}", "variables": "{}", "name": "check_sh_success", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "569196de-8f93-496e-a22f-73e19f21256b", "code": "internal_passwd_reuse\n [Documentation] RHEL-07-010240 / CIS-5.3.3 - Password cannot be reused for 5 generations\n [Arguments] ${node}\n internal_check_if_case_is_valid\n ${cmd}= Set Variable sudo grep -r 'remember=4' /etc/pam.d/password-auth\n ${node_ip}= node.get_centralsitemanager_node_oam_ip_address ${node}\n ${output}= ssh.send_command_to_centralsitemanager ${cmd} 0 ${node_ip}\n Log ${output}\n ${state}= String.Get Regexp Matches ${output} remember=4\n Log ${state}\n Should Not Be Empty ${state} wrong pass expiry info\n ${cmd}= Set Variable sudo grep -r 'remember=4' /etc/pam.d/system-auth\n ${node_ip}= node.get_centralsitemanager_node_oam_ip_address ${node}\n ${output}= ssh.send_command_to_centralsitemanager ${cmd} 0 ${node_ip}\n Log ${output}\n ${state}= String.Get Regexp Matches ${output} remember=4\n Log ${state}\n Should Not Be Empty ${state} wrong passwd reuse amount", "settings": "{'String': {'text': 'Library String'}}", "variables": "{}", "name": "internal_passwd_reuse", "documentation": "[Arguments] ${node}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2da35cda-82d4-40ab-bbbf-208126a663ba", "code": "internal_check_if_dns_exist\n ${T_DNS_1} ${T_DNS_2} Get_dns_variables\n Skip If '${T_DNS_1}' == '${EMPTY}' and '${T_DNS_2}' == '${EMPTY}' msg=DNS and NTP Servers are not set!", "settings": "{}", "variables": "{}", "name": "internal_check_if_dns_exist", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9f48c757-eafa-43e2-9073-a5b13ff3476f", "code": "internal_set_dns_to_update\n #Option 1\n ${dns_ips}= Create List ${T_DNS_1} ${T_DNS_2}\n ${dns_ips}= evaluate sorted(${dns_ips})\n #Option 2\n ${dns_ips_2}= Create List ${T_DNS_1}\n ${dns_ips_2}= evaluate sorted(${dns_ips_2})\n [Return] ${dns_ips} ${dns_ips_2}\n\ninternal_get_current_dns_list\n [Documentation] fetch dns list from etcd\n [Arguments] ${new_pw}\n ${login} Set Variable sudo ncs user login --username ${S_NCS_USERNAME} --password ${new_pw}\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} ${login}\n ${system_dns_servers}= service.internal_read_dns_servers\n Log ${system_dns_servers}\n ${splited_ips}= Split String ${system_dns_servers} ,\n ${splited_ips_sorted}= evaluate sorted(${splited_ips})\n [Return] ${splited_ips_sorted}\n\ninternal_update_dns\n [Documentation] Update DNS\n [Arguments] ${dns_ips_list}\n ${is_NCS_24_11_above}= config.Is_current_NCS_sw_build_greater_than cbis-24.11.0\n ${add_bm_config}= ncsManagerOperations.get_add_bm_configuration_data\n IF ${is_NCS_24_11_above}\n ${add_bm_config_dns} Update Value To Json ${add_bm_config} $.content.cluster.cluster_basic.\"CBIS:cluster_deployment:cluster_config:external_dns\"[0].forward_ips ${dns_ips_list}\n ncsManagerOperations.post_add_bm_configuration_data ${add_bm_config_dns}\n Log ${add_bm_config_dns}\n ELSE\n ${dns_info}= Create Dictionary CBIS:cluster_deployment:cluster_config:external_dns ${dns_ips_list}\n Set To Dictionary ${add_bm_config['content']['cluster']} cluster_basic ${dns_info}\n ncsManagerOperations.post_add_bm_configuration_data ${add_bm_config}\n Log ${add_bm_config}\n END\n Wait For Operation To Finish DNS add_bm_configuration", "settings": "{}", "variables": "{}", "name": "internal_set_dns_to_update", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "da2b4f50-ce69-411e-8a5b-93ed3971c0ff", "code": "Wait For Operation To Finish DNS\n [Documentation] Waits for given operation to finish and after done it validates its log to check it was finished successfully.\n [Arguments] ${operation} ${expected_log_message}=*** Flow Finished successfully ***\n Sleep 10 sec\n Wait Until Keyword Succeeds 10 min 10 sec Operation Should Not Be Active DNS ${operation}\n ${log}= Run Keyword ncsManagerOperations.get_${operation}_log\n Should Contain ${log} ${expected_log_message}", "settings": "{}", "variables": "{}", "name": "Wait For Operation To Finish DNS", "documentation": "[Arguments] ${operation} ${expected_log_message}=*** Flow Finished successfully ***", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4987866b-96bf-4254-a5fd-0d95a75de668", "code": "Operation Should Not Be Active DNS\n [Documentation] Checks if given operation is not active (running) anymore.\n [Arguments] ${operation}\n ${active}= Run Keyword ncsManagerOperations.get_${operation}_isActive\n Should Not Be True ${active}", "settings": "{}", "variables": "{}", "name": "Operation Should Not Be Active DNS", "documentation": "[Arguments] ${operation}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9879_NCS_Passwords_Check.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "df99c4a1-1539-4906-836e-1ee6d4477663", "code": "*** Settings ***\n\nDocumentation Ticket: NCSDEV-9859\n... verify that the password for ncs-admin user can be changed only from ncs-manager user management tile.\n... and not from NCS Portal GUI/Keycloak GUI.\n... TEAM: CBIS_NCS_Automation_Tools\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nLibrary Collections\nLibrary String\nLibrary BuiltIn\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n## preparation for the case ------------------------------------------------------------------\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login...\\n\\n\n setup.precase_setup\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case.\\n\\n\n internal_check_if_case_is_valid\n check.precase_cluster_status\n\ntrying_to_change_passwd\n internal_check_if_case_is_valid\n ${conn} ssh.open_connection_to_controller\n ${cmd} Set Variable ncs user password modify --password ${G_NCM_REST_API_PASSWORD} --new-password NewPasswordCheck123$\n ${error_message} Set Variable Password for ncs-admin user can be changed only from ncs-manager user management tile\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} ${cmd}\n ${successfully_matches} Get Regexp Matches ${std_out} ${error_message}\n Should Be Equal As Integers ${code} 1\n Should Be True \"${successfully_matches}\"!=\"[]\"\n ssh.close_connection ${conn}\n\npostcase_cluster_status\n [Documentation] Check cluster status after the case.\\n\\n\n internal_check_if_case_is_valid\n check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Run Keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" Skip IPMI protocol can be used only in baremetal installation.\n", "name": "suites/rnd/NCSDEV-9859_ncs_password_change_check.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9859_ncs_password_change_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f7871f0a-0463-4636-8aef-9af0f0d0520a", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login...\\n\\n\n setup.precase_setup", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9859_ncs_password_change_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "5655fbbc-c03f-484b-ad3c-71923ff706b0", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case.\\n\\n\n internal_check_if_case_is_valid\n check.precase_cluster_status", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9859_ncs_password_change_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8f7092e8-52e7-493f-970f-f686f1fc8699", "code": "trying_to_change_passwd\n internal_check_if_case_is_valid\n ${conn} ssh.open_connection_to_controller\n ${cmd} Set Variable ncs user password modify --password ${G_NCM_REST_API_PASSWORD} --new-password NewPasswordCheck123$\n ${error_message} Set Variable Password for ncs-admin user can be changed only from ncs-manager user management tile\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} ${cmd}\n ${successfully_matches} Get Regexp Matches ${std_out} ${error_message}\n Should Be Equal As Integers ${code} 1\n Should Be True \"${successfully_matches}\"!=\"[]\"\n ssh.close_connection ${conn}", "settings": "{}", "variables": "{}", "name": "trying_to_change_passwd", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9859_ncs_password_change_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6135a755-43b6-4936-a347-addc71d54525", "code": "postcase_cluster_status\n [Documentation] Check cluster status after the case.\\n\\n\n internal_check_if_case_is_valid\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9859_ncs_password_change_check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "117e86a7-55e2-47c0-bcf5-ad45ceae1027", "code": "internal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Run Keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" Skip IPMI protocol can be used only in baremetal installation.", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9859_ncs_password_change_check.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "18a48116-6b49-441b-b7b1-674f9c8944ef", "code": "*** Settings ***\n\nResource ../../resource/setup.robot\nResource ../../resource/config.robot\nResource ../../resource/ssh.robot\n\nSuite Setup setup.Suite_setup\nSuite Teardown setup.Suite_teardown\n\n\n*** Test Cases ***\n\nprecase_test_case\n setup.Precase_setup\n Get_var_log_journal_max_size\n\ncheck_journal_size_before\n ${journal_size}= get_var_log_journal_size\n ${journal_diff}= Get_journal_diff ${S_JOURNAL_MAX_SIZE} ${journal_size}\n Should Be True ${journal_diff} > 0 journal size is bigger than it its max size ${S_JOURNAL_MAX_SIZE}\n\nstress_journal_test\n ${conn}= ssh.Open_connection_to_deployment_server\n ${journal_size}= get_var_log_journal_size\n ${journal_size_number}= Get_var_log_journal_size_number\n ${journal_diff}= Get_journal_diff ${S_JOURNAL_MAX_SIZE} ${journal_size}\n ${journal_regex}= Get Regexp Matches ${journal_size} [0-9.]*([A-Za-z]+) 1\n ${journal_string}= Set Variable ${journal_regex}[0]\n IF \"${journal_string}\" == \"G\"\n ${journal_diff}= Evaluate ${journal_diff} / 1024 / 1024 * 1000\n ${journal_diff}= Convert To Integer ${journal_diff}\n ELSE IF \"${journal_string}\" == \"M\"\n ${journal_diff}= Evaluate ${journal_diff} / 1024 * 1000\n ${journal_diff}= Convert To Integer ${journal_diff}\n ELSE\n ${journal_diff}= Evaluate ${journal_diff} * 1000\n ${journal_diff}= Convert To Integer ${journal_diff}\n END\n\n ${start_stress}= Evaluate 1\n ${end_stress}= Evaluate 5\n FOR ${start_stress} IN RANGE ${end_stress}\n ssh.Send_command ${conn} for i in {1..${journal_diff}}; do dd if=/dev/urandom bs=10000 count=2 | base64 | logger; done\n ${new_journal_size_number}= Get_var_log_journal_size_number\n IF ${new_journal_size_number} > ${journal_size_number}\n ${journal_size}= Set Variable ${new_journal_size_number}\n ELSE\n Exit For Loop\n END\n END\n\n\n\ncheck_journal_size_after\n ${journal_size}= get_var_log_journal_size\n ${journal_diff}= Get_journal_diff ${S_JOURNAL_MAX_SIZE} ${journal_size}\n Should Be True ${journal_diff} > 0 journal size is bigger than it its max size ${S_JOURNAL_MAX_SIZE}\n\n\n\n\n*** Keywords ***\n\nget_var_log_journal_max_size\n ${conn}= ssh.Open_connection_to_deployment_server\n ${journal_conf}= ssh.Send_command ${conn} cat /etc/systemd/journald.conf\n ${journal_max_size}= Get Regexp Matches ${journal_conf} SystemMaxUse=([0-9]+[A-Za-z]+) 1\n Set Suite Variable ${S_JOURNAL_MAX_SIZE} ${journal_max_size}[0]\n ssh.Close_connection ${conn}\n\n\nget_var_log_journal_size\n ${conn}= ssh.Open_connection_to_deployment_server\n ${c_journal_size}= ssh.Send_command ${conn} du -sh /var/log/journal\n ${journal_size}= Get Regexp Matches ${c_journal_size} [0-9.]*[A-Za-z]+\n ssh.Close_connection ${conn}\n log ${journal_size}\n [Return] ${journal_size}[0]\n\nget_var_log_journal_size_number\n ${conn}= ssh.Open_connection_to_deployment_server\n ${c_journal_size}= ssh.Send_command ${conn} du -sh /var/log/journal\n ${journal_size}= Get Regexp Matches ${c_journal_size} ([0-9.]*)[A-Za-z]+ 1\n ${journal_size_number}= Evaluate ${journal_size}[0]\n ssh.Close_connection ${conn}\n log ${journal_size_number}\n [Return] ${journal_size_number}\n\nget_journal_diff\n [Arguments] ${max_journal_size} ${journal_size}\n ${max_journal_regex}= Get Regexp Matches ${max_journal_size} ([0-9.]*)([A-Za-z]+) 1 2\n ${journal_regex}= Get Regexp Matches ${journal_size} ([0-9.]*)([A-Za-z]+) 1 2\n ${max_journal_integer}= Evaluate ${max_journal_regex}[0][0]\n ${max_journal_string}= Set Variable ${max_journal_regex}[0][1]\n ${journal_integer}= Evaluate ${journal_regex}[0][0]\n ${journal_string}= Set Variable ${journal_regex}[0][1]\n ${max_journal_kb_size}= Get_size_in_kb ${max_journal_integer} ${max_journal_string}\n ${journal_kb_size}= Get_size_in_kb ${journal_integer} ${journal_string}\n ${journal_kb_diff}= Evaluate ${max_journal_kb_size} - ${journal_kb_size}\n [Return] ${journal_kb_diff}\n\n\nget_size_in_kb\n [Arguments] ${size_integer} ${size_string}\n IF \"${size_string}\" == \"G\"\n ${size_kb}= Evaluate ${size_integer} * 1024 * 1024\n Return From Keyword ${size_kb}\n ELSE IF \"${size_string}\" == \"M\"\n ${size_kb}= Evaluate ${size_integer} * 1024\n Return From Keyword ${size_kb}\n END\n Return From Keyword ${size_integer}", "name": "suites/rnd/NCSDEV-9737_var_log_journal_test.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/config.robot': 'resource/config.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1b209afd-fece-403e-972b-27d3e74b0524", "code": "precase_test_case\n setup.Precase_setup\n Get_var_log_journal_max_size", "settings": "{}", "variables": "{}", "name": "precase_test_case", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cca6a46a-28b1-40ea-9f68-6812c3ab9d93", "code": "check_journal_size_before\n ${journal_size}= get_var_log_journal_size\n ${journal_diff}= Get_journal_diff ${S_JOURNAL_MAX_SIZE} ${journal_size}\n Should Be True ${journal_diff} > 0 journal size is bigger than it its max size ${S_JOURNAL_MAX_SIZE}", "settings": "{}", "variables": "{}", "name": "check_journal_size_before", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "af38c0dd-3857-4ac5-b3e8-82d03dcb5f4f", "code": "stress_journal_test\n ${conn}= ssh.Open_connection_to_deployment_server\n ${journal_size}= get_var_log_journal_size\n ${journal_size_number}= Get_var_log_journal_size_number\n ${journal_diff}= Get_journal_diff ${S_JOURNAL_MAX_SIZE} ${journal_size}\n ${journal_regex}= Get Regexp Matches ${journal_size} [0-9.]*([A-Za-z]+) 1\n ${journal_string}= Set Variable ${journal_regex}[0]\n IF \"${journal_string}\" == \"G\"\n ${journal_diff}= Evaluate ${journal_diff} / 1024 / 1024 * 1000\n ${journal_diff}= Convert To Integer ${journal_diff}\n ELSE IF \"${journal_string}\" == \"M\"\n ${journal_diff}= Evaluate ${journal_diff} / 1024 * 1000\n ${journal_diff}= Convert To Integer ${journal_diff}\n ELSE\n ${journal_diff}= Evaluate ${journal_diff} * 1000\n ${journal_diff}= Convert To Integer ${journal_diff}\n END\n\n ${start_stress}= Evaluate 1\n ${end_stress}= Evaluate 5\n FOR ${start_stress} IN RANGE ${end_stress}\n ssh.Send_command ${conn} for i in {1..${journal_diff}}; do dd if=/dev/urandom bs=10000 count=2 | base64 | logger; done\n ${new_journal_size_number}= Get_var_log_journal_size_number\n IF ${new_journal_size_number} > ${journal_size_number}\n ${journal_size}= Set Variable ${new_journal_size_number}\n ELSE\n Exit For Loop\n END\n END", "settings": "{}", "variables": "{}", "name": "stress_journal_test", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cc33b1d9-ff86-4613-ae58-839cc1c58cd0", "code": "check_journal_size_after\n ${journal_size}= get_var_log_journal_size\n ${journal_diff}= Get_journal_diff ${S_JOURNAL_MAX_SIZE} ${journal_size}\n Should Be True ${journal_diff} > 0 journal size is bigger than it its max size ${S_JOURNAL_MAX_SIZE}", "settings": "{}", "variables": "{}", "name": "check_journal_size_after", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "fa7405ee-f6c6-483a-a9d3-065fa0569f3c", "code": "get_var_log_journal_max_size\n ${conn}= ssh.Open_connection_to_deployment_server\n ${journal_conf}= ssh.Send_command ${conn} cat /etc/systemd/journald.conf\n ${journal_max_size}= Get Regexp Matches ${journal_conf} SystemMaxUse=([0-9]+[A-Za-z]+) 1\n Set Suite Variable ${S_JOURNAL_MAX_SIZE} ${journal_max_size}[0]\n ssh.Close_connection ${conn}", "settings": "{}", "variables": "{}", "name": "get_var_log_journal_max_size", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c397c75c-0818-4a2c-8961-7538f3defadf", "code": "get_var_log_journal_size\n ${conn}= ssh.Open_connection_to_deployment_server\n ${c_journal_size}= ssh.Send_command ${conn} du -sh /var/log/journal\n ${journal_size}= Get Regexp Matches ${c_journal_size} [0-9.]*[A-Za-z]+\n ssh.Close_connection ${conn}\n log ${journal_size}\n [Return] ${journal_size}[0]\n\nget_var_log_journal_size_number\n ${conn}= ssh.Open_connection_to_deployment_server\n ${c_journal_size}= ssh.Send_command ${conn} du -sh /var/log/journal\n ${journal_size}= Get Regexp Matches ${c_journal_size} ([0-9.]*)[A-Za-z]+ 1\n ${journal_size_number}= Evaluate ${journal_size}[0]\n ssh.Close_connection ${conn}\n log ${journal_size_number}\n [Return] ${journal_size_number}\n\nget_journal_diff\n [Arguments] ${max_journal_size} ${journal_size}\n ${max_journal_regex}= Get Regexp Matches ${max_journal_size} ([0-9.]*)([A-Za-z]+) 1 2\n ${journal_regex}= Get Regexp Matches ${journal_size} ([0-9.]*)([A-Za-z]+) 1 2\n ${max_journal_integer}= Evaluate ${max_journal_regex}[0][0]\n ${max_journal_string}= Set Variable ${max_journal_regex}[0][1]\n ${journal_integer}= Evaluate ${journal_regex}[0][0]\n ${journal_string}= Set Variable ${journal_regex}[0][1]\n ${max_journal_kb_size}= Get_size_in_kb ${max_journal_integer} ${max_journal_string}\n ${journal_kb_size}= Get_size_in_kb ${journal_integer} ${journal_string}\n ${journal_kb_diff}= Evaluate ${max_journal_kb_size} - ${journal_kb_size}\n [Return] ${journal_kb_diff}\n\n\nget_size_in_kb\n [Arguments] ${size_integer} ${size_string}\n IF \"${size_string}\" == \"G\"\n ${size_kb}= Evaluate ${size_integer} * 1024 * 1024\n Return From Keyword ${size_kb}\n ELSE IF \"${size_string}\" == \"M\"\n ${size_kb}= Evaluate ${size_integer} * 1024\n Return From Keyword ${size_kb}\n END\n Return From Keyword ${size_integer}", "settings": "{}", "variables": "{}", "name": "get_var_log_journal_size", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9737_var_log_journal_test.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "0eb72690-3ded-4b5d-851c-bb845e748421", "code": "*** Settings ***\n\nTest Timeout 60 min\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/node.robot\nResource ../../resource/ipmi.robot\nResource ../../resource/ironic.robot\nResource ../../resource/ping.robot\nLibrary Collections\nLibrary String\nLibrary BuiltIn\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n## preparation for the case ------------------------------------------------------------------\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\\n\\n\n setup.precase_setup\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case.\\n\\n\n internal_check_if_case_is_valid\n check.precase_cluster_status\n\n## actual test case --------------------------------------------------------------------------\n\nread_node_to_pwr_off\n [Documentation] Read one node controller name which is not located to deployment server or have rest API base URL. That will be powered OFF.\\n\\n\n internal_check_if_case_is_valid\n ${master_node} ${maintenance_status} internal_get_node_to_pwr_off\n Run Keyword If ${maintenance_status}==${True} ironic.set_node_maintenance_mode_state ${master_node} mode=${False}\n Set Suite Variable ${S_MAINTENANCE_STATUS_BEFORE} ${maintenance_status}\n Set Suite Variable ${S_PWR_OFF_NODE_NAME} ${master_node}\n LOG TO CONSOLE \\n\\tSELECTED_NODE=${master_node}\n\ncreate_suite_variables\n [Documentation] Create suite variables.\n internal_check_if_case_is_valid\n ${ipmi_address_of_the_controller}= ipmi.get_ipmi_address ${S_PWR_OFF_NODE_NAME}\n Log ${ipmi_address_of_the_controller}\n ${private_oam_ip}= node.get_private_oam_ip ${S_PWR_OFF_NODE_NAME}\n Log ${private_oam_ip}\n Set Suite Variable ${S_TEST_IPMI_ADDRESS} ${ipmi_address_of_the_controller}\n Set Suite Variable ${S_RESTART_OAM_IP} ${private_oam_ip}\n LOG TO CONSOLE \\n\\tSelected node ${S_PWR_OFF_NODE_NAME}\\n\\tipmi address=${S_TEST_IPMI_ADDRESS}\\n\\tinternal ip=${S_RESTART_OAM_IP}\n\ncheck_power_status_before\n [Documentation] Check power status before power OFF.\n internal_check_if_case_is_valid\n ipmi.check_if_power_status_is_on ${S_TEST_IPMI_ADDRESS}\n\nping_before\n [Documentation] Confirm that chosen node pings before power OFF.\n internal_check_if_case_is_valid\n ping.node ${S_RESTART_OAM_IP}\n\npower_off_the_node\n [Documentation] Power OFF chosen node.\n internal_check_if_case_is_valid\n Run Keyword And Warn On Failure ipmi.power_off ${S_TEST_IPMI_ADDRESS}\n Log To Console \\n\\t${S_PWR_OFF_NODE_NAME} powered off\n #ssh.close_all_connections\n #ipmi.wait_power_status_to_become_off ${S_TEST_IPMI_ADDRESS}\n Sleep 10 seconds\n\nwait_until_node_come_up_by_ironic\n [Documentation] ironic anticipated to power on on its own (when the node doesn't come up by ironic the test forced power on)\n internal_check_if_case_is_valid\n # Wait until power status becomes ON in chosen node\n ssh.close_all_connections\n Wait Until Keyword Succeeds 60x 20s ipmi.check_if_power_status_is_on ${S_TEST_IPMI_ADDRESS}\n # Wait until the status will be Ready in chosen node\n ${is_node_up} Run Keyword And Return Status internal_wait_node_to_come_up ${S_PWR_OFF_NODE_NAME}\n IF ${is_node_up}==${False}\n ipmi.power_on ${S_TEST_IPMI_ADDRESS}\n ipmi.wait_power_status_to_become_on ${S_TEST_IPMI_ADDRESS}\n Fail The node doesn't come up by ironic\n END\n Wait Until Keyword Succeeds 14x 30s internal_wait_deployment_server_connection_ok\n Wait Until Keyword Succeeds 14x 60s internal_wait_until_ncm_rest_api_login_succeed\n\nwait_until_cluster_gets_stable\n [Documentation] Waiting PODS, nodes and ceph to recover after restart.\\n\\n\n internal_check_if_case_is_valid\n check.wait_until_cluster_gets_stable\n\n# post actions for the case -------------------------------------------------------------------------\n\npostcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created.\\n\\n\n internal_check_if_case_is_valid\n Run Keyword If ${S_MAINTENANCE_STATUS_BEFORE}==${True} ironic.set_node_maintenance_mode_state ${S_PWR_OFF_NODE_NAME} mode=${True}\n setup.suite_cleanup\n ssh.close_all_connections\n\npostcase_cluster_status\n [Documentation] Check cluster status after the case.\\n\\n\n internal_check_if_case_is_valid\n check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Run Keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" Skip IPMI protocol can be used only in baremetal installation.\n\ninternal_get_node_to_pwr_off\n [Documentation] get the deployment node name and maintenance status of node\n ${active_node} Set Variable ${None}\n ${central} config.is_centralized_installation\n ${controller_nodes} node.get_control_name_list\n FOR ${node_name} IN @{controller_nodes}\n ${maintenance_status} ironic.get_node_show_parameters ${node_name} maintenance\n IF ${maintenance_status}==${False}\n ${active_node} Set Variable ${node_name}\n Exit For Loop\n END\n END\n ${active_node} Run Keyword If '${active_node}'=='${None}' Set Variable ${controller_nodes[0]}\n ... ELSE Set Variable ${active_node}\n ${maintenance_status} ironic.get_node_show_parameters ${active_node} maintenance\n [Return] ${active_node} ${maintenance_status}\n\ninternal_wait_deployment_server_connection_ok\n [Documentation] Waits until connection to Deployment server is succeed.\\n\\n\n ssh.close_all_connections\n ${conn}= ssh.open_connection_to_deployment_server\n ${status}= Run Keyword And Return Status ssh.send_command ${conn} date\n ssh.close_connection ${conn}\n run keyword If \"${status}\"==\"${FALSE}\" Fail Deployment servet connection not ready yet!\n ... ELSE Log To Console \\tDeployment server connection OK.\n\ninternal_wait_until_ncm_rest_api_login_succeed\n [Documentation] Waits until ncs restapi login succeed.\\n\\n\n ssh.close_all_connections\n ${status}= Run Keyword And Return Status setup.ncm_rest_api_login\n run keyword If \"${status}\"==\"${FALSE}\" Fail NCM RestApi login NOK!\n ... ELSE Log To Console \\n\\tNCM RestApi login OK.\n\ninternal_wait_node_to_come_up\n [Arguments] ${node_name}\n ssh.close_all_connections\n Wait Until Keyword Succeeds 15x 60s node.node_kubectl_status_is_ok ${node_name}\n", "name": "suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/ipmi.robot': 'resource/ipmi.robot', '../../resource/ironic.robot': 'resource/ironic.robot', '../../resource/ping.robot': 'resource/ping.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "036836af-f340-4cea-ad4d-3959b5b35c78", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login.\\n\\n\n setup.precase_setup", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4f8b7e7a-0ee8-482e-bfa8-731b72352762", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case.\\n\\n\n internal_check_if_case_is_valid\n check.precase_cluster_status\n\n## actual test case --------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "049d382e-25e8-48a3-b130-fe02d6fbbda7", "code": "read_node_to_pwr_off\n [Documentation] Read one node controller name which is not located to deployment server or have rest API base URL. That will be powered OFF.\\n\\n\n internal_check_if_case_is_valid\n ${master_node} ${maintenance_status} internal_get_node_to_pwr_off\n Run Keyword If ${maintenance_status}==${True} ironic.set_node_maintenance_mode_state ${master_node} mode=${False}\n Set Suite Variable ${S_MAINTENANCE_STATUS_BEFORE} ${maintenance_status}\n Set Suite Variable ${S_PWR_OFF_NODE_NAME} ${master_node}\n LOG TO CONSOLE \\n\\tSELECTED_NODE=${master_node}", "settings": "{}", "variables": "{}", "name": "read_node_to_pwr_off", "documentation": "", "imports_file_locations": "{'../../resource/ironic.robot': 'suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c3c9ce7a-da2b-499e-8f81-9c3e6bf3635c", "code": "create_suite_variables\n [Documentation] Create suite variables.\n internal_check_if_case_is_valid\n ${ipmi_address_of_the_controller}= ipmi.get_ipmi_address ${S_PWR_OFF_NODE_NAME}\n Log ${ipmi_address_of_the_controller}\n ${private_oam_ip}= node.get_private_oam_ip ${S_PWR_OFF_NODE_NAME}\n Log ${private_oam_ip}\n Set Suite Variable ${S_TEST_IPMI_ADDRESS} ${ipmi_address_of_the_controller}\n Set Suite Variable ${S_RESTART_OAM_IP} ${private_oam_ip}\n LOG TO CONSOLE \\n\\tSelected node ${S_PWR_OFF_NODE_NAME}\\n\\tipmi address=${S_TEST_IPMI_ADDRESS}\\n\\tinternal ip=${S_RESTART_OAM_IP}", "settings": "{}", "variables": "{}", "name": "create_suite_variables", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f1627451-b34b-4457-b9b6-67a4a374cd5e", "code": "check_power_status_before\n [Documentation] Check power status before power OFF.\n internal_check_if_case_is_valid\n ipmi.check_if_power_status_is_on ${S_TEST_IPMI_ADDRESS}", "settings": "{}", "variables": "{}", "name": "check_power_status_before", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a643063d-42a8-4576-b6b5-2ae4d132379c", "code": "ping_before\n [Documentation] Confirm that chosen node pings before power OFF.\n internal_check_if_case_is_valid\n ping.node ${S_RESTART_OAM_IP}", "settings": "{}", "variables": "{}", "name": "ping_before", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "206fa74c-70eb-49d5-9eb3-c1fd49fd5016", "code": "power_off_the_node\n [Documentation] Power OFF chosen node.\n internal_check_if_case_is_valid\n Run Keyword And Warn On Failure ipmi.power_off ${S_TEST_IPMI_ADDRESS}\n Log To Console \\n\\t${S_PWR_OFF_NODE_NAME} powered off\n #ssh.close_all_connections\n #ipmi.wait_power_status_to_become_off ${S_TEST_IPMI_ADDRESS}\n Sleep 10 seconds", "settings": "{}", "variables": "{}", "name": "power_off_the_node", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b22dd11b-9fc1-4fff-bd1d-7db69fc992d2", "code": "wait_until_node_come_up_by_ironic\n [Documentation] ironic anticipated to power on on its own (when the node doesn't come up by ironic the test forced power on)\n internal_check_if_case_is_valid\n # Wait until power status becomes ON in chosen node\n ssh.close_all_connections\n Wait Until Keyword Succeeds 60x 20s ipmi.check_if_power_status_is_on ${S_TEST_IPMI_ADDRESS}\n # Wait until the status will be Ready in chosen node\n ${is_node_up} Run Keyword And Return Status internal_wait_node_to_come_up ${S_PWR_OFF_NODE_NAME}\n IF ${is_node_up}==${False}\n ipmi.power_on ${S_TEST_IPMI_ADDRESS}\n ipmi.wait_power_status_to_become_on ${S_TEST_IPMI_ADDRESS}\n Fail The node doesn't come up by ironic\n END\n Wait Until Keyword Succeeds 14x 30s internal_wait_deployment_server_connection_ok\n Wait Until Keyword Succeeds 14x 60s internal_wait_until_ncm_rest_api_login_succeed", "settings": "{}", "variables": "{}", "name": "wait_until_node_come_up_by_ironic", "documentation": "", "imports_file_locations": "{'../../resource/ironic.robot': 'suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot', '../../resource/node.robot': 'suites/production/2052_power_off_on_active_controller_node.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "fe395694-db76-4970-8c81-525aa73071ce", "code": "wait_until_cluster_gets_stable\n [Documentation] Waiting PODS, nodes and ceph to recover after restart.\\n\\n\n internal_check_if_case_is_valid\n check.wait_until_cluster_gets_stable\n\n# post actions for the case -------------------------------------------------------------------------", "settings": "{}", "variables": "{}", "name": "wait_until_cluster_gets_stable", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "75419318-5968-47fd-83e0-3d7d8d922b8e", "code": "postcase_cleanup\n [Documentation] Cleanup any possible object this robot suite might have created.\\n\\n\n internal_check_if_case_is_valid\n Run Keyword If ${S_MAINTENANCE_STATUS_BEFORE}==${True} ironic.set_node_maintenance_mode_state ${S_PWR_OFF_NODE_NAME} mode=${True}\n setup.suite_cleanup\n ssh.close_all_connections", "settings": "{}", "variables": "{}", "name": "postcase_cleanup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "5e3615d1-6aec-4b7e-b953-4b72659d87ad", "code": "postcase_cluster_status\n [Documentation] Check cluster status after the case.\\n\\n\n internal_check_if_case_is_valid\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "cdff0ddf-a7c6-4957-8f09-2796dba4fdb0", "code": "internal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Run Keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" Skip IPMI protocol can be used only in baremetal installation.", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d6eee13a-5014-42dd-970c-4ebbe2b64b6d", "code": "internal_get_node_to_pwr_off\n [Documentation] get the deployment node name and maintenance status of node\n ${active_node} Set Variable ${None}\n ${central} config.is_centralized_installation\n ${controller_nodes} node.get_control_name_list\n FOR ${node_name} IN @{controller_nodes}\n ${maintenance_status} ironic.get_node_show_parameters ${node_name} maintenance\n IF ${maintenance_status}==${False}\n ${active_node} Set Variable ${node_name}\n Exit For Loop\n END\n END\n ${active_node} Run Keyword If '${active_node}'=='${None}' Set Variable ${controller_nodes[0]}\n ... ELSE Set Variable ${active_node}\n ${maintenance_status} ironic.get_node_show_parameters ${active_node} maintenance\n [Return] ${active_node} ${maintenance_status}\n\ninternal_wait_deployment_server_connection_ok\n [Documentation] Waits until connection to Deployment server is succeed.\\n\\n\n ssh.close_all_connections\n ${conn}= ssh.open_connection_to_deployment_server\n ${status}= Run Keyword And Return Status ssh.send_command ${conn} date\n ssh.close_connection ${conn}\n run keyword If \"${status}\"==\"${FALSE}\" Fail Deployment servet connection not ready yet!\n ... ELSE Log To Console \\tDeployment server connection OK.", "settings": "{}", "variables": "{}", "name": "internal_get_node_to_pwr_off", "documentation": "${active_node} Set Variable ${None}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c56f5d79-9fc0-449a-b3d6-e47e895b3ece", "code": "internal_wait_until_ncm_rest_api_login_succeed\n [Documentation] Waits until ncs restapi login succeed.\\n\\n\n ssh.close_all_connections\n ${status}= Run Keyword And Return Status setup.ncm_rest_api_login\n run keyword If \"${status}\"==\"${FALSE}\" Fail NCM RestApi login NOK!\n ... ELSE Log To Console \\n\\tNCM RestApi login OK.", "settings": "{}", "variables": "{}", "name": "internal_wait_until_ncm_rest_api_login_succeed", "documentation": "ssh.close_all_connections", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "1a28d6c1-00ef-4134-af12-eb2fb85af165", "code": "internal_wait_node_to_come_up\n [Arguments] ${node_name}\n ssh.close_all_connections\n Wait Until Keyword Succeeds 15x 60s node.node_kubectl_status_is_ok ${node_name}", "settings": "{}", "variables": "{}", "name": "internal_wait_node_to_come_up", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9610_Check_node_come_up_by_ironic.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "959756fc-ec18-4778-a520-3734d0db624a", "code": "*** Settings ***\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../ncsdev/resource/certificate_renew_test_helper.robot\nLibrary String\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n${namespace_name} ncms\n\n# Release info\n${release_name} autotestcm\n${chart_name} stable\\/citm-ingress\n${http_port} 1111\n${https_port} 2222\n\n# helm variable will be taken form this referenc release, it is assume it is in namespace as release to be installed\n${reference_release} bcmt-citm-ingress\n\n# Certificate details\n${certificate_name} ${release_name}-cert-name\n${secret_name} ${release_name}-secret-name\n${dnsName} ${release_name}-dns-name\n${issuer_name} ncms-ca-issuer\n${issuer_kind} ClusterIssuer\n\n# General, this will be saved later with date before certificate update\n${original_expiration_date} ${EMPTY}\n\n*** Test Cases ***\nCertificate Creation\n [Setup] Clean Up\n Create Certificate\n Install New Release\n Verify Certification In Release\n\nTest Certificate State\n certificate_renew_test_helper.list_installed_charts namespace=${namespace_name}\n certificate_renew_test_helper.Print Certificate Status namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Certificate namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Secret namespace=${namespace_name} secret=${secret_name}\n Verify Certification In Release\n\nTest Renew Certificate\n [Teardown] Clean Up\n # Save original certifidate expiration date\n ${result}= Get Expiration Date\n Set Global Variable ${original_expiration_date} ${result}\n\n # Now, renew the certificate\n certificate_renew_test_helper.Renew Certificate namespace=${namespace_name} certificate=${certificate_name}\n Log Sleeping for 5 seconds, to let secret to be renew INFO False console=True\n Sleep 5s\n certificate_renew_test_helper.Print Certificate Status namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Certificate namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Secret namespace=${namespace_name} secret=${secret_name}\n\n # Rolloput application...\n Restart Application\n\n # Verify certificate after change\n Verify Certification In Release\n\n # Verify expiration date has changed\n ${new_expiration_time}= Get Expiration Date\n Log Old expiration time is ${original_expiration_date} INFO False console=True\n Log New expiration time is ${new_expiration_time} INFO False console=True\n\n IF \"${new_expiration_time}\" != \"${original_expiration_date}\"\n Log Expiration time has been updated succesfully INFO False console=True\n ELSE\n Fail Expiration time has not been updated\n END\n\n*** Keywords ***\nClean Up\n # Uninstall the release\n ${conn} ssh.open_connection_to_controller\n ${uninstall_release}= Set Variable sudo helm uninstall -n ${namespace_name} ${release_name} || true\n ssh.send_command ${conn} ${uninstall_release}\n\n log Delete Secret INFO False console=True\n ${delete_secret_command} = Set Variable sudo kubectl delete secret ${secret_name} -n ${namespace_name} --ignore-not-found\n ssh.send_command ${conn} ${delete_secret_command}\n\n log Delete Certificates INFO False console=True\n ${delete_certificate_command} = Set Variable sudo kubectl delete certificates ${certificate_name} -n ${namespace_name} --ignore-not-found\n ssh.send_command ${conn} ${delete_certificate_command}\n\nCreate Certificate\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/ncsdev/resource/autotestcm-cert-name.json /tmp/\n ${conn} ssh.open_connection_to_controller\n ${create_certificate_command}= Set Variable sudo kubectl apply -f /tmp/autotestcm-cert-name.json -n ${namespace_name}\n ssh.send_command ${conn} ${create_certificate_command}\n Log Sleep for 5 seconds to let secret to be created INFO False console=True\n Sleep 5s\n certificate_renew_test_helper.Print Certificate Status namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Certificate namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Secret namespace=${namespace_name} secret=${secret_name}\n\nInstall New Release\n ${values_file} Set Variable /tmp/ref_rel_values.txt\n ${conn} ssh.open_connection_to_controller\n # Prepare info for release.\n ssh.send_command ${conn} sudo helm get values -n ${namespace_name} ${reference_release} > ${values_file}\n ${command} Set Variable sudo sed -i 's/.*defaultSSLCertificate.*/${SPACE}${SPACE}defaultSSLCertificate\\\\: ${namespace_name}\\\\/${secret_name}/' ${values_file}\n ssh.send_command ${conn} ${command}\n ssh.send_command ${conn} sudo sed -i 's/.*httpPort.*/${SPACE}${SPACE}httpPort: \"${http_port}\"/' ${values_file}\n ssh.send_command ${conn} sudo sed -i 's/.*httpsPort.*/${SPACE}${SPACE}httpsPort: \"${https_port}\"/' ${values_file}\n\n # Now that variable file hasn been updated, we can install the application.\n ${install_command} Set Variable sudo -S -E helm install ${release_name} ${chart_name} -n ${namespace_name} -f ${values_file} --set controller.service.targetPorts.https=${https_port} --set controller.service.targetPorts.http=${http_port} --wait\n ssh.send_command ${conn} ${install_command}\n ssh.send_command ${conn} sudo helm status -n ${namespace_name} ${release_name}\n Log Sleep for 5 seconds to let app come up... INFO False console=True\n Sleep 5s\n\nVerify Certification In Release\n ${conn} ssh.open_connection_to_controller\n ${command_get_certificate} Set Variable openssl s_client -connect ${release_name}-citm-ingress.ncms.svc:${https_port} 2>/dev/null < /dev/null | openssl x509 -text\n ${certificate_output}= ssh.send_command ${conn} ${command_get_certificate}\n Log certificate_output = ${certificate_output}\n\n ${command} Set Variable openssl s_client -connect ${release_name}-citm-ingress.ncms.svc:${https_port} 2>/dev/null < /dev/null | openssl x509 -text | grep ${dnsName}\n ssh.send_command ${conn} ${command}\n ${expire_date}= Get Expiration Date\n Log Expiration date of certificate is ${expire_date} INFO False console=True\n\nGet Expiration Date\n ${conn} ssh.open_connection_to_controller\n ${command} Set Variable openssl s_client -connect ${release_name}-citm-ingress.ncms.svc:${https_port} 2>/dev/null < /dev/null | openssl x509 -text | grep 'Not After'\n ${result}= ssh.send_command ${conn} ${command}\n [Return] ${result}\n\nRestart Application\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo kubectl rollout restart daemonset -n ${namespace_name} ${release_name}-citm-ingress\n ssh.send_command ${conn} sudo kubectl rollout status daemonset -n ${namespace_name} ${release_name}-citm-ingress --timeout=300s\n", "name": "suites/rnd/NCSDEV-9464-renew_certificate.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../ncsdev/resource/certificate_renew_test_helper.robot': 'ncsdev/resource/certificate_renew_test_helper.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "cb6cbcfd-e534-4e16-9cfe-df03a9ebc0f4", "code": "Certificate Creation\n [Setup] Clean Up\n Create Certificate\n Install New Release\n Verify Certification In Release", "settings": "{}", "variables": "{}", "name": "Certificate Creation", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "621fc6b3-791d-484b-bb24-024b68b50969", "code": "Test Certificate State\n certificate_renew_test_helper.list_installed_charts namespace=${namespace_name}\n certificate_renew_test_helper.Print Certificate Status namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Certificate namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Secret namespace=${namespace_name} secret=${secret_name}\n Verify Certification In Release", "settings": "{}", "variables": "{'namespace_name': {'text': '${namespace_name} ncms'}, 'certificate_name': {'text': '${certificate_name} ${release_name}-cert-name'}, 'secret_name': {'text': '${secret_name} ${release_name}-secret-name'}}", "name": "Test Certificate State", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "08f37fc7-835f-49d2-9a51-e03bd3c01832", "code": "Test Renew Certificate\n [Teardown] Clean Up\n # Save original certifidate expiration date\n ${result}= Get Expiration Date\n Set Global Variable ${original_expiration_date} ${result}\n\n # Now, renew the certificate\n certificate_renew_test_helper.Renew Certificate namespace=${namespace_name} certificate=${certificate_name}\n Log Sleeping for 5 seconds, to let secret to be renew INFO False console=True\n Sleep 5s\n certificate_renew_test_helper.Print Certificate Status namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Certificate namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Secret namespace=${namespace_name} secret=${secret_name}\n\n # Rolloput application...\n Restart Application\n\n # Verify certificate after change\n Verify Certification In Release\n\n # Verify expiration date has changed\n ${new_expiration_time}= Get Expiration Date\n Log Old expiration time is ${original_expiration_date} INFO False console=True\n Log New expiration time is ${new_expiration_time} INFO False console=True\n\n IF \"${new_expiration_time}\" != \"${original_expiration_date}\"\n Log Expiration time has been updated succesfully INFO False console=True\n ELSE\n Fail Expiration time has not been updated\n END", "settings": "{}", "variables": "{'original_expiration_date': {'text': '${original_expiration_date} ${EMPTY}'}, 'namespace_name': {'text': '${namespace_name} ncms'}, 'certificate_name': {'text': '${certificate_name} ${release_name}-cert-name'}, 'secret_name': {'text': '${secret_name} ${release_name}-secret-name'}}", "name": "Test Renew Certificate", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "56bc74a2-b023-469a-aaf8-191ef7b2c095", "code": "Clean Up\n # Uninstall the release\n ${conn} ssh.open_connection_to_controller\n ${uninstall_release}= Set Variable sudo helm uninstall -n ${namespace_name} ${release_name} || true\n ssh.send_command ${conn} ${uninstall_release}\n\n log Delete Secret INFO False console=True\n ${delete_secret_command} = Set Variable sudo kubectl delete secret ${secret_name} -n ${namespace_name} --ignore-not-found\n ssh.send_command ${conn} ${delete_secret_command}\n\n log Delete Certificates INFO False console=True\n ${delete_certificate_command} = Set Variable sudo kubectl delete certificates ${certificate_name} -n ${namespace_name} --ignore-not-found\n ssh.send_command ${conn} ${delete_certificate_command}", "settings": "{}", "variables": "{'namespace_name': {'text': '${namespace_name} ncms'}, 'release_name': {'text': '${release_name} autotestcm'}, 'secret_name': {'text': '${secret_name} ${release_name}-secret-name'}, 'certificate_name': {'text': '${certificate_name} ${release_name}-cert-name'}}", "name": "Clean Up", "documentation": "", "imports_file_locations": "{'../../ncsdev/resource/certificate_renew_test_helper.robot': 'ncsdev/resource/certificate_renew_test_helper.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b558c626-bcf8-421a-8e72-73fc4429d447", "code": "Create Certificate\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/ncsdev/resource/autotestcm-cert-name.json /tmp/\n ${conn} ssh.open_connection_to_controller\n ${create_certificate_command}= Set Variable sudo kubectl apply -f /tmp/autotestcm-cert-name.json -n ${namespace_name}\n ssh.send_command ${conn} ${create_certificate_command}\n Log Sleep for 5 seconds to let secret to be created INFO False console=True\n Sleep 5s\n certificate_renew_test_helper.Print Certificate Status namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Certificate namespace=${namespace_name} certificate=${certificate_name}\n certificate_renew_test_helper.Print Secret namespace=${namespace_name} secret=${secret_name}", "settings": "{}", "variables": "{'namespace_name': {'text': '${namespace_name} ncms'}, 'certificate_name': {'text': '${certificate_name} ${release_name}-cert-name'}, 'secret_name': {'text': '${secret_name} ${release_name}-secret-name'}}", "name": "Create Certificate", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d3a675e8-d6af-4325-a93b-0315735cc130", "code": "Install New Release\n ${values_file} Set Variable /tmp/ref_rel_values.txt\n ${conn} ssh.open_connection_to_controller\n # Prepare info for release.\n ssh.send_command ${conn} sudo helm get values -n ${namespace_name} ${reference_release} > ${values_file}\n ${command} Set Variable sudo sed -i 's/.*defaultSSLCertificate.*/${SPACE}${SPACE}defaultSSLCertificate\\\\: ${namespace_name}\\\\/${secret_name}/' ${values_file}\n ssh.send_command ${conn} ${command}\n ssh.send_command ${conn} sudo sed -i 's/.*httpPort.*/${SPACE}${SPACE}httpPort: \"${http_port}\"/' ${values_file}\n ssh.send_command ${conn} sudo sed -i 's/.*httpsPort.*/${SPACE}${SPACE}httpsPort: \"${https_port}\"/' ${values_file}\n\n # Now that variable file hasn been updated, we can install the application.\n ${install_command} Set Variable sudo -S -E helm install ${release_name} ${chart_name} -n ${namespace_name} -f ${values_file} --set controller.service.targetPorts.https=${https_port} --set controller.service.targetPorts.http=${http_port} --wait\n ssh.send_command ${conn} ${install_command}\n ssh.send_command ${conn} sudo helm status -n ${namespace_name} ${release_name}\n Log Sleep for 5 seconds to let app come up... INFO False console=True\n Sleep 5s", "settings": "{}", "variables": "{'namespace_name': {'text': '${namespace_name} ncms'}, 'reference_release': {'text': '${reference_release} bcmt-citm-ingress'}, 'secret_name': {'text': '${secret_name} ${release_name}-secret-name'}, 'http_port': {'text': '${http_port} 1111'}, 'https_port': {'text': '${https_port} 2222'}, 'release_name': {'text': '${release_name} autotestcm'}, 'chart_name': {'text': '${chart_name} stable\\\\/citm-ingress'}}", "name": "Install New Release", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "69545a9e-a392-497d-988d-c72391f9bd0e", "code": "Verify Certification In Release\n ${conn} ssh.open_connection_to_controller\n ${command_get_certificate} Set Variable openssl s_client -connect ${release_name}-citm-ingress.ncms.svc:${https_port} 2>/dev/null < /dev/null | openssl x509 -text\n ${certificate_output}= ssh.send_command ${conn} ${command_get_certificate}\n Log certificate_output = ${certificate_output}\n\n ${command} Set Variable openssl s_client -connect ${release_name}-citm-ingress.ncms.svc:${https_port} 2>/dev/null < /dev/null | openssl x509 -text | grep ${dnsName}\n ssh.send_command ${conn} ${command}\n ${expire_date}= Get Expiration Date\n Log Expiration date of certificate is ${expire_date} INFO False console=True", "settings": "{}", "variables": "{'release_name': {'text': '${release_name} autotestcm'}, 'https_port': {'text': '${https_port} 2222'}, 'dnsName': {'text': '${dnsName} ${release_name}-dns-name'}}", "name": "Verify Certification In Release", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "d2166cb9-759d-413e-bca2-1b2ccd5ddfd1", "code": "Get Expiration Date\n ${conn} ssh.open_connection_to_controller\n ${command} Set Variable openssl s_client -connect ${release_name}-citm-ingress.ncms.svc:${https_port} 2>/dev/null < /dev/null | openssl x509 -text | grep 'Not After'\n ${result}= ssh.send_command ${conn} ${command}\n [Return] ${result}\n\nRestart Application\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo kubectl rollout restart daemonset -n ${namespace_name} ${release_name}-citm-ingress\n ssh.send_command ${conn} sudo kubectl rollout status daemonset -n ${namespace_name} ${release_name}-citm-ingress --timeout=300s", "settings": "{}", "variables": "{'release_name': {'text': '${release_name} autotestcm'}, 'https_port': {'text': '${https_port} 2222'}, 'namespace_name': {'text': '${namespace_name} ncms'}}", "name": "Get Expiration Date", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9464-renew_certificate.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "38a59553-342d-4883-967c-7c04c9d46a12", "code": "*** Settings ***\nDocumentation Logs check file is testing the logs under /var/log\n ... TC 1 : Test Ironic Logs\n\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nLibrary String\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Variables ***\n${IRONIC_LOGS_PATTERN} Failed to attach Virtual media. Max retries exceeded\n\n*** Test Cases ***\nPrecase Setup\n [Documentation] Runs precase setup and creates the dicitionary for the test cases\n setup.precase_setup\n # Set Key=Value in manner of Path=Pattern\n ${path_pattern_dict} Create Dictionary\n ... /var/log/ironic/ironic-conductor.log=${IRONIC_LOGS_PATTERN}\n Set Suite Variable ${S_PATH_PATTERN} &{path_pattern_dict}\n\nTest Ironic Logs\n [Documentation] Checks that ${IRONIC_LOGS_PATTERN} is not in ironic-conductor logs\n ${ironic_log_result} Check Log files ${S_PATH_PATTERN}\n List Should Not Contain Value ${ironic_log_result} ${IRONIC_LOGS_PATTERN} the pattern: ${IRONIC_LOGS_PATTERN} found in ironic logs!\n\n*** Keywords ***\nCheck Log files\n [Arguments] ${path_pattern_dict}\n ${conn} ssh.open_connection_to_controller\n ${results} Create List\n FOR ${key} IN @{path_pattern_dict}\n ${pattern} Get From Dictionary ${path_pattern_dict} ${key}\n ${resp} ${err} ${code} ssh.send_command_and_return_rc ${conn} sudo awk '/\"${pattern}\"/{found=1;exit}END{if(!found)exit 1}' ${key}\n IF \"${code}\"!=\"0\"\n Append To List ${results} ${TRUE}\n ELSE\n Append To List ${results} ${pattern}\n END\n END\n [Return] ${results}\n", "name": "suites/rnd/NCSDEV-9463-logs_check_tests.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9463-logs_check_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "f125bc47-6567-4ed7-9d12-7fb216c2f6c2", "code": "Precase Setup\n [Documentation] Runs precase setup and creates the dicitionary for the test cases\n setup.precase_setup\n # Set Key=Value in manner of Path=Pattern\n ${path_pattern_dict} Create Dictionary\n ... /var/log/ironic/ironic-conductor.log=${IRONIC_LOGS_PATTERN}\n Set Suite Variable ${S_PATH_PATTERN} &{path_pattern_dict}", "settings": "{}", "variables": "{'IRONIC_LOGS_PATTERN': {'text': '${IRONIC_LOGS_PATTERN} Failed to attach Virtual media. Max retries exceeded'}}", "name": "Precase Setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9463-logs_check_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "329cf675-2227-4094-9b15-cc65d9ab83f7", "code": "Test Ironic Logs\n [Documentation] Checks that ${IRONIC_LOGS_PATTERN} is not in ironic-conductor logs\n ${ironic_log_result} Check Log files ${S_PATH_PATTERN}\n List Should Not Contain Value ${ironic_log_result} ${IRONIC_LOGS_PATTERN} the pattern: ${IRONIC_LOGS_PATTERN} found in ironic logs!", "settings": "{}", "variables": "{'IRONIC_LOGS_PATTERN': {'text': '${IRONIC_LOGS_PATTERN} Failed to attach Virtual media. Max retries exceeded'}}", "name": "Test Ironic Logs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9463-logs_check_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4d199d2a-b264-4153-adfe-90fa03837ff5", "code": "Check Log files\n [Arguments] ${path_pattern_dict}\n ${conn} ssh.open_connection_to_controller\n ${results} Create List\n FOR ${key} IN @{path_pattern_dict}\n ${pattern} Get From Dictionary ${path_pattern_dict} ${key}\n ${resp} ${err} ${code} ssh.send_command_and_return_rc ${conn} sudo awk '/\"${pattern}\"/{found=1;exit}END{if(!found)exit 1}' ${key}\n IF \"${code}\"!=\"0\"\n Append To List ${results} ${TRUE}\n ELSE\n Append To List ${results} ${pattern}\n END\n END", "settings": "{}", "variables": "{}", "name": "Check Log files", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9463-logs_check_tests.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "cf6c33e5-0470-475f-baa8-49e6c8609c0a", "code": "*** Settings ***\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nLibrary String\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n\n*** Test Cases ***\nSet Variables\n [Documentation] Set variables for the test cases\n setup.precase_setup\n ${harbor_portal_pod} Get Harbor Portal pod\n Set Suite Variable ${S_HARBOR_PORTAL_POD} ${harbor_portal_pod}\n\nCheck Num of CPU\n [Documentation] Check that num of CPU is 4\n ${num_of_cpu} Get Number Of CPU for Worker ${S_HARBOR_PORTAL_POD}\n Set Suite Variable ${S_NUM_OF_CPU} ${num_of_cpu}\n log ${num_of_cpu}\n Should Be Equal As Strings ${num_of_cpu} 4 Number of CPU for worker is not 4 : ${num_of_cpu}\n\nCheck worker proccess\n [Documentation] Check that num of Worker proccess is 4 in nginx.conf file\n ${num_of_proccess} Get worker proccess configuration ${S_HARBOR_PORTAL_POD}\n Set Suite Variable ${S_NUM_OF_PROC} ${num_of_proccess}\n log ${num_of_proccess}\n Should Be Equal As Strings ${num_of_proccess} 4\n ... Number Of Proccess in configuration file for worker is not 4 : ${num_of_proccess}\n\nCheck cpu proccess diff\n [Documentation] Checks if there is difference between number of current CPU for worker and the number of proccess in the conf file\n Should Not Be True ${S_NUM_OF_CPU}>${S_NUM_OF_PROC}\n ... number of current CPU is bigger than number of proccess in configuration file : ${S_NUM_OF_CPU}>${S_NUM_OF_PROC}\n\n*** Keywords ***\nGet Harbor Portal pod\n [Documentation] Return the portal pod name if not exist returns false\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl get pods -nncms | grep harbor\n ${lines} Split To Lines ${resp}\n FOR ${l} IN @{lines}\n IF \"portal\" in \"${l}\"\n ${split} Split String ${l} ${SPACE}\n ${harbor_portal} Set Variable ${split[0]}\n Return From Keyword ${harbor_portal}\n ELSE\n Continue For Loop\n END\n END\n Return From Keyword ${FALSE}\n\nGet Number Of CPU for Worker\n [Documentation] Returns number of procces for worker in the machine\n [Arguments] ${harbor_portal_pod}\n IF '${harbor_portal_pod}'=='${FALSE}'\n Fail harbor portal pod not exist\n END\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl exec -it -nncms ${harbor_portal_pod} -c \"portal\" -- ps aux | grep -c worker\n [Return] ${resp}\n\nGet worker proccess configuration\n [Documentation] Returns the number of worker proccess from nginx.conf file\n [Arguments] ${harbor_portal_pod}\n IF '${harbor_portal_pod}'=='${FALSE}'\n Fail harbor portal pod not exist\n END\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl exec -it -n ncms ${harbor_portal_pod} -c \"portal\" -- grep worker_pro /etc/nginx/nginx.conf\n ${r_resp} Remove String ${resp} ;\n ${split} Split String ${r_resp} ${SPACE}\n [Return] ${split[-1]}", "name": "suites/rnd/NCSDEV-9243_test_harbor_workers.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "820a9a94-e3ae-411e-bd28-e7e6ffeefdf0", "code": "Set Variables\n [Documentation] Set variables for the test cases\n setup.precase_setup\n ${harbor_portal_pod} Get Harbor Portal pod\n Set Suite Variable ${S_HARBOR_PORTAL_POD} ${harbor_portal_pod}", "settings": "{}", "variables": "{}", "name": "Set Variables", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "323237fe-6ab5-4a8f-a001-e387331e8470", "code": "Check Num of CPU\n [Documentation] Check that num of CPU is 4\n ${num_of_cpu} Get Number Of CPU for Worker ${S_HARBOR_PORTAL_POD}\n Set Suite Variable ${S_NUM_OF_CPU} ${num_of_cpu}\n log ${num_of_cpu}\n Should Be Equal As Strings ${num_of_cpu} 4 Number of CPU for worker is not 4 : ${num_of_cpu}", "settings": "{}", "variables": "{}", "name": "Check Num of CPU", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "d5802be9-4695-4324-a4ae-28b774959557", "code": "Check worker proccess\n [Documentation] Check that num of Worker proccess is 4 in nginx.conf file\n ${num_of_proccess} Get worker proccess configuration ${S_HARBOR_PORTAL_POD}\n Set Suite Variable ${S_NUM_OF_PROC} ${num_of_proccess}\n log ${num_of_proccess}\n Should Be Equal As Strings ${num_of_proccess} 4\n ... Number Of Proccess in configuration file for worker is not 4 : ${num_of_proccess}", "settings": "{}", "variables": "{}", "name": "Check worker proccess", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "286413bc-fb89-4222-83de-595cf10fc022", "code": "Check cpu proccess diff\n [Documentation] Checks if there is difference between number of current CPU for worker and the number of proccess in the conf file\n Should Not Be True ${S_NUM_OF_CPU}>${S_NUM_OF_PROC}\n ... number of current CPU is bigger than number of proccess in configuration file : ${S_NUM_OF_CPU}>${S_NUM_OF_PROC}", "settings": "{}", "variables": "{}", "name": "Check cpu proccess diff", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "79fa60ba-875b-4d94-a500-557acaaf026f", "code": "Get Harbor Portal pod\n [Documentation] Return the portal pod name if not exist returns false\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl get pods -nncms | grep harbor\n ${lines} Split To Lines ${resp}\n FOR ${l} IN @{lines}\n IF \"portal\" in \"${l}\"\n ${split} Split String ${l} ${SPACE}\n ${harbor_portal} Set Variable ${split[0]}\n Return From Keyword ${harbor_portal}\n ELSE\n Continue For Loop\n END\n END\n Return From Keyword ${FALSE}", "settings": "{}", "variables": "{}", "name": "Get Harbor Portal pod", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "2fb0639c-3b12-4a32-a20b-fd0bdb0bb072", "code": "Get Number Of CPU for Worker\n [Documentation] Returns number of procces for worker in the machine\n [Arguments] ${harbor_portal_pod}\n IF '${harbor_portal_pod}'=='${FALSE}'\n Fail harbor portal pod not exist\n END\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl exec -it -nncms ${harbor_portal_pod} -c \"portal\" -- ps aux | grep -c worker\n [Return] ${resp}\n\nGet worker proccess configuration\n [Documentation] Returns the number of worker proccess from nginx.conf file\n [Arguments] ${harbor_portal_pod}\n IF '${harbor_portal_pod}'=='${FALSE}'\n Fail harbor portal pod not exist\n END\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl exec -it -n ncms ${harbor_portal_pod} -c \"portal\" -- grep worker_pro /etc/nginx/nginx.conf\n ${r_resp} Remove String ${resp} ;\n ${split} Split String ${r_resp} ${SPACE}", "settings": "{}", "variables": "{}", "name": "Get Number Of CPU for Worker", "documentation": "[Arguments] ${harbor_portal_pod}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9243_test_harbor_workers.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "dd8e56d6-88b2-4966-8202-08a03b57f6f3", "code": "*** Settings ***\n\nResource ../../resource/setup.robot\nResource ../../resource/config.robot\nResource ../../suites/helpers/validate_var_log_partition.robot\nResource ../../suites/helpers/validate_partition.robot\n\n\nSuite Setup setup.Suite_setup\nSuite Teardown setup.Suite_teardown\n\n*** Test Cases ***\n\nprecase_setup\n setup.Precase_setup\n internal_check_if_case_is_valid\n ${is_new_version}= config.Is_current_NCS_sw_build_greater_than NCS-24.11.0\n Set Suite Variable ${S_USE_NEW_VERSION} ${is_new_version}\n IF ${S_USE_NEW_VERSION}\n ${is_partitions_nodes_dict_exist}= validate_partition.Is_partitions_info_exist\n IF not ${is_partitions_nodes_dict_exist}\n ${node_list}= validate_partition.Get_all_nodes_names\n validate_partition.Update_partitions_info ${node_list}\n ELSE\n ${node_list}= Create List\n validate_partition.Update_partitions_info ${node_list}\n END\n ELSE\n ${is_partitions_nodes_dict_exist}= validate_var_log_partition.Is_partitions_info_exist\n IF not ${is_partitions_nodes_dict_exist}\n ${node_list}= validate_var_log_partition.Get_all_nodes_names\n validate_var_log_partition.Update_partitions_info ${node_list}\n ELSE\n ${node_list}= Create List\n validate_var_log_partition.Update_partitions_info ${node_list}\n END\n END\n\n\nvalidate_all_partitions\n internal_check_if_case_is_valid\n IF ${S_USE_NEW_VERSION}\n validate_partition.Validate All Partitions\n ELSE\n validate_var_log_partition.Validate All Partitions\n END\n\n\nvar_log_stress_testing\n internal_check_if_case_is_valid\n IF ${S_USE_NEW_VERSION}\n validate_partition.Validate Partition Valid var_log\n validate_partition.Validate Partition On Managers Stress Testing var_log\n ELSE\n validate_var_log_partition.Validate Var Partition Valid\n validate_var_log_partition.Validate Var Partition On Managers Stress Testing\n END\n\n\nvar_log_healthcheck\n internal_check_if_case_is_valid\n IF ${S_USE_NEW_VERSION}\n validate_partition.Validate Partition Valid var_log\n validate_partition.Validate Health Check\n ELSE\n validate_var_log_partition.Validate Var Partition Valid\n validate_var_log_partition.Validate Health Check Var Log\n END\n\n\n*** Keywords ***\n\ninternal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Pass Execution If \"${is_baremetal_installation}\"==\"${FALSE}\" Partitioning should not be checked with CN-A\n", "name": "suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/config.robot': 'resource/config.robot', '../../suites/helpers/validate_var_log_partition.robot': 'suites/helpers/validate_var_log_partition.robot', '../../suites/helpers/validate_partition.robot': 'suites/helpers/validate_partition.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0a50b575-2585-4458-8f6a-dec8f13b4b26", "code": "precase_setup\n setup.Precase_setup\n internal_check_if_case_is_valid\n ${is_new_version}= config.Is_current_NCS_sw_build_greater_than NCS-24.11.0\n Set Suite Variable ${S_USE_NEW_VERSION} ${is_new_version}\n IF ${S_USE_NEW_VERSION}\n ${is_partitions_nodes_dict_exist}= validate_partition.Is_partitions_info_exist\n IF not ${is_partitions_nodes_dict_exist}\n ${node_list}= validate_partition.Get_all_nodes_names\n validate_partition.Update_partitions_info ${node_list}\n ELSE\n ${node_list}= Create List\n validate_partition.Update_partitions_info ${node_list}\n END\n ELSE\n ${is_partitions_nodes_dict_exist}= validate_var_log_partition.Is_partitions_info_exist\n IF not ${is_partitions_nodes_dict_exist}\n ${node_list}= validate_var_log_partition.Get_all_nodes_names\n validate_var_log_partition.Update_partitions_info ${node_list}\n ELSE\n ${node_list}= Create List\n validate_var_log_partition.Update_partitions_info ${node_list}\n END\n END", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "4f7d6a67-aa63-49fa-8aba-a4b64e4961ca", "code": "validate_all_partitions\n internal_check_if_case_is_valid\n IF ${S_USE_NEW_VERSION}\n validate_partition.Validate All Partitions\n ELSE\n validate_var_log_partition.Validate All Partitions\n END", "settings": "{}", "variables": "{}", "name": "validate_all_partitions", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "49f57eaf-860f-4b0f-8ae9-22676ad02a25", "code": "var_log_stress_testing\n internal_check_if_case_is_valid\n IF ${S_USE_NEW_VERSION}\n validate_partition.Validate Partition Valid var_log\n validate_partition.Validate Partition On Managers Stress Testing var_log\n ELSE\n validate_var_log_partition.Validate Var Partition Valid\n validate_var_log_partition.Validate Var Partition On Managers Stress Testing\n END", "settings": "{}", "variables": "{}", "name": "var_log_stress_testing", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "84dd36e3-f328-4408-87e1-d633c0c493e9", "code": "var_log_healthcheck\n internal_check_if_case_is_valid\n IF ${S_USE_NEW_VERSION}\n validate_partition.Validate Partition Valid var_log\n validate_partition.Validate Health Check\n ELSE\n validate_var_log_partition.Validate Var Partition Valid\n validate_var_log_partition.Validate Health Check Var Log\n END", "settings": "{}", "variables": "{}", "name": "var_log_healthcheck", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "8ef48eb3-7ef9-495c-b5cc-ef5f610e21de", "code": "internal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Pass Execution If \"${is_baremetal_installation}\"==\"${FALSE}\" Partitioning should not be checked with CN-A", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9173_var_log_partitioning_tests.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "1e8ad63d-3373-46ee-8c75-061f0ba2fc04", "code": "*** Settings ***\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/config.robot\nResource ../../resource/ncsManagerSecurity.robot\n\n\nSuite Setup setup.Suite_setup\nSuite Teardown setup.Suite_teardown\n\n*** Variables ***\n${NCS_ADMIN_USER} ncs-administrator\n${NCS_ADMIN_PASS} goNokia123$\n${NCS_ADMIN_NEW_PASS} Robotest-Pass12!\n\n*** Test Cases ***\n\nprecase_setup\n setup.Precase_setup\n ${is_central}= config.Is_centralized_installation\n Run Keyword If ${is_central} Set Suite Variable ${CONFIG_TYPE} central\n ... ELSE Set Suite Variable ${CONFIG_TYPE} cluster\n IF ${is_central}\n ${management_cluster_name}= config.central_deployment_cloud_name\n Set Suite Variable ${S_MANAGEMENT_CLUSTER_NAME} ${management_cluster_name}\n END\n\n\nupdate_password_to_ncs-administrator_user_new_password\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" internal_update_password_central ${NCS_ADMIN_USER} ${NCS_ADMIN_NEW_PASS}\n ... ELSE internal_update_password_cluster ${NCS_ADMIN_USER} ${NCS_ADMIN_NEW_PASS}\n\nwait_until_new_password_update_is_complete\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" Wait_until_password_change_operation_finished_central\n ... ELSE Wait_until_password_change_operation_finished_cluster\n\nvalidate_ncs-administrator_user_login_new_password\n Verify_deployment_node_password ${NCS_ADMIN_NEW_PASS}\n\n\nupdate_password_to_ncs-administrator_user_restore_password\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" internal_update_password_central ${NCS_ADMIN_USER} ${NCS_ADMIN_PASS}\n ... ELSE internal_update_password_cluster ${NCS_ADMIN_USER} ${NCS_ADMIN_PASS}\n\nwait_until_restore_password_update_is_complete\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" Wait_until_password_change_operation_finished_central\n ... ELSE Wait_until_password_change_operation_finished_cluster\n\n\nvalidate_ncs-administrator_user_login_restored_password\n Verify_deployment_node_password ${NCS_ADMIN_PASS}\n\n\n*** Keywords ***\n\ninternal_update_password_cluster\n [Arguments] ${username} ${password}\n ${res}= ncsManagerSecurity.deploy_linux_user_password_change ${S_CLUSTER_NAME} ${username} ${password}\n\ninternal_update_password_central\n [Arguments] ${username} ${password}\n ${res}= ncsManagerSecurity.deploy_linux_user_password_change ${S_MANAGEMENT_CLUSTER_NAME} ${username} ${password}\n\n\n#internal_wait_until_password_update_is_complete_cluster\n# FOR ${i} IN RANGE 10\n# ${status}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${S_CLUSTER_NAME}\n# Exit For Loop If \"${status}\"==\"False\"\n# Sleep 30\n# END\n#\n#internal_wait_until_password_update_is_complete_central\n# FOR ${i} IN RANGE 10\n# ${status}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${S_MANAGEMENT_CLUSTER_NAME}\n# Exit For Loop If \"${status}\"==\"False\"\n# Sleep 30\n# END\n# FOR ${i} IN RANGE 10\n# ${status}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${S_CLUSTER_NAME}\n# Exit For Loop If \"${status}\"==\"False\"\n# Sleep 30\n# END\n#\n#internal_verify_transaction_log\n# [Arguments] ${cluster_name}\n# ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${cluster_name}\n# Should Contain ${log} linux_user_pwd_value\\\\\": *** msg=\\nSomething went wrong and the log shows what!!!\\n\\n\n\n\n\n\nwait_until_password_change_operation_finished_cluster\n [Documentation] Waits for passsword change operation to finish and after done it validates its log to check it was finished successfully cluster.\n Sleep 10 sec\n Wait Until Keyword Succeeds 15 min 10 sec Password_change_operation_should_not_be_active ${S_CLUSTER_NAME}\n ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${S_CLUSTER_NAME}\n Should Contain ${log} linux_user_pwd_value\\\\\": *** msg=\\nSomething went wrong and the log shows what!!!\\n\\n\n\nwait_until_password_change_operation_finished_central\n [Documentation] Waits for passsword change operation to finish and after done it validates its log to check it was finished successfully central.\n Sleep 10 sec\n Wait Until Keyword Succeeds 15 min 10 sec Password_change_operation_should_not_be_active ${S_MANAGEMENT_CLUSTER_NAME}\n Wait Until Keyword Succeeds 15 min 10 sec Password_change_operation_should_not_be_active ${S_CLUSTER_NAME}\n ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${S_MANAGEMENT_CLUSTER_NAME}\n Should Contain ${log} linux_user_pwd_value\\\\\": *** msg=\\nSomething went wrong and the log shows what!!!\\n\\n\n\n\npassword_change_operation_should_not_be_active\n [Documentation] Checks if given password change operation is not active (running) anymore.\n [Arguments] ${cluster_name}\n ${active}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${cluster_name}\n Should Not Be True ${active}\n\nverify_deployment_node_password\n [Arguments] ${password}\n ${conn}= ssh.Open_connection_to_deployment_server ${NCS_ADMIN_USER} ${password}\n ${output} ${error} ${code}= Send_command_and_return_rc ${conn} echo ''\n Should Be True \"${code}\" == \"0\"\n ssh.Close_connection ${conn}", "name": "suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/config.robot': 'resource/config.robot', '../../resource/ncsManagerSecurity.robot': 'resource/ncsManagerSecurity.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "e60a177c-d683-4d35-a2a5-532b98e1dccf", "code": "precase_setup\n setup.Precase_setup\n ${is_central}= config.Is_centralized_installation\n Run Keyword If ${is_central} Set Suite Variable ${CONFIG_TYPE} central\n ... ELSE Set Suite Variable ${CONFIG_TYPE} cluster\n IF ${is_central}\n ${management_cluster_name}= config.central_deployment_cloud_name\n Set Suite Variable ${S_MANAGEMENT_CLUSTER_NAME} ${management_cluster_name}\n END", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "68a3b310-782b-45cb-bdd0-c067c530e6eb", "code": "update_password_to_ncs-administrator_user_new_password\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" internal_update_password_central ${NCS_ADMIN_USER} ${NCS_ADMIN_NEW_PASS}\n ... ELSE internal_update_password_cluster ${NCS_ADMIN_USER} ${NCS_ADMIN_NEW_PASS}", "settings": "{}", "variables": "{'NCS_ADMIN_USER': {'text': '${NCS_ADMIN_USER} ncs-administrator'}}", "name": "update_password_to_ncs-administrator_user_new_password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "913ceb34-83f6-4473-9f0a-a90fd24e4815", "code": "wait_until_new_password_update_is_complete\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" Wait_until_password_change_operation_finished_central\n ... ELSE Wait_until_password_change_operation_finished_cluster", "settings": "{}", "variables": "{}", "name": "wait_until_new_password_update_is_complete", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3223562c-fc3a-4cc1-8b81-7cd7f8c11337", "code": "validate_ncs-administrator_user_login_new_password\n Verify_deployment_node_password ${NCS_ADMIN_NEW_PASS}", "settings": "{}", "variables": "{}", "name": "validate_ncs-administrator_user_login_new_password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "51162c5a-31dd-4a46-87ad-2e13d378f5dd", "code": "update_password_to_ncs-administrator_user_restore_password\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" internal_update_password_central ${NCS_ADMIN_USER} ${NCS_ADMIN_PASS}\n ... ELSE internal_update_password_cluster ${NCS_ADMIN_USER} ${NCS_ADMIN_PASS}", "settings": "{}", "variables": "{'NCS_ADMIN_USER': {'text': '${NCS_ADMIN_USER} ncs-administrator'}, 'NCS_ADMIN_PASS': {'text': '${NCS_ADMIN_PASS} goNokia123$\\n${NCS_ADMIN_NEW_PASS} Robotest-Pass12!'}}", "name": "update_password_to_ncs-administrator_user_restore_password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "06477a8d-05e2-405e-880f-575eb270bb0d", "code": "wait_until_restore_password_update_is_complete\n Run Keyword If \"${CONFIG_TYPE}\" == \"central\" Wait_until_password_change_operation_finished_central\n ... ELSE Wait_until_password_change_operation_finished_cluster", "settings": "{}", "variables": "{}", "name": "wait_until_restore_password_update_is_complete", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6dfde8ff-f024-4502-8601-37b4bd7c88c2", "code": "validate_ncs-administrator_user_login_restored_password\n Verify_deployment_node_password ${NCS_ADMIN_PASS}", "settings": "{}", "variables": "{'NCS_ADMIN_PASS': {'text': '${NCS_ADMIN_PASS} goNokia123$\\n${NCS_ADMIN_NEW_PASS} Robotest-Pass12!'}}", "name": "validate_ncs-administrator_user_login_restored_password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "c199608b-c2b9-43d7-a708-43ce3effab24", "code": "internal_update_password_cluster\n [Arguments] ${username} ${password}\n ${res}= ncsManagerSecurity.deploy_linux_user_password_change ${S_CLUSTER_NAME} ${username} ${password}", "settings": "{}", "variables": "{}", "name": "internal_update_password_cluster", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4daa6372-2cad-4817-9325-955009d262cc", "code": "internal_update_password_central\n [Arguments] ${username} ${password}\n ${res}= ncsManagerSecurity.deploy_linux_user_password_change ${S_MANAGEMENT_CLUSTER_NAME} ${username} ${password}\n\n\n#internal_wait_until_password_update_is_complete_cluster\n# FOR ${i} IN RANGE 10\n# ${status}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${S_CLUSTER_NAME}\n# Exit For Loop If \"${status}\"==\"False\"\n# Sleep 30\n# END\n#\n#internal_wait_until_password_update_is_complete_central\n# FOR ${i} IN RANGE 10\n# ${status}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${S_MANAGEMENT_CLUSTER_NAME}\n# Exit For Loop If \"${status}\"==\"False\"\n# Sleep 30\n# END\n# FOR ${i} IN RANGE 10\n# ${status}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${S_CLUSTER_NAME}\n# Exit For Loop If \"${status}\"==\"False\"\n# Sleep 30\n# END\n#\n#internal_verify_transaction_log\n# [Arguments] ${cluster_name}\n# ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${cluster_name}\n# Should Contain ${log} linux_user_pwd_value\\\\\": *** msg=\\nSomething went wrong and the log shows what!!!\\n\\n", "settings": "{}", "variables": "{}", "name": "internal_update_password_central", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "e200373b-8404-4fd2-99d7-525097ea87fe", "code": "wait_until_password_change_operation_finished_cluster\n [Documentation] Waits for passsword change operation to finish and after done it validates its log to check it was finished successfully cluster.\n Sleep 10 sec\n Wait Until Keyword Succeeds 15 min 10 sec Password_change_operation_should_not_be_active ${S_CLUSTER_NAME}\n ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${S_CLUSTER_NAME}\n Should Contain ${log} linux_user_pwd_value\\\\\": *** msg=\\nSomething went wrong and the log shows what!!!\\n\\n", "settings": "{}", "variables": "{}", "name": "wait_until_password_change_operation_finished_cluster", "documentation": "Sleep 10 sec", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a4a0e040-1a47-4097-8ec9-9b4970808114", "code": "wait_until_password_change_operation_finished_central\n [Documentation] Waits for passsword change operation to finish and after done it validates its log to check it was finished successfully central.\n Sleep 10 sec\n Wait Until Keyword Succeeds 15 min 10 sec Password_change_operation_should_not_be_active ${S_MANAGEMENT_CLUSTER_NAME}\n Wait Until Keyword Succeeds 15 min 10 sec Password_change_operation_should_not_be_active ${S_CLUSTER_NAME}\n ${log}= ncsManagerSecurity.get_security_user_management_bm_log ${S_MANAGEMENT_CLUSTER_NAME}\n Should Contain ${log} linux_user_pwd_value\\\\\": *** msg=\\nSomething went wrong and the log shows what!!!\\n\\n", "settings": "{}", "variables": "{}", "name": "wait_until_password_change_operation_finished_central", "documentation": "Sleep 10 sec", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "6dfee83c-a846-4c96-995d-6f06aa60567f", "code": "password_change_operation_should_not_be_active\n [Documentation] Checks if given password change operation is not active (running) anymore.\n [Arguments] ${cluster_name}\n ${active}= ncsManagerSecurity.get_cluster_bm_security_user_management_isActive ${cluster_name}\n Should Not Be True ${active}", "settings": "{}", "variables": "{}", "name": "password_change_operation_should_not_be_active", "documentation": "[Arguments] ${cluster_name}", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "eb3926f1-a3bc-430a-b0b2-07fdab605308", "code": "verify_deployment_node_password\n [Arguments] ${password}\n ${conn}= ssh.Open_connection_to_deployment_server ${NCS_ADMIN_USER} ${password}\n ${output} ${error} ${code}= Send_command_and_return_rc ${conn} echo ''\n Should Be True \"${code}\" == \"0\"\n ssh.Close_connection ${conn}", "settings": "{}", "variables": "{'NCS_ADMIN_USER': {'text': '${NCS_ADMIN_USER} ncs-administrator'}}", "name": "verify_deployment_node_password", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-9165_change_ncs-administrator_twice_test.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "413e3362-31d9-4f4b-87e0-e526b8eb85e4", "code": "*** Settings ***\nDocumentation deplyoment of BTEL and CITM\n ... then Expose Alertmanager in edge node\n ... Checks that alertmanager exposed successfully\n\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/node.robot\nLibrary ../../infra/paramikowrapper.py\nLibrary Collections\nLibrary String\nLibrary ../../resource/pythonFunctions.py\n\nSuite Setup setup.suite_setup\nSuite Teardown Test Teardown\n\n*** Test Cases ***\nConfigure BTEL\n setup.precase_setup\n Get BCMT-addons tgz\n Label And Taint Nodes\n Create btel namespace\n Merge BTEL\n Modify Values\n Change volume\n Increase vm count\n TLS Generation\n TLS and Sensitive Secrets\n\nConfigure CITM\n Replace CITM Values.yaml\n Merge CITM\n\nInstall CITM\n Helm Install CITM\n\nInstall BTEL\n Helm Install BTEL\n\nTest Alertmanager\n Expose AlertManager\n Check Alertmanager Endpoints\n\n*** Keywords ***\nGet BCMT-addons tgz\n [Documentation] Get BCMT-addons and unzip them into /opt/bcmt/app-2.0/\n ${conn} ssh.open_connection_to_controller\n Get Latest bcmt-addons package\n Log to Console wget the tgz\n ssh.send_command ${conn} wget https://repo.cci.nokia.net/artifactory/csf-generic-candidates/BCMT/${S_LATEST_BCMT_ADDONS_PACKAGE}\n Log to console finished\n ${resp} ssh.send_command ${conn} sudo tar --strip-components=1 -xvf ${S_LATEST_BCMT_ADDONS_PACKAGE} -C /opt/bcmt/app-2.0/\n log ${resp}\n\nlabel and taint nodes\n [Documentation] Label and taint 1 Worker and Label 1 Edge\n ${conn} ssh.open_connection_to_controller\n #label all nodes\n ssh.send_command ${conn} sudo kubectl label nodes --all is_btel_all=true\n #label worker\n ${workers}= node.get_worker_name_list\n log ${workers}\n Set Suite Variable ${S_WORKER_NODE_NAME} ${workers[0]}\n ssh.send_command ${conn} sudo kubectl label node ${S_WORKER_NODE_NAME} is_btel_worker=true\n #taint worker\n ssh.send_command ${conn} sudo kubectl taint node ${S_WORKER_NODE_NAME} is_btel=true:NoSchedule\n #label edge\n ${edge_nodes}= node.get_edge_name_list\n Set Suite Variable ${S_EDGE_NODE_NAME} ${edge_nodes[0]}\n ssh.send_command ${conn} sudo kubectl label node ${S_EDGE_NODE_NAME} is_btel_edge=true\n #verify label\n ${verify_label} ssh.send_command ${conn} sudo kubectl get nodes -l is_btel_all\n Should Contain ${verify_label} ${S_WORKER_NODE_NAME}\n Should Contain ${verify_label} ${S_EDGE_NODE_NAME}\n\nCreate btel namespace\n [Documentation] Create the btel namespace\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl get ns\n ${status} Run Keyword And Return Status Should Not Contain ${resp} btel\n IF ${status}\n ssh.send_command ${conn} sudo kubectl create namespace btel\n ELSE\n Log namespace already exist\n END\n\nMerge BTEL\n [Documentation] merge btel into bcmt-registry\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo ncs service registry-server merge --registry_server_name=bcmt-registry --file_path=/opt/bcmt/app-2.0/BTEL/images/app-registry.tgz --user_name ${G_NCM_CLUSTER_NODE_USERNAME} --password ${G_NCM_CLUSTER_NODE_PASSWORD}\n\nChange volume\n [Documentation] change volume from cinder-az-nova to glusterfs-storageclass\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo sed -i 's/cinder-az-nova/glusterfs-storageclass/g' /opt/bcmt/storage/app-2.0/BTEL/profile/values.yaml\n\nIncrease vm count\n [Documentation] Increase vm count to 262144MB\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/sysctl.yaml /tmp\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo kubectl --validate=false apply -f /tmp/sysctl.yaml\n\nModify Values\n [Documentation] Modify values.yaml : delete spaces and delete btel heading and lcm section from the values.yaml file.\n ... Change replicas to 1\n ${conn} ssh.open_connection_to_controller\n ${cmd1} Set Variable sudo tail -n +11 /opt/bcmt/storage/app-2.0/BTEL/profile/values.yaml > values.yaml && sudo mv -f values.yaml /opt/bcmt/storage/app-2.0/BTEL/profile/\n ${cmd2} Set Variable sudo sed -i 's/replicas: 2/replicas: 1/g' /opt/bcmt/app-2.0/BTEL/profile/values.yaml\n ${cmd3} Set Variable sudo sed -i 's/replicas: 3/replicas: 1/g' /opt/bcmt/app-2.0/BTEL/profile/values.yaml\n ${cmd4} Set Variable sudo sed -i 's/^${SPACE}${SPACE}//g' /opt/bcmt/storage/app-2.0/BTEL/profile/values.yaml\n ssh.send_command ${conn} ${cmd1}\n ssh.send_command ${conn} ${cmd2}\n ssh.send_command ${conn} ${cmd3}\n ssh.send_command ${conn} ${cmd4}\n\nTLS Generation\n [Documentation] Generate TLS certs\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo tar -xvf /opt/bcmt/app-2.0/BTEL/tls-certificate.tgz -C /opt/bcmt/app-2.0/BTEL/\n ssh.send_command ${conn} sudo chmod -R 777 /opt/bcmt/app-2.0/BTEL/tls-certificate/openssl.cnf\n ${cmd} set variable printf \"%s\" \"\"'DNS.4\\ =\\ \\\\\"*.btel.svc.cluster.local\\\\\"'\"\" >> /opt/bcmt/app-2.0/BTEL/tls-certificate/openssl.cnf\n ssh.send_command ${conn} ${cmd}\n ssh.send_command ${conn} cd /opt/bcmt/app-2.0/BTEL/tls-certificate/ && sudo make\n\n ssh.send_command ${conn} sudo mkdir /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs\n ssh.send_command ${conn} sudo mkdir -p /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cpro /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/grafana\n\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm/calm.mq.serverCert\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/client/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm/calm.mq.clientCert\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/client/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm/calm.mq.clientKey\n\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/testca/cacert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq/ca.crt\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq/tls.key\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq/tls.crt\n\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem > /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot/cnot.wildfly.https.cert'\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/testca/cacert.pem >> /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot/cnot.wildfly.https.cert'\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot/cnot.wildfly.https.key\n\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/client/cert.pem > /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cpro/cpro.alertmanager.outboundTLS.cert'\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/testca/cacert.pem >> /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cpro/cpro.alertmanager.outboundTLS.cert'\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/grafana/grafana.cert\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/grafana/grafana.key\n\nTLS and Sensitive Secrets\n [Documentation] create TLS secrets using certificates.\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/regr_TLS_sensitive_secrets.sh /tmp\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} chmod 777 /tmp/regr_TLS_sensitive_secrets.sh\n ssh.send_command ${conn} sudo bash /tmp/regr_TLS_sensitive_secrets.sh\n\nhelm install BTEL\n [Documentation] install btel using helm\n ${conn}= ssh.open_connection_to_controller\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} sudo helm install btel -nbtel /opt/bcmt/app-2.0/BTEL/charts/btel-3.2.0.tgz -f /opt/bcmt/app-2.0/BTEL/profile/values.yaml\n log to console \\n${std_out}\\n\n ssh.close_connection ${conn}\n Run Keyword and Ignore Error Should Be Equal As Strings ${code} 0\n\nReplace CITM values.yaml\n [Documentation] Replace values.yaml of CITM installation\n ${scp} ssh.open_scp_connection_to_controller\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo rm -rf /opt/bcmt/app-2.0/CITM/profile/values.yaml\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/values.yaml /opt/bcmt/app-2.0/CITM/profile/\n\nMerge CITM\n [Documentation] Merge CITM into the bcmt-registry\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo ncs service registry-server merge --registry_server_name=bcmt-registry --file_path=/opt/bcmt/app-2.0/CITM/images/app-registry.tgz --user_name ${G_NCM_CLUSTER_NODE_USERNAME} --password ${G_NCM_CLUSTER_NODE_PASSWORD}\n\nhelm install CITM\n [Documentation] install CITM using helm\n ${conn} ssh.open_connection_to_controller\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} sudo helm install citm -nbtel /opt/bcmt/storage/app-2.0/CITM/charts/citm-ingress-2.4.1.tgz -f /opt/bcmt/storage/app-2.0/CITM/profile/values.yaml --timeout 60s\n log to console \\n${std_out}\\n\n ssh.close_connection ${conn}\n Run Keyword and Ignore Error Should Be Equal As Strings ${code} 0\n\nExpose AlertManager\n [Documentation] Exposes alertmanager\n ${scp} ssh.open_scp_connection_to_controller\n ${conn} ssh.open_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/alertmanager-ingress.yaml /tmp\n ${cmd} Set Variable sudo kubectl apply -f /tmp/alertmanager-ingress.yaml\n ssh.send_command ${conn} ${cmd}\n\nGet Alertmanager Endpoints\n [Documentation] Returns the Alertmanager endpoints\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl describe svc cpro-alertmanager-ext -nbtel\n ${lines} Split to Lines ${resp}\n FOR ${l} IN @{lines}\n IF \"Endpoints\" in \"${l}\"\n ${split} Split String ${l} ${SPACE}\n ${split_endpoints} Split String ${split[-1]} ,\n Return From Keyword ${split_endpoints[0]} ${split_endpoints[-1]}\n ELSE\n Continue For Loop\n END\n END\n\nCheck Alertmanager Endpoints\n [Documentation] Check that alertmanager endpoints GET request returns 200 OK\n ${endpoint1} ${endpoint2} Get Alertmanager Endpoints\n ${conn} ssh.open_connection_to_controller\n ${resp1} ssh.send_command ${conn} sudo curl -X GET -I ${endpoint1}\n ${resp2} ssh.send_command ${conn} sudo curl -X GET -I ${endpoint2}\n ${lines1} Split To Lines ${resp1}\n ${lines2} Split To Lines ${resp2}\n Should Be Equal As Strings ${lines1[0]} HTTP/1.1 200 OK\n Should Be Equal As Strings ${lines2[0]} HTTP/1.1 200 OK\n\nTest Teardown\n setup.suite_teardown\n Delete BTEL and CITM\n Remove taints and labels\n\nDelete BTEL and CITM\n ${conn} ssh.open_connection_to_controller\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo helm uninstall btel -nbtel\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo helm uninstall citm -nbtel\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo kubectl delete ns btel\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo rm -rf /opt/bcmt/app-2.0/BTEL\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo rm -rf /opt/bcmt/app-2.0/CITM\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo rm -rf ${S_LATEST_BCMT_ADDONS_PACKAGE}\n\nRemove taints and labels\n ${conn} ssh.open_connection_to_controller\n # remove taints\n ssh.send_command ${conn} sudo kubectl taint node ${S_WORKER_NODE_NAME} is_btel=true:NoSchedule-\n # remove labels\n ssh.send_command ${conn} sudo kubectl label node ${S_EDGE_NODE_NAME} is_btel_edge-\n ssh.send_command ${conn} sudo kubectl label nodes --all is_btel_all-\n ssh.send_command ${conn} sudo kubectl label node ${S_WORKER_NODE_NAME} is_btel_worker-\n\nGet Latest bcmt-addons package\n\t${conn} ssh.open_connection_to_controller\n\tssh.send_command ${conn} sudo wget -O bcmt_packages https://repo.cci.nokia.net/artifactory/csf-generic-candidates/BCMT/\n\t${resp} ssh.send_command ${conn} sudo cat bcmt_packages | grep bcmt-addons\n\t${bcmt_addons} Get Regexp Matches ${resp} bcmt-addons-[0-9]*.[0-9].[0-9].[0-9].[A-z]*\n\t${bcmt_addons} Evaluate set(${bcmt_addons})\n\t${packages_dict} Create Dictionary\n\tFOR ${package} IN @{bcmt_addons}\n\t\t${package_s} Split String ${package} -\n\t\t${version_s} Split String ${package_s[-1]} .\n\t\tSet To Dictionary ${packages_dict} ${package}=${version_s[0:-1]}\n END\n Log ${packages_dict}\n ${packages_vals} Get Dictionary Values ${packages_dict}\n ${latest_version} Find Latest Version ${packages_vals}\n ${latest_bcmt_addons_package} Get Key By Value ${packages_dict} ${latest_version}\n Set Suite Variable ${S_LATEST_BCMT_ADDONS_PACKAGE} ${latest_bcmt_addons_package}\n\nCompare Versions\n\t[Arguments] ${v1} ${v2}\n\t${v1}= Evaluate tuple(map(int, ${v1}))\n\t${v2}= Evaluate tuple(map(int, ${v2}))\n\tIF ${v1} < ${v2}\n\t\tReturn From Keyword -1\n\tELSE IF ${v1} > ${v2}\n\t\tReturn From Keyword 1\n ELSE\n Return From Keyword 0\n END\n\nFind Latest Version\n\t[Arguments] ${packages_versions}\n\tIF not ${packages_versions}\n\t\tReturn From Keyword ${NONE}\n END\n\n ${latest_version} Set Variable ${packages_versions[0]}\n\n FOR ${version} IN @{packages_versions}\n \t${r} Run Keyword Compare Versions ${version} ${latest_version}\n \tIF ${r} > 0\n \t\t${latest_version} Set Variable ${version}\n END\n END\n [Return] ${latest_version}", "name": "suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/node.robot': 'resource/node.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "2584d8c1-d832-4192-a344-8e46830ee9bf", "code": "Configure BTEL\n setup.precase_setup\n Get BCMT-addons tgz\n Label And Taint Nodes\n Create btel namespace\n Merge BTEL\n Modify Values\n Change volume\n Increase vm count\n TLS Generation\n TLS and Sensitive Secrets", "settings": "{}", "variables": "{}", "name": "Configure BTEL", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b8f49275-5508-476b-8e27-b96f5d5feaf9", "code": "Configure CITM\n Replace CITM Values.yaml\n Merge CITM", "settings": "{}", "variables": "{}", "name": "Configure CITM", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "392bce93-100f-43b1-a87e-1af86db7b120", "code": "Install CITM\n Helm Install CITM", "settings": "{}", "variables": "{}", "name": "Install CITM", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "ef883600-99db-49ec-96e9-8ac7f7f537f8", "code": "Install BTEL\n Helm Install BTEL", "settings": "{}", "variables": "{}", "name": "Install BTEL", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "c08f923f-4402-4f0e-ad92-7493fceaa3cc", "code": "Test Alertmanager\n Expose AlertManager\n Check Alertmanager Endpoints", "settings": "{}", "variables": "{}", "name": "Test Alertmanager", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a2800b39-710f-4089-a51e-0975bbee5562", "code": "Get BCMT-addons tgz\n [Documentation] Get BCMT-addons and unzip them into /opt/bcmt/app-2.0/\n ${conn} ssh.open_connection_to_controller\n Get Latest bcmt-addons package\n Log to Console wget the tgz\n ssh.send_command ${conn} wget https://repo.cci.nokia.net/artifactory/csf-generic-candidates/BCMT/${S_LATEST_BCMT_ADDONS_PACKAGE}\n Log to console finished\n ${resp} ssh.send_command ${conn} sudo tar --strip-components=1 -xvf ${S_LATEST_BCMT_ADDONS_PACKAGE} -C /opt/bcmt/app-2.0/\n log ${resp}", "settings": "{}", "variables": "{}", "name": "Get BCMT-addons tgz", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "81174b69-7d8a-415e-bb98-427fc09019d8", "code": "label and taint nodes\n [Documentation] Label and taint 1 Worker and Label 1 Edge\n ${conn} ssh.open_connection_to_controller\n #label all nodes\n ssh.send_command ${conn} sudo kubectl label nodes --all is_btel_all=true\n #label worker\n ${workers}= node.get_worker_name_list\n log ${workers}\n Set Suite Variable ${S_WORKER_NODE_NAME} ${workers[0]}\n ssh.send_command ${conn} sudo kubectl label node ${S_WORKER_NODE_NAME} is_btel_worker=true\n #taint worker\n ssh.send_command ${conn} sudo kubectl taint node ${S_WORKER_NODE_NAME} is_btel=true:NoSchedule\n #label edge\n ${edge_nodes}= node.get_edge_name_list\n Set Suite Variable ${S_EDGE_NODE_NAME} ${edge_nodes[0]}\n ssh.send_command ${conn} sudo kubectl label node ${S_EDGE_NODE_NAME} is_btel_edge=true\n #verify label\n ${verify_label} ssh.send_command ${conn} sudo kubectl get nodes -l is_btel_all\n Should Contain ${verify_label} ${S_WORKER_NODE_NAME}\n Should Contain ${verify_label} ${S_EDGE_NODE_NAME}", "settings": "{}", "variables": "{}", "name": "label and taint nodes", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "cd0cc2d6-dd10-481d-a9df-3b3ac21f5042", "code": "Create btel namespace\n [Documentation] Create the btel namespace\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl get ns\n ${status} Run Keyword And Return Status Should Not Contain ${resp} btel\n IF ${status}\n ssh.send_command ${conn} sudo kubectl create namespace btel\n ELSE\n Log namespace already exist\n END", "settings": "{}", "variables": "{}", "name": "Create btel namespace", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a2ac71dc-6d5f-42c6-9013-5855e57041b6", "code": "Merge BTEL\n [Documentation] merge btel into bcmt-registry\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo ncs service registry-server merge --registry_server_name=bcmt-registry --file_path=/opt/bcmt/app-2.0/BTEL/images/app-registry.tgz --user_name ${G_NCM_CLUSTER_NODE_USERNAME} --password ${G_NCM_CLUSTER_NODE_PASSWORD}", "settings": "{}", "variables": "{}", "name": "Merge BTEL", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "6eaee45f-c1bf-4238-b073-d455b5548777", "code": "Change volume\n [Documentation] change volume from cinder-az-nova to glusterfs-storageclass\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo sed -i 's/cinder-az-nova/glusterfs-storageclass/g' /opt/bcmt/storage/app-2.0/BTEL/profile/values.yaml", "settings": "{}", "variables": "{}", "name": "Change volume", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "4b43b6af-91bb-49f0-a14c-4b10f4c4364b", "code": "Increase vm count\n [Documentation] Increase vm count to 262144MB\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/sysctl.yaml /tmp\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo kubectl --validate=false apply -f /tmp/sysctl.yaml", "settings": "{}", "variables": "{}", "name": "Increase vm count", "documentation": "${scp} ssh.open_scp_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "053f3ddd-106a-4c51-90b6-10d9ae53428e", "code": "Modify Values\n [Documentation] Modify values.yaml : delete spaces and delete btel heading and lcm section from the values.yaml file.\n ... Change replicas to 1\n ${conn} ssh.open_connection_to_controller\n ${cmd1} Set Variable sudo tail -n +11 /opt/bcmt/storage/app-2.0/BTEL/profile/values.yaml > values.yaml && sudo mv -f values.yaml /opt/bcmt/storage/app-2.0/BTEL/profile/\n ${cmd2} Set Variable sudo sed -i 's/replicas: 2/replicas: 1/g' /opt/bcmt/app-2.0/BTEL/profile/values.yaml\n ${cmd3} Set Variable sudo sed -i 's/replicas: 3/replicas: 1/g' /opt/bcmt/app-2.0/BTEL/profile/values.yaml\n ${cmd4} Set Variable sudo sed -i 's/^${SPACE}${SPACE}//g' /opt/bcmt/storage/app-2.0/BTEL/profile/values.yaml\n ssh.send_command ${conn} ${cmd1}\n ssh.send_command ${conn} ${cmd2}\n ssh.send_command ${conn} ${cmd3}\n ssh.send_command ${conn} ${cmd4}", "settings": "{}", "variables": "{}", "name": "Modify Values", "documentation": "Change replicas to 1", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "5fdd4116-4ab3-4a9e-acd6-9ccf5bf24228", "code": "TLS Generation\n [Documentation] Generate TLS certs\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo tar -xvf /opt/bcmt/app-2.0/BTEL/tls-certificate.tgz -C /opt/bcmt/app-2.0/BTEL/\n ssh.send_command ${conn} sudo chmod -R 777 /opt/bcmt/app-2.0/BTEL/tls-certificate/openssl.cnf\n ${cmd} set variable printf \"%s\" \"\"'DNS.4\\ =\\ \\\\\"*.btel.svc.cluster.local\\\\\"'\"\" >> /opt/bcmt/app-2.0/BTEL/tls-certificate/openssl.cnf\n ssh.send_command ${conn} ${cmd}\n ssh.send_command ${conn} cd /opt/bcmt/app-2.0/BTEL/tls-certificate/ && sudo make\n\n ssh.send_command ${conn} sudo mkdir /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs\n ssh.send_command ${conn} sudo mkdir -p /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cpro /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/grafana\n\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm/calm.mq.serverCert\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/client/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm/calm.mq.clientCert\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/client/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/calm/calm.mq.clientKey\n\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/testca/cacert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq/ca.crt\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq/tls.key\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/crmq/tls.crt\n\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem > /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot/cnot.wildfly.https.cert'\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/testca/cacert.pem >> /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot/cnot.wildfly.https.cert'\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cnot/cnot.wildfly.https.key\n\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/client/cert.pem > /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cpro/cpro.alertmanager.outboundTLS.cert'\n ssh.send_command ${conn} sudo sh -c 'cat /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/testca/cacert.pem >> /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/cpro/cpro.alertmanager.outboundTLS.cert'\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/cert.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/grafana/grafana.cert\n ssh.send_command ${conn} sudo cp /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/server/key.pem /opt/bcmt/storage/app-2.0/BTEL/tls-certificate/certs/grafana/grafana.key", "settings": "{}", "variables": "{}", "name": "TLS Generation", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "143b6ac0-359d-4d3d-953e-856674a75be8", "code": "TLS and Sensitive Secrets\n [Documentation] create TLS secrets using certificates.\n ${scp} ssh.open_scp_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/regr_TLS_sensitive_secrets.sh /tmp\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} chmod 777 /tmp/regr_TLS_sensitive_secrets.sh\n ssh.send_command ${conn} sudo bash /tmp/regr_TLS_sensitive_secrets.sh", "settings": "{}", "variables": "{}", "name": "TLS and Sensitive Secrets", "documentation": "${scp} ssh.open_scp_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f7157259-b1ee-42c4-90aa-e0939992060d", "code": "helm install BTEL\n [Documentation] install btel using helm\n ${conn}= ssh.open_connection_to_controller\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} sudo helm install btel -nbtel /opt/bcmt/app-2.0/BTEL/charts/btel-3.2.0.tgz -f /opt/bcmt/app-2.0/BTEL/profile/values.yaml\n log to console \\n${std_out}\\n\n ssh.close_connection ${conn}\n Run Keyword and Ignore Error Should Be Equal As Strings ${code} 0", "settings": "{}", "variables": "{}", "name": "helm install BTEL", "documentation": "${conn}= ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "5cdbea1f-c4d1-4e03-9e3c-b69d7372a521", "code": "Replace CITM values.yaml\n [Documentation] Replace values.yaml of CITM installation\n ${scp} ssh.open_scp_connection_to_controller\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo rm -rf /opt/bcmt/app-2.0/CITM/profile/values.yaml\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/values.yaml /opt/bcmt/app-2.0/CITM/profile/", "settings": "{}", "variables": "{}", "name": "Replace CITM values.yaml", "documentation": "${scp} ssh.open_scp_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b2f931bf-1f3c-46d6-9836-1503c3349639", "code": "Merge CITM\n [Documentation] Merge CITM into the bcmt-registry\n ${conn} ssh.open_connection_to_controller\n ssh.send_command ${conn} sudo ncs service registry-server merge --registry_server_name=bcmt-registry --file_path=/opt/bcmt/app-2.0/CITM/images/app-registry.tgz --user_name ${G_NCM_CLUSTER_NODE_USERNAME} --password ${G_NCM_CLUSTER_NODE_PASSWORD}", "settings": "{}", "variables": "{}", "name": "Merge CITM", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "b74c12fd-4091-449b-96a9-6c02c670b498", "code": "helm install CITM\n [Documentation] install CITM using helm\n ${conn} ssh.open_connection_to_controller\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} sudo helm install citm -nbtel /opt/bcmt/storage/app-2.0/CITM/charts/citm-ingress-2.4.1.tgz -f /opt/bcmt/storage/app-2.0/CITM/profile/values.yaml --timeout 60s\n log to console \\n${std_out}\\n\n ssh.close_connection ${conn}\n Run Keyword and Ignore Error Should Be Equal As Strings ${code} 0", "settings": "{}", "variables": "{}", "name": "helm install CITM", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9f0e3862-9722-4661-8265-049f237be551", "code": "Expose AlertManager\n [Documentation] Exposes alertmanager\n ${scp} ssh.open_scp_connection_to_controller\n ${conn} ssh.open_connection_to_controller\n ssh.scp_file_to_host ${scp} 24/testcase_config_files/btel_regr/alertmanager-ingress.yaml /tmp\n ${cmd} Set Variable sudo kubectl apply -f /tmp/alertmanager-ingress.yaml\n ssh.send_command ${conn} ${cmd}", "settings": "{}", "variables": "{}", "name": "Expose AlertManager", "documentation": "${scp} ssh.open_scp_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "944e5970-adaa-4cbb-9cfa-2f7e445f1abe", "code": "Get Alertmanager Endpoints\n [Documentation] Returns the Alertmanager endpoints\n ${conn} ssh.open_connection_to_controller\n ${resp} ssh.send_command ${conn} sudo kubectl describe svc cpro-alertmanager-ext -nbtel\n ${lines} Split to Lines ${resp}\n FOR ${l} IN @{lines}\n IF \"Endpoints\" in \"${l}\"\n ${split} Split String ${l} ${SPACE}\n ${split_endpoints} Split String ${split[-1]} ,\n Return From Keyword ${split_endpoints[0]} ${split_endpoints[-1]}\n ELSE\n Continue For Loop\n END\n END", "settings": "{}", "variables": "{}", "name": "Get Alertmanager Endpoints", "documentation": "${conn} ssh.open_connection_to_controller", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "cde57620-9fa6-414d-865e-840b4c8c3743", "code": "Check Alertmanager Endpoints\n [Documentation] Check that alertmanager endpoints GET request returns 200 OK\n ${endpoint1} ${endpoint2} Get Alertmanager Endpoints\n ${conn} ssh.open_connection_to_controller\n ${resp1} ssh.send_command ${conn} sudo curl -X GET -I ${endpoint1}\n ${resp2} ssh.send_command ${conn} sudo curl -X GET -I ${endpoint2}\n ${lines1} Split To Lines ${resp1}\n ${lines2} Split To Lines ${resp2}\n Should Be Equal As Strings ${lines1[0]} HTTP/1.1 200 OK\n Should Be Equal As Strings ${lines2[0]} HTTP/1.1 200 OK", "settings": "{}", "variables": "{}", "name": "Check Alertmanager Endpoints", "documentation": "${endpoint1} ${endpoint2} Get Alertmanager Endpoints", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "9bf84712-ed76-4f1d-a052-d478e049610d", "code": "Test Teardown\n setup.suite_teardown\n Delete BTEL and CITM\n Remove taints and labels", "settings": "{}", "variables": "{}", "name": "Test Teardown", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "7afae8d4-6910-4d91-a86a-ce30877b4442", "code": "Delete BTEL and CITM\n ${conn} ssh.open_connection_to_controller\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo helm uninstall btel -nbtel\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo helm uninstall citm -nbtel\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo kubectl delete ns btel\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo rm -rf /opt/bcmt/app-2.0/BTEL\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo rm -rf /opt/bcmt/app-2.0/CITM\n Run Keyword And Ignore Error ssh.send_command ${conn} sudo rm -rf ${S_LATEST_BCMT_ADDONS_PACKAGE}", "settings": "{}", "variables": "{}", "name": "Delete BTEL and CITM", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "357639bb-df69-4674-a829-9fab6b079b19", "code": "Remove taints and labels\n ${conn} ssh.open_connection_to_controller\n # remove taints\n ssh.send_command ${conn} sudo kubectl taint node ${S_WORKER_NODE_NAME} is_btel=true:NoSchedule-\n # remove labels\n ssh.send_command ${conn} sudo kubectl label node ${S_EDGE_NODE_NAME} is_btel_edge-\n ssh.send_command ${conn} sudo kubectl label nodes --all is_btel_all-\n ssh.send_command ${conn} sudo kubectl label node ${S_WORKER_NODE_NAME} is_btel_worker-", "settings": "{}", "variables": "{}", "name": "Remove taints and labels", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "dde288f6-d871-4e01-befd-8ac5db66e855", "code": "Get Latest bcmt-addons package\n\t${conn} ssh.open_connection_to_controller\n\tssh.send_command ${conn} sudo wget -O bcmt_packages https://repo.cci.nokia.net/artifactory/csf-generic-candidates/BCMT/\n\t${resp} ssh.send_command ${conn} sudo cat bcmt_packages | grep bcmt-addons\n\t${bcmt_addons} Get Regexp Matches ${resp} bcmt-addons-[0-9]*.[0-9].[0-9].[0-9].[A-z]*\n\t${bcmt_addons} Evaluate set(${bcmt_addons})\n\t${packages_dict} Create Dictionary\n\tFOR ${package} IN @{bcmt_addons}\n\t\t${package_s} Split String ${package} -\n\t\t${version_s} Split String ${package_s[-1]} .\n\t\tSet To Dictionary ${packages_dict} ${package}=${version_s[0:-1]}\n END\n Log ${packages_dict}\n ${packages_vals} Get Dictionary Values ${packages_dict}\n ${latest_version} Find Latest Version ${packages_vals}\n ${latest_bcmt_addons_package} Get Key By Value ${packages_dict} ${latest_version}\n Set Suite Variable ${S_LATEST_BCMT_ADDONS_PACKAGE} ${latest_bcmt_addons_package}", "settings": "{}", "variables": "{}", "name": "Get Latest bcmt-addons package", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "466eacf8-20d9-404b-9105-a482d7f5dc59", "code": "Compare Versions\n\t[Arguments] ${v1} ${v2}\n\t${v1}= Evaluate tuple(map(int, ${v1}))\n\t${v2}= Evaluate tuple(map(int, ${v2}))\n\tIF ${v1} < ${v2}\n\t\tReturn From Keyword -1\n\tELSE IF ${v1} > ${v2}\n\t\tReturn From Keyword 1\n ELSE\n Return From Keyword 0\n END", "settings": "{}", "variables": "{}", "name": "Compare Versions", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a1cfa816-f5bc-45d2-8f83-52e6eb0cdf98", "code": "Find Latest Version\n\t[Arguments] ${packages_versions}\n\tIF not ${packages_versions}\n\t\tReturn From Keyword ${NONE}\n END\n\n ${latest_version} Set Variable ${packages_versions[0]}\n\n FOR ${version} IN @{packages_versions}\n \t${r} Run Keyword Compare Versions ${version} ${latest_version}\n \tIF ${r} > 0\n \t\t${latest_version} Set Variable ${version}\n END\n END", "settings": "{}", "variables": "{}", "name": "Find Latest Version", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8958_BTEL_alertmanager_exposed_test.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "e3af426d-dea5-498f-918d-50c39a8ee331", "code": "*** Settings ***\n\nDocumentation Test that check the API Request for FSS CONNECT feature\n... Ticket: NCSDEV-8848\n... TEAM: CBIS_NCS_Automation_Tools\n\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\nResource ../../resource/network.robot\nLibrary Collections\nLibrary String\nLibrary BuiltIn\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Test Cases ***\n## preparation for the case ------------------------------------------------------------------\n\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, ping to FSS fqdn...\\n\\n\n setup.precase_setup\n ${is_fqdn_available} Run Keyword And Return Status Wait Until Keyword Succeeds 12x 10s ping.deployment_server ${G_FABRIC_MANAGER_REST_API_BASE_URL}\n Set Suite Variable ${S_FSS_AVAILABLE} ${is_fqdn_available}\n\nprecase_cluster_status\n [Documentation] Check cluster status before the case.\\n\\n\n internal_check_if_case_is_valid\n check.precase_cluster_status\n\nset_the_ip_of_the_fss_deployer\n\tinternal_check_if_case_is_valid\n\t${fss_ip_depl}= get_fabric_manager_deployer_ip\n Set Suite Variable ${S_FSS_IP_DEPLOYER} ${fss_ip_depl}\n\nset_variables_for_fss_connect\n internal_check_if_case_is_valid\n ${cmd} Set Variable cat \"$(jq '.fss' ~/input.json | jq -r '.certificate')\" > ~/fss.crt.pem\n #${cmd1} Catenate awk 'NF {sub(/\\\\r/, \"\"); printf \"%s\\\\\\\\n\",$0;}' ~/fss.crt.pem\n ${cmd1} Catenate cat ~/fss.crt.pem\n ${output} send_command_to_fss_deployer ${cmd}\n ${pem} send_command_to_fss_deployer ${cmd1}\n ${pem} get_pem_in_one_line ${pem}\n Log ${pem}\n ${fqdn}= config.fabric_manager_rest_api_base_url\n ${user_api}= config.fabric_manager_rest_api_username\n ${pass_api}= config.fabric_manager_rest_api_password\n Set Suite Variable ${S_FSS_FQDN} ${fqdn}\n Set Suite Variable ${S_FSS_USERNAME} ${user_api}\n Set Suite Variable ${S_FSS_PASSWORD} ${pass_api}\n Set Suite Variable ${S_FSS_CERTIFICATE} ${pem}\n\nset_the_uuid\n\tinternal_check_if_case_is_valid\n\t${full_cmd_uuid} Catenate sudo curl -s -H \"Authorization: Bearer\n\t ... $(curl -s -X POST -H \"Content-Type: application/json\" -d '{\"username\": \"${S_FSS_USERNAME}\", \"password\": \"${S_FSS_PASSWORD}\"}' https://${S_FSS_FQDN}/rest/auth/login --insecure | jq -r '.access_token' 2>/dev/null)\"\n\t ... https://${S_FSS_FQDN}/rest/intentmgr/api/v1/regions --insecure | jq .[] | jq -r '.\"uuid\"' 2>/dev/null\n\t${conn} ssh.Open_connection_to_deployment_server\n\n\tTRY\n\t\t${uuid_output} ssh.send_Command ${conn} ${full_cmd_uuid}\n ${uuid_split} Split To Lines ${uuid_output}\n ${uuid} Strip String ${uuid_split[-1]}\n Check Uuid Output ${uuid}\n EXCEPT\n\t ${cmd_token} Set Variable sudo curl -s -X POST -H \"Content-Type: application/json\" -d '{\"username\": \"${S_FSS_USERNAME}\", \"password\": \"${S_FSS_PASSWORD}\"}' https://${S_FSS_FQDN}/rest/auth/login --insecure | jq -r '.access_token' 2>/dev/null\n\t ${cmd_uuid_url} Set Variable https://${S_FSS_FQDN}/rest/intentmgr/api/v1/regions --insecure | jq .[] | jq -r '.\"uuid\"' 2>/dev/null\n \t${token} ssh.send_command ${conn} ${cmd_token}\n \t${token} Strip String ${token}\n \t${cmd_base} Set Variable sudo curl -s -H \"Authorization: Bearer ${token}\"\n \t${full_cmd_uuid} Set Variable ${cmd_base} ${cmd_uuid_url}\n \t${uuid} ssh.send_command ${conn} ${full_cmd_uuid}\n \tCheck Uuid Output ${uuid}\n END\n\n\tSet Suite Variable ${S_FSS_UUID} ${uuid}\n\nconnect_fss_to_the_env\n internal_check_if_case_is_valid\n ${add_bm_config}= ncsManagerOperations.get_add_bm_configuration_data\n ${fss_info} Create Dictionary\n ... CBIS:cluster_deployment:cluster_config:fabric_manager:fabric_manager FSS_Connect\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_fqdn ${S_FSS_FQDN}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_username ${S_FSS_USERNAME}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_password ${S_FSS_PASSWORD}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_regionid ${S_FSS_UUID}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_certificate ${S_FSS_CERTIFICATE}\n\tSet To Dictionary ${add_bm_config['content']['general']} common ${fss_info}\n Log ${add_bm_config}\n\n ncsManagerOperations.post_add_bm_configuration_data ${add_bm_config}\n ncsManagerOperations.wait_for_operation_to_finish add_bm_configuration\n\npostcase_cluster_status\n [Documentation] Check cluster status after the case.\\n\\n\n internal_check_if_case_is_valid\n check.postcase_cluster_status\n\n*** Keywords ***\n\ninternal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Run Keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" Skip IPMI protocol can be used only in baremetal installation.\n Run Keyword If \"${S_FSS_AVAILABLE}\"==\"${FALSE}\" Skip The FSS Server does not replay ping in the setup\n\nget_fabric_manager_deployer_ip\n ${fss_base_url}= config.fabric_manager_rest_api_base_url\n ${user_depl}= config.fabric_manager_deployer_username\n ${pass_depl}= config.fabric_manager_deployer_password\n\t${conn} ssh.open_connection_to_deployment_server\n\t${cmd} Set Variable sudo nslookup ${fss_base_url} | grep Address\n\t${std_out} ssh.send_command ${conn} ${cmd}\n\tLog \\nAdresses from nslookup: \\n${std_out}\n\t${split_output} Split To Lines ${std_out}\n\t${possible_ip} Remove String ${split_output[1]} Address:\n\t${possible_ip} Strip String ${possible_ip}\n\t${is_ipv4} Is_ipv4_address ${possible_ip}\n\tRun Keyword If '${is_ipv4}'=='${False}' Fail The ip of fss deployer should be ipv4\n\t# find the deployer\n\t${split_ip} Split String ${possible_ip} .\n\t${last_num_of_ip} Set Variable ${split_ip[-1]}\n\t${start_num} Evaluate ${last_num_of_ip}-3\n\t${end_num} Evaluate ${last_num_of_ip}+4\n ssh.close_connection ${conn}\n\tFOR ${num} IN RANGE ${start_num} ${end_num}\n\t ${possible_ip} Evaluate \"${split_ip[0]}\"+\".\"+\"${split_ip[1]}\"+\".\"+\"${split_ip[2]}\"+\".\"+\"${num}\"\n\t FOR ${i} IN RANGE 3\n\t \t${is_pass} ${resp} try_open_conn_and_get_hostname ${possible_ip} ${user_depl} ${pass_depl}\n\t \tLog ${resp}\n\t \t${is_failed_on_conn_timeout} Run Keyword If \"${is_pass}\"!=\"PASS\" Get Regexp Matches ${resp} Connection timed out\n\t \t... ELSE Create List\n\t \tExit For Loop If \"${is_failed_on_conn_timeout}\"==\"[]\"\n\t \tSleep 60s\n\t END\n\t Continue For Loop If \"${is_pass}\"==\"FAIL\"\n\t ${matches} Get Regexp Matches ${resp} deploy\n\t ${len_matches} Get Length ${matches}\n\t Return From Keyword If ${len_matches}>0 ${possible_ip}\n\tEND\n Fail Doesn't found ip for fss deployer: The last error was: ${resp}\n\ntry_open_conn_and_get_hostname\n\t[Arguments] ${ip} ${user} ${password}\n\t${is_pass} ${resp} Run Keyword And Ignore Error\n\t... open_connection_and_send_command ${ip} ${user} ${password} hostname\n\t[Return] ${is_pass} ${resp}\n\nsend_command_to_fss_deployer\n\t[Arguments] ${cmd}\n ${user_depl}= config.fabric_manager_deployer_username\n ${pass_depl}= config.fabric_manager_deployer_password\n ${stdout} open_connection_and_send_command ${S_FSS_IP_DEPLOYER} ${user_depl} ${pass_depl} ${cmd}\n [Return] ${stdout}\n\nget_pem_in_one_line\n\t[Arguments] ${pem}\n ${pem} Split to Lines ${pem}\n ${final_server_crt} Create List\n ${last_line} Set Variable ${pem[-1]}\n ${line_seprator} Convert to String \\\\n\n FOR ${crt_line} IN @{pem}\n \tIF \"${crt_line}\" == \"${last_line}\"\n \t\t${server_crt_line} Set Variable ${crt_line}\n \tELSE\n ${server_crt_line} Set Variable ${crt_line}${line_seprator}\n END\n Append to List ${final_server_crt} ${server_crt_line}\n END\n ${pem} Evaluate '${EMPTY}'.join(${final_server_crt})\n ${pem} Convert to String ${pem}\n\t[Return] ${pem}\n\ncheck uuid output\n\t[Arguments] ${uuid}\n ${is_digit} Evaluate \"${uuid}\".isdigit()\n Should Be True ${is_digit}\n\nopen_connection_and_send_command\n\t[Arguments] ${ip} ${user} ${password} ${command}\n\t${conn} ssh.open_connection_to_deployment_server\n\t${final_command} Set Variable sshpass -p ${password} ssh -q -tt -o StrictHostKeyChecking=no ${user}@${ip} '${command}'\n\t${stdout} ssh.send_command ${conn} ${final_command}\n\t[Return] ${stdout}\n", "name": "suites/rnd/NCSDEV-8848_fss_connect_check.robot", "imports_file_locations": "{'../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot', '../../resource/network.robot': 'resource/network.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "1f7eb733-cd7d-4ce0-aa34-6db9c7d8d8a9", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, ping to FSS fqdn...\\n\\n\n setup.precase_setup\n ${is_fqdn_available} Run Keyword And Return Status Wait Until Keyword Succeeds 12x 10s ping.deployment_server ${G_FABRIC_MANAGER_REST_API_BASE_URL}\n Set Suite Variable ${S_FSS_AVAILABLE} ${is_fqdn_available}", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "534d2984-be89-4c56-bfdc-cb4fe748b901", "code": "precase_cluster_status\n [Documentation] Check cluster status before the case.\\n\\n\n internal_check_if_case_is_valid\n check.precase_cluster_status", "settings": "{}", "variables": "{}", "name": "precase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "a40df139-340b-4df2-9d3b-f699160cb91f", "code": "set_the_ip_of_the_fss_deployer\n\tinternal_check_if_case_is_valid\n\t${fss_ip_depl}= get_fabric_manager_deployer_ip\n Set Suite Variable ${S_FSS_IP_DEPLOYER} ${fss_ip_depl}", "settings": "{}", "variables": "{}", "name": "set_the_ip_of_the_fss_deployer", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "6fa97edd-b105-4338-9917-2d0d4f573af0", "code": "set_variables_for_fss_connect\n internal_check_if_case_is_valid\n ${cmd} Set Variable cat \"$(jq '.fss' ~/input.json | jq -r '.certificate')\" > ~/fss.crt.pem\n #${cmd1} Catenate awk 'NF {sub(/\\\\r/, \"\"); printf \"%s\\\\\\\\n\",$0;}' ~/fss.crt.pem\n ${cmd1} Catenate cat ~/fss.crt.pem\n ${output} send_command_to_fss_deployer ${cmd}\n ${pem} send_command_to_fss_deployer ${cmd1}\n ${pem} get_pem_in_one_line ${pem}\n Log ${pem}\n ${fqdn}= config.fabric_manager_rest_api_base_url\n ${user_api}= config.fabric_manager_rest_api_username\n ${pass_api}= config.fabric_manager_rest_api_password\n Set Suite Variable ${S_FSS_FQDN} ${fqdn}\n Set Suite Variable ${S_FSS_USERNAME} ${user_api}\n Set Suite Variable ${S_FSS_PASSWORD} ${pass_api}\n Set Suite Variable ${S_FSS_CERTIFICATE} ${pem}", "settings": "{}", "variables": "{}", "name": "set_variables_for_fss_connect", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "dfc6de0b-718a-4a01-a18e-8fa2fc1e1d4c", "code": "set_the_uuid\n\tinternal_check_if_case_is_valid\n\t${full_cmd_uuid} Catenate sudo curl -s -H \"Authorization: Bearer\n\t ... $(curl -s -X POST -H \"Content-Type: application/json\" -d '{\"username\": \"${S_FSS_USERNAME}\", \"password\": \"${S_FSS_PASSWORD}\"}' https://${S_FSS_FQDN}/rest/auth/login --insecure | jq -r '.access_token' 2>/dev/null)\"\n\t ... https://${S_FSS_FQDN}/rest/intentmgr/api/v1/regions --insecure | jq .[] | jq -r '.\"uuid\"' 2>/dev/null\n\t${conn} ssh.Open_connection_to_deployment_server\n\n\tTRY\n\t\t${uuid_output} ssh.send_Command ${conn} ${full_cmd_uuid}\n ${uuid_split} Split To Lines ${uuid_output}\n ${uuid} Strip String ${uuid_split[-1]}\n Check Uuid Output ${uuid}\n EXCEPT\n\t ${cmd_token} Set Variable sudo curl -s -X POST -H \"Content-Type: application/json\" -d '{\"username\": \"${S_FSS_USERNAME}\", \"password\": \"${S_FSS_PASSWORD}\"}' https://${S_FSS_FQDN}/rest/auth/login --insecure | jq -r '.access_token' 2>/dev/null\n\t ${cmd_uuid_url} Set Variable https://${S_FSS_FQDN}/rest/intentmgr/api/v1/regions --insecure | jq .[] | jq -r '.\"uuid\"' 2>/dev/null\n \t${token} ssh.send_command ${conn} ${cmd_token}\n \t${token} Strip String ${token}\n \t${cmd_base} Set Variable sudo curl -s -H \"Authorization: Bearer ${token}\"\n \t${full_cmd_uuid} Set Variable ${cmd_base} ${cmd_uuid_url}\n \t${uuid} ssh.send_command ${conn} ${full_cmd_uuid}\n \tCheck Uuid Output ${uuid}\n END\n\n\tSet Suite Variable ${S_FSS_UUID} ${uuid}", "settings": "{}", "variables": "{}", "name": "set_the_uuid", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0283060f-4517-4e34-aa76-96cb042e99af", "code": "connect_fss_to_the_env\n internal_check_if_case_is_valid\n ${add_bm_config}= ncsManagerOperations.get_add_bm_configuration_data\n ${fss_info} Create Dictionary\n ... CBIS:cluster_deployment:cluster_config:fabric_manager:fabric_manager FSS_Connect\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_fqdn ${S_FSS_FQDN}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_username ${S_FSS_USERNAME}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_password ${S_FSS_PASSWORD}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_regionid ${S_FSS_UUID}\n\t...\t\t\tCBIS:cluster_deployment:cluster_config:fabric_manager:fss_certificate ${S_FSS_CERTIFICATE}\n\tSet To Dictionary ${add_bm_config['content']['general']} common ${fss_info}\n Log ${add_bm_config}\n\n ncsManagerOperations.post_add_bm_configuration_data ${add_bm_config}\n ncsManagerOperations.wait_for_operation_to_finish add_bm_configuration", "settings": "{}", "variables": "{}", "name": "connect_fss_to_the_env", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "75c1449f-6ddd-4619-ac44-4ecf551b4f27", "code": "postcase_cluster_status\n [Documentation] Check cluster status after the case.\\n\\n\n internal_check_if_case_is_valid\n check.postcase_cluster_status", "settings": "{}", "variables": "{}", "name": "postcase_cluster_status", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "f6449db0-c3a2-4211-bc11-b8a93b643e1d", "code": "internal_check_if_case_is_valid\n ${is_baremetal_installation}= config.is_baremetal_installation\n Run Keyword If \"${is_baremetal_installation}\"==\"${FALSE}\" Skip IPMI protocol can be used only in baremetal installation.\n Run Keyword If \"${S_FSS_AVAILABLE}\"==\"${FALSE}\" Skip The FSS Server does not replay ping in the setup", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "a647971e-5335-405c-bd2e-486a8aa21498", "code": "get_fabric_manager_deployer_ip\n ${fss_base_url}= config.fabric_manager_rest_api_base_url\n ${user_depl}= config.fabric_manager_deployer_username\n ${pass_depl}= config.fabric_manager_deployer_password\n\t${conn} ssh.open_connection_to_deployment_server\n\t${cmd} Set Variable sudo nslookup ${fss_base_url} | grep Address\n\t${std_out} ssh.send_command ${conn} ${cmd}\n\tLog \\nAdresses from nslookup: \\n${std_out}\n\t${split_output} Split To Lines ${std_out}\n\t${possible_ip} Remove String ${split_output[1]} Address:\n\t${possible_ip} Strip String ${possible_ip}\n\t${is_ipv4} Is_ipv4_address ${possible_ip}\n\tRun Keyword If '${is_ipv4}'=='${False}' Fail The ip of fss deployer should be ipv4\n\t# find the deployer\n\t${split_ip} Split String ${possible_ip} .\n\t${last_num_of_ip} Set Variable ${split_ip[-1]}\n\t${start_num} Evaluate ${last_num_of_ip}-3\n\t${end_num} Evaluate ${last_num_of_ip}+4\n ssh.close_connection ${conn}\n\tFOR ${num} IN RANGE ${start_num} ${end_num}\n\t ${possible_ip} Evaluate \"${split_ip[0]}\"+\".\"+\"${split_ip[1]}\"+\".\"+\"${split_ip[2]}\"+\".\"+\"${num}\"\n\t FOR ${i} IN RANGE 3\n\t \t${is_pass} ${resp} try_open_conn_and_get_hostname ${possible_ip} ${user_depl} ${pass_depl}\n\t \tLog ${resp}\n\t \t${is_failed_on_conn_timeout} Run Keyword If \"${is_pass}\"!=\"PASS\" Get Regexp Matches ${resp} Connection timed out\n\t \t... ELSE Create List\n\t \tExit For Loop If \"${is_failed_on_conn_timeout}\"==\"[]\"\n\t \tSleep 60s\n\t END\n\t Continue For Loop If \"${is_pass}\"==\"FAIL\"\n\t ${matches} Get Regexp Matches ${resp} deploy\n\t ${len_matches} Get Length ${matches}\n\t Return From Keyword If ${len_matches}>0 ${possible_ip}\n\tEND\n Fail Doesn't found ip for fss deployer: The last error was: ${resp}", "settings": "{}", "variables": "{}", "name": "get_fabric_manager_deployer_ip", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "45f44846-204e-4fe2-aacd-446f57a2f9dd", "code": "try_open_conn_and_get_hostname\n\t[Arguments] ${ip} ${user} ${password}\n\t${is_pass} ${resp} Run Keyword And Ignore Error\n\t... open_connection_and_send_command ${ip} ${user} ${password} hostname\n\t[Return] ${is_pass} ${resp}\n\nsend_command_to_fss_deployer\n\t[Arguments] ${cmd}\n ${user_depl}= config.fabric_manager_deployer_username\n ${pass_depl}= config.fabric_manager_deployer_password\n ${stdout} open_connection_and_send_command ${S_FSS_IP_DEPLOYER} ${user_depl} ${pass_depl} ${cmd}\n [Return] ${stdout}\n\nget_pem_in_one_line\n\t[Arguments] ${pem}\n ${pem} Split to Lines ${pem}\n ${final_server_crt} Create List\n ${last_line} Set Variable ${pem[-1]}\n ${line_seprator} Convert to String \\\\n\n FOR ${crt_line} IN @{pem}\n \tIF \"${crt_line}\" == \"${last_line}\"\n \t\t${server_crt_line} Set Variable ${crt_line}\n \tELSE\n ${server_crt_line} Set Variable ${crt_line}${line_seprator}\n END\n Append to List ${final_server_crt} ${server_crt_line}\n END\n ${pem} Evaluate '${EMPTY}'.join(${final_server_crt})\n ${pem} Convert to String ${pem}\n\t[Return] ${pem}\n\ncheck uuid output\n\t[Arguments] ${uuid}\n ${is_digit} Evaluate \"${uuid}\".isdigit()\n Should Be True ${is_digit}", "settings": "{}", "variables": "{}", "name": "try_open_conn_and_get_hostname", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "61b9a6d6-4d6e-4508-b7fe-f40ac7fdb8ee", "code": "open_connection_and_send_command\n\t[Arguments] ${ip} ${user} ${password} ${command}\n\t${conn} ssh.open_connection_to_deployment_server\n\t${final_command} Set Variable sshpass -p ${password} ssh -q -tt -o StrictHostKeyChecking=no ${user}@${ip} '${command}'\n\t${stdout} ssh.send_command ${conn} ${final_command}", "settings": "{}", "variables": "{}", "name": "open_connection_and_send_command", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8848_fss_connect_check.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "ee03efd1-f29e-47c3-8ec2-261a624e15d1", "code": "*** Settings ***\nDocumentation TICKET: NCSDEV-8762\n... The test check if the modules from the list is exist in the blade\n\nTest Timeout 15 min\n\nLibrary BuiltIn\nLibrary Collections\nLibrary String\n\nResource ../../resource/setup.robot\nResource ../../resource/ssh.robot\nResource ../../resource/config.robot\nResource ../../resource/node.robot\n\nSuite Setup setup.suite_setup\nSuite Teardown setup.suite_teardown\n\n*** Variables ***\n@{S_LIST_MODULES} xpmem ceph # add modules you want to check\n\n*** Test Cases ***\nprecase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login, set parameters of the case, env is valid.\n setup.precase_setup\n internal_check_prereqs\n internal_check_if_case_is_valid # Check if the env is valid\n\ncheck_modules_exist\n ${conn} ssh.open_connection_to_controller\n ${blade} ssh.send_command ${conn} sudo hostname -s\n Log The name of the host: ${blade}\n FOR ${module} IN @{S_LIST_MODULES}\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} sudo modinfo ${module}\n Log output:${\\n}${std_out} ${\\n}rc: ${code}\n Should Be Equal As Integers ${code} 0\n END\n\n\n*** Keywords ***\ninternal_check_prereqs\n [Tags] robot:private\n [Arguments] ${target_version}=cbis-22.100.12 ${target_build}=1 ${only_supported_centrel}=${FALSE}\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n # Check if environment is ncs version 23.5 or above\n ${is_currect_version} config.is_current_NCS_sw_build_greater_than ${target_version} ${target_build} is_baremetal=${S_IS_BAREMETAL_INSTALLATION}\n Set Suite Variable ${S_IS_CURRECT_VERSION} ${is_currect_version}\n # Check if environment suppurted with central\n ${is_central} config.is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n Set Suite Variable ${S_ONLY_SUPPORTED_CENTRAL} ${only_supported_centrel}\n\ninternal_check_if_case_is_valid\n\t[Tags] robot:private\n [Documentation] Check if configuration is supported.\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If \"${S_ONLY_SUPPORTED_CENTRAL}\"==\"${TRUE}\" and \"${S_IS_CENTRAL}\"==\"${FALSE}\" This case is supported only in central installation\n Skip If \"${S_IS_CURRECT_VERSION}\"==\"${FALSE}\" The NCS version of this setup not supported\n", "name": "suites/rnd/NCSDEV-8762_check_modules_exist.robot", "imports_file_locations": "{'../../resource/setup.robot': 'resource/setup.robot', '../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/config.robot': 'resource/config.robot', '../../resource/node.robot': 'resource/node.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8762_check_modules_exist.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "3ad73989-7820-4a1d-a5b4-f9b2dd11c06a", "code": "precase_setup\n [Documentation] Run Precase setup - ncs rest api login, get cluster name, setup ncs cli config and login, set parameters of the case, env is valid.\n setup.precase_setup\n internal_check_prereqs\n internal_check_if_case_is_valid # Check if the env is valid", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8762_check_modules_exist.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "acef6e3f-a360-4ffe-8dee-00b40f90f08c", "code": "check_modules_exist\n ${conn} ssh.open_connection_to_controller\n ${blade} ssh.send_command ${conn} sudo hostname -s\n Log The name of the host: ${blade}\n FOR ${module} IN @{S_LIST_MODULES}\n ${std_out} ${std_err} ${code} ssh.send_command_and_return_rc ${conn} sudo modinfo ${module}\n Log output:${\\n}${std_out} ${\\n}rc: ${code}\n Should Be Equal As Integers ${code} 0\n END", "settings": "{}", "variables": "{'S_LIST_MODULES': {'text': '@{S_LIST_MODULES} xpmem ceph # add modules you want to check'}}", "name": "check_modules_exist", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8762_check_modules_exist.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "38ce7fe7-3c34-499f-b49c-87989754caa7", "code": "internal_check_prereqs\n [Tags] robot:private\n [Arguments] ${target_version}=cbis-22.100.12 ${target_build}=1 ${only_supported_centrel}=${FALSE}\n # Check if environment is baremetal\n ${is_baremetal_installation}= config.is_baremetal_installation\n Set Suite Variable ${S_IS_BAREMETAL_INSTALLATION} ${is_baremetal_installation}\n # Check if environment is ncs version 23.5 or above\n ${is_currect_version} config.is_current_NCS_sw_build_greater_than ${target_version} ${target_build} is_baremetal=${S_IS_BAREMETAL_INSTALLATION}\n Set Suite Variable ${S_IS_CURRECT_VERSION} ${is_currect_version}\n # Check if environment suppurted with central\n ${is_central} config.is_centralized_installation\n Set Suite Variable ${S_IS_CENTRAL} ${is_central}\n Set Suite Variable ${S_ONLY_SUPPORTED_CENTRAL} ${only_supported_centrel}", "settings": "{}", "variables": "{}", "name": "internal_check_prereqs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8762_check_modules_exist.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "84af8f41-0a3e-4463-bcda-671c41daff5f", "code": "internal_check_if_case_is_valid\n\t[Tags] robot:private\n [Documentation] Check if configuration is supported.\n Skip If \"${S_IS_BAREMETAL_INSTALLATION}\"==\"${FALSE}\" This case is supported only in baremetal installation\n Skip If \"${S_ONLY_SUPPORTED_CENTRAL}\"==\"${TRUE}\" and \"${S_IS_CENTRAL}\"==\"${FALSE}\" This case is supported only in central installation\n Skip If \"${S_IS_CURRECT_VERSION}\"==\"${FALSE}\" The NCS version of this setup not supported", "settings": "{}", "variables": "{}", "name": "internal_check_if_case_is_valid", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8762_check_modules_exist.robot" }, { "element_type": "test", "project_name": "NCS", "uuid": "fce27df5-2430-46d1-a390-aaf1cd5d23a7", "code": "*** Settings ***\n\nLibrary ../../resource/PythonFunctionsPostUpgrade.py\n\nResource ../../resource/ssh.robot\nResource ../../resource/ceph.robot\nResource ../../resource/node.robot\nResource ../../resource/config.robot\nResource ../../resource/setup.robot\n\nSuite Setup setup.Suite_setup\nSuite Teardown setup.Suite_teardown\n\n*** Test Cases ***\n\nprecase_setup\n setup.Precase_setup\n ${conn}= ssh.Open_connection_to_deployment_server\n ${connections_dict}= get_all_nodes_connection_dict\n Set Suite Variable ${DEPL_CONN} ${conn}\n Set Suite Variable ${CONNECTIONS} ${connections_dict}\n ${logrotate_podman}= Get_podman_logrotate_conf\n Set Suite Variable ${S_LOGROTATE_PODMAN} ${logrotate_podman}\n\ncheck_logrotate_podman_conf\n ${coded_conf}= Get Regexp Matches ${S_LOGROTATE_PODMAN} [^\\s^ ]\n Should Be True \"${coded_conf}\" != \"[]\" the configuration is invalid : ${S_LOGROTATE_PODMAN}\n\ncheck_logs\n FOR ${connection} IN @{CONNECTIONS}\n check_logs_size_amount ${CONNECTIONS}[${connection}]\n END\n\npostcase_setup\n close_all_nodes_connections ${CONNECTIONS}\n Close_connection ${DEPL_CONN}\n\n\n\n\n\n\n*** Keywords ***\nget_podman_logrotate_conf\n ${podman_logrotate_cmd}= Set Variable cat /etc/logrotate.d/podman\n ${podman_logrotate_conf}= ssh.Send_command ${DEPL_CONN} ${podman_logrotate_cmd}\n [Return] ${podman_logrotate_conf}\n\n\nget_logrotate_info\n ${path}= Get Regexp Matches ${S_LOGROTATE_PODMAN} \\/[^{]+(?= \\{)\n ${size_line}= Get Regexp Matches ${S_LOGROTATE_PODMAN} .*\\\\bsize\\\\b.*\n ${amount_line}= Get Regexp Matches ${S_LOGROTATE_PODMAN} .*\\\\brotate\\\\b.*\n ${dir_first_line}= Get Regexp Matches ${path}[-1] ([^ ]*)[\\*] 1\n ${dir_last_line}= Get Regexp Matches ${path}[-1] [\\*]([^ ]*) 1\n ${size_number}= Get Regexp Matches ${size_line}[-1] [0-9]*\n ${amount_number}= Get Regexp Matches ${amount_line}[-1] [0-9]*\n Remove Empty From List ${size_number}\n Remove Empty From List ${amount_number}\n ${dir_file_name}= Get Regexp Matches ${dir_last_line}[-1] [\\/]([^\\/ ]*)$ 1\n ${dir_last_line_name}= Get Regexp Matches ${dir_last_line}[-1] ([^ ]*)[\\/] 1\n ${dir_first}= Set Variable ${dir_first_line}[-1]\n ${size}= Set Variable ${size_number}[-1]\n ${amount}= Set Variable ${amount_number}[-1]\n ${dir_last}= Set Variable ${dir_last_line_name}[-1]\n ${file_name}= Set Variable ${dir_file_name}[-1]\n [Return] ${file_name} ${dir_first} ${dir_last} ${size} ${amount}\n\ncheck_logs_size_amount\n [Arguments] ${conn}\n ${file_name} ${dir_first} ${dir_last} ${size} ${amount}= Get_logrotate_info\n ${amount_int}= Evaluate ${amount} + 1\n ${size_int}= Evaluate ${size}\n ${directories_cmd}= Set Variable sudo ls ${dir_first}\n ${log_files}= ssh.Send_command ${conn} ${directories_cmd}\n ${log_files_list}= Split To Lines ${log_files}\n FOR ${log_dir_file} IN @{log_files_list}\n ${is_directory}= Get Regexp Matches ${log_dir_file} \\.\\w+\n Continue For Loop If \"${is_directory}\" != \"[]\"\n ${logs} ${error} ${code}= ssh.Send_command_and_return_rc ${conn} sudo ls ${dir_first}${log_dir_file}${dir_last} | grep ${file_name} | grep -v backup\n ${logs_zipped} ${error_zip} ${code_zip}= ssh.Send_command_and_return_rc ${conn} sudo ls ${dir_first}${log_dir_file}${dir_last} | grep ${file_name} | grep .gz | grep -v backup\n Continue For Loop If \"${code}\" != \"0\"\n ${logs_list}= Split To Lines ${logs}\n ${logs_zipped_list}= Split To Lines ${logs_zipped}\n Remove Empty From List ${logs_zipped_list}\n Remove Empty From List ${logs_list}\n ${log_amount}= Get Length ${logs_list}\n Should Be True ${log_amount} <= ${amount_int} the amount of log files is not valid by the configuration ${log_amount} > ${amount_int}\n Continue For Loop If \"${code_zip}\" != \"0\"\n FOR ${log} IN @{logs_zipped_list}\n ${file_info}= ssh.Send_command ${conn} sudo du -sh ${dir_first}${log_dir_file}${dir_last}/${log}\n ${file_info_list}= Split String ${file_info}\n ${file_size}= Get Regexp Matches ${file_info_list}[0] [0-9]*\n Remove Empty From List ${file_size}\n ${file_size_int}= Evaluate ${file_size}[0]\n Should Be True ${file_size_int} <= ${size_int} the size of the log file ${log} in the directory ${log_dir_file} is bigger than the configuration size ${file_size_int} > ${size_int}\n END\n END\n\nget_all_nodes_connection_dict\n [Documentation] gets a dictionary of all connections that were opened on all nodes\n ${connections_dict}= Create Dictionary\n ${node_list}= node.Get_name_list\n ${host_list}= ceph.Get_host_list\n ${central_nodes}= Create List\n ${is_central}= config.Is_centralized_installation\n IF ${is_central}\n ${central_nodes}= node.Get_centralsitemanager_nodes_name_list\n END\n FOR ${host} IN @{host_list}\n IF \"${host}\" not in ${node_list}\n Append To List ${node_list} ${host}\n END\n END\n FOR ${node} IN @{node_list}\n IF \"${node}\" in ${host_list}\n ${ip}= ceph.Get_host_ip ${node}\n ${conn}= ssh.Open_connection_to_node ${ip}\n ELSE\n ${conn}= ssh.Open_connection_to_node ${node}\n END\n Set To Dictionary ${connections_dict} ${node} ${conn}\n END\n FOR ${central_node} IN @{central_nodes}\n ${ip}= node.Get_centralsitemanager_node_int_ip_address ${central_node}\n ${conn}= ssh.Open_connection_to_node ${ip}\n Set To Dictionary ${connections_dict} ${central_node} ${conn}\n END\n [Return] ${connections_dict}\n\nclose_all_nodes_connections\n [Documentation] closes all connections from a list of connections\n ... connections_dict= dict of opened connections(KW: get_all_nodes_connection_list)\n [Arguments] ${connections_dict}\n FOR ${connection} IN @{connections_dict}\n Log To Console connection to node closed\n ssh.Close_connection ${connections_dict}[${connection}]\n END\n\n\n\n\n", "name": "suites/rnd/NCSDEV-8761_logrotate_podman_test.robot", "imports_file_locations": "{'../../resource/ssh.robot': 'resource/ssh.robot', '../../resource/ceph.robot': 'resource/ceph.robot', '../../resource/node.robot': 'resource/node.robot', '../../resource/config.robot': 'resource/config.robot', '../../resource/setup.robot': 'resource/setup.robot'}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8761_logrotate_podman_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "0476a708-94d0-4d2b-a0af-0d003ac75f45", "code": "precase_setup\n setup.Precase_setup\n ${conn}= ssh.Open_connection_to_deployment_server\n ${connections_dict}= get_all_nodes_connection_dict\n Set Suite Variable ${DEPL_CONN} ${conn}\n Set Suite Variable ${CONNECTIONS} ${connections_dict}\n ${logrotate_podman}= Get_podman_logrotate_conf\n Set Suite Variable ${S_LOGROTATE_PODMAN} ${logrotate_podman}", "settings": "{}", "variables": "{}", "name": "precase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8761_logrotate_podman_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "327575f8-92db-47ff-ac19-7752e05d1634", "code": "check_logrotate_podman_conf\n ${coded_conf}= Get Regexp Matches ${S_LOGROTATE_PODMAN} [^\\s^ ]\n Should Be True \"${coded_conf}\" != \"[]\" the configuration is invalid : ${S_LOGROTATE_PODMAN}", "settings": "{}", "variables": "{}", "name": "check_logrotate_podman_conf", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8761_logrotate_podman_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "b7a548ab-0d0a-47be-ab9b-f5eed56d9c43", "code": "check_logs\n FOR ${connection} IN @{CONNECTIONS}\n check_logs_size_amount ${CONNECTIONS}[${connection}]\n END", "settings": "{}", "variables": "{}", "name": "check_logs", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8761_logrotate_podman_test.robot" }, { "element_type": "test_case", "project_name": "NCS", "uuid": "8a9f4380-c957-4aa1-b8fc-74d3633e133c", "code": "postcase_setup\n close_all_nodes_connections ${CONNECTIONS}\n Close_connection ${DEPL_CONN}", "settings": "{}", "variables": "{}", "name": "postcase_setup", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8761_logrotate_podman_test.robot" }, { "element_type": "keyword", "project_name": "NCS", "uuid": "244ef1c4-9992-4317-b21a-a056762749cc", "code": "get_podman_logrotate_conf\n ${podman_logrotate_cmd}= Set Variable cat /etc/logrotate.d/podman\n ${podman_logrotate_conf}= ssh.Send_command ${DEPL_CONN} ${podman_logrotate_cmd}\n [Return] ${podman_logrotate_conf}\n\n\nget_logrotate_info\n ${path}= Get Regexp Matches ${S_LOGROTATE_PODMAN} \\/[^{]+(?= \\{)\n ${size_line}= Get Regexp Matches ${S_LOGROTATE_PODMAN} .*\\\\bsize\\\\b.*\n ${amount_line}= Get Regexp Matches ${S_LOGROTATE_PODMAN} .*\\\\brotate\\\\b.*\n ${dir_first_line}= Get Regexp Matches ${path}[-1] ([^ ]*)[\\*] 1\n ${dir_last_line}= Get Regexp Matches ${path}[-1] [\\*]([^ ]*) 1\n ${size_number}= Get Regexp Matches ${size_line}[-1] [0-9]*\n ${amount_number}= Get Regexp Matches ${amount_line}[-1] [0-9]*\n Remove Empty From List ${size_number}\n Remove Empty From List ${amount_number}\n ${dir_file_name}= Get Regexp Matches ${dir_last_line}[-1] [\\/]([^\\/ ]*)$ 1\n ${dir_last_line_name}= Get Regexp Matches ${dir_last_line}[-1] ([^ ]*)[\\/] 1\n ${dir_first}= Set Variable ${dir_first_line}[-1]\n ${size}= Set Variable ${size_number}[-1]\n ${amount}= Set Variable ${amount_number}[-1]\n ${dir_last}= Set Variable ${dir_last_line_name}[-1]\n ${file_name}= Set Variable ${dir_file_name}[-1]\n [Return] ${file_name} ${dir_first} ${dir_last} ${size} ${amount}\n\ncheck_logs_size_amount\n [Arguments] ${conn}\n ${file_name} ${dir_first} ${dir_last} ${size} ${amount}= Get_logrotate_info\n ${amount_int}= Evaluate ${amount} + 1\n ${size_int}= Evaluate ${size}\n ${directories_cmd}= Set Variable sudo ls ${dir_first}\n ${log_files}= ssh.Send_command ${conn} ${directories_cmd}\n ${log_files_list}= Split To Lines ${log_files}\n FOR ${log_dir_file} IN @{log_files_list}\n ${is_directory}= Get Regexp Matches ${log_dir_file} \\.\\w+\n Continue For Loop If \"${is_directory}\" != \"[]\"\n ${logs} ${error} ${code}= ssh.Send_command_and_return_rc ${conn} sudo ls ${dir_first}${log_dir_file}${dir_last} | grep ${file_name} | grep -v backup\n ${logs_zipped} ${error_zip} ${code_zip}= ssh.Send_command_and_return_rc ${conn} sudo ls ${dir_first}${log_dir_file}${dir_last} | grep ${file_name} | grep .gz | grep -v backup\n Continue For Loop If \"${code}\" != \"0\"\n ${logs_list}= Split To Lines ${logs}\n ${logs_zipped_list}= Split To Lines ${logs_zipped}\n Remove Empty From List ${logs_zipped_list}\n Remove Empty From List ${logs_list}\n ${log_amount}= Get Length ${logs_list}\n Should Be True ${log_amount} <= ${amount_int} the amount of log files is not valid by the configuration ${log_amount} > ${amount_int}\n Continue For Loop If \"${code_zip}\" != \"0\"\n FOR ${log} IN @{logs_zipped_list}\n ${file_info}= ssh.Send_command ${conn} sudo du -sh ${dir_first}${log_dir_file}${dir_last}/${log}\n ${file_info_list}= Split String ${file_info}\n ${file_size}= Get Regexp Matches ${file_info_list}[0] [0-9]*\n Remove Empty From List ${file_size}\n ${file_size_int}= Evaluate ${file_size}[0]\n Should Be True ${file_size_int} <= ${size_int} the size of the log file ${log} in the directory ${log_dir_file} is bigger than the configuration size ${file_size_int} > ${size_int}\n END\n END", "settings": "{}", "variables": "{}", "name": "get_podman_logrotate_conf", "documentation": "", "imports_file_locations": "{}", "file_location": "https://scm.cci.nokia.net/cia/automation-tests-ncs/24/suites/rnd/NCSDEV-8761_logrotate_podman_test.robot" } ]