Add dummy test suite for Genius tdd-wip
[integration/test.git] / csit / suites / packetcable / PCMM / 010__pcmm_rest_call.robot
1 *** Settings ***
2 Documentation     Checking packetcable:ccap resconf is working
3 Suite Setup       Create Session And Init Variables
4 Suite Teardown    Delete All Sessions
5 Library           OperatingSystem
6 Library           String
7 Library           RequestsLibrary
8 Library           ../../../libraries/Common.py
9 Variables         ../../../variables/Variables.py
10 Resource          ../../../libraries/PacketcableVersion.robot
11 Resource          ../../../libraries/TemplatedRequests.robot
12
13 *** Variables ***
14 ${CCAP_ID1}       93b7d8de-15fb-11e5-b60b-1697f925ec7b
15 ${CCAP_ID2}       dc13b3fc-15fe-11e5-b60b-1697f925ec7b
16 ${CCAP_IP1}       192.168.1.101
17 ${CCAP_IP2}       192.168.1.102
18
19 *** Test Cases ***
20 Add CCAP
21     [Documentation]    Add Single CCAP
22     [Tags]    PacketCable PCMM Reset Call
23     ${Data}    OperatingSystem.Get File    ${PACKETCABLE_RESOURCE_DIR}/add_ccap.json
24     ${Data}    Replace String    ${Data}    {ccapId-1}    ${CCAP_ID1}
25     ${Data}    Replace String    ${Data}    {ccapIp-1}    ${CCAP_IP1}
26     log    ${Data}
27     log    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
28     ${resp}    RequestsLibrary.Put Request    ODLSession    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}    data=${Data}
29     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
30
31 Get CCAP
32     [Documentation]    Get Single CCAP
33     [Tags]    PacketCable PCMM Reset Call
34     log    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
35     ${resp}    RequestsLibrary.Get Request    ODLSession    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
36     Should be Equal As Strings    ${resp.status_code}    200
37
38 Delete CAPP
39     [Documentation]    Delete Single CCAP
40     [Tags]    PacketCable PCMM Reset Call
41     log    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
42     ${resp}    RequestsLibrary.Delete Request    ODLSession    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
43     Should be Equal As Strings    ${resp.status_code}    200
44
45 Add Multiple.CCAPs
46     [Documentation]    Add Multiple CCAPs
47     [Tags]    PacketCable PCMM Reset Call
48     ${Data}    OperatingSystem.Get File    ${PACKETCABLE_RESOURCE_DIR}/add_multi_ccaps.json
49     ${Data}    Replace String    ${Data}    {ccapId-1}    ${CCAP_ID1}
50     ${Data}    Replace String    ${Data}    {ccapIp-1}    ${CCAP_IP1}
51     ${Data}    Replace String    ${Data}    {ccapId-2}    ${CCAP_ID2}
52     ${Data}    Replace String    ${Data}    {ccapIp-2}    ${CCAP_IP2}
53     log    ${Data}
54     ${resp}    RequestsLibrary.Put Request    ODLSession    ${ODLREST_CCAPS}    data=${Data}
55     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
56
57 Get ALL.CCAPs
58     [Documentation]    Get ALL CCAPs
59     [Tags]    PacketCable PCMM Reset Call
60     ${resp}    RequestsLibrary.Get Request    ODLSession    ${ODLREST_CCAPS}
61     Should be Equal As Strings    ${resp.status_code}    200
62
63 Delete All.CCAPs
64     [Documentation]    Delete ALL CCAPs
65     [Tags]    PacketCable PCMM Reset Call
66     ${resp}    RequestsLibrary.Delete Request    ODLSession    ${ODLREST_CCAPS}
67     Should be Equal As Strings    ${resp.status_code}    200