summaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/bc_interface.robot8
-rw-r--r--robot/resources/chart_museum.robot10
-rw-r--r--robot/resources/consul_interface.robot4
-rw-r--r--robot/resources/mr_interface.robot9
-rw-r--r--robot/resources/usecases/5gbulkpm_helm_interface.robot119
5 files changed, 123 insertions, 27 deletions
diff --git a/robot/resources/bc_interface.robot b/robot/resources/bc_interface.robot
index 3d0ebc02..7d4c1fb1 100644
--- a/robot/resources/bc_interface.robot
+++ b/robot/resources/bc_interface.robot
@@ -25,3 +25,11 @@ Return dmaap details with basic auth
Log Received response from bus controller ${resp.text}
[Return] ${resp}
+Delete MR topic
+ [Documentation] Runs Bus Controller to remove topic
+ [Arguments] ${data_path}
+ ${auth}= Create List ${GLOBAL_BC_USERNAME} ${GLOBAL_BC_PASSWORD}
+ ${session}= Create Session bs ${BC_HTTPS_ENDPOINT} auth=${auth}
+ ${resp}= Delete Request bs ${data_path}
+ Log Received response from bus controller ${resp.status_code}
+ [Return] ${resp} \ No newline at end of file
diff --git a/robot/resources/chart_museum.robot b/robot/resources/chart_museum.robot
index e201a914..7b46deb3 100644
--- a/robot/resources/chart_museum.robot
+++ b/robot/resources/chart_museum.robot
@@ -43,25 +43,31 @@ Install helm charts
[Arguments] ${chart_repo_name} ${dcae_servcie_helm_charts} ${dcae_service_helm_name} ${wait_time}=2 min ${set_values_override}=${EMPTY}
${helm_install}= Set Variable helm install ${dcae_service_helm_name} ${chart_repo_name}/${dcae_servcie_helm_charts} --set global.repository=${registry_ovveride} ${set_values_override}
${helm_install_command_output} = Run And Return Rc And Output ${helm_install}
+ Log ${helm_install_command_output[1]}
Should Be Equal As Integers ${helm_install_command_output[0]} 0
Wait Until Keyword Succeeds ${wait_time} 20 sec Checking Status Of Deployed Appliction Using Helm ${dcae_servcie_helm_charts} ${dcae_service_helm_name}
Install helm charts from folder
[Documentation] Install DCAE Servcie using helm charts not in repo
[Arguments] ${chart_folder} ${dcae_service_helm_name} ${wait_time}=2 min ${set_values_override}=${EMPTY}
+ ${helm_dependency_update}= Set Variable helm dependency update ${chart_folder}
+ ${helm_dependency_update_output} = Run And Return Rc And Output ${helm_dependency_update}
+ Log ${helm_dependency_update_output[1]}
+ Should Be Equal As Integers ${helm_dependency_update_output[0]} 0
${rest} ${dcae_servcie_helm_charts} = Split String From Right ${chart_folder} / 1
${helm_install}= Set Variable helm install ${dcae_service_helm_name} ${chart_folder} --set global.repository=${registry_ovveride} ${set_values_override}
${helm_install_command_output} = Run And Return Rc And Output ${helm_install}
+ Log ${helm_install_command_output[1]}
Should Be Equal As Integers ${helm_install_command_output[0]} 0
Wait Until Keyword Succeeds ${wait_time} 20 sec Checking Status Of Deployed Appliction Using Helm ${dcae_servcie_helm_charts} ${dcae_service_helm_name}
Checking Status Of Deployed Appliction Using Helm
[Arguments] ${dcae_servcie_helm_charts} ${dcae_service_helm_name}
- ${pod_status}= Set Variable kubectl get pods -n onap | grep ${ONAP_HELM_RELEASE}-${dcae_servcie_helm_charts} | awk '{print $3}'
+ ${pod_status}= Set Variable kubectl get pods -n onap | grep ${dcae_service_helm_name} | awk '{print $3}'
${pod_status_command_output} = Run And Return Rc And Output ${pod_status}
Should Be Equal As Integers ${pod_status_command_output[0]} 0
Should Be Equal As Strings ${pod_status_command_output[1]} Running
- ${pod_ready}= Set Variable kubectl get pods -n onap | grep ${ONAP_HELM_RELEASE}-${dcae_servcie_helm_charts} | awk '{print $2}'
+ ${pod_ready}= Set Variable kubectl get pods -n onap | grep ${dcae_service_helm_name} | awk '{print $2}'
${pod_ready_command_output} = Run And Return Rc And Output ${pod_ready}
Should Be Equal As Integers ${pod_ready_command_output[0]} 0
${pre} ${post} = Split String ${pod_ready_command_output[1]} / 1
diff --git a/robot/resources/consul_interface.robot b/robot/resources/consul_interface.robot
index 5b6f948f..ca0244b7 100644
--- a/robot/resources/consul_interface.robot
+++ b/robot/resources/consul_interface.robot
@@ -6,7 +6,9 @@ Library String
Resource global_properties.robot
*** Variables ***
-${CONSUL_ENDPOINT} http://consul.onap:8500
+${CONSUL_ENDPOINT} http://consul-server-ui:8500
+#${CONSUL_ENDPOINT} ${GLOBAL_CONSUL_SERVER_PROTOCOL}://${GLOBAL_CONSUL_SERVER_NAME}:${GLOBAL_CONSUL_SERVER_PORT}
+
*** Keywords ***
diff --git a/robot/resources/mr_interface.robot b/robot/resources/mr_interface.robot
index 2d3cda28..f4c57cd2 100644
--- a/robot/resources/mr_interface.robot
+++ b/robot/resources/mr_interface.robot
@@ -143,3 +143,12 @@ Run MR Post Request
Log Received response from message router ${resp.text}
[Return] ${resp}
+Run MR Delete Request
+ [Documentation] Runs MR Delete request
+ [Arguments] ${data_path}
+ ${session}= Create Session mr ${MR_ENDPOINT}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Delete Request mr ${data_path} headers=${headers}
+ Log Received response from message router ${resp.status_code}
+ [Return] ${resp} \ No newline at end of file
diff --git a/robot/resources/usecases/5gbulkpm_helm_interface.robot b/robot/resources/usecases/5gbulkpm_helm_interface.robot
index 6707767f..8dfc3972 100644
--- a/robot/resources/usecases/5gbulkpm_helm_interface.robot
+++ b/robot/resources/usecases/5gbulkpm_helm_interface.robot
@@ -6,6 +6,7 @@ Library String
Library JSONLibrary
Resource ../mr_interface.robot
Resource ../dr_interface.robot
+Resource ../bc_interface.robot
Resource ../consul_interface.robot
Resource ../chart_museum.robot
@@ -37,6 +38,8 @@ ${SET_KNOWN_HOSTS_FILE_PATH} kubectl set env deployment/$
${CHECK_ENV_SET} kubectl set env pod/$(kubectl get pod -n onap | grep datafile | awk '{print $1}') --list -n onap
${COPY_RSA_KEY} kubectl cp /tmp/known_hosts $(kubectl get pod -n onap | grep datafile | awk '{print $1}'):/home/datafile/.ssh/known_hosts -n onap
${CHECK_DFC_LOGS} kubectl logs $(kubectl get pod -n onap | grep datafile | awk '{print $1}') -n onap --tail=4
+${CHECK_ALL_DFC_LOGS} kubectl logs $(kubectl get pod -n onap | grep datafile | awk '{print $1}') -n onap --all-containers
+${CHECK_ALL_PMMAPPER_LOGS} kubectl logs $(kubectl get pod -n onap | grep pm-mapper | awk '{print $1}') -n onap --all-containers
${EXPECTED_PRINT} StrictHostKeyChecking is enabled but environment variable KNOWN_HOSTS_FILE_PATH is not set or points to not existing file
${MONGO_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/cmpv2/k8s-mongo.yaml
${PNF_SIMULATOR_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/cmpv2/k8s-pnf-simulator.yaml
@@ -47,6 +50,7 @@ ${pm_notification_event} dfc/notification.jinja
${consul_change_event} dfc/consul.jinja
${ves_client_single_event}= ves/pnf_simulator_single_event.jinja
${SFTP_HELM_CHARTS} ${EXECDIR}/robot/assets/helm/sftp
+${HTTPS_SERVER_HELM_CHARTS} ${EXECDIR}/robot/assets/helm/pm-https-server
${HELM_RELEASE} kubectl --namespace onap get pods | sed 's/ .*//' | grep robot | sed 's/-.*//'
*** Keywords ***
@@ -73,6 +77,7 @@ Topic Validate
Send File Ready Event to VES Collector and Deploy all DCAE Applications
[Arguments] ${pm_file} ${file_format_type} ${file_format_version}
Disable Warnings
+ Delete PERFORMANCE_MEASUREMENTS topic
Setting Global Variables
Send File Ready Event to VES Collector ${pm_file} ${file_format_type} ${file_format_version}
Add chart repository chart-museum http://chart-museum:80 onapinitializer demo123456!
@@ -82,15 +87,26 @@ Send File Ready Event to VES Collector and Deploy all DCAE Applications
Deploying 3GPP PM Mapper
Log To Console Deploying SFTP Server As xNF
Deploying SFTP Server As xNF
+ Log To Console Deploying HTTPS Server with correct CMPv2 certificates as xNF
+ Deploying HTTPS server with correct certificates
+ Log To Console Deploying HTTPS Server with wrong subject alternatives in CMPv2 certificates as xNF
+ Deploying HTTPS server with wrong certificates - wrong SAN-s
Checking PERFORMANCE_MEASUREMENTS Topic In Message Router
DR Bulk PM Feed Check
DR PM Mapper Subscriber Check
Usecase Teardown
Disable Warnings
- Uninstall helm charts ${ONAP_HELM_RELEASE}-dfc
- Uninstall helm charts ${ONAP_HELM_RELEASE}-pmmapper
+ Get all logs from PM Mapper
+ Get all logs from Data File Collector
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-datafile-collector
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-pm-mapper
Uninstall helm charts ${ONAP_HELM_RELEASE}-sftp
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans
+
+Delete PERFORMANCE_MEASUREMENTS topic
+ ${resp}= Delete MR topic /webapi/topics/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS
Setting Global Variables
${test_variables} = Create Dictionary
@@ -125,21 +141,6 @@ Upload PM Files to xNF SFTP Server
Put File ${pm_file_path} upload/${pm_file}
[Return] ${pm_file}
-Upload PM Files to xNF HTTPS Server
- [Arguments] ${pm_file_path} ${https_server}
- ${epoch}= Get Current Date result_format=epoch
- Set Variable A${epoch}.xml.gz
- Copy File ${pm_file_path} tmp/${pm_file}
- ${fileData}= Get Binary File tmp/${pm_file}
- ${file_part}= Create List ${pm_file} ${fileData} application/octet-stream
- ${fileParts}= Create Dictionary
- Set to Dictionary ${fileParts} uploaded_file=${file_part}
- ${auth}= Create List demo demo123456!
- ${session}= Create Session https http://${https_server}:80 auth=${auth}
- ${resp}= Post Request https /upload.php files=${fileParts}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${pm_file}
-
Check Given Print In DFC Log
[Arguments] ${check_dfc_logs}
${dfc_logs}= Run Given Command On DFC Container ${CHECK_DFC_LOGS}
@@ -167,15 +168,25 @@ Check Known Hosts In Env
[Return] ${output}
Deploying Data File Collector
- Install helm charts chart-museum dcae-datafile-collector ${ONAP_HELM_RELEASE}-dfc 3 min
+ Install helm charts chart-museum dcae-datafile-collector ${ONAP_HELM_RELEASE}-dcae-datafile-collector 3 min --set useCmpv2Certificates=true --set global.cmpv2Enabled=true --set masterPasswordOverride=test --debug
Deploying 3GPP PM Mapper
- Install helm charts chart-museum dcae-pm-mapper ${ONAP_HELM_RELEASE}-pmmapper 3 min
+ Install helm charts chart-museum dcae-pm-mapper ${ONAP_HELM_RELEASE}-dcae-pm-mapper 3 min --debug
Deploying SFTP Server As xNF
- ${override} = Set Variable --set fullnameOverride=${ONAP_HELM_RELEASE}-sftp
+ ${override} = Set Variable --set fullnameOverride=${ONAP_HELM_RELEASE}-sftp --debug
Install helm charts from folder ${SFTP_HELM_CHARTS} ${ONAP_HELM_RELEASE}-sftp set_values_override=${override}
+Deploying HTTPS server with correct certificates
+ ${name} = Set Variable ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans
+ ${override} = Set Variable --set fullnameOverride=${name} --set nameOverride=${name} --set certificates.name=${name} --set certificates.commonName=${name} --set certificates.dnsNames={${name}} --debug
+ Install helm charts from folder ${HTTPS_SERVER_HELM_CHARTS} ${name} set_values_override=${override}
+
+Deploying HTTPS server with wrong certificates - wrong SAN-s
+ ${name} = Set Variable ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans
+ ${override} = Set Variable --set fullnameOverride=${name} --set nameOverride=${name} --set certificates.name=${name} --set certificates.commonName=wrong-sans-1 --set certificates.dnsNames={wrong-sans-2} --debug
+ Install helm charts from folder ${HTTPS_SERVER_HELM_CHARTS} ${name} set_values_override=${override}
+
Checking PERFORMANCE_MEASUREMENTS Topic In Message Router
${headers}= Create Dictionary content-type=application/json
${subdata}= OperatingSystem.Get File ${PMMAPPER_SUB_ROLE_DATA}
@@ -228,10 +239,70 @@ Checking DFC Logs After KNOWN_HOSTS_FILE_PATH Env Variable Added
${dfc_logs}= Run Given Command On DFC Container ${CHECK_DFC_LOGS}
Should Not Contain ${dfc_logs} ${EXPECTED_PRINT}
+Get all logs from PM Mapper
+ ${pmmapper_logs}= Check logs ${CHECK_ALL_PMMAPPER_LOGS}
+ Log ${pmmapper_logs}
+
+Get all logs from Data File Collector
+ ${pmmapper_logs}= Check logs ${CHECK_ALL_DFC_LOGS}
+ Log ${pmmapper_logs}
+
Checking DFC Logs After SFTP Server RSA Key Changed
Wait Until Keyword Succeeds 5 min 30 sec Check Given Print In DFC LOG ${CHECK_DFC_LOGS}
-Check DFC logs
- [Arguments] ${DFC_LOG_CHECK}
- ${rc} = Run and Return RC ${DFC_LOG_CHECK}
- Should Be Equal As Integers ${rc} 0
+Check logs
+ [Arguments] ${LOG_CHECK}
+ ${rc} = Run And Return Rc And Output ${LOG_CHECK}
+ Should Be Equal As Integers ${rc[0]} 0
+ [Return] ${rc[1]}
+
+Change DFC httpsHostnameVerify configuration in Consul
+ [Documentation] Changes DFC httpsHostnameVerify config.
+ [Arguments] ${httpsHostnameVerify}
+ ${httpsHostnameVerify_conf} Create Dictionary httpsHostnameVerify=${httpsHostnameVerify}
+ Templating.Create Environment pm ${GLOBAL_TEMPLATE_FOLDER}
+ ${event}= Templating.Apply Template pm ${consul_change_event} ${httpsHostnameVerify_conf}
+ ${rc} ${container_name} = Run and Return RC and Output kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME | awk -F'-' '{print $2}'
+ Should Be Equal As Integers ${rc} 0
+ ${resp}= Run Consul Put Request /v1/kv/${container_name}-datafile-collector?raw=1 ${event}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${rc} = Run and Return RC kubectl delete pods -n onap $(kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME)
+ Should Be Equal As Integers ${rc} 0
+ Wait Until Keyword Succeeds 120 sec 5 sec Check logs kubectl logs -n onap $(kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME) ${container_name}-datafile-collector
+
+Sending File Ready Event to VES Collector for HTTPS Server
+ [Arguments] ${https-server_host}
+ Send File Ready Event to VES Collector for HTTPS Server ${PM_FILE} ${GLOBAL_TEST_VARIABLES["FILE_FORMAT_TYPE"]} ${GLOBAL_TEST_VARIABLES["FILE_FORMAT_VERSION"]} ${https-server_host}
+
+Send File Ready Event to VES Collector for HTTPS Server
+ [Arguments] ${pm_file} ${file_format_type} ${file_format_version} ${https_server_host}
+ Disable Warnings
+ ${pm_event} Create Dictionary https_server_host=${https_server_host} pm_file=${pm_file} fileFormatType=${file_format_type} fileFormatVersion=${file_format_version}
+ Templating.Create Environment pm ${GLOBAL_TEMPLATE_FOLDER}
+ ${VES_FILE_READY_NOTIFICATION}= Templating.Apply Template pm ${pm_notification_event} ${pm_event}
+ ${headers}= Create Dictionary content-type=application/json
+ ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD}
+ ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH} auth=${auth}
+ ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 202
+
+
+Uploading PM Files to xNF HTTPS Server
+ [Arguments] ${https-server_host}
+ ${pm_file}= Upload PM Files to xNF HTTPS Server ${GLOBAL_TEST_VARIABLES["PM_FILE_PATH"]} ${https-server_host}
+ Set Global Variable ${PM_FILE} ${pm_file}
+
+Upload PM Files to xNF HTTPS Server
+ [Arguments] ${pm_file_path} ${https_server}
+ ${epoch}= Get Current Date result_format=epoch
+ ${pm_file} = Set Variable A${epoch}.xml.gz
+ Copy File ${pm_file_path} tmp/${pm_file}
+ ${fileData}= Get Binary File tmp/${pm_file}
+ ${file_part}= Create List ${pm_file} ${fileData} application/octet-stream
+ ${fileParts}= Create Dictionary
+ Set to Dictionary ${fileParts} uploaded_file=${file_part}
+ ${auth}= Create List demo demo123456!
+ ${session}= Create Session https http://${https_server}:80 auth=${auth}
+ ${resp}= Post Request https /upload.php files=${fileParts}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${pm_file} \ No newline at end of file