+++ /dev/null
-*** Settings ***
-Documentation Test suite for the container manager module.
-Suite Teardown Delete All Sessions
-Library Collections
-Library RequestsLibrary
-Library ../../libraries/Common.py
-Variables ../../variables/Variables.py
-
-*** Variables ***
-${name} test_container1
-@{nodeconnectors} OF|1@OF|00:00:00:00:00:00:00:01 OF|23@OF|00:00:00:00:00:00:20:21
-${key} containerConfig
-${REST_CONTEXT} /controller/nb/v2/containermanager
-
-*** Test Cases ***
-Add a container
- [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
- 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
- ${resp} Get session ${REST_CONTEXT}/containers
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
-
-Remove a container
- [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
- 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
- ${resp} Get session ${REST_CONTEXT}/containers
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}