Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / didm / basic / 010_Didm.robot
1 *** Settings ***
2 Documentation       Basic Tests for Device Identification and Driver Management.
3 ...
4 ...                 Copyright (c) 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
5 ...
6 ...                 This program and the accompanying materials are made available under the
7 ...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...                 and is available at http://www.eclipse.org/legal/epl-v10.html
9
10 Library             SSHLibrary
11 Library             Collections
12 Library             OperatingSystem
13 Library             RequestsLibrary
14 Library             ../../../libraries/Common.py
15 Resource            ../../../libraries/KarafKeywords.robot
16 Resource            ../../../libraries/Utils.robot
17 Variables           ../../../variables/Variables.py
18
19 Suite Setup         Setup Didm Environment
20 Suite Teardown      Delete All Sessions
21
22
23 *** Variables ***
24 ${DIDM_ID}          "didm-identification:device-type"
25 ${DEVICE_TYPE}      "mininet-didm:mininet-device-type"
26
27
28 *** Test Cases ***
29 Verify Device Identification
30     [Documentation]    Verification of Device type identification feature with device driver installed.
31     [Tags]    didm
32     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
33     Should Be Equal As Strings    ${resp.status_code}    200
34     Should Contain    ${resp.content}    ${DIDM_ID}
35     Should Contain    ${resp.content}    ${DEVICE_TYPE}
36
37
38 *** Keywords ***
39 Setup Didm Environment
40     [Documentation]    Installing DIDM related features, mininet driver, hp3800 driver
41     ...    creating session to retrieve operational opendaylight inventory nodes
42     Install a Feature    odl-didm-identification-api
43     Install a Feature    odl-didm-identification
44     Install a Feature    odl-didm-drivers-api
45     Install a Feature    odl-didm-mininet
46     Install a Feature    odl-hp3800
47     Start Mininet
48     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}