X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fpacketcable%2FPCMM%2F010__pcmm_rest_call.robot;fp=csit%2Fsuites%2Fpacketcable%2FPCMM%2F010__pcmm_rest_call.robot;h=58b3eebeb63cebada2adb8c760fac7ba8db9304c;hb=59e81c38620fa1b61e15771191e35771450b9499;hp=0000000000000000000000000000000000000000;hpb=072f6e3a8d1bdf8f4c663843589c22d93ba07791;p=integration%2Ftest.git diff --git a/csit/suites/packetcable/PCMM/010__pcmm_rest_call.robot b/csit/suites/packetcable/PCMM/010__pcmm_rest_call.robot new file mode 100644 index 0000000000..58b3eebeb6 --- /dev/null +++ b/csit/suites/packetcable/PCMM/010__pcmm_rest_call.robot @@ -0,0 +1,64 @@ +*** Settings *** +Documentation Checking Network created in OVSDB are pushed to OpenDaylight +Suite Setup Create Session ODLSession http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library OperatingSystem +Library String +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${ODLREST_CAPP} /restconf/config/packetcable:ccap +${PACKETCABLE_CONFIG_DIR} ${CURDIR}/../../../variables/packetcable +${CCAP_ID1} 93b7d8de-15fb-11e5-b60b-1697f925ec7b +${CCAP_ID2} dc13b3fc-15fe-11e5-b60b-1697f925ec7b +${CCAP_IP1} 192.168.1.101 +${CCAP_IP2} 192.168.1.102 + +*** Test Cases *** +Add CCAP + [Documentation] Add Single CCAP + [Tags] PacketCable PCMM Reset Call + ${Data} OperatingSystem.Get File ${PACKETCABLE_CONFIG_DIR}/add_ccap.json + ${Data} Replace String ${Data} {ccapId-1} ${CCAP_ID1} + ${Data} Replace String ${Data} {ccapIp-1} ${CCAP_IP1} + log ${Data} + ${resp} RequestsLibrary.Put ODLSession ${ODLREST_CAPP}/ccaps/${CCAP_ID1} data=${Data} headers=${HEADERS} + Should be Equal As Strings ${resp.status_code} 200 + +Get CCAP + [Documentation] Get Single CCAP + [Tags] PacketCable PCMM Reset Call + ${resp} RequestsLibrary.Get ODLSession ${ODLREST_CAPP}/ccaps/${CCAP_ID1} + Should be Equal As Strings ${resp.status_code} 200 + +Delete CAPP + [Documentation] Delete Single CCAP + [Tags] PacketCable PCMM Reset Call + ${resp} RequestsLibrary.Delete ODLSession ${ODLREST_CAPP}/ccaps/${CCAP_ID1} + Should be Equal As Strings ${resp.status_code} 200 + +Add Multiple.CCAPs + [Documentation] Add Multiple CCAPs + [Tags] PacketCable PCMM Reset Call + ${Data} OperatingSystem.Get File ${PACKETCABLE_CONFIG_DIR}/add_multi_ccaps.json + ${Data} Replace String ${Data} {ccapId-1} ${CCAP_ID1} + ${Data} Replace String ${Data} {ccapIp-1} ${CCAP_IP1} + ${Data} Replace String ${Data} {ccapId-2} ${CCAP_ID2} + ${Data} Replace String ${Data} {ccapIp-2} ${CCAP_IP2} + log ${Data} + ${resp} RequestsLibrary.Put ODLSession ${ODLREST_CAPP} data=${Data} headers=${HEADERS} + Should be Equal As Strings ${resp.status_code} 200 + +Get ALL.CCAPs + [Documentation] Get ALL CCAPs + [Tags] PacketCable PCMM Reset Call + ${resp} RequestsLibrary.Get ODLSession ${ODLREST_CAPP} + Should be Equal As Strings ${resp.status_code} 200 + +Delete All.CCAPs + [Documentation] Delete ALL CCAPs + [Tags] PacketCable PCMM Reset Call + ${resp} RequestsLibrary.Delete ODLSession ${ODLREST_CAPP} + Should be Equal As Strings ${resp.status_code} 200