Resource consul_interface.robot
Resource policy_interface.robot
Resource aai/create_availability_zone.robot
+Resource so/direct_instantiate.robot
Library ONAPLibrary.Utilities
Library Collections
Library RequestsLibrary
Library ONAPLibrary.Templating WITH NAME Templating
Library ONAPLibrary.AAI WITH NAME AAI
+Library ONAPLibrary.SO WITH NAME SO
*** Variables ***
Load Customer And Models
[Documentation] Use ONAP to Orchestrate a service.
[Arguments] ${customer_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}
Load Customer ${customer_name}
Load Models ${customer_name}
-Load OwningEntity
- [Documentation] Use ONAP to Orchestrate a service.
- [Arguments] ${parameter} ${name}
- ${data_path}= Set Variable /maintenance/category_parameter/${parameter}
- ${vid_data}= Set Variable {"options":["${name}"]}
- ${auth}= Create List ${GLOBAL_VID_USERNAME} ${GLOBAL_VID_PASSWORD}
- Log Creating session ${data_path}
- ${session}= Create Session vid ${VID_ENDPOINT}${VID_ENV} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${GLOBAL_VID_USERNAME} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Post Request vid ${data_path} data=${vid_data} headers=${headers}
-
Load Customer
[Documentation] Use ONAP to Orchestrate a service.
[Arguments] ${customer_name}
${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
${region}= Get Openstack Region
Create Customer For VNF Demo ${customer_name} ${customer_name} INFRA ${GLOBAL_AAI_CLOUD_OWNER} ${region} ${tenant_id}
- Create Customer For VNF Demo ${customer_name} ${customer_name} INFRA ${GLOBAL_AAI_CLOUD_OWNER} RegionTlab 50b190410b2a4c229d8a6044a80ab7c1
+ Create Customer For VNF Demo ${customer_name} ${customer_name} INFRA ${GLOBAL_AAI_CLOUD_OWNER} RegionTlab 50b190410b2a4c229d8a6044a80ab7c1
Create Availability Zone If Not Exists ${GLOBAL_AAI_CLOUD_OWNER} ${region} ${GLOBAL_AAI_AVAILABILITY_ZONE_NAME}
Load Models
- [Documentation] Use ONAP to Orchestrate a service.
+ [Documentation] Load Basic Test VNF Models
[Arguments] ${customer_name}
Log ${\n}Distributing vFWCL
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vFWCL ${DEMO_PREFIX}VFWCL
+ Distribute Model vFWCL ${DEMO_PREFIX}VFWCL
Log Distibuting vLB
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB ${DEMO_PREFIX}VLB
+ Distribute Model vLB ${DEMO_PREFIX}VLB
Log Distibuting vLB_CDS
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB_CDS ${DEMO_PREFIX}VLB_CDS True
- ##${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPE ${DEMO_PREFIX}VCPE
- ##${status} ${value}= Run Keyword And Ignore Error Distribute Model vIMS ${DEMO_PREFIX}VIMS
+ Distribute Model vLB_CDS ${DEMO_PREFIX}VLB_CDS True
+
+Load vCPE Models
+ [Documentation] Load vCPE Models
+ [Arguments] ${customer_name}
Log Distibuting vCPEInfra
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPEInfra ${DEMO_PREFIX}VCPEInfra
+ Distribute Model vCPEInfra ${DEMO_PREFIX}VCPEInfra
Log Distibuting vCPEvBNG
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPEvBNG ${DEMO_PREFIX}VCPEvBNG
+ Distribute Model vCPEvBNG ${DEMO_PREFIX}VCPEvBNG
Log Distibuting vCPEvBRGEMU
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPEvBRGEMU ${DEMO_PREFIX}VCPEvBRGEMU
+ Distribute Model vCPEvBRGEMU ${DEMO_PREFIX}VCPEvBRGEMU
Log Distibuting vCPEvGMUX
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPEvGMUX ${DEMO_PREFIX}VCPEvGMUX
+ Distribute Model vCPEvGMUX ${DEMO_PREFIX}VCPEvGMUX
Log Distibuting vCPEvGW (this is not vCPEResCust service)
- ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPEvGW ${DEMO_PREFIX}VCPEvGW
+ Distribute Model vCPEvGW ${DEMO_PREFIX}VCPEvGW
Distribute Model
- [Arguments] ${service} ${modelName} ${cds}=
- Model Distribution For Directory ${service} ${modelName} ${cds}
-
-Distribute vCPEResCust Model
- [Arguments] ${service} ${modelName}
- Model Distribution For vCPEResCust Directory ${service} ${modelName}
+ [Arguments] ${service} ${modelName} ${cds}=False ${instantiationType}=A-la-carte ${resourceType}=VF
+ Model Distribution For Directory ${service} ${modelName} ${cds} ${instantiationType} ${resourceType}
Create Customer For VNF Demo
[Documentation] Create demo customer for the demo
Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${vnf} demo ${service}
[Teardown] Close All Browsers
+Preload User Model GRA
+ [Documentation] Preload the demo data for the passed VNF with the passed module name via GRA
+ [Arguments] ${vnf_name} ${vf_module_name} ${service} ${service_instance_id} ${vnf}=${service}
+ # Go to A&AI and get information about the VNF we need to preload
+ ${status} ${generic_vnf}= Run Keyword And Ignore Error Get Service Instance ${vnf_name}
+ Run Keyword If '${status}' == 'FAIL' FAIL VNF Name: ${vnf_name} is not found.
+ ${vnf_type}= Set Variable ${generic_vnf['vnf-type']}
+ ${relationships}= Set Variable ${generic_vnf['relationship-list']['relationship']}
+ ${relationship_data}= Get Relationship Data ${relationships}
+ ${customer_id}= Catenate
+ :FOR ${r} IN @{relationship_data}
+ \ ${service}= Set Variable If '${r['relationship-key']}' == 'service-subscription.service-type' ${r['relationship-value']} ${service}
+ \ ${service_instance_id}= Set Variable If '${r['relationship-key']}' == 'service-instance.service-instance-id' ${r['relationship-value']} ${service_instance_id}
+ \ ${customer_id}= Set Variable If '${r['relationship-key']}' == 'customer.global-customer-id' ${r['relationship-value']} ${customer_id}
+ ${invariantUUID}= Get Persona Model Id ${service_instance_id} ${service} ${customer_id}
+
+ # We still need the vf module names. We can get them from VID using the persona_model_id (invariantUUID) from A&AI
+ Setup Browser
+ Login To VID GUI
+ ${vf_modules}= Get Module Names from VID ${invariantUUID}
+ Log ${generic_vnf}
+ Log ${service_instance_id},${vnf_name},${vnf_type},${vf_module_name},${vf_modules},${service}
+ Preload Gra ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${vnf} demo ${service}
+ [Teardown] Close All Browsers
+
Get Relationship Data
[Arguments] ${relationships}
${persona_model_id}= Get From DIctionary ${resp.json()['service-instance'][0]} model-invariant-id
[Return] ${persona_model_id}
-APPC Mount Point
- [Arguments] ${vf_module_name}
- Run Openstack Auth Request auth
- ${status} ${stack_info}= Run Keyword and Ignore Error Wait for Stack to Be Deployed auth ${vf_module_name} timeout=120s
- Run Keyword if '${status}' == 'FAIL' FAIL ${vf_module_name} Stack is not found
- ${stack_id}= Get From Dictionary ${stack_info} id
- ${server_list}= Get Openstack Servers auth
- ${vpg_name_0}= Get From Dictionary ${stack_info} vpg_name_0
- ${vnf_id}= Get From Dictionary ${stack_info} vnf_id
- ${vpg_public_ip}= Get Server Ip ${server_list} ${stack_info} vpg_name_0 network_name=${GLOBAL_INJECTED_OPENSTACK_PUBLIC_NETWORK}
- ${appc}= Create Mount Point In APPC ${vnf_id} ${vpg_public_ip}
-
Instantiate VNF
[Arguments] ${service} ${vf_module_label}=NULL
${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
\ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module}
\ ${model_invariant_id}= Set Variable If '${vf_module_label}' in '${vf_module}' ${generic_vnf['model-invariant-id']} ${model_invariant_id}
Log Update old vFWCL Policy for ModelInvariantID=${model_invariant_id}
- ${status} ${value}= Run Keyword And Ignore Error Update vVFWCL Policy ${model_invariant_id}
- :FOR ${vf_module_name} IN @{vf_module_name_list}
- \ Log APPC Mount Point for VNF Module Name=${vf_module_name}
- \ ${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name}
+ ${status} ${value}= Run Keyword And Ignore Error Update vFWCL Operational and Monitoring Policies ${model_invariant_id}
Log Update Tca ControlLoopName
Update Tca ControlLoopName ${model_invariant_id}
+Instantiate VNF CDS
+ [Arguments] ${service} ${vf_module_label}=NULL
+ ${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB_CDS demoVLB_CDS True
+ ${resp}= Get Service Catalog demoVLB_CDS
+ ${service-uuid}= Set Variable ${resp['uuid']}
+ ${service-invariantUUID}= Set Variable ${resp['invariantUUID']}
+ ${requestid}= CDS Service Instantiate demoVLB_CDS ${service-uuid} ${service-invariantUUID}
+ ${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME } ${GLOBAL_SO_PASSWORD}
+ SO.Run Polling Get Request ${GLOBAL_SO_APIHAND_ENDPOINT} ${GLOBAL_SO_ORCHESTRATION_REQUESTS_PATH}/${requestid} tries=30 interval=60 auth=${auth}
+
Instantiate Demo VNF
[Arguments] ${service} ${vf_module_label}=NULL
${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
\ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module}
\ ${model_invariant_id}= Set Variable If '${vf_module_label}' in '${vf_module}' ${generic_vnf['model-invariant-id']} ${model_invariant_id}
Log ModelInvariantID=${model_invariant_id}
- ${status} ${value}= Run Keyword And Ignore Error Update vVFWCL Policy ${model_invariant_id}
- ${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name}
-
+ ${status} ${value}= Run Keyword And Ignore Error Update vFWCL Operational and Monitoring Policies ${model_invariant_id}
Save For Delete
[Documentation] Create a variable file to be loaded for save for delete
${vars}= Catenate ${vars}]\n
OperatingSystem.Create File ${FILE_CACHE}/${stack_name}.py ${vars}
OperatingSystem.Create File ${FILE_CACHE}/lastVNF4HEATBRIGE.py ${vars}
-
-