Define Suite Setup and Suite Teardown
[integration/test.git] / csit / suites / openstack / neutron / __init__.robot
1 *** Settings ***
2 Documentation     Test suite for Neutron Plugin
3 Suite Setup       Start Suite
4 Suite Teardown    Stop Suite
5 Library           SSHLibrary
6 Library           Collections
7 Library           RequestsLibrary
8 Library           ../../../libraries/Common.py
9 Variables         ../../../variables/Variables.py
10
11 *** Variables ***
12 ${UserInfo}       {"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}
13
14 *** Keywords ***
15 Start Suite
16     Create Session    KeyStoneSession    http://${OPENSTACK}:5000    headers=${HEADERS}
17     ${resp}    post    KeyStoneSession    /v2.0/tokens    ${UserInfo}
18     Should Be Equal As Strings    ${resp.status_code}    200
19     ${result}    To JSON    ${resp.content}
20     ${result}    Get From Dictionary    ${result}    access
21     ${result}    Get From Dictionary    ${result}    token
22     ${TOKEN}    Get From Dictionary    ${result}    id
23     ${X-AUTH}    Create Dictionary    X-Auth-Token=${TOKEN}    Content-Type=application/json
24     Set Global Variable    ${X-AUTH}
25
26 Stop Suite
27     Delete All Sessions