aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2020-04-10 17:31:43 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2020-04-13 10:10:46 +0000
commit80c61bf3c01ab00d23cdd0e7b96336d8d859b49e (patch)
tree6e6f2cfd6e809deb15ab8d46092dbed0fd00a231 /robot/resources
parent83a352f8c04a608f2b6acded0a091b7da00d4d08 (diff)
Enhance PNF registration test cases in Frankfurt release
Issue-ID: INT-1525 Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> Change-Id: I67ae25340a3480194910709ce06866c4fb0f0c37
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/aai/create_customer.robot7
-rw-r--r--robot/resources/aai/create_service.robot7
-rw-r--r--robot/resources/test_templates/pnf_orchestration_test_template.robot16
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot11
4 files changed, 22 insertions, 19 deletions
diff --git a/robot/resources/aai/create_customer.robot b/robot/resources/aai/create_customer.robot
index c0498b6c..f5e73d36 100644
--- a/robot/resources/aai/create_customer.robot
+++ b/robot/resources/aai/create_customer.robot
@@ -39,9 +39,10 @@ Get OwningEntity Id
[Documentation] Returns OwningEntity Id based on OwningEntity name
[Arguments] ${name}
${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} /aai/v11/business/owning-entities auth=${GLOBAL_AAI_AUTHENTICATION}
- @{list}= Copy List ${resp.json['owning-entity']}
+ ${resp_json}= Set Variable ${resp.json()}
+ @{list}= Copy List ${resp_json['owning-entity']}
:FOR ${map} IN @{list}
- \ ${owning_entity_name}= Run Keyword And Ignore Error Get From Dictionary ${map} owning-entity-name
- \ ${owning_entity_id}= Run Keyword And Ignore Error Get From Dictionary ${map} owning-entity-id
+ \ ${owning_entity_name}= Get From Dictionary ${map} owning-entity-name
+ \ ${owning_entity_id}= Get From Dictionary ${map} owning-entity-id
\ ${id} Run Keyword If '${owning_entity_name}' == '${name}' Set Variable ${owning_entity_id}
[Return] ${id} \ No newline at end of file
diff --git a/robot/resources/aai/create_service.robot b/robot/resources/aai/create_service.robot
index 0dc7a2f2..1c036ec3 100644
--- a/robot/resources/aai/create_service.robot
+++ b/robot/resources/aai/create_service.robot
@@ -63,10 +63,11 @@ Get Service Id
[Documentation] Gets a service id in A&AI
[Arguments] ${service_description}
${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_SERVICE_PATH} auth=${GLOBAL_AAI_AUTHENTICATION}
- @{list}= Copy List ${resp.json['service']}
+ ${resp_json}= Set Variable ${resp.json()}
+ @{list}= Copy List ${resp_json['service']}
:FOR ${map} IN @{list}
- \ ${service_type}= Run Keyword And Ignore Error Get From Dictionary ${map} service-description
- \ ${service_id}= Run Keyword And Ignore Error Get From Dictionary ${map} service-id
+ \ ${service_type}= Get From Dictionary ${map} service-description
+ \ ${service_id}= Get From Dictionary ${map} service-id
\ ${id} Run Keyword If '${service_type}' == '${service_description}' Set Variable ${service_id}
[Return] ${id}
diff --git a/robot/resources/test_templates/pnf_orchestration_test_template.robot b/robot/resources/test_templates/pnf_orchestration_test_template.robot
index 8a5b58f4..af0375df 100644
--- a/robot/resources/test_templates/pnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/pnf_orchestration_test_template.robot
@@ -20,13 +20,13 @@ Library ONAPLibrary.Utilities
Orchestrate PNF Macro Flow
[Documentation] Use ONAP to Orchestrate a PNF Macro service.
- [Arguments] ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_model_type} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
+ [Arguments] ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_model_type} ${region} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
${lcp_region}= Set Variable ${GLOBAL_INJECTED_REGION}
${uuid}= Generate UUID4
${full_customer_name}= Catenate ${customer_name}_${uuid}
${service_name}= Catenate Service_Ete_Name${uuid}
${service_type}= Set Variable ${service}
- Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${GLOBAL_INJECTED_REGION}
+ Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${region}
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}
@@ -35,8 +35,8 @@ Orchestrate PNF Macro Flow
Orchestrate PNF Building Block Flow
[Documentation] Use ONAP to Orchestrate a PNF using GR api
- [Arguments] ${service_model_name} ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration ${lineOfBusinessName}=LOB-Demonstration ${platformName}=Platform-Demonstration
- ${service_ctalog_json}= Get Service Catalog ${service_model_name}
+ [Arguments] ${service_model_name} ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${region} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration ${lineOfBusinessName}=LOB-Demonstration ${platformName}=Platform-Demonstration
+ ${json_resp}= Get Service Catalog ${service_model_name}
${service_model_uuid}= Set Variable ${json_resp["uuid"]}
${service_model_invariant_uuid }= Set Variable ${json_resp["invariantUUID"]}
${nf_resource_name}= Set Variable ${json_resp["componentInstances"][0]["name"]}
@@ -44,20 +44,20 @@ Orchestrate PNF Building Block Flow
${componentName}= Set Variable ${json_resp["componentInstances"][0]["componentName"]}
${resource_ctalog_json}= Get Resource Catalog ${componentName}
${nf_model_invariant_uuid}= Set Variable ${json_resp["invariantUUID"]}
- ${nf_model_uuid}= Set Variable ${json_resp["uuid]}
+ ${nf_model_uuid}= Set Variable ${json_resp["uuid"]}
${nf_model_name}= Set Variable ${json_resp["name"]}
${productFamilyId}= Get Service Id ${product_family}
- ${owningEntityId}= Get Owning Entity Id ${owningEntityName}
+ ${owningEntityId}= Get Owning Entity Id ${owning_entity}
${uuid}= Generate UUID4
${full_customer_name}= Catenate ${customer_name}_${uuid}
${service_name}= Catenate Service_Ete_Name${uuid}
${service_type}= Set Variable ${service}
- Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${GLOBAL_INJECTED_REGION}
+ Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${region}
${arguments}= Create Dictionary service_model_invariant_uuid=${service_model_invariant_uuid}
Set To Dictionary ${arguments} service_model_uuid ${service_model_uuid}
Set To Dictionary ${arguments} service_model_name ${service_model_name}
Set To Dictionary ${arguments} owningEntityId ${owningEntityId}
- Set To Dictionary ${arguments} owningEntityName ${owningEntityName}
+ Set To Dictionary ${arguments} owningEntityName ${owning_entity}
Set To Dictionary ${arguments} full_customer_name ${full_customer_name}
Set To Dictionary ${arguments} service_name ${service_name}
Set To Dictionary ${arguments} productFamilyId ${productFamilyId}
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 af9b4140..5d388266 100644
--- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot
+++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
@@ -22,11 +22,11 @@ Library ONAPLibrary.SO WITH NAME SO
${aai_so_registration_entry_template}= aai/add_pnf_registration_info.jinja
${pnf_ves_integration_request}= ves/pnf_registration_request.jinja
${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_VES_PNFREG_OUTPUT_PATH} /events/unauthenticated.VES_PNFREG_OUTPUT/2/1
-${VES_ENDPOINT} ${GLOBAL_DCAE_VES_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VES_HOST}:${GLOBAL_DCAE_VES_SERVER_PORT}
+${VES_ENDPOINT} ${GLOBAL_DCAE_VES_HTTPS_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VES_HOST}:${GLOBAL_DCAE_VES_HTTPS_SERVER_PORT}
${VES_data_path} /eventListener/v7
${tenant_name} dummy_tenant_for_pnf
${tenant_id} dummy_tenant_id_for_pnf
-${region} ${GLOBAL_INJECTED_REGION}
+${region} RegionForPNF
*** Keywords ***
@@ -96,7 +96,8 @@ Run VES HTTP Post Request
[Documentation] Runs a VES Post request
[Arguments] ${data}
Disable Warnings
- ${session}= Create Session ves ${VES_ENDPOINT}
+ ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD}
+ ${session}= Create Session ves ${VES_ENDPOINT} auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
${post_resp}= Post Request ves ${VES_data_path} data=${data} headers=${headers}
Log PNF integration request ${data}
@@ -132,8 +133,8 @@ Instantiate PNF_macro service and succesfully registrate PNF template
Load OwningEntity owningEntity OE-${customer_name}
Load OwningEntity lineOfBusiness LOB-${customer_name}
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} Project-${customer_name} OE-${customer_name}
- ... ELSE Orchestrate PNF Building Block Flow ${service_model_name} ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration ${lineOfBusinessName}=LOB-Demonstration ${platformName}=Platform-Demonstration
+ ${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}
Run Keyword If "${building_block_flow}"=='true' Check PNF orchestration status in A&AI ${pnf_correlation_id} registered
[Teardown] Instantiate PNF_macro service Teardown ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict} ${service_instance_id} ${service_recipe_id} ${building_block_flow}