aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-09-27 10:38:50 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-09-27 10:39:43 -0700
commit9abb61ca2cea1907cab2cec312d6dca6e53a93cd (patch)
treec8ff0718b6626832efd3ff3acc48590dbd6cb64c /tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
parenta328a3e2e531240ea4a9ed2ce4a284af1be5e225 (diff)
Move CSIT to integration/csit repo
To facilite branching of CSIT tests, all CSIT test code and scripts are relocated to the integration/csit repo. Change-Id: I1e4c0eff44691f73f8098b3c52764107f6b8b8df Issue-ID: INT-671 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot')
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
new file mode 100644
index 00000000..58f5cbc1
--- /dev/null
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
@@ -0,0 +1,48 @@
+*** Settings ***
+Library XnfSimulatorLibrary
+Library VesHvContainersUtilsLibrary
+Library Collections
+
+*** Keywords ***
+Configure xNF Simulators Using Valid Certificates On Ports
+ [Arguments] ${XNF_PORTS_LIST}
+ ${VALID_XNF_SIMULATORS_ADDRESSES}= Configure xNF Simulators ${XNF_PORTS_LIST}
+ Set Suite Variable ${VALID_XNF_SIMULATORS_ADDRESSES}
+
+Configure xNF Simulators
+ [Arguments] ${XNF_PORTS_LIST}
+ ... ${should_use_valid_certs}=${true}
+ ... ${should_disable_ssl}=${false}
+ ... ${should_connect_to_unencrypted_hv_ves}=${false}
+ ${XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST}
+ ... ${should_use_valid_certs}
+ ... ${should_disable_ssl}
+ ... ${should_connect_to_unencrypted_hv_ves}
+ [Return] ${XNF_SIMULATORS_ADDRESSES}
+
+Get xNF Simulators Using Valid Certificates
+ [Arguments] ${AMOUNT}=1
+ ${SIMULATORS}= Get Slice From List ${VALID_XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
+ [Return] ${SIMULATORS}
+
+
+Send Messages From xNF Simulators
+ [Arguments] ${XNF_HOSTS_LIST} ${MESSAGE_FILEPATH}
+ :FOR ${HOST} IN @{XNF_HOSTS_LIST}
+ \ ${XNF_SIM_API_ACCESS}= Get xNF Sim Api Access Url ${HTTP_METHOD_URL} ${HOST}
+ \ ${XNF_SIM_API_URL}= Catenate SEPARATOR= ${XNF_SIM_API_ACCESS} ${XNF_SIM_API_PATH}
+ \ Send messages ${XNF_SIM_API_URL} ${MESSAGE_FILEPATH}
+
+
+VES-HV Collector Test Shutdown
+ Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL}
+
+
+VES-HV Collector Suite Teardown
+ Stop And Remove All Xnf Simulators ${SUITE NAME}
+
+*** Variables ***
+${HTTP_METHOD_URL} http://
+
+${XNF_SIM_API_PATH} /simulator/async
+