*** Test Cases ***
Get Controller Modules
[Documentation] Get the controller modules via Restconf
- ${resp} RequestsLibrary.Get session ${MODULES_API}
+ ${resp} RequestsLibrary.Get Request session ${MODULES_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ietf-restconf
${XML2} Replace String ${XML1} 127.0.0.1 ${NETOPEER}
${body} Replace String ${XML2} mininet ${NETOPEER_USER}
Log ${body}
- ${resp} Post session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body}
+ ${resp} Post Request session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 204
Pull External Device configuration
[Documentation] Pull Netopeer configuration
[Tags] netconf
- ${resp} Get session ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
+ ${resp} Get Request session ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} {}
Verify Device Operational data
[Documentation] Verify Netopeer operational data
[Tags] exclude
- ${resp} Get session ${REST_CONT_OPER}/${REST_NTPR_MOUNT}
+ ${resp} Get Request session ${REST_CONT_OPER}/${REST_NTPR_MOUNT}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} schema
*** Keywords ***
Get Inventory
- ${resp} Get session ${REST_CONT_OPER}/node/netopeer
+ ${resp} Get Request session ${REST_CONT_OPER}/node/netopeer
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} "node-id":"netopeer"
*** Test Cases ***
Get the Specific Node Inventory and Lacp aggregator details
[Documentation] Get the lacp-aggregator data for specific node
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}
Verify LACP RESTAPI Response Code for node ${resp}
Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} ${agg-id1}
Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} ${agg-id2}
Get information of each lacp-aggregator for a node
[Documentation] Get each lacp-aggregator data for a node
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id1}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id1}
Verify LACP RESTAPI Response Code for node ${resp}
Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg1-connector-id1}
Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg1-connector-id2}
Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lag-groupid
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
Verify LACP RESTAPI Response Code for node ${resp}
Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1}
Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id2}
Get node connector data for node 1
[Documentation] Get the node connector inventory for node 1
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id1}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id1}
Verify LACP RESTAPI Response Code for node ${resp}
Verify specific LACP node connector data for node ${resp.content} ${agg-id1} agg-id
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id2}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id2}
Verify LACP RESTAPI Response Code for node ${resp}
Verify specific LACP node connector data for node ${resp.content} ${agg-id1} agg-id
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id1}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id1}
Verify LACP RESTAPI Response Code for node ${resp}
Verify specific LACP node connector data for node ${resp.content} ${agg-id2} agg-id
- ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id2}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id2}
Verify LACP RESTAPI Response Code for node ${resp}
Verify specific LACP node connector data for node ${resp.content} ${agg-id2} agg-id
Verify LACP Tags Are Formed
[Documentation] Fundamental Check That LACP is working
- ${resp} Get session ${OPERATIONAL_NODES_API}
+ ${resp} Get Request session ${OPERATIONAL_NODES_API}
Verify LACP RESTAPI Response Code for node ${resp}
Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} non-lag-groupid
Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lacp-aggregators
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Should Be True ${res}
Check No Switches Inventory
- ${resp}= Get session ${OPERATIONAL_NODES_API}
+ ${resp}= Get Request session ${OPERATIONAL_NODES_API}
Log ${resp.content}
Should Be Equal As Strings '${resp.content}' '{"nodes":{}}'
Deconfigure Flows
[Documentation] Flows deconfiguration
- ${resp}= Delete session ${CONFIG_NODES_API}
+ ${resp}= Delete Request session ${CONFIG_NODES_API}
Should Be Equal As Numbers ${resp.status_code} 200
Check No Flows In Operational Last
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}
Add Flow 1 To Controller1
Init Flow Variables 1 1 1
Log ${data}
- ${resp}= Put session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
+ ${resp}= Put Request session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
Log ${resp.content}
${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
Add Flow 2 To Controller2
Init Flow Variables 1 2 2
Log ${data}
- ${resp}= Put session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
+ ${resp}= Put Request session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
Log ${resp.content}
${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
Add Flow 3 To Controller3
Init Flow Variables 1 3 3
Log ${data}
- ${resp}= Put session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
+ ${resp}= Put Request session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
Log ${resp.content}
${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
Delete Flow 1 On Controller1
Init Flow Variables 1 1 1
- ${resp}= Delete session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
+ ${resp}= Delete Request session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
Log ${resp.content}
${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
Delete Flow 2 On Controller2
Init Flow Variables 1 2 2
- ${resp}= Delete session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
+ ${resp}= Delete Request session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
Log ${resp.content}
${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
Delete Flow 3 On Controller3
Init Flow Variables 1 3 3
- ${resp}= Delete session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
+ ${resp}= Delete Request session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
Log ${resp.content}
${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
List connections
[Documentation] SNMP get
[Tags] SNMP get
- ${resp} RequestsLibrary.Post session ${REST_CONTEXT_SNMP_SET} data={"input": {"ip-address": "${DEVICE_IP}","oid" : "1.3.6.1.2.1.1.1.0","get-type" : "GET-BULK","community" : "private" } }
+ ${resp} RequestsLibrary.Post Request session ${REST_CONTEXT_SNMP_SET} data={"input": {"ip-address": "${DEVICE_IP}","oid" : "1.3.6.1.2.1.1.1.0","get-type" : "GET-BULK","community" : "private" } }
Should Be Equal As Strings ${resp.status_code} 200
[Teardown] Report_Failure_Due_To_Bug 5360
*** Test Cases ***
Get Controller Modules
[Documentation] Get the controller modules via Restconf
- ${resp} RequestsLibrary.Get session ${MODULES_API}
+ ${resp} RequestsLibrary.Get Request session ${MODULES_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ietf-restconf