Copy dhcp files 57/66357/8
authorSam Hague <shague@redhat.com>
Mon, 11 Dec 2017 21:25:55 +0000 (16:25 -0500)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 13 Dec 2017 07:05:36 +0000 (07:05 +0000)
Depends-on: https://git.opendaylight.org/gerrit/66364

Change-Id: Ib222fee32b0a53e4a6186cd0618c25d8a76b6e62
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/OpenStackOperations.robot
csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot

index 95dddbeeb1e1c02bed35c6557d445a4700db5236..106fdcd4d2961fdedf95ec42410ce77424d3f478 100644 (file)
@@ -384,6 +384,7 @@ Get VM IPs
     \    BuiltIn.Run Keyword If    "${status}" == "FAIL"    Collections.Append To List    ${vm_ips}    None
     \    ${rc}    ${vm_console_output}=    BuiltIn.Run Keyword If    "${status}" == "FAIL"    Run And Return Rc And Output    openstack console log show ${vm}
     \    BuiltIn.Run Keyword If    "${status}" == "FAIL"    BuiltIn.Log    ${vm_console_output}
+    Copy DHCP Files From Control Node
     [Return]    @{vm_ips}    ${ips_and_console_log[1]}
 
 Collect VM IPv6 SLAAC Addresses
@@ -1198,3 +1199,13 @@ OpenStack Suite Teardown
     ...    benefit automatically.
     OpenStack Cleanup All
     SSHLibrary.Close All Connections
+
+Copy DHCP Files From Control Node
+    [Documentation]    Copy the current DHCP files to the robot vm. The keyword must be called
+    ...    after the subnet(s) are created and before the subnet(s) are deleted.
+    ${suite_} =    BuiltIn.Evaluate    """${SUITE_NAME}""".replace(" ","_").replace("/","_").replace(".","_")
+    ${dstdir} =    Set Variable    /tmp/qdhcp/${suite_}
+    OperatingSystem.Create Directory    ${dstdir}
+    Get ControlNode Connection
+    BuiltIn.Run Keyword And Ignore Error    SSHLibrary.Get Directory    /opt/stack/data/neutron/dhcp    ${dstdir}    recursive=True
+    SSHLibrary.Close Connection
index 366f185a9d7b1525e1349895b22ac750cd304bc0..692c5a9bd7ff4690bee31c115d2fa27b2bbdf473 100644 (file)
@@ -111,6 +111,7 @@ Create Nova VMs
     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
     \    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    @{VM_IPS}[${index}]    None
     \    Run Keyword If    '${status}' == 'FAIL'    DevstackUtils.Write Commands Until Prompt    openstack console log show @{VM_INSTANCES}[${index}]    30s
+    OpenStackOperations.Copy DHCP Files From Control Node
     BuiltIn.Set Suite Variable    ${VM_IP_NET10}
     BuiltIn.Set Suite Variable    ${VM_IP_NET20}
     BuiltIn.Should Not Contain    ${VM_IP_NET10}    None