2 Documentation Checking packetcable:ccap resconf is working
4 Library OperatingSystem
6 Library RequestsLibrary
7 Library ../../../libraries/Common.py
8 Variables ../../../variables/Variables.py
9 Resource ../../../libraries/PacketcableVersion.robot
10 Resource ../../../libraries/TemplatedRequests.robot
12 Suite Setup Create Session And Init Variables
13 Suite Teardown Delete All Sessions
17 ${CCAP_ID1} 93b7d8de-15fb-11e5-b60b-1697f925ec7b
18 ${CCAP_ID2} dc13b3fc-15fe-11e5-b60b-1697f925ec7b
19 ${CCAP_IP1} 192.168.1.101
20 ${CCAP_IP2} 192.168.1.102
25 [Documentation] Add Single CCAP
26 [Tags] packetcable pcmm reset call
27 ${Data} OperatingSystem.Get File ${PACKETCABLE_RESOURCE_DIR}/add_ccap.json
28 ${Data} Replace String ${Data} {ccapId-1} ${CCAP_ID1}
29 ${Data} Replace String ${Data} {ccapIp-1} ${CCAP_IP1}
31 log ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
32 ${resp} RequestsLibrary.Put Request ODLSession ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1} data=${Data}
33 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
36 [Documentation] Get Single CCAP
37 [Tags] packetcable pcmm reset call
38 log ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
39 ${resp} RequestsLibrary.Get Request ODLSession ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
40 Should be Equal As Strings ${resp.status_code} 200
43 [Documentation] Delete Single CCAP
44 [Tags] packetcable pcmm reset call
45 log ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
46 ${resp} RequestsLibrary.Delete Request ODLSession ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
47 Should be Equal As Strings ${resp.status_code} 200
50 [Documentation] Add Multiple CCAPs
51 [Tags] packetcable pcmm reset call
52 ${Data} OperatingSystem.Get File ${PACKETCABLE_RESOURCE_DIR}/add_multi_ccaps.json
53 ${Data} Replace String ${Data} {ccapId-1} ${CCAP_ID1}
54 ${Data} Replace String ${Data} {ccapIp-1} ${CCAP_IP1}
55 ${Data} Replace String ${Data} {ccapId-2} ${CCAP_ID2}
56 ${Data} Replace String ${Data} {ccapIp-2} ${CCAP_IP2}
58 ${resp} RequestsLibrary.Put Request ODLSession ${ODLREST_CCAPS} data=${Data}
59 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
62 [Documentation] Get ALL CCAPs
63 [Tags] packetcable pcmm reset call
64 ${resp} RequestsLibrary.Get Request ODLSession ${ODLREST_CCAPS}
65 Should be Equal As Strings ${resp.status_code} 200
68 [Documentation] Delete ALL CCAPs
69 [Tags] packetcable pcmm reset call
70 ${resp} RequestsLibrary.Delete Request ODLSession ${ODLREST_CCAPS}
71 Should be Equal As Strings ${resp.status_code} 200