summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>2019-07-25 17:28:25 +0000
committerAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>2019-07-25 18:18:58 +0000
commit908e9bdfc0a0778346b6571dddf5134fd3d7dbee (patch)
tree4f4f23a6184b390a04207ca1593369ccb2de1bdd
parent0b4b16cf7c55e056433f599e480575d83a703341 (diff)
Need to perform vLB_CDS distribution via Robot
Issue-ID: TEST-180 Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com> Change-Id: Ic4cf617c1cdccdf71efc562738bc3fba9060b634 Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
-rw-r--r--robot/resources/asdc_interface.robot21
-rw-r--r--robot/resources/demo_preload.robot6
2 files changed, 25 insertions, 2 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index 7fa648fb..4594ac50 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -130,6 +130,7 @@ Distribute Model From ASDC
:FOR ${deployment} IN @{deploymentlist}
\ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
\ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment}
+ Run Keyword If ${cds} == True Add CDS Parameters ${catalog_service_name}
Checkin ASDC Catalog Service ${catalog_service_id}
Wait Until Keyword Succeeds 600s 15s Request Certify ASDC Catalog Service ${catalog_service_id}
Start Certify ASDC Catalog Service ${catalog_service_id}
@@ -1030,3 +1031,23 @@ Create Multi Part
${partData}= Create List ${fileName} ${fileData} ${contentType}
Set To Dictionary ${addTo} ${partName}=${partData}
+
+Add CDS Parameters
+ [Arguments] ${catalog_service_name}
+ ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1 ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
+ #${resp_json}= To Json ${resp}
+ ${service_uuid}= Set Variable ${resp.json()['uniqueId']}
+ ${component_uuid}= Set Variable ${resp.json()['componentInstances'][0]['uniqueId']}
+ @{inputs}= Copy List ${resp.json()['componentInstances'][0]['inputs']}
+ :FOR ${input} IN @{inputs}
+ \ Run Keyword If '${input['name']}' == "sdnc_artifact_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string vdns-vnf
+ \ ... ELSE IF '${input['name']}' == "sdnc_model_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string test
+ \ ... ELSE IF '${input['name']}' == "sdnc_model_version" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string 1.0.0
+ \ ... ELSE IF '${input['name']}' == "skip_post_instantiation_configuration" Set Input Parameter ${service_uuid} ${component_uuid} ${input} boolean false
+
+
+Set Input Parameter
+ [Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value}
+
+ ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${service_uuid}/resourceInstance/${component_uuid}/inputs {"constraints":[],"name":"${input['name']}","parentUniqueId":"${input['parentUniqueId']}","password":false,"required":false,"schema":{"property":{}},"type":"${input_type}","uniqueId":"${input['uniqueId']}","value":"${input_value}","definition":false,"toscaPresentation":{"ownerId":"${input['ownerId']}"}}
+ Should Be Equal As Strings ${resp.status_code} 200
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 97932527..61b8b66b 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -67,6 +67,8 @@ Load Models
${status} ${value}= Run Keyword And Ignore Error Distribute Model vFWCL ${DEMO_PREFIX}VFWCL
Log Distibuting vLB
${status} ${value}= Run Keyword And Ignore Error 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
Log Distibuting vCPEInfra
@@ -81,8 +83,8 @@ Load Models
${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPEvGW ${DEMO_PREFIX}VCPEvGW
Distribute Model
- [Arguments] ${service} ${modelName}
- Model Distribution For Directory ${service} ${modelName}
+ [Arguments] ${service} ${modelName} ${cds}=
+ Model Distribution For Directory ${service} ${modelName} ${cds}
Distribute vCPEResCust Model
[Arguments] ${service} ${modelName}