aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/mr_interface.robot13
-rw-r--r--robot/resources/test_templates/pnf_orchestration_test_template.robot6
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot2
-rw-r--r--robot/resources/usecases/5gbulkpm_interface.robot29
4 files changed, 44 insertions, 6 deletions
diff --git a/robot/resources/mr_interface.robot b/robot/resources/mr_interface.robot
index 8204315a..2d3cda28 100644
--- a/robot/resources/mr_interface.robot
+++ b/robot/resources/mr_interface.robot
@@ -106,6 +106,19 @@ Run MR Auth Get Request
Log Received response from message router ${resp.text}
[Return] ${resp}
+Run MR Auth Post Request (User And Pass)
+ [Documentation] Runs MR Authenticated Post Request
+ [Arguments] ${data_path} ${username} ${password} ${data}
+ ${auth}= Create List ${username} ${password}
+ ${session}= Create Session mr ${MR_ENDPOINT} auth=${auth}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}
+ ${resp}= Post Request mr ${data_path} headers=${headers} data=${data}
+ ${status_string}= Convert To String ${resp.status_code}
+ Should Match Regexp ${status_string} ^(204|200)$
+ Log Received response from message router ${resp.text}
+ [Return] ${resp}
+
Run MR Get Request
[Documentation] Runs MR Get request
[Arguments] ${data_path}
diff --git a/robot/resources/test_templates/pnf_orchestration_test_template.robot b/robot/resources/test_templates/pnf_orchestration_test_template.robot
index 6bfa1029..0302ef65 100644
--- a/robot/resources/test_templates/pnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/pnf_orchestration_test_template.robot
@@ -30,7 +30,7 @@ Orchestrate PNF Macro Flow
Setup Browser
Login To VID GUI
${service_instance_id} ${request_id}= Wait Until Keyword Succeeds 300s 5s Create VID PNF Service Instance ${full_customer_name} ${service_model_type} ${service} ${service_name} ${project_name} ${owning_entity} ${product_family} ${lcp_region} ${tenant_name} ${pnf_correlation_id}
- Wait Until Keyword Succeeds 60s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
+ Wait Until Keyword Succeeds 120s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
[Return] ${service_instance_id} ${request_id} ${full_customer_name}
Orchestrate PNF Building Block Flow
@@ -72,8 +72,8 @@ Orchestrate PNF Building Block Flow
Set To Dictionary ${arguments} productFamilyId ${productFamilyId}
Set To Dictionary ${arguments} nf_instance_name ${pnf_correlation_id}
${request_id} ${service_instance_id}= Create PNF Service Using GR Api ${arguments}
- Wait Until Keyword Succeeds 120s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
- Wait Until Keyword Succeeds 60s 20s Check PNF orchestration status in A&AI ${pnf_correlation_id} Register
+ Wait Until Keyword Succeeds 180 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
+ Wait Until Keyword Succeeds 180 20s Check PNF orchestration status in A&AI ${pnf_correlation_id} Register
[Return] ${service_instance_id} /onap/so/infra/orchestrationRequests/v7/${request_id} ${full_customer_name}
diff --git a/robot/resources/test_templates/pnf_registration_without_SO_template.robot b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
index fe373e6e..fd8aaed1 100644
--- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot
+++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
@@ -135,7 +135,7 @@ Instantiate PNF_macro service and succesfully registrate PNF template
Load OwningEntity platform Platform-${customer_name}
${service_instance_id} ${request_id} ${full_customer_name} Run Keyword If "${building_block_flow}"=='false' Orchestrate PNF Macro Flow ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_name} ${region} Project-${customer_name} OE-${customer_name}
... ELSE Orchestrate PNF Building Block Flow ${catalog_service_name} ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${region} project_name=Project-${customer_name} owning_entity=OE-${customer_name} lineOfBusinessName=LOB-${customer_name} platformName=Platform-${customer_name}
- Wait Until Keyword Succeeds 120s 40s Send and verify VES integration request in SO and A&AI ${request_id} ${PNF_entry_dict}
+ Wait Until Keyword Succeeds 180s 40s Send and verify VES integration request in SO and A&AI ${request_id} ${PNF_entry_dict}
Run Keyword If "${building_block_flow}"=='true' Check PNF orchestration status in A&AI ${pnf_correlation_id} Active
[Teardown] Instantiate PNF_macro service Teardown ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict}
diff --git a/robot/resources/usecases/5gbulkpm_interface.robot b/robot/resources/usecases/5gbulkpm_interface.robot
index 91d4d08e..86b0ca00 100644
--- a/robot/resources/usecases/5gbulkpm_interface.robot
+++ b/robot/resources/usecases/5gbulkpm_interface.robot
@@ -8,9 +8,9 @@ Library String
${INVENTORY_SERVER} ${GLOBAL_INVENTORY_SERVER_PROTOCOL}://${GLOBAL_INVENTORY_SERVER_NAME}:${GLOBAL_INVENTORY_SERVER_PORT}
${DEPLOYMENT_SERVER} ${GLOBAL_DEPLOYMENT_HANDLER_SERVER_PROTOCOL}://${GLOBAL_DEPLOYMENT_HANDLER_SERVER_NAME}:${GLOBAL_DEPLOYMENT_HANDLER_SERVER_PORT}
${DR_ENDPOINT} ${GLOBAL_DMAAP_DR_PROV_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DMAAP_DR_PROV_IP_ADDR}:${GLOBAL_DMAAP_DR_PROV_SERVER_PORT}
-${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME}:${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT}
${DMAAP_BC_SERVER} ${GLOBAL_BC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_BC_IP_ADDR}:${GLOBAL_BC_HTTPS_SERVER_PORT}
${VES_HEALTH_CHECK_PATH} ${GLOBAL_DCAE_VES_HTTPS_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VES_HOST}:${GLOBAL_DCAE_VES_HTTPS_SERVER_PORT}
+${MR_PUBLISH_TEMPLATE} mr/mr_publish.jinja
*** Keywords ***
Undeploy Service
@@ -31,8 +31,33 @@ xNF PM File Validate
${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD}
Should Contain ${resp.text} ${value}
+Topic Validate
+ [Arguments] ${value}
+ ${timestamp}= Get Current Date
+ ${dict}= Create Dictionary timestamp=${timestamp}
+ Templating.Create Environment mr ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template mr ${MR_PUBLISH_TEMPLATE} ${dict}
+ ${resp}= Run MR Auth Post Request (User And Pass) ${MR_TOPIC_URL_PATH_FOR_POST} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} ${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD}
+ Should Contain ${resp.text} ${value}
+
+
Usecase Teardown
Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/pmmapper
Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/sftpserver
Undeploy Service ${INVENTORY_SERVER} ${INVENTORY_ENDPOINT}/${serviceTypeId-Sftp}
- Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/datafile \ No newline at end of file
+ Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/datafile
+
+
+Send File Ready Event to VES Collector
+ [Arguments] ${epoch}
+ ${headers}= Create Dictionary content-type=application/json
+ ${fileready}= OperatingSystem.Get File ${JSON_DATA_FILE}
+ ${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=${fileready} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 202
+ ${VES_FILE_READY_NOTIFICATION} Set Variable {"event":{"commonEventHeader":{"version":"4.0.1","vesEventListenerVersion":"7.0.1","domain":"notification","eventName":"Noti_RnNode-Ericsson_FileReady","eventId":"FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1","lastEpochMicrosec":8745745764578,"priority":"Normal","reportingEntityName":"otenb5309","sequence":0,"sourceName":"oteNB5309","startEpochMicrosec":8745745764578,"timeZoneOffset":"UTC+05.30"},"notificationFields":{"changeIdentifier":"PM_MEAS_FILES","changeType":"FileReady","notificationFieldsVersion":"2.0","arrayOfNamedHashMap":[{"name":"A${epoch}.xml.gz","hashMap":{"location":"sftp://bulkpm:bulkpm@sftpserver:22/upload/A${epoch}.xml.gz","compression":"gzip","fileFormatType":"org.3GPP.32.435#measCollec","fileFormatVersion":"V10"}}]}}}
+ ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 202 \ No newline at end of file