aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2020-01-02 11:09:35 +0100
committerKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2020-01-03 01:01:12 +0100
commit72bc8026880a8cdef3584a472f29e434d56f4f2c (patch)
tree5c10bf3a35a4143a0e4f632aa99f556b19133c22 /robot
parentafbbaa07b1c35394c1f0722de620979b18871041 (diff)
Make the pnf registration test cases independent from robot init
Issue-ID: INT-1407 Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> Change-Id: I80c76ebdca556535b78e921492029692ff4419c0
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/test_templates/pnf_orchestration_test_template.robot17
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot13
-rw-r--r--robot/testsuites/pnf-registration.robot2
3 files changed, 24 insertions, 8 deletions
diff --git a/robot/resources/test_templates/pnf_orchestration_test_template.robot b/robot/resources/test_templates/pnf_orchestration_test_template.robot
index e0566e5a..bb3f1816 100644
--- a/robot/resources/test_templates/pnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/pnf_orchestration_test_template.robot
@@ -1,5 +1,5 @@
*** Settings ***
-Documentation This test template encapsulates the VNF Orchestration use case.
+Documentation This test template encapsulates the PNF Orchestration use case.
Resource ../vid/create_service_instance.robot
Resource ../vid/vid_interface.robot
@@ -18,17 +18,26 @@ Library ONAPLibrary.Utilities
*** Keywords ***
Orchestrate PNF
- [Documentation] Use ONPA to Orchestrate a PNF Macro service.
+ [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
- ${lcp_region}= Get Openstack Region
+ ${lcp_region}= Set Variable ${GLOBAL_INJECTED_REGION}
${uuid}= Generate UUID4
${full_customer_name}= Catenate ${customer_name}_${uuid}
${list}= Create List
${service_name}= Catenate Service_Ete_Name${uuid}
${service_type}= Set Variable ${service}
- Create Customer For VNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id}
+ Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${GLOBAL_INJECTED_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}
Wait Until Keyword Succeeds 60s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
[Return] ${service} ${request_id} ${full_customer_name}
+
+
+Create Customer For PNF
+ [Documentation] PNF Orchestration Test setup....
+ ... Create Customer, Create Service and related relationships
+ [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${tenant_id} ${cloud_region_id}
+ Create Service If Not Exists ${service_type}
+ ${resp}= Create Customer ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${cloud_region_id} ${tenant_id}
+ Should Be Equal As Strings ${resp} 201 \ No newline at end of file
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 e8725986..0f36adc9 100644
--- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot
+++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
@@ -23,6 +23,9 @@ ${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_data_path} /eventListener/v7
+${tenant_name} dummy_tenant_for_pnf
+${tenant_id} dummy_tenant_id_for_pnf
+${region} ${GLOBAL_INJECTED_REGION}
*** Keywords ***
@@ -111,7 +114,7 @@ Check SO service completition status
Instantiate PNF_macro service and succesfully registrate PNF template
[Documentation] Test case template for design, create, instantiate PNF/macro service and succesfully registrate PNF
- [Arguments] ${service_name} ${PNF_entry_dict} ${pnf_correlation_id} ${service}=pNF ${product_family}=gNB
+ [Arguments] ${service_name} ${PNF_entry_dict} ${pnf_correlation_id} ${service}=pNF ${product_family}=pNF ${customer_name}=ETE_Customer
Log To Console \nDistributing TOSCA Based PNF Model
${status} ${value}= Run Keyword And Ignore Error Distribute Model ${service} ${service_name} cds=False instantiationType=Macro resourceType=PNF
@@ -126,8 +129,12 @@ Instantiate PNF_macro service and succesfully registrate PNF template
Run Keyword If "${value}"=='409 != 201' Log To Console Service Recipe for TOSCA Based PNF Model is already assigned
... ELSE IF "${status}"=='PASS' Log To Console Service Recipe for TOSCA Based PNF Model has been assigned
... ELSE Log To Console Check Service Recipe for TOSCA Based PNF Model assignmenta
- ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
- ${service} ${request_id} ${full_customer_name} Orchestrate PNF ETE_Customer ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_name}
+ Inventory Tenant If Not Exists CloudOwner ${region} SharedNode OwnerType v1 CloudZone ${tenant_id} ${tenant_name}
+ Load OwningEntity lineOfBusiness LOB-${customer_name}
+ Load OwningEntity platform Platform-${customer_name}
+ Load OwningEntity project Project-${customer_name}
+ Load OwningEntity owningEntity OE-${customer_name}
+ ${service} ${request_id} ${full_customer_name} Orchestrate PNF ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_name} Project-${customer_name} OE-${customer_name}
Wait Until Keyword Succeeds 120s 40s Send and verify VES integration request in SO and A&AI ${request_id} ${PNF_entry_dict}
diff --git a/robot/testsuites/pnf-registration.robot b/robot/testsuites/pnf-registration.robot
index 8fd0d824..ef299a5e 100644
--- a/robot/testsuites/pnf-registration.robot
+++ b/robot/testsuites/pnf-registration.robot
@@ -35,4 +35,4 @@ Instantiate PNF_macro service and succesfully registrate PNF
[Tags] pnf_registrate ete
${pnf_correlation_id}= Generate Random String 20 [LETTERS][NUMBERS]
${PNF_entry_dict}= Create Dictionary correlation_id=${pnf_correlation_id} PNF_IPv4_address=13.13.13.13 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
- Instantiate PNF_macro service and succesfully registrate PNF template Demo_pNF ${PNF_entry_dict} ${pnf_correlation_id} \ No newline at end of file
+ Instantiate PNF_macro service and succesfully registrate PNF template Demo_pNF ${PNF_entry_dict} ${pnf_correlation_id}