aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2019-12-05 16:21:20 -0500
committerBrian Freeman <bf1936@att.com>2019-12-06 12:02:01 -0500
commit026df1b5db881b1fa5af704fc1a8a6f16b1c664c (patch)
treeea46c736e5f25223c54b9ac08d899202745b628f /robot
parent590721c5bdd9f00ed441e1ceba411d360bb41712 (diff)
Reduce init duration
Return if service_name already exists Issue-ID: INT-1397 Change-Id: I5d4da95501643d7fe21779e5f20aab26f05e873e Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/demo_preload.robot24
-rw-r--r--robot/resources/sdc_interface.robot9
-rw-r--r--robot/testsuites/demo.robot4
3 files changed, 22 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']}
diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot
index c1877e71..9b870015 100644
--- a/robot/testsuites/demo.robot
+++ b/robot/testsuites/demo.robot
@@ -38,6 +38,10 @@ Initialize SO Openstack Identity For V3
${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD}
Run Keyword If '${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}'=='v3' SO.Upsert Cloud Configuration ${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_CLOUD_CONFIG_PATH} ${GLOBAL_TEMPLATE_FOLDER} ${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} ${arguments} auth=${auth}
+Initialize vCPE Models
+ [Tags] distributeVCPE
+ Load vCPE Models
+
Initialize Customer
[Tags] InitCustomer
Load Customer Demonstration