From 75f5ad1f10a344c04229e82320277d16d83bb486 Mon Sep 17 00:00:00 2001 From: Brian Freeman Date: Thu, 17 Jan 2019 17:37:59 -0500 Subject: Add Save and Validate Model Issue-ID: INT-808 Change-Id: I782aca5ee0f5b0012838c0b38aa8ea112946e880 Signed-off-by: Brian Freeman --- robot/resources/clamp_interface.robot | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'robot/resources') diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot index 4d29b095..3a3e0b82 100644 --- a/robot/resources/clamp_interface.robot +++ b/robot/resources/clamp_interface.robot @@ -27,6 +27,27 @@ Run CLAMP Create Model ${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 + ${random}= Generate Random String 4 [LOWER][NUMBERS] + ${policy_name}= Catenate PolicyTest ${random} + Run CLAMP Save vLB Model ${model_name} ${template_name} ${policy_name} + +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} + ${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 + Run CLAMP Validation Test ${model_name} ${data} + +Run CLAMP Validation Test + [Documentation] Validate CLAMP Control Loop CLAMP Model + [Arguments] ${model_name} ${model_data} + ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/action/submit/${model_name}?test=true + ${resp}= Run CLAMP HTTPS Put Request ${data_path} ${model_data} + Should Be Equal As Strings ${resp.status_code} 200 + Run CLAMP Get Properties [Documentation] get CLAMP Control Loop properties -- cgit 1.2.3-korg