*** Keywords ***
Distribute Model From ASDC
[Documentation] Goes end to end creating all the ASDC objects based ONAP model and distributing it to the systems. It then returns the service name, VF name and VF module name
- [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}=
+ [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}=False ${service}=
# For Testing use random service names
#${random}= Get Current Date
#${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random}
Setup ASDC Catalog Resource
[Documentation] Creates all the steps a VF needs for an ASDC Catalog Resource and returns the id
- [Arguments] ${model_zip_path} ${cds}=
+ [Arguments] ${model_zip_path} ${cds}=None
${license_model_id} ${license_model_version_id}= Add ASDC License Model
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}
+ ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
+ ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1 ${ASDC_DESIGNER_USER_ID} auth=${auth}
#${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
+ ... 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']}"}}
+ ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
+ ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${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']}"}} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
*** Variables ***
${GLOBAL_APPLICATION_ID} robot-ete
-${GLOBAL_MSO_STATUS_PATH} /onap/so/infra/orchestrationRequests/v6/
+${GLOBAL_SO_STATUS_PATH} /onap/so/infra/orchestrationRequests/v6/
${GLOBAL_SELENIUM_BROWSER} chrome
${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
${GLOBAL_SELENIUM_DELAY} 0
${CONFIG_POLICY_NAME} vFirewall
${CONFIG_POLICY_TYPE} Unknown
-${OPS_POLICY_NAME}
${OPS_POLICY_TYPE} BRMS_PARAM
# VFW low threshold
[Documentation] Create Opertional Policy
${randompolicyname} = Create Policy Name
${policyname1}= Catenate com.${randompolicyname}
- ${OPS_POLICY_NAME}= Catenate ${policyname1}
- ${dict}= Create Dictionary policy_name=${OPS_POLICY_NAME}
+ ${dict}= Create Dictionary policy_name=${policyname1}
Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
${output}= Templating.Apply Template cl ${CREATE_OPS_TEMPLATE} ${dict}
${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE} ${output}
[Teardown] Teardown Models ${catalog_service_id} ${catalog_resource_ids}
Model Distribution For Directory
- [Arguments] ${service} ${catalog_service_name}= ${cds}=
+ [Arguments] ${service} ${catalog_service_name}= ${cds}=None
ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${directory_list}= ServiceMapping.Get Service Folder Mapping default ${service}
${ziplist}= Create List
${request_id}= Parse Request Id ${response text}
${service_instance_id}= Parse Instance Id ${response text}
${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
+ SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
[return] ${service_instance_id}
Wait For Model
${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
${request_id}= Parse Request Id ${response text}
${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
+ SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
Search Service Instance
[Arguments] ${service_instance_id}
${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
${request_id}= Parse Request Id ${response text}
${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
Create VID VNF module
[Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} ${vnf_name}
${request_id}= Parse Request Id ${response text}
${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
[Return] ${instance_id}
Wait For Add VF Module
${request_id}= Parse Request Id ${response text}
Click Element xpath=//div[@class='ng-scope']/div[@class = 'buttonRow']/button[text() = 'Close']
${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
[Return] ${teardown_status} ${vfmodule}
Handle VID Alert