diff options
author | Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com> | 2019-07-25 17:28:25 +0000 |
---|---|---|
committer | Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com> | 2019-07-25 18:18:58 +0000 |
commit | 908e9bdfc0a0778346b6571dddf5134fd3d7dbee (patch) | |
tree | 4f4f23a6184b390a04207ca1593369ccb2de1bdd /robot/resources/asdc_interface.robot | |
parent | 0b4b16cf7c55e056433f599e480575d83a703341 (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>
Diffstat (limited to 'robot/resources/asdc_interface.robot')
-rw-r--r-- | robot/resources/asdc_interface.robot | 21 |
1 files changed, 21 insertions, 0 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 |