[Arguments] ${controller_ip} ${auth_data}
[Documentation] Makes a POST REST call to the AUTH_TOKEN_API with the given auth_data and returns the response
Create Session ODL_SESSION http://${controller_ip}:8181
- ${headers}= Create Dictionary Content-Type application/x-www-form-urlencoded
+ ${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= RequestsLibrary.POST ODL_SESSION ${AUTH_TOKEN_API} data=${auth_data} headers=${headers}
Delete All Sessions
[Return] ${resp}
Revoke Auth Token
[Arguments] ${token}
[Documentation] Requests the given token be revoked via POST to ${REVOKE_TOKEN_API}
- ${headers}= Create Dictionary Content-Type application/x-www-form-urlencoded
+ ${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= RequestsLibrary.POST ODL_SESSION ${REVOKE_TOKEN_API} data=${token} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 204
[Documentation] Will return user information. If no user id is passed, it will retrieve all users in DB
[Arguments] ${user_id}=${EMPTY}
Create Session httpbin http://${CONTROLLER}:${RESTPORT}
- ${headers}= Create Dictionary Content-Type application/x-www-form-urlencoded
+ ${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= RequestsLibrary.GET httpbin ${idmurl}/users/${user_id} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
[Documentation] Will return user information. If no user id is passed, it will retrieve all users in DB
[Arguments] ${user_data}
Create Session httpbin http://${CONTROLLER}:${RESTPORT}
- ${headers}= Create Dictionary Content-Type application/json
+ ${headers}= Create Dictionary Content-Type=application/json
${resp}= RequestsLibrary.POST httpbin ${idmurl}/users headers=${headers} data=${user_data}
Should Be Equal As Strings ${resp.status_code} 201
Log ${resp.content}
Log Flow XML is ${flow.xml}
write dpctl dump-flows -O OpenFlow13
${switchoutput} Read Until >
- ${headers}= Create Dictionary Content-Type application/yang.data+xml
+ ${headers}= Create Dictionary Content-Type=application/yang.data+xml
${resp} RequestsLibrary.Post session restconf/operations/sal-flow:remove-flow data=${flow.xml} headers=${headers}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
[Arguments] ${expvalue}
[Documentation] Checks the config store for given flow. Returns True if present, otherwise returns False
... This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
- ${headers}= Create Dictionary Accept application/xml
+ ${headers}= Create Dictionary Accept=application/xml
${resp}= RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers}
Log ${resp}
Log ${resp.content}
[Arguments] ${expvalue}
[Documentation] Checks the operational store for given flow. Returns True if present, otherwise returns False
... This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
- ${headers}= Create Dictionary Accept application/xml
+ ${headers}= Create Dictionary Accept=application/xml
${resp}= RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id} headers=${headers}
Log ${resp}
Log ${resp.content}
Make REST Transaction
[Arguments] ${expected_status_code} ${auth_data}=${EMPTY}
Create Session ODL_SESSION http://${CONTROLLER}:8181
- ${headers}= Create Dictionary Content-Type application/x-www-form-urlencoded
+ ${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
Run Keyword If "${auth_data}" != "${EMPTY}" Set To Dictionary ${headers} Authorization Bearer ${auth_data}
${resp}= RequestsLibrary.GET ODL_SESSION ${OPERATIONAL_NODES_API} headers=${headers}
Log STATUS_CODE: ${resp.status_code} CONTENT: ${resp.content}
Should Be Equal ${expected} ${presence_flow} msg=${msgf}
Flow Presence Config Flow
- ${headers}= Create Dictionary Accept application/xml
+ ${headers}= Create Dictionary Accept=application/xml
${resp}= RequestsLibrary.Get session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers}
Log ${resp}
Log ${resp.content}
Should Be Equal ${expected} ${presence_table} msg=${msgf}
Flow Presence Operational Table
- ${headers}= Create Dictionary Accept application/xml
+ ${headers}= Create Dictionary Accept=application/xml
${resp}= RequestsLibrary.Get session /restconf/operational/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id} headers=${headers}
Log ${resp}
Log ${resp.content}
Get Controller Response
[Arguments] ${session} ${url}
- ${headers}= Create Dictionary Accept application/xml
+ ${headers}= Create Dictionary Accept=application/xml
${resp}= Get ${session} ${url} headers=${headers}
Return From Keyword ${resp}
Post TSDR Configuration Interval
[Arguments] ${interval}
[Documentation] Configuration TSDR collection interval ${interval}
- ${p1} Create Dictionary interval ${interval}
- ${p2} Create Dictionary input ${p1}
- ${post_data} Create Dictionary setPollingInterval ${p2}
+ ${p1} Create Dictionary interval=${interval}
+ ${p2} Create Dictionary input=${p1}
+ ${post_data} Create Dictionary setPollingInterval=${p2}
Log ${post_data}
${resp} RequestsLibrary.Post session ${OPER_INTERVAL} ${post_data}
Should Be Equal As Strings ${resp.status_code} 201
Add a subnet
[Documentation] Add a subnet, list to validate the result.
[Tags] add
- ${body} Create Dictionary name ${name} subnet 10.0.0.254/8
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} subnet=10.0.0.254/8
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/subnet/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error
Remove a subnet
[Documentation] Remove a subnet, list to validate the result.
[Tags] remove
- ${body} Create Dictionary name ${name} subnet 10.0.0.254/8
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} subnet=10.0.0.254/8
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/subnet/${name}
Should Be Equal As Strings ${resp.status_code} 204 Response status code error
[Documentation] Add a container, list to validate the result.
[Tags] add
${flowspecs} Convert To List ${EMPTY}
- ${body} Create Dictionary container ${name} flowSpecs ${flowspecs} staticVlan
- ... 10 nodeConnectors ${nodeconnectors}
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary container=${name} flowSpecs=${flowspecs} staticVlan=10
+ ... nodeConnectors=${nodeconnectors}
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/container/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error
[Documentation] Remove a container, list to validate the result.
[Tags] remove
${flowspecs} Convert To List ${EMPTY}
- ${body} Create Dictionary container ${name} flowSpecs ${flowspecs} staticVlan
- ... 10 nodeConnectors ${nodeconnectors}
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary container=${name} flowSpecs=${flowspecs} staticVlan=10
+ ... nodeConnectors=${nodeconnectors}
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Delete session ${REST_CONTEXT}/container/${name}
Should Be Equal As Strings ${resp.status_code} 204 Response status code error
Add a static route
[Documentation] Add a static route, list to validate the result.
[Tags] add
- ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
- ... 10.0.0.2
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} prefix=192.168.1.0/24 nextHop=10.0.0.2
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error
Remove a subnet
[Documentation] Remove a subnet, list to validate the result.
[Tags] remove
- ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
- ... 10.0.0.2
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} prefix=192.168.1.0/24 nextHop=10.0.0.2
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
Should Be Equal As Strings ${resp.status_code} 204 Response status code error
Add a flow
[Documentation] Add a flow, list to validate the result.
[Tags] add
- ${node} Create Dictionary type OF id ${node_id}
+ ${node} Create Dictionary type=OF id=${node_id}
${actions} Create List OUTPUT=1
- ${body} Create Dictionary name ${name} installInHw true node
- ... ${node} priority 1 etherType 0x800 nwDst
- ... 10.0.0.1/32 actions ${actions}
+ ${body} Create Dictionary name=${name} installInHw=true node=${node}
+ ... priority=1 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
${headers} Create Dictionary Content-Type application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
Remove a flow
[Documentation] Remove a flow, list to validate the result.
[Tags] remove
- ${node} Create Dictionary type OF id ${node_id}
+ ${node} Create Dictionary type=OF id=${node_id}
${actions} Create List OUTPUT=1
- ${body} Create Dictionary name ${name} installInHw true node
- ... ${node} priority 1 etherType 0x800 nwDst
- ... 10.0.0.1/32 actions ${actions}
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} installInHw=true node=${node}
+ ... priority=1 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
Should Be Equal As Strings ${resp.status_code} 204 Response status code error
Add a host
[Documentation] Add a host, list to validate the result.
[Tags] add
- ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
- ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary nodeType=OF dataLayerAddress=5e:bf:79:84:10:a6
+ ... vlan=1 nodeId=00:00:00:00:00:00:00:03 nodeConnectorId=9
+ ... networkAddress=10.0.1.4 staticHost=${True} nodeConnectorType=OF
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/address/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error
Remove a host
[Documentation] Remove a host, list to validate the result.
[Tags] remove
- ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
- ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary nodeType=OF dataLayerAddress=5e:bf:79:84:10:a6
+ ... vlan=1 nodeId=00:00:00:00:00:00:00:03 nodeConnectorId=9
+ ... networkAddress=10.0.1.4 staticHost=${True} nodeConnectorType=OF
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/address/${name}
Should Be Equal As Strings ${resp.status_code} 204 Response status code error
${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodes
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
${result} TO JSON ${resp.content}
- ${node} Create Dictionary id ${node_id} type ${node_type}
+ ${node} Create Dictionary id=${node_id} type=${node_type}
${content} Extract All Nodes ${result}
Log ${content}
List Should Contain Value ${content} ${node}
Log ${result}
${nodes} Extract All Nodes ${result}
${property_values} Extract Node Property Values ${result} ${property}
- ${node} Create Dictionary id ${node_id} type ${node_type}
- ${property_value} Create Dictionary value ${value}
+ ${node} Create Dictionary id=${node_id} type=${node_type}
+ ${property_value} Create Dictionary value=${value}
Log ${property_value}
List Should Contain Value ${nodes} ${node}
List Should Contain Value ${property_values} ${property_value}
Log ${result}
${nodes} Extract All Nodes ${result}
${properties} Extract Node Property Values ${result} ${property}
- ${node} Create Dictionary id ${node_id} type ${node_type}
- ${property} Create Dictionary value ${value}
+ ${node} Create Dictionary id=${node_id} type=${node_type}
+ ${property} Create Dictionary value=${value}
Log ${property}
List Should Contain Value ${nodes} ${node}
List Should Not Contain Value ${properties} ${property}
Log ${result}
${property_values} Extract Nodeconnector Property Values ${result} ${property}
Log ${property_values}
- ${property_value} Create Dictionary value ${value}
+ ${property_value} Create Dictionary value=${value}
List Should Contain Value ${property_values} ${property_value}
Nodeconnector property should not exist
Log ${result}
${property_values} Extract Nodeconnector Property Values ${result} ${property}
Log ${property_values}
- ${property_value} Create Dictionary value ${value}
+ ${property_value} Create Dictionary value=${value}
List Should not Contain Value ${property_values} ${property_value}
List all nodeconnectors of node
Add a userlink
[Documentation] Add a userlink, list to validate the result.
[Tags] add
- ${body} Create Dictionary name ${name} status Success srcNodeConnector
- ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} status=Success
+ ... srcNodeConnector=OF|1@OF|00:00:00:00:00:00:00:02
+ ... dstNodeConnector=OF|1@OF|00:00:00:00:00:00:00:03
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error
Remove a userlink
[Documentation] Remove a userlink, list to validate the result.
[Tags] remove
- ${body} Create Dictionary name ${name} status Success srcNodeConnector
- ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} status=Success
+ ... srcNodeConnector=OF|1@OF|00:00:00:00:00:00:00:02
+ ... dstNodeConnector=OF|1@OF|00:00:00:00:00:00:00:03
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/userLink/${name}
Should Be Equal As Strings ${resp.status_code} 204 Response status code error
Add a flow in C1
[Documentation] Adding a flow, list to validate the result in C1
[Tags] add
- ${node} Create Dictionary type OF id ${node_id}
+ ${node} Create Dictionary type=OF id=${node_id}
${actions} Create List OUTPUT=1
- ${body} Create Dictionary name ${name} installInHw true node
- ... ${node} priority 1 etherType 0x800 nwDst
- ... 10.0.0.1/32 actions ${actions}
+ ${body} Create Dictionary name=${name} installInHw=true node=${node}
+ ... priority=1 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
Create Session session http://${Controller1_IP}:8080 auth=${AUTH} headers=${HEADERS}
${resp} Put session ${REST_CONTEXT_P}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201
the system is working with C1 and C2
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller1_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Should Contain X Times ${resp.content} ${nodeconn3} 2
Should Contain X Times ${resp.content} ${nodeconn4} 2
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller2_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
the system is working with C2
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller2_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
the system is working with C1
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller1_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
the system is working with C1 and C2
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller1_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Should Contain X Times ${resp.content} ${nodeconn3} 2
Should Contain X Times ${resp.content} ${nodeconn4} 2
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller2_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
a flow is installed in a bridge
- ${node} Create Dictionary type OF id ${node_id}
+ ${node} Create Dictionary type=OF id=${node_id}
${actions} Create List OUTPUT=1
- ${body} Create Dictionary name ${name} installInHw true node
- ... ${node} priority 995 etherType 0x800 nwDst
- ... 10.0.0.1/32 actions ${actions}
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} installInHw=true node=${node}
+ ... priority=995 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller1_IP}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error
C1 see the flow
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller1_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT_2}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
C2 see the flow
- ${headers} Create Dictionary Content-Type application/json
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller2_IP}:8080 headers=${headers} auth=${auth}
${resp} Get session ${REST_CONTEXT_2}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
a flow is installed in a bridge
- ${node} Create Dictionary type OF id ${node_id}
+ ${node} Create Dictionary type=OF id=${node_id}
${actions} Create List OUTPUT=1
- ${body} Create Dictionary name ${name} installInHw true node
- ... ${node} priority 999 etherType 0x800 nwDst
- ... 10.0.0.1/32 actions ${actions}
- ${headers} Create Dictionary Content-Type application/json
+ ${body} Create Dictionary name=${name} installInHw=true node=${node}
+ ... priority=999 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
+ ${headers} Create Dictionary Content-Type=application/json
Create Session session http://${Controller1_IP}:8080 headers=${headers} auth=${auth}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
Should Be Equal As Strings ${resp.status_code} 201 Response status code error