aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/demo_preload.robot24
-rw-r--r--robot/resources/sdc_interface.robot9
2 files changed, 18 insertions, 15 deletions
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index bbd7e423..302f5cda 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -63,26 +63,28 @@ Load Customer
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}=False ${instantiationType}=A-la-carte ${resourceType}=VF
diff --git a/robot/resources/sdc_interface.robot b/robot/resources/sdc_interface.robot
index 366e5f5e..25bd5167 100644
--- a/robot/resources/sdc_interface.robot
+++ b/robot/resources/sdc_interface.robot
@@ -73,10 +73,9 @@ ${SDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED
Distribute Model From SDC
[Documentation] Goes end to end creating all the SDC objects based ONAP model and distributing it to the systems. It then returns the service name, VF/PNF name and VF module name
[Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}=False ${service}= ${instantiationType}=A-la-carte ${resourceType}=VF
- # For Testing use random service names
- #${random}= Get Current Date
- #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}_${random}
- ${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name} ${instantiationType}
+ # add logic to handle service name already exists
+ ${status} ${catalog_service_id}= Run Keyword And Ignore Error Add SDC Catalog Service ${catalog_service_name} ${instantiationType}
+ Return From Keyword If '${status}' == 'FAIL'
${catalog_resource_ids}= Create List
${catalog_resources}= Create Dictionary
##### TODO: Support for Multiple resources of one type in a service ######
@@ -256,6 +255,7 @@ Create Allotted Resource Data File
Download CSAR
[Documentation] Download CSAR
[Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar
+ Return From Keyword If '${catalog_service_id}'=='None'
# get meta data
${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']}
@@ -811,6 +811,7 @@ Add SDC Catalog Service
Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
${data}= Templating.Apply Template sdc ${SDC_CATALOG_SERVICE_TEMPLATE} ${map}
${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
+ Run Keyword If ('${resp.status_code}'=='409') Log ${\n} ${catalog_service_name} Service Already Exists console=yes
Should Be Equal As Strings ${resp.status_code} 201
[Return] ${resp.json()['uniqueId']}