Add potassium stream keywords
[integration/test.git] / csit / libraries / LiveMigration.robot
1 *** Settings ***
2 Documentation       Live Migration Library, This can be used by Live Migration tests.
3
4 Library             SSHLibrary
5 Resource            DevstackUtils.robot
6 Resource            OpenStackOperations.robot
7 Resource            SSHKeywords.robot
8 Resource            ../variables/Variables.robot
9
10
11 *** Variables ***
12 ${NOVA_CPU_CONF}                    /etc/nova/nova-cpu.conf
13 ${NOVA_COMPUTE_SERVICE}             n-cpu
14 ${CMP_INSTANCES_DEFAULT_PATH}       /opt/stack/data/nova/instances
15
16
17 *** Keywords ***
18 Live Migration Suite Setup
19     [Documentation]    Suite Setup For Live Migration Tests
20     OpenStackOperations.OpenStack Suite Setup
21     LiveMigration.Setup Live Migration In Compute Nodes
22
23 Live Migration Suite Teardown
24     [Documentation]    Suite Teardown for Live Migration Tests
25     LiveMigration.UnSet Live Migration In Compute Nodes
26     OpenStackOperations.OpenStack Suite Teardown
27
28 Setup Live Migration In Compute Nodes
29     [Documentation]    Set instances to be created in the shared directory.
30     FOR    ${conn_id}    IN    @{OS_CMP_CONN_IDS}
31         OpenStackOperations.Modify OpenStack Configuration File
32         ...    ${conn_id}
33         ...    ${NOVA_CPU_CONF}
34         ...    DEFAULT
35         ...    instances_path
36         ...    ${CMP_INSTANCES_SHARED_PATH}
37         OpenStackOperations.Restart DevStack Service    ${conn_id}    ${NOVA_COMPUTE_SERVICE}
38     END
39
40 UnSet Live Migration In Compute Nodes
41     [Documentation]    Clear settings done for Live Migration
42     FOR    ${conn_id}    IN    @{OS_CMP_CONN_IDS}
43         OpenStackOperations.Modify OpenStack Configuration File
44         ...    ${conn_id}
45         ...    ${NOVA_CPU_CONF}
46         ...    DEFAULT
47         ...    instances_path
48         ...    ${CMP_INSTANCES_DEFAULT_PATH}
49         OpenStackOperations.Restart DevStack Service    ${conn_id}    ${NOVA_COMPUTE_SERVICE}
50     END