summaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/asdc_interface.robot2
-rw-r--r--robot/resources/policy_interface.robot33
2 files changed, 34 insertions, 1 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index cbaba4ac..1160c316 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -260,7 +260,7 @@ Download CSAR
${base64Obj}= Set Variable ${resp.json()['base64Contents']}
${binObj}= Evaluate base64.b64decode("${base64Obj}") modules=base64
Create Binary File ${save_directory}/${csar_file_name} ${binObj}
- Log To Console Downloaded:${csar_file_name}
+ Log To Console ${\n}Downloaded:${csar_file_name}
[Return]
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 6f48e4fc..8bbbb62a 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -52,6 +52,16 @@ Run Policy Put Request
${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
[Return] ${resp}
+
+Run Policy Post Request
+ [Documentation] Runs Policy Post request
+ [Arguments] ${data_path} ${data}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${POLICY_ENDPOINT}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
+ ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
+ Log Received response from policy ${resp.text}
+ [Return] ${resp}
Run Policy Delete Request
[Documentation] Runs Policy Delete request
@@ -129,3 +139,26 @@ Validate the vFWCL Policy
Should Be Equal As Strings ${resp.status_code} 200
${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params
Should Be Equal As Strings ${resp.status_code} 200
+
+
+Create vFirewall Monitoring Policy
+ ${dict}= Create Dictionary
+ ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.template ${dict}
+ ${resp}= Run Policy Post Request /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies ${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+
+Create vFirewall Operational Policy
+ [Arguments] ${resource_id}
+ ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
+ ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_policy_operational_input.template ${dict}
+ ${resp}= Run Policy Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+
+Push vFirewall Policies To PDP Group
+ ${dict}= Create Dictionary
+ ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_push.template ${dict}
+ ${resp}= Run Policy Post Request /policy/pap/v1/pdps/policies ${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+