aboutsummaryrefslogtreecommitdiffstats
path: root/tests/clamp/APIs/01__Test_CL_APIs.robot
blob: 9fb9d06dcc5538c7e629060ee5e4a6946416425a (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
*** Settings ***
Library     Collections
Library     RequestsLibrary
Library     OperatingSystem
Library     json

*** Variables ***
${login}                     admin
${passw}                     password

*** Keywords ***
Create the sessions
    ${auth}=    Create List     ${login}    ${passw}
    Create Session   clamp  https://localhost:8443   auth=${auth}   disable_warnings=1
    Set Global Variable     ${clamp_session}      clamp

*** Test Cases ***
Get Requests health check ok
    Create the sessions
    ${resp}=    Get Request    ${clamp_session}   /restservices/clds/v1/healthcheck
    Should Be Equal As Strings  ${resp.status_code}     200

List TCAs
    ${resp}=    Get Request    ${clamp_session}   /restservices/clds/v2/loop/getAllNames
    Should Contain Match    ${resp}   *Name1_tca*
    Should Contain Match    ${resp}   *tca_2*
    Should Contain Match    ${resp}   *Name1_tca_3*

Open TCA1
    ${resp}=    Get Request    ${clamp_session}   /restservices/clds/v2/loop/LOOP_yHsgu_v1_0_ResourceInstanceName1_tca
    Should Contain Match    ${resp}   *Name1_tca*
    Should Contain Match    ${resp}   *Operational Policy Item*
    Should Contain Match    ${resp}   *Operational policies*

Open TCA2
    ${resp}=    Get Request    ${clamp_session}   /restservices/clds/v2/loop/LOOP_yHsgu_v1_0_ResourceInstanceName2_tca_2
    Should Contain Match    ${resp}   *Name2_tca_2*
    Should Contain Match    ${resp}   *Operational Policy Item*
    Should Contain Match    ${resp}   *1004*
    Should Contain Match    ${resp}   *TCA Policy Scope*

Open TCA3
    ${resp}=    Get Request    ${clamp_session}   /restservices/clds/v2/loop/LOOP_yHsgu_v1_0_ResourceInstanceName1_tca_3
    Should Contain Match    ${resp}   *Name1_tca_3*
    Should Contain Match    ${resp}   *Operational Policy Item*
    Should Contain Match    ${resp}   *1004*
    Should Contain Match    ${resp}   *TCA Policy Scope*