diff options
Diffstat (limited to 'robot/resources/asdc_interface.robot')
-rw-r--r-- | robot/resources/asdc_interface.robot | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index f31e7c50..9dc3254e 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -68,23 +68,23 @@ Distribute Model From ASDC # on certify it gets a new id ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} Approve ASDC Catalog Service ${catalog_service_id} - : FOR ${DIST_INDEX} IN RANGE 1 3 + : FOR ${DIST_INDEX} IN RANGE 2 \ Log Distribution Attempt ${DIST_INDEX} \ Distribute ASDC Catalog Service ${catalog_service_id} \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} \ ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} \ Exit For Loop If '${status}'=='PASS' + Should Be Equal As Strings ${status} PASS [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Loop Over Check Catalog Service Distributed - [Arguments] ${catalog_service_id} - : FOR ${CHECK_INDEX} IN RANGE 1 15 - \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} - \ Sleep 20s + [Arguments] ${catalog_service_id} + : FOR ${CHECK_INDEX} IN RANGE 15 + \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} + \ Sleep 20s \ Return From Keyword If '${status}'=='PASS' - Fail - + Should Be Equal As Strings ${status} PASS Setup ASDC Catalog Resource [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id @@ -103,12 +103,8 @@ Setup ASDC Catalog Resource Package ASDC Software Product ${software_product_id} ${software_product_version_id} ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id} ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} - Checkin ASDC Catalog Resource ${catalog_resource_id} - Request Certify ASDC Catalog Resource ${catalog_resource_id} - Start Certify ASDC Catalog Resource ${catalog_resource_id} - # on certify it gets a new id + ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} [Return] ${catalog_resource_id} - ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} Add ASDC License Model [Documentation] Creates an asdc license model and returns its id ${uuid}= Generate UUID @@ -298,10 +294,10 @@ Start Certify ASDC Catalog Resource [Return] ${resp.json()} Certify ASDC Catalog Resource [Documentation] start certify an asdc Catalog Resource by its id and returns the new id - [Arguments] ${catalog_resource_id} + [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID} ${map}= Create Dictionary user_remarks=Robot remarks ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} + ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp.json()['uniqueId']} @@ -407,20 +403,13 @@ Check Catalog Service Distributed ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} @{ITEMS}= Copy List ${det_resp['distributionStatusList']} Should Not Be Empty ${ITEMS} - ${AAI_DEPLOY} Set Variable FALSE - ${SDNC_DEPLOY} Set Variable FALSE - ${SO_DEPLOY} Set Variable FALSE ${SO_COMPLETE} Set Variable FALSE :FOR ${ELEMENT} IN @{ITEMS} \ Log ${ELEMENT['omfComponentID']} \ Log ${ELEMENT['status']} - \ ${SDNC_DEPLOY} Set Variable If (('sdnc-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${SDNC_DEPLOY}' == 'TRUE') TRUE - \ ${SO_DEPLOY} Set Variable If (('mso-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${SO_DEPLOY}' == 'TRUE') TRUE - \ ${AAI_DEPLOY} Set Variable If (('aai-ml' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${AAI_DEPLOY}'=='TRUE') TRUE - \ ${SO_COMPLETE} Set Variable If (('mso-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE - Should Be True ( '${SDNC_DEPLOY}'=='TRUE') SDNC Test - Should Be True ( '${SO_DEPLOY}'=='TRUE') SO Test - Should Be True ( '${AAI_DEPLOY}'=='TRUE') AAI Test + \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE + \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE') + \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test Get Catalog Service Distribution Details [Documentation] gets an asdc catalog Service distrbution details |