17a8771a881e42794c8b91dad61913d48c2bd08e
[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 ${OSTENANTNAME}    "admin"
13 ${OSUSERNAME}     "admin"
14 ${OSPASSWORD}     "admin"
15 ${UserInfo}       {"auth": {"tenantName": ${OSTENANTNAME}, "passwordCredentials": {"username": ${OSUSERNAME}, "password": ${OSPASSWORD}}}}
16
17 *** Keywords ***
18 Start Suite
19     Create Session    KeyStoneSession    http://${KEYSTONE}:5000    headers=${HEADERS}
20     ${resp}    post    KeyStoneSession    /v2.0/tokens    ${UserInfo}
21     Should Be Equal As Strings    ${resp.status_code}    200
22     ${result}    To JSON    ${resp.content}
23     ${result}    Get From Dictionary    ${result}    access
24     ${result}    Get From Dictionary    ${result}    token
25     ${TOKEN}    Get From Dictionary    ${result}    id
26     ${X-AUTH}    Create Dictionary    X-Auth-Token=${TOKEN}    Content-Type=application/json
27     ${X-AUTH-NOCONTENT}    Create Dictionary    X-Auth-Token=${TOKEN}
28     Set Global Variable    ${X-AUTH}
29     Set Global Variable    ${X-AUTH-NOCONTENT}
30
31 Stop Suite
32     Delete All Sessions