summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2020-04-28 13:27:57 +0200
committerMarcin Przybysz <marcin.przybysz@nokia.com>2020-04-30 08:06:31 +0000
commit8ff2b412beb36ef285555324a2b94cd97421edb7 (patch)
tree36dd76817b02453321be2b9bbae73dc240ecb758
parentc5f768d7fdcf48fdab12c4f02e7120a122bba78b (diff)
Extend PnF registrate test cases for GR API
Issue-ID: INT-1477 Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> Change-Id: If4184f17307e2694ab9988d24821fd1ce8331c31
-rw-r--r--robot/assets/templates/so/create_pnf_service_building_block.jinja6
-rw-r--r--robot/resources/so/create_service_instance.robot5
-rw-r--r--robot/resources/test_templates/pnf_orchestration_test_template.robot6
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot12
-rw-r--r--robot/testsuites/pnf-registration.robot8
5 files changed, 20 insertions, 17 deletions
diff --git a/robot/assets/templates/so/create_pnf_service_building_block.jinja b/robot/assets/templates/so/create_pnf_service_building_block.jinja
index 15fae640..31e3e51d 100644
--- a/robot/assets/templates/so/create_pnf_service_building_block.jinja
+++ b/robot/assets/templates/so/create_pnf_service_building_block.jinja
@@ -18,12 +18,12 @@
"instanceName":"{{service_name}}",
"productFamilyId":"{{productFamilyId}}",
"source":"VID",
- "suppressRollback": False,
+ "suppressRollback": "False",
"requestorId":"demo"
},
"requestParameters":{
"subscriptionServiceType":"{{service}}",
- "aLaCarte": False,
+ "aLaCarte": "False",
"userParams":[
{
"service":{
@@ -56,7 +56,7 @@
"productFamilyId":"{{productFamilyId}}",
"instanceParams":[],
"instanceName":"{{nf_instance_name}}"
- },
+ }
]
}
}
diff --git a/robot/resources/so/create_service_instance.robot b/robot/resources/so/create_service_instance.robot
index 44e526b6..d03a1286 100644
--- a/robot/resources/so/create_service_instance.robot
+++ b/robot/resources/so/create_service_instance.robot
@@ -20,5 +20,8 @@ Create PNF Service Using GR Api
Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
${data}= Templating.Apply Template so ${CREATE_PNF_SERVICE_GR_API} ${arguments}
${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD}
- ${request_id} ${service_instance_id} SO.Run Create Request ${GLOBAL_SO_ENDPOINT} ${CREATE_SERVICE_PATH} ${data} auth=${auth}
+ ${requestReferences} SO.Run Post Request ${GLOBAL_SO_ENDPOINT} ${CREATE_SERVICE_PATH} ${data} auth=${auth}
+ ${requestReferences_json} Set Variable ${requestReferences.json()}
+ ${request_id} Set Variable ${requestReferences_json['requestReferences']['requestId']}
+ ${service_instance_id} Set Variable ${requestReferences_json['requestReferences']['instanceId']}
[Return] ${request_id} ${service_instance_id} \ No newline at end of file
diff --git a/robot/resources/test_templates/pnf_orchestration_test_template.robot b/robot/resources/test_templates/pnf_orchestration_test_template.robot
index 332849e4..6bfa1029 100644
--- a/robot/resources/test_templates/pnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/pnf_orchestration_test_template.robot
@@ -72,9 +72,9 @@ 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 60s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
- Check PNF orchestration status in A&AI ${pnf_correlation_id} register
- [Return] ${service_instance_id} ${request_id}
+ 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
+ [Return] ${service_instance_id} /onap/so/infra/orchestrationRequests/v7/${request_id} ${full_customer_name}
Create Customer For PNF
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 fa581b90..fe373e6e 100644
--- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot
+++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
@@ -80,11 +80,11 @@ Query PNF A&AI updated entry
Check PNF orchestration status in A&AI
[Documentation] Query PNF A&AI updated entry
- [Arguments] ${PNF_entry_dict} ${status}
- ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} /aai/v11/network/pnfs/pnf/${pnf_correlation_id} auth=${GLOBAL_AAI_AUTHENTICATION}
+ [Arguments] ${pnf_correlation_id} ${status}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} /aai/v19/network/pnfs/pnf/${pnf_correlation_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${get_resp.status_code} 200
${json_resp}= Set Variable ${get_resp.json()}
- Should Be Equal As Strings ${status} ${PNF_entry_dict.orchestrationStatus}
+ Should Be Equal As Strings ${status} ${json_resp['orchestration-status']}
Check VES_PNFREG_OUTPUT topic presence in MR
[Documentation] Verify if unauthenticated.VES_PNFREG_OUTPUT topic is present in MR
@@ -136,8 +136,8 @@ Instantiate PNF_macro service and succesfully registrate PNF template
${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}
+ 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}
Send and verify VES integration request in SO and A&AI
[Documentation] Gets service status and compares with expected status
@@ -147,6 +147,6 @@ Send and verify VES integration request in SO and A&AI
Wait Until Keyword Succeeds 30s 10s Check SO service completition status ${request_id} COMPLETE
Instantiate PNF_macro service Teardown
- [Arguments] ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict} ${service_instance_id} ${service_recipe_id} ${building_block_flow}
+ [Arguments] ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict}
Teardown Models ${catalog_service_id} ${catalog_resource_ids}
Cleanup PNF entry in A&AI ${PNF_entry_dict} \ No newline at end of file
diff --git a/robot/testsuites/pnf-registration.robot b/robot/testsuites/pnf-registration.robot
index d3e98fa6..2f6eee40 100644
--- a/robot/testsuites/pnf-registration.robot
+++ b/robot/testsuites/pnf-registration.robot
@@ -1,6 +1,6 @@
*** Settings ***
Documentation Executes the PNF registration test cases including setup and teardown
-Test Timeout 10m
+Test Timeout 15m
Resource ../resources/test_templates/pnf_registration_without_SO_template.robot
Library String
@@ -14,7 +14,7 @@ PNF Registration only DCAE part: AAI, VES, PRH, DMaaP
... This test case creates A&AI entry for PNF without SDC model distribution and service instantiation in SO.
... Test case verify PNF Registration only in DCAE part: AAI, VES, PRH, DMaaP.
... During test case Robot adds PNF entry to A&AI that contains: correlation ID, PNF_IPv4_address and PNF_IPv6_address
- [Tags] pnf_registrate ete
+ [Tags] pnf_registrate ete pnf_registrate_all
${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
Log Initial PNF entry ${PNF_entry_dict}
@@ -32,7 +32,7 @@ Instantiate PNF_macro service and succesfully registrate PNF
... At the end of the service is checked in terms
... - service completion
... - PNF entry update about information from VES event
- [Tags] pnf_registrate ete
+ [Tags] pnf_registrate ete pnf_registrate_all
${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
${PNF_service_model}= Set Variable Demo_pNF_${pnf_correlation_id}
@@ -48,7 +48,7 @@ Instantiate PNF service (using building blocks) and succesfully registrate PNF
... - service completion
... - PNF entry update about information from VES event
... - PNF orchestration status
- [Tags] pnf_registrate_gr_api
+ [Tags] pnf_registrate_gr_api pnf_registrate_all 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
${PNF_service_model}= Set Variable Demo_pNF_${pnf_correlation_id}