summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
509482e)
-Added csit/libraries/PacketcableVersion.robot to handle variable setting based on a new
ODL_VERSION option that can (optionally) be supplied to robot. Defaults to master if not set.
-Resources split into two groups lithium and master.
-Test cases updated to use new variables so both Li and Be can be tested
Change-Id: Icd397f9122ddc9bc159ec6956a32496e349ae1d4
Signed-off-by: Ryan Vail <r.vail@cablelabs.com>
--- /dev/null
+*** Settings ***
+Documentation This setup variable for Packetcable based on ODL version
+
+*** Variables ***
+${ODL_VERSION} master # defaults to latest version in the master branch
+${ODLREST_CCAPS} /restconf/config/packetcable:ccaps
+${CCAP_TOKEN} ccap
+${PACKETCABLE_RESOURCE_DIR} ${CURDIR}/../variables/packetcable/${ODL_VERSION}
+
+*** Keywords ***
+Init Variables
+ Run Keyword If "${ODL_VERSION}" == "lithium" Init Variables Lithium
+ log ${ODL_VERSION}
+ log ${ODLREST_CCAPS}
+ log ${CCAP_TOKEN}
+
+Init Variables Lithium
+ Set Suite Variable ${ODLREST_CCAPS} /restconf/config/packetcable:ccap
+ Set Suite Variable ${CCAP_TOKEN} ccaps
+
+Create Session And Init Variables
+ Init Variables
+ Create Session ODLSession http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Documentation Checking Network created in OVSDB are pushed to OpenDaylight
-Suite Setup Create Session ODLSession http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Documentation Checking packetcable:ccap resconf is working
+Suite Setup Create Session And Init Variables
Suite Teardown Delete All Sessions
Library OperatingSystem
Library String
Library RequestsLibrary
Library ../../../libraries/Common.py
Variables ../../../variables/Variables.py
Suite Teardown Delete All Sessions
Library OperatingSystem
Library String
Library RequestsLibrary
Library ../../../libraries/Common.py
Variables ../../../variables/Variables.py
+Resource ../../../libraries/PacketcableVersion.robot
-${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_ID1} 93b7d8de-15fb-11e5-b60b-1697f925ec7b
${CCAP_ID2} dc13b3fc-15fe-11e5-b60b-1697f925ec7b
${CCAP_IP1} 192.168.1.101
Add CCAP
[Documentation] Add Single CCAP
[Tags] PacketCable PCMM Reset Call
Add CCAP
[Documentation] Add Single CCAP
[Tags] PacketCable PCMM Reset Call
- ${Data} OperatingSystem.Get File ${PACKETCABLE_CONFIG_DIR}/add_ccap.json
+ ${Data} OperatingSystem.Get File ${PACKETCABLE_RESOURCE_DIR}/add_ccap.json
${Data} Replace String ${Data} {ccapId-1} ${CCAP_ID1}
${Data} Replace String ${Data} {ccapIp-1} ${CCAP_IP1}
log ${Data}
${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}
+ log ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
+ ${resp} RequestsLibrary.Put Request ODLSession ${ODLREST_CCAPS}/${CCAP_TOKEN}/${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
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}
+ log ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
+ ${resp} RequestsLibrary.Get Request ODLSession ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
Should be Equal As Strings ${resp.status_code} 200
Delete CAPP
[Documentation] Delete Single CCAP
[Tags] PacketCable PCMM Reset Call
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}
+ log ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
+ ${resp} RequestsLibrary.Delete Request ODLSession ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
Should be Equal As Strings ${resp.status_code} 200
Add Multiple.CCAPs
[Documentation] Add Multiple CCAPs
[Tags] PacketCable PCMM Reset Call
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} OperatingSystem.Get File ${PACKETCABLE_RESOURCE_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}
${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}
+ ${resp} RequestsLibrary.Put Request ODLSession ${ODLREST_CCAPS} 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
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}
+ ${resp} RequestsLibrary.Get Request ODLSession ${ODLREST_CCAPS}
Should be Equal As Strings ${resp.status_code} 200
Delete All.CCAPs
[Documentation] Delete ALL CCAPs
[Tags] PacketCable PCMM Reset Call
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}
+ ${resp} RequestsLibrary.Delete Request ODLSession ${ODLREST_CCAPS}
Should be Equal As Strings ${resp.status_code} 200
Should be Equal As Strings ${resp.status_code} 200
-}
\ No newline at end of file
--- /dev/null
+{
+ "ccap": [{
+ "ccapId": "{ccapId-1}",
+ "amId": {
+ "am-tag": "0xcada",
+ "am-type": "1"
+ },
+ "connection": {
+ "ipAddress": "{ccapIp-1}",
+ "port": "6060"
+ },
+ "subscriber-subnets": [
+ "10.32.110.1/24"
+ ],
+ "downstream-scns": [
+ "extrm_dn"
+ ],
+ "upstream-scns": [
+ "extrm_up"
+ ]
+ }]
+}
--- /dev/null
+{ "ccaps": {
+ "ccap": [
+ { "ccapId": "{ccapId-1}",
+ "amId": {
+ "am-tag": "0xcada",
+ "am-type": "1"
+ },
+ "connection": {
+ "ipAddress": "{ccapIp-1}",
+ "port": "6060"
+ },
+ "subscriber-subnets": [
+ "44.137.0.0/16",
+ "2001:4978:030d:1000:0:0:0:0/52"
+ ],
+ "downstream-scns": [
+ "ipvideo_dn",
+ "extrm_dn",
+ "SCNC"
+ ],
+ "upstream-scns": [
+ "SCNA",
+ "extrm_up"
+ ]
+ },
+ { "ccapId": "{ccapId-2}",
+ "amId": {
+ "am-tag": "0xcada",
+ "am-type": "1"
+ },
+ "connection": {
+ "ipAddress": "{ccapIp-2}",
+ "port": "6060"
+ },
+ "subscriber-subnets": [
+ "44.133.0.0/19"
+ ],
+ "downstream-scns": [
+ "ipvideo_dn",
+ "extrm_dn",
+ "SCNC"
+ ],
+ "upstream-scns": [
+ "SCNA",
+ "extrm_up"
+ ]
+ }]
+}}