2 Documentation This test template encapsulates the PNF Orchestration use case.
4 Resource ../vid/create_service_instance.robot
5 Resource ../vid/vid_interface.robot
6 Resource ../aai/service_instance.robot
7 Resource model_test_template.robot
8 Resource ../openstack/neutron_interface.robot
9 Resource ../sdc_interface.robot
10 Resource vnf_orchestration_test_template.robot
11 Resource ../so/create_service_instance.robot
14 Library ONAPLibrary.Openstack
15 Library SeleniumLibrary
17 Library ONAPLibrary.Utilities
21 Orchestrate PNF Macro Flow
22 [Documentation] Use ONAP to Orchestrate a PNF Macro service.
23 [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
24 ${lcp_region}= Set Variable ${region}
25 ${uuid}= Generate UUID4
26 ${full_customer_name}= Catenate ${customer_name}_${uuid}
27 ${service_name}= Catenate Service_Ete_Name${uuid}
28 ${service_type}= Set Variable ${service}
29 Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${region}
32 ${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}
33 Wait Until Keyword Succeeds 120s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
34 [Return] ${service_instance_id} ${request_id} ${full_customer_name}
36 Orchestrate PNF Building Block Flow
37 [Documentation] Use ONAP to Orchestrate a PNF using GR api
38 [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
39 ${json_resp}= Get Service Catalog ${service_model_name}
40 ${service_model_uuid}= Set Variable ${json_resp["uuid"]}
41 ${service_model_invariant_uuid }= Set Variable ${json_resp["invariantUUID"]}
42 ${nf_resource_name}= Set Variable ${json_resp["componentInstances"][0]["name"]}
43 ${nf_resource_uuid}= Set Variable ${json_resp["componentInstances"][0]["customizationUUID"]}
44 ${componentName}= Set Variable ${json_resp["componentInstances"][0]["componentName"]}
45 ${resource_ctalog_json}= Get Resource Catalog ${componentName}
46 ${nf_model_invariant_uuid}= Set Variable ${json_resp["invariantUUID"]}
47 ${nf_model_uuid}= Set Variable ${json_resp["uuid"]}
48 ${nf_model_name}= Set Variable ${json_resp["name"]}
49 ${productFamilyId}= Get Service Id ${product_family}
50 ${owningEntityId}= Get Owning Entity Id ${owning_entity}
51 ${uuid}= Generate UUID4
52 ${full_customer_name}= Catenate ${customer_name}_${uuid}
53 ${service_name}= Catenate Service_Ete_Name${uuid}
54 ${service_type}= Set Variable ${service}
55 Create Customer For PNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} ${region}
56 ${arguments}= Create Dictionary service_model_invariant_uuid=${service_model_invariant_uuid}
57 Set To Dictionary ${arguments} service_model_uuid ${service_model_uuid}
58 Set To Dictionary ${arguments} service_model_name ${service_model_name}
59 Set To Dictionary ${arguments} owningEntityId ${owningEntityId}
60 Set To Dictionary ${arguments} owningEntityName ${owning_entity}
61 Set To Dictionary ${arguments} full_customer_name ${full_customer_name}
62 Set To Dictionary ${arguments} service_name ${service_name}
63 Set To Dictionary ${arguments} productFamilyId ${productFamilyId}
64 Set To Dictionary ${arguments} service ${service}
65 Set To Dictionary ${arguments} nf_resource_name ${nf_resource_name}
66 Set To Dictionary ${arguments} nf_resource_uuid ${nf_resource_uuid}
67 Set To Dictionary ${arguments} nf_model_invariant_uuid ${nf_model_invariant_uuid}
68 Set To Dictionary ${arguments} nf_model_uuid ${nf_model_uuid}
69 Set To Dictionary ${arguments} nf_model_name ${nf_model_name}
70 Set To Dictionary ${arguments} platformName ${platformName}
71 Set To Dictionary ${arguments} lineOfBusinessName ${lineOfBusinessName}
72 Set To Dictionary ${arguments} productFamilyId ${productFamilyId}
73 Set To Dictionary ${arguments} nf_instance_name ${pnf_correlation_id}
74 ${request_id} ${service_instance_id}= Create PNF Service Using GR Api ${arguments}
75 Wait Until Keyword Succeeds 180 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name}
76 Wait Until Keyword Succeeds 180 20s Check PNF orchestration status in A&AI ${pnf_correlation_id} Register
77 [Return] ${service_instance_id} /onap/so/infra/orchestrationRequests/v7/${request_id} ${full_customer_name}
80 Create Customer For PNF
81 [Documentation] PNF Orchestration Test setup....
82 ... Create Customer, Create Service and related relationships
83 [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${tenant_id} ${cloud_region_id}
84 Create Service If Not Exists ${service_type}
85 ${resp}= Create Customer ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${cloud_region_id} ${tenant_id}
86 Should Be Equal As Strings ${resp} 201