summaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dcaegen2/prh_testcases/resources/prh_keywords.robot
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests/dcaegen2/prh_testcases/resources/prh_keywords.robot')
-rw-r--r--test/csit/tests/dcaegen2/prh_testcases/resources/prh_keywords.robot61
1 files changed, 61 insertions, 0 deletions
diff --git a/test/csit/tests/dcaegen2/prh_testcases/resources/prh_keywords.robot b/test/csit/tests/dcaegen2/prh_testcases/resources/prh_keywords.robot
new file mode 100644
index 000000000..1595cd4a4
--- /dev/null
+++ b/test/csit/tests/dcaegen2/prh_testcases/resources/prh_keywords.robot
@@ -0,0 +1,61 @@
+*** Settings ***
+Documentation The main interface for interacting with PRH. It handles low level stuff like managing the http request library
+Library PrhLibrary.py
+Library RequestsLibrary
+
+*** Variables ***
+
+*** Keywords ***
+PRH Suite Setup
+ [Documentation] Start DMaaP and AAI Mockup Server
+ ${ret}= Setup DMaaP Server
+ Should Be Equal As Strings ${ret} true
+ ${ret}= Setup AAI Server
+ Should Be Equal As Strings ${ret} true
+
+PRH Suite Shutdown
+ [Documentation] Shutdown DMaaP and AAI Mockup Server
+ ${ret}= Shutdown DMaap Server
+ Should Be Equal As Strings ${ret} true
+ ${ret}= Shutdown AAI Server
+ Should Be Equal As Strings ${ret} true
+
+Get event from DMaaP
+ [Arguments] ${ip} ${endpoint}
+ [Documentation] Get an event from DMaaP
+ ${url}= Catenate SEPARATOR= ${ip} ${endpoint}
+ Log Creating session ${url}
+ Create Session prh-d1 ${url}
+ ${resp}= Get Request prh-d1 ${url}
+ Log Received response from dcae ${resp.json()}
+ [Return] ${resp}
+
+Send patch from AAI
+ [Arguments] ${ip} ${endpoint}
+ [Documentation] Get patch from AAI
+ ${url}= Catenate SEPARATOR= ${ip} ${endpoint}
+ Log Creating session ${url}
+ Create Session prh-d1 ${url}
+ ${resp}= Patch Request prh-d1 ${url}
+ Log ${resp}
+ [Return] ${resp}
+
+Get json from AAI
+ [Arguments] ${ip} ${endpoint}
+ [Documentation] Get json from AAI
+ ${url}= Catenate SEPARATOR= ${ip} ${endpoint}
+ Log Creating session ${url}
+ Create Session prh-d1 ${url}
+ ${resp}= Get Request prh-d1 ${url}
+ Log Received response from dcae ${resp.json()}
+ [Return] ${resp}
+
+Post json to DMaaP
+ [Arguments] ${ip} ${endpoint} ${PNF_READY}
+ [Documentation] Get json from AAI
+ ${url}= Catenate SEPARATOR= ${ip} ${endpoint}
+ Log Creating session ${url}
+ Create Session prh-d1 ${url}
+ ${resp}= Post Request prh-d1 ${url} data=${PNF_READY}
+ Log ${resp}
+ [Return] ${resp}