From 369e51562f068d5e653211902efc69220508eca1 Mon Sep 17 00:00:00 2001 From: DR695H Date: Wed, 19 Jun 2019 21:16:58 -0400 Subject: move so, clamp, oof to jinja Issue-ID: TEST-158 Change-Id: I88798326879463103a66a97d4ddbc53e864be01a Signed-off-by: DR695H --- robot/resources/clamp_interface.robot | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'robot/resources/clamp_interface.robot') diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot index b8ec12bf..a83bc4d3 100644 --- a/robot/resources/clamp_interface.robot +++ b/robot/resources/clamp_interface.robot @@ -4,9 +4,8 @@ Library RequestsLibrary Library Collections Library String Library ONAPLibrary.JSON - +Library ONAPLibrary.Templating Resource global_properties.robot -Resource json_templater.robot *** Variables *** ${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/healthcheck @@ -15,7 +14,7 @@ ${CLAMP_BASE_PATH} /restservices/clds/v1 ${CLAMP_CLIENT_KEY} robot/assets/keys/org.onap.clamp.key.clear.pem ${CLAMP_CLIENT_CERT} robot/assets/keys/org.onap.clamp.cert.pem -${CLAMP_TEMPLATE_PATH} robot/assets/templates/clamp +${CLAMP_TEMPLATE_PATH} clamp *** Keywords *** @@ -23,7 +22,8 @@ Run CLAMP Create Model [Documentation] Create a new CLAMP Model [Arguments] ${model_name} ${template_name} ${dict}= Create Dictionary MODEL_NAME=${model_name} TEMPLATE_NAME=${template_name} - ${data}= Fill JSON Template File ${CLAMP_TEMPLATE_PATH}/create_model.template ${dict} + Create Environment clamp ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template clamp ${CLAMP_TEMPLATE_PATH}/create_model.jinja ${dict} ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model/${model_name} ${resp}= Run CLAMP HTTPS Put Request ${data_path} ${data} Should Be Equal As Strings ${resp.status_code} 200 @@ -35,7 +35,8 @@ Run CLAMP Save vLB Model [Documentation] Save CLAMP Model [Arguments] ${model_name} ${template_name} ${policy_name} ${dict}= Create Dictionary MODEL_NAME=${model_name} TEMPLATE_NAME=${template_name} POLICY_NAME=${policy_name} DOLLAR_SIGN=$ - ${data}= Fill JSON Template File ${CLAMP_TEMPLATE_PATH}/save_model_vlb.template ${dict} + Create Environment clamp ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template clamp ${CLAMP_TEMPLATE_PATH}/save_model_vlb.jinja ${dict} ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model/${model_name} ${resp}= Run CLAMP HTTPS Put Request ${data_path} ${data} Should Be Equal As Strings ${resp.status_code} 200 -- cgit 1.2.3-korg