Migrate request invocations (controller)
[integration/test.git] / csit / libraries / IoTDM / IoTDMKeywords.robot
1 *** Settings ***
2 Documentation       Keywords specific for IoTDM test suites.
3
4 Library             ./criotdm.py
5 Library             OperatingSystem
6 Library             iotdm_comm.py
7
8
9 *** Keywords ***
10 IOTDM Basic Suite Setup
11     [Documentation]    Set up basic test suite
12     [Arguments]    ${odl_ip_address}    ${odl_user_name}    ${odl_password}
13     ${iserver} =    Connect To Iotdm    ${odl_ip_address}    ${odl_user_name}    ${odl_password}    http
14     Set Suite Variable    ${iserver}
15
16 Resolve Local Ip Address
17     [Documentation]    Retrieve list of IP addresses of local host, try to find IP address accessible from the
18     ...    host where tested ODL system is running and set it as global variable named local_ip
19     ${ip_list} =    OperatingSystem.Run    hostname -I
20     Log    iotdm_ip: ${ODL_SYSTEM_1_IP}
21     Log    hostname -I: ${ip_list}
22     ${local_ip} =    Get Local Ip From List    ${ODL_SYSTEM_1_IP}    ${ip_list}
23     Set Global Variable    ${local_ip}
24     Log    local_ip: ${local_ip}
25
26 Connect And Provision cseBase
27     [Documentation]    Connects to IoTDM RESTCONF interface and provisions cseBase resource InCSE1
28     Connect To Iotdm    ${ODL_SYSTEM_1_IP}    ${ODL_RESTCONF_USER}    ${ODL_RESTCONF_PASSWORD}
29
30 Clear The Resource Tree
31     [Documentation]    Connects to IoTDM RESTCONF interface and clears whole resource tree
32     Kill The Tree    ${ODL_SYSTEM_1_IP}    InCSE1    ${ODL_RESTCONF_USER}    ${ODL_RESTCONF_PASSWORD}