aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
blob: 3451186573ed0dc162b3f985539477c342d62927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
*** Settings ***
Library       XnfSimulatorLibrary
Library       VesHvContainersUtilsLibrary
Library       Collections

*** Keywords ***
Configure Valid xNF Simulators On Ports
    [Arguments]    ${XNF_PORTS_LIST}
    ${VALID_XNF_SIMULATORS_ADDRESSES}=   Start Xnf Simulators    ${XNF_PORTS_LIST}    True
    Set Suite Variable    ${VALID_XNF_SIMULATORS_ADDRESSES}


Configure Invalid xNF Simulators On Ports
    [Arguments]    ${XNF_PORTS_LIST}
    ${INVALID_XNF_SIMULATORS_ADDRESSES}=   Start Xnf Simulators    ${XNF_PORTS_LIST}    False
    Set Suite Variable    ${INVALID_XNF_SIMULATORS_ADDRESSES}


Get Valid xNF Simulators
    [Arguments]  ${AMOUNT}
    ${SIMULATORS}=   Get Slice From List   ${VALID_XNF_SIMULATORS_ADDRESSES}   0   ${AMOUNT}
    [Return]   ${SIMULATORS}


Get Invalid xNF Simulators
    [Arguments]  ${AMOUNT}
    ${SIMULATORS}=   Get Slice From List   ${INVALID_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

*** Variables ***
${HTTP_METHOD_URL}                             http://

${XNF_SIM_API_PATH}                            /simulator/async