*** Test Cases ***
Get Controller Modules
[Documentation] Get the controller modules via Restconf
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ietf-restconf
Get nodeconnector for the root node
[Documentation] Get the inventory for the root node
${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/node/openflow:1
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:1
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.content}
*** Keywords ***
Check Every Nodes
[Arguments] ${numnodes}
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Should Be Equal As Strings ${resp.status_code} 200
: FOR ${IND} IN RANGE 1 ${numnodes+1}
\ Should Contain ${resp.content} openflow:${IND}
Check Every Nodes Stats
[Arguments] ${numnodes}
: FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/node/openflow:${IND}
+ \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
\ Log ${resp.content}
\ Should Be Equal As Strings ${resp.status_code} 200
\ Should Contain ${resp.content} flow-capable-node-connector-statistics
Check Every Nodes Nodeconnector
[Arguments] ${numnodes}
: FOR ${IND} IN RANGE 2 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/node/openflow:${IND}
+ \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
\ Log ${resp.content}
\ Should Be Equal As Strings ${resp.status_code} 200
\ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
*** Keywords ***
Verify Element Count
[Arguments] ${URI} ${xpath_location} ${expected_count}
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT} headers=${ACCEPT_XML}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT} headers=${ACCEPT_XML}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
${count}= Get Element Count ${resp.content} xpath=${xpath_location}
Verify LACP aggregator data is updated post link down scenario
[Documentation] Functionality will verify the node conenctor data on the lacp-agg api after link down scenario
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
Verify LACP RESTAPI Response Code for node ${resp}
Verify LACP RESTAPI connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1}
Should not Contain ${resp.content} ${node1}:${agg2-connector-id2}
Verify LACP aggregator data is updated post link up scenario
[Documentation] Functionality will verify the node connector data on the lacp-agg api after link up scenario
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
Verify LACP RESTAPI Response Code for node ${resp}
Verify LACP RESTAPI connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1}
Verify LACP RESTAPI connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id2}
Verify LACP Tags Are Formed
[Documentation] Fundamental Check That LACP is working
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}
+ ${resp} RequestsLibrary.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
Verify LACP Tags Are Formed
[Documentation] Fundamental Check That LACP is working
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}
+ ${resp} RequestsLibrary.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
*** Keywords ***
Reset Stats
- ${resp}= RequestsLibrary.Post Request session ${LFM_SB_RPC_API}:reset-stats
+ ${resp}= RequestsLibrary.Post Request session ${LFM_SB_RPC_API}:reset-stats
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
[Documentation] Add Pre-define Role
[Tags] Put
${body} OperatingSystem.Get File ${PREDEFINE_ROLE_FILE}
- ${resp} RequestsLibrary.Put session ${PREDEFINE_ROLE_URI} data=${body} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Put Request session ${PREDEFINE_ROLE_URI} data=${body} headers=${HEADERS_YANG_JSON}
Should Be Equal As Strings ${resp.status_code} 200
Add Pre-define Node
[Documentation] Add Pre-define Node
[Tags] Put
${body} OperatingSystem.Get File ${PREDEFINE_NODE_FILE}
- ${resp} RequestsLibrary.Put session ${PREDEFINE_NODE_URI} data=${body} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Put Request session ${PREDEFINE_NODE_URI} data=${body} headers=${HEADERS_YANG_JSON}
Should Be Equal As Strings ${resp.status_code} 200
Add Pre-define Connection
[Documentation] Add Pre-define Connection
[Tags] Put
${body} OperatingSystem.Get File ${PREDEFINE_CONNECTION_FILE}
- ${resp} RequestsLibrary.Put session ${PREDEFINE_CONNECTION_URI} data=${body} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Put Request session ${PREDEFINE_CONNECTION_URI} data=${body} headers=${HEADERS_YANG_JSON}
Should Be Equal As Strings ${resp.status_code} 200
Register Tenant
[Documentation] Register Tenant
[Tags] Post
${body} OperatingSystem.Get File ${REGISTER_TENANT_FILE}
- ${resp} RequestsLibrary.Post session ${REGISTER_TENANT_URI} data=${body} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Post Request session ${REGISTER_TENANT_URI} data=${body} headers=${HEADERS_YANG_JSON}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
*** 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
*** Test Cases ***
Get Controller Modules
[Documentation] Get the controller modules via Restconf
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ietf-restconf
*** Keywords ***
REST Get List of Intents
[Documentation] Get the list of intents configured
- ${resp} RequestsLibrary.Get session ${INTENT_CONTEXT}
+ ${resp} RequestsLibrary.Get Request session ${INTENT_CONTEXT}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} "intents"
[Return] ${resp.content}
REST Get Intent From Id
[Arguments] ${id}
[Documentation] Get the intent detail from id
- ${resp} RequestsLibrary.Get session ${INTENT_CONTEXT}/intent/${id}
+ ${resp} RequestsLibrary.Get Request session ${INTENT_CONTEXT}/intent/${id}
Log Json ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ${id}
${headers}= Create Dictionary Content-Type=application/json
${id}= Generate Random UUID
${data}= Catenate {"intent":{"id": "${id}","subjects":[{"order": 1,"end-point-group": {"name": "${intent_from}"}},{"order": 2,"end-point-group": { "name": "${intent_to}"}}],"actions": [{"order": 1,"${intent_permission}": {}}]}}
- ${resp} RequestsLibrary.Post session ${INTENT_CONTEXT} headers=${headers} data=${data}
+ ${resp} RequestsLibrary.Post Request session ${INTENT_CONTEXT} headers=${headers} data=${data}
Should Be Equal As Strings ${resp.status_code} 204
[Return] ${id}
[Documentation] Make an Intent and return the id of the new intent
${headers}= Create Dictionary Content-Type=application/json
${data}= Catenate {"intent":{"id": "${id}","subjects":[{"order": 1,"end-point-group": {"name": "${intent_from}"}},{"order": 2,"end-point-group": { "name": "${intent_to}"}}],"actions": [{"order": 1,"${intent_permission}": {}}]}}
- ${resp} RequestsLibrary.Put session ${INTENT_CONTEXT}/intent/${id} headers=${headers} data=${data}
+ ${resp} RequestsLibrary.Put Request session ${INTENT_CONTEXT}/intent/${id} headers=${headers} data=${data}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp}
REST Delete All Intents
[Documentation] Delete all of the Intents
${headers}= Create Dictionary Content-Type=application/json
- ${resp} RequestsLibrary.Delete session ${INTENT_CONTEXT} headers=${headers}
+ ${resp} RequestsLibrary.Delete Request session ${INTENT_CONTEXT} headers=${headers}
Log ${resp}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.content}
[Arguments] ${id}
[Documentation] Delete Intent by Id
${headers}= Create Dictionary Content-Type=application/json
- ${resp} RequestsLibrary.Delete session ${INTENT_CONTEXT}/intent/${id} headers=${headers}
+ ${resp} RequestsLibrary.Delete Request session ${INTENT_CONTEXT}/intent/${id} headers=${headers}
Log ${resp}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.content}