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