X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FOpenStackOperations.robot;h=8005a9331a102d290c56a865bcd9ba8dfe410647;hb=c7922ef3cd9bc1b5ec052e68cdf666bf7b62a65b;hp=9a0c09b0d0f13085a2db6411e46b1966357490b2;hpb=4d2c93ce3c50f8799a598f6782eddc73897fdcba;p=integration%2Ftest.git diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index 9a0c09b0d0..8005a9331a 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -359,6 +359,26 @@ Collect VM IP Addresses Return From Keyword If ${dhcp_length}==0 ${ip_list} ${EMPTY} [Return] ${ip_list} ${dhcp_ip} +Collect VM IPv6 SLAAC Addresses + [Arguments] ${fail_on_none} ${prefix} @{vm_list} + [Documentation] Using nova console-log on the provided ${vm_list} to search for the string "inet6" which + ... correlates to the instance generated IPv6 address, based on the ${prefix} received from ODL (SLAAC mode). + ${devstack_conn_id}= Get ControlNode Connection + Switch Connection ${devstack_conn_id} + ${ip_list} Create List @{EMPTY} + : FOR ${vm} IN @{vm_list} + \ Log ${vm} + \ ${vm_ip_line}= Write Commands Until Prompt nova console-log ${vm} | grep -i "inet6" 30s + \ Log ${vm_ip_line} + \ @{vm_ip_list} Get Regexp Matches ${vm_ip_line} ${prefix} + \ ${vm_ip_length} Get Length ${vm_ip_list} + \ Run Keyword If ${vm_ip_length}>0 Append To List ${ip_list} @{vm_ip_list}[0] + \ ... ELSE Append To List ${ip_list} None + \ Log ${ip_list} + Run Keyword If '${fail_on_none}' == 'true' Should Not Contain ${ip_list} None + Log ${ip_list} + [Return] ${ip_list} + View Vm Console [Arguments] ${vm_instance_names} [Documentation] View Console log of the created vm instances using nova show. @@ -437,7 +457,9 @@ Exit From Vm Console Check Ping [Arguments] ${ip_address} ${ttl}=64 [Documentation] Run Ping command on the IP available as argument - ${output}= Write Commands Until Expected Prompt ping -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT} + ${ethertype}= Get Regexp Matches ${ip_address} ${IP_REGEX} + ${output}= Run Keyword If ${ethertype} Write Commands Until Expected Prompt ping -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT} + ... ELSE Write Commands Until Expected Prompt ping6 -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT} Should Contain ${output} 64 bytes Check Metadata Access @@ -475,6 +497,7 @@ Test Operations From Vm Instance ${rcode}= Run Keyword And Return Status Check If Console Is VmInstance Run Keyword If ${rcode} Write Commands Until Expected Prompt ifconfig ${OS_SYSTEM_PROMPT} Run Keyword If ${rcode} Write Commands Until Expected Prompt route ${OS_SYSTEM_PROMPT} + Run Keyword If ${rcode} Write Commands Until Expected Prompt route -A inet6 ${OS_SYSTEM_PROMPT} Run Keyword If ${rcode} Write Commands Until Expected Prompt arp -an ${OS_SYSTEM_PROMPT} : FOR ${dest_ip} IN @{dest_ips} \ Log ${dest_ip}