2 Documentation Openstack library. This library is useful for tests to create network, subnet, router and vm instances
6 Library OperatingSystem
7 Resource SystemUtils.robot
8 Resource ../variables/Variables.robot
9 Resource ../variables/netvirt/Variables.robot
10 Variables ../variables/netvirt/Modules.py
15 [Documentation] Open SSh Connection and disable selinux
16 [Arguments] ${node_ip} ${user_name} ${password} ${prompt}
17 ${connection}= Get Ssh Connection ${node_ip} ${user_name} ${password} ${prompt}
18 Disable SeLinux Tempororily ${connection}
21 Get All Ssh Connections
22 [Documentation] Open All SSH Connections.
23 IF 0 < ${NUM_CONTROL_NODES}
24 Setup Basic Ssh ${OS_CONTROL_1_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
26 IF 2 < ${NUM_CONTROL_NODES}
27 Setup basic Ssh ${OS_CONTROL_2_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
29 IF 2 < ${NUM_CONTROL_NODES}
30 Setup basic Ssh ${OS_CONTROL_3_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
32 IF 3 < ${NUM_CONTROL_NODES}
33 Setup basic Ssh ${OS_CONTROL_4_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
35 IF 4 < ${NUM_CONTROL_NODES}
36 Setup basic Ssh ${OS_CONTROL_5_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
38 IF 2 < ${NUM_CONTROL_NODES}
39 Setup basic Ssh ${HAPROXY_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
41 IF 0 < ${NUM_COMPUTE_NODES}
42 Setup basic Ssh ${OS_COMPUTE_1_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
44 IF 1 < ${NUM_COMPUTE_NODES}
45 Setup basic Ssh ${OS_COMPUTE_2_IP} ${OS_USER} ${OS_USER_PASSWORD} ${OS_NODE_PROMPT}
48 Enable Live Migration In A Node
49 [Arguments] ${compute_cxn}
50 Switch Connection ${compute_cxn}
51 Crudini Edit ${compute_cxn} /etc/libvirt/libvirtd.conf '' listen_tls 0
52 Crudini Edit ${compute_cxn} /etc/libvirt/libvirtd.conf '' listen_tcp 0
53 Crudini Edit ${compute_cxn} /etc/libvirt/libvirtd.conf '' auth_tcp '"none"'
56 ... /etc/nova/nova.conf
59 ... '/var/lib/nova/instances_live_migration'
60 Restart Service ${compute_cxn} openstack-nova-compute libvirtd
62 Enable Live Migration In All Compute Nodes
63 [Documentation] Enables Live Migration in all computes
64 ${compute_1_cxn}= Setup Basic Ssh ${OS_COMPUTE_1_IP} jenkins '' '>'
65 Enable Live Migration In A Node ${compute_1_cxn}
66 ${compute_2_cxn}= Setup Basic Ssh ${OS_COMPUTE_2_IP} jenkins '' '>'
67 Enable Live Migration In A Node ${compute_2_cxn}
70 [Arguments] ${control_node_cxn}
71 Enable Service ${control_node_cxn} httpd
72 Start Service ${control_node_cxn} httpd
73 Start Service ${control_node_cxn} openstack-glance-api openstack-glance-registry
75 ... ${control_node_cxn}
76 ... openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.servi
77 ... ce openstack-nova-novncproxy.service
80 ... sudo ovs-vsctl set-manager tcp:${OS_CONTROL_1_IP}:6640 tcp:${OS_CONTROL_2_IP}:6640 tcp:${OS_CONTROL_3_IP}:6640 tcp:${OS_CONTROL_4_IP}:6640 tcp:${OS_CONTROL_5_IP}:6640
82 ... ${control_node_cxn}
83 ... neutron-server.service neutron-dhcp-agent.service neutron-metadata-agent.service