Support for cirros-0.4.0 password 12/91512/7
authorSrinivas Rachakonda <srinivas.rachakonda@gmail.com>
Tue, 21 Jul 2020 19:40:51 +0000 (01:10 +0530)
committerJamo Luhrsen <jluhrsen@gmail.com>
Wed, 22 Jul 2020 16:46:32 +0000 (16:46 +0000)
The password for cirros-0.4.0-x86_64-disk.img (and higher
cirros version images) is gocubsgo.
OpenstackOperation.robot takes cirros as username and
password as cubswin:).
So there is need to add two more arguments user=cirros and
password=gocubsgo.

The default passowrd will be changed in all library files once
we move to Openstack Stein on wards.

Signed-off-by: Srinivas Rachakonda <srinivas.rachakonda@gmail.com>
Change-Id: I92ac6c79caedc465412363d890d6e7c0c639d025

csit/libraries/OpenStackOperations.robot
csit/suites/l2gw/01_Configure_verify_l2gateway.robot
csit/variables/netvirt/Variables.robot

index e47cef60b642cdf629b8ec74cee2c10dd7d642a6..e6cfb6bd643660541a0a3872fbec9a892af5574e 100644 (file)
@@ -389,8 +389,9 @@ Check If Instance Is Ready For Ssh Login Using PublicKey
     BuiltIn.Should Contain    ${output}    ${vm_ip}
 
 Check If Instance Is Ready For Ssh Login Using Password
-    [Arguments]    ${net_name}    ${vm_ip}    ${user}=cirros    ${password}=cubswin:)    ${console}=cirros
+    [Arguments]    ${net_name}    ${vm_ip}    ${user}=cirros    ${password}=${EMPTY}    ${console}=cirros
     [Documentation]    Ensure the VM is reachable from ssh as tests would require. This keyword will use password authentication
+    ${password}    BuiltIn.Set Variable If    "${password}"=="${EMPTY}"    ${PASSWORD_CIRROS_${OPENSTACK_BRANCH}}
     ${output} =    Execute Command on VM Instance    ${net_name}    ${vm_ip}    ifconfig    ${user}    ${password}
     ...    console=${console}
     BuiltIn.Should Contain    ${output}    ${vm_ip}
@@ -539,9 +540,10 @@ Check Metadata Access
     BuiltIn.Should Contain    ${output}    200
 
 Execute Command on VM Instance
-    [Arguments]    ${net_name}    ${vm_ip}    ${cmd}    ${user}=cirros    ${password}=cubswin:)    ${cmd_timeout}=30s
+    [Arguments]    ${net_name}    ${vm_ip}    ${cmd}    ${user}=cirros    ${password}=${EMPTY}    ${cmd_timeout}=30s
     ...    ${console}=cirros
     [Documentation]    Login to the vm instance using ssh in the network, executes a command inside the VM and returns the ouput.
+    ${password}    BuiltIn.Set Variable If    "${password}"=="${EMPTY}"    ${PASSWORD_CIRROS_${OPENSTACK_BRANCH}}
     OpenStackOperations.Get ControlNode Connection
     ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
     ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh ${user}@${vm_ip} -o MACs=hmac-sha1 -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=password    password:
@@ -571,9 +573,10 @@ Copy File To VM Instance With PublicKey Auth
     BuiltIn.Should Be True    '${rc}' == '0'
 
 Test Operations From Vm Instance
-    [Arguments]    ${net_name}    ${src_ip}    ${dest_ips}    ${user}=cirros    ${password}=cubswin:)    ${ttl}=64
+    [Arguments]    ${net_name}    ${src_ip}    ${dest_ips}    ${user}=cirros    ${password}=${EMPTY}    ${ttl}=64
     ...    ${ping_should_succeed}=True    ${check_metadata}=True    ${console}=cirros    ${ping_tries}=3
     [Documentation]    Login to the vm instance using ssh in the network.
+    ${password}    BuiltIn.Set Variable If    "${password}"=="${EMPTY}"    ${PASSWORD_CIRROS_${OPENSTACK_BRANCH}}
     OpenStackOperations.Get ControlNode Connection
     ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
     ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh -o MACs=hmac-sha1 -o ConnectTimeout=5 -o StrictHostKeyChecking=no ${user}@${src_ip} -o UserKnownHostsFile=/dev/null    password:    10s
@@ -596,8 +599,9 @@ Test Operations From Vm Instance
 
 Test Netcat Operations From Vm Instance
     [Arguments]    ${net_name}    ${vm_ip}    ${dest_ip}    ${additional_args}=${EMPTY}    ${port}=12345    ${user}=cirros
-    ...    ${password}=cubswin:)
+    ...    ${password}=${EMPTY}
     [Documentation]    Use Netcat to test TCP/UDP connections to the controller
+    ${password}    BuiltIn.Set Variable If    "${password}"=="${EMPTY}"    ${PASSWORD_CIRROS_${OPENSTACK_BRANCH}}
     ${client_data}    BuiltIn.Set Variable    Test Client Data
     ${server_data}    BuiltIn.Set Variable    Test Server Data
     OpenStackOperations.Get ControlNode Connection
index 9f4af485a6c043dcf2eedacf308977756a41bdc0..91398b3258ca4919a20f08fb945fc83afc1b5e1f 100644 (file)
@@ -69,7 +69,7 @@ TC06 Dhcp Ip Allocation For Hwvtep Tap Port
 TC07 Verify Ping From Compute Node Vm To Hwvtep
     [Documentation]    Verify that VM on Compute Node can ping HWVTEP port
     ${output}=    Wait Until Keyword Succeeds    60s    10s    Execute Command on VM Instance    ${NET_1}    ${port_ip_list[0]}
-    ...    ping -c 3 ${port_ip_list[1]}    cirros    gocubsgo
+    ...    ping -c 3 ${port_ip_list[1]}
     Log    ${output}
     Should Not Contain    ${output}    ${PACKET_LOSS}
     ${src_mac_list}=    Create List    ${port_mac_list[0]}
index 429420664f747716afe8991ed6c39d44590aa5d9..e29d7fdfcfab62a2ed30a66236f154bb726301b4 100644 (file)
@@ -7,6 +7,9 @@ Documentation     Variables for Netvirt Test Suites
 ${CIRROS_stable/queens}    cirros-0.3.5-x86_64-disk
 ${CIRROS_stable/rocky}    cirros-0.3.5-x86_64-disk
 ${CIRROS_stable/stein}    cirros-0.4.0-x86_64-disk
+${PASSWORD_CIRROS_stable/stein}    gocubsgo
+${PASSWORD_CIRROS_stable/rocky}    cubswin:)
+${PASSWORD_CIRROS_stable/queens}    cubswin:)
 ${CIRROS_master}    cirros-0.4.0-x86_64-disk
 ${DEFAULT_PING_COUNT}    3
 ${PRE_CLEAN_OPENSTACK_ALL}    False