- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ Should Contain ${resp.content} "node-id":"openflow:${switch}"
- \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:1"
- \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:2"
- \ Should Contain ${resp.content} "source-tp":"openflow:${switch}:2"
- \ Should Contain ${resp.content} "dest-tp":"openflow:${switch}:2"
- \ ${edge} Evaluate ${switch}==1 or ${switch}==${switches}
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "tp-id":"openflow:${switch}:3"
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "source-tp":"openflow:${switch}:3"
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "dest-tp":"openflow:${switch}:3"
+ [Arguments] ${switches}
+ ${resp}= RequestsLibrary.GET On Session session url=${RFC8040_OPERATIONAL_TOPO_API} expected_status=200
+ Log ${resp.text}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ Should Contain ${resp.text} "node-id":"openflow:${switch}"
+ Should Contain ${resp.text} "tp-id":"openflow:${switch}:1"
+ Should Contain ${resp.text} "tp-id":"openflow:${switch}:2"
+ Should Contain ${resp.text} "source-tp":"openflow:${switch}:2"
+ Should Contain ${resp.text} "dest-tp":"openflow:${switch}:2"
+ ${edge}= Evaluate ${switch}==1 or ${switch}==${switches}
+ IF not ${edge}
+ Should Contain ${resp.text} "tp-id":"openflow:${switch}:3"
+ END
+ IF not ${edge}
+ Should Contain ${resp.text} "source-tp":"openflow:${switch}:3"
+ END
+ IF not ${edge}
+ Should Contain ${resp.text} "dest-tp":"openflow:${switch}:3"
+ END
+ END