7af0ca1f45ffddd7333f7c5de16b16a6ff17ab05
[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 Suite Setup       Setup Didm Environment
10 Suite Teardown    Delete All Sessions
11 Library           SSHLibrary
12 Library           Collections
13 Library           OperatingSystem
14 Library           RequestsLibrary
15 Library           ../../../libraries/Common.py
16 Resource          ../../../libraries/KarafKeywords.robot
17 Resource          ../../../libraries/Utils.robot
18 Variables         ../../../variables/Variables.py
19
20 *** Variables ***
21 ${DIDM_ID}        "didm-identification:device-type"
22 ${DEVICE_TYPE}    "mininet-didm:mininet-device-type"
23
24 *** Test Cases ***
25 Verify Device Identification
26     [Documentation]    Verification of Device type identification feature with device driver installed.
27     [Tags]    DIDM
28     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
29     Should Be Equal As Strings    ${resp.status_code}    200
30     Should Contain    ${resp.content}    ${DIDM_ID}
31     Should Contain    ${resp.content}    ${DEVICE_TYPE}
32
33 *** Keywords ***
34 Setup Didm Environment
35     [Documentation]    Installing DIDM related features, mininet driver, hp3800 driver
36     ...    creating session to retrieve operational opendaylight inventory nodes
37     Install a Feature    odl-didm-identification-api
38     Install a Feature    odl-didm-identification
39     Install a Feature    odl-didm-drivers-api
40     Install a Feature    odl-didm-mininet
41     Install a Feature    odl-hp3800
42     Start Suite
43     Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}