<html><body><p><img width="16" height="16" src="cid:1__=8FBB0F33DFA56DCA8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Jayashree D ---09-07-2020 02:53:26 PM---Hi All, I am trying to use the test automation for my platfor"><font size="2" color="#424282">Jayashree D ---09-07-2020 02:53:26 PM---Hi All, I am trying to use the test automation for my platform (tiogapass), while trying I met an is</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Jayashree D <jayashree-d@hcl.com></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org></font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">"Velumani T-ERS,HCLTech" <velumanit@hcl.com></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">09-07-2020 02:53 PM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">[EXTERNAL] Issue about REST API endpoint paths in openbmc-test-automation</font><br><font size="2" color="#5F5F5F">Sent by: </font><font size="2">"openbmc" <openbmc-bounces+gkeishin=in.ibm.com@lists.ozlabs.org></font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font face="Calibri"> </font><br><font face="Calibri">Hi All,</font><br><font face="Calibri"> </font><br><font face="Segoe UI">I am trying to use the test automation for my platform (tiogapass), while trying I met an issue in "Verify CPU Functional State" which fails because it shows the list is empty for cpu in the given path.</font><br><font face="Segoe UI"> </font><br><font face="Segoe UI"> ${cpu_list}= Get Endpoint Paths ${HOST_INVENTORY_URI}system cpu*<br> Should Not Be Empty ${cpu_list}</font><br><font face="Segoe UI"> </font><br><font face="Segoe UI">When I used curl command to verify the test, I am able to get the data from the given path.</font><br><font face="Segoe UI"> </font><br><font face="Segoe UI"> [root@odc ~]# curl -k -H "X-Auth-Token: $token" </font><a href="https://$%7Bbmc%7D/xyz/openbmc_project/inventory/system/chassis/motherboard/"><u><font color="#0563C1" face="Segoe UI">https://${bmc}/xyz/openbmc_project/inventory/system/chassis/motherboard/</font></u></a><font face="Segoe UI"><br> {<br> "data": [<br> "/xyz/openbmc_project/inventory/system/chassis/motherboard/CPU_1",<br> "/xyz/openbmc_project/inventory/system/chassis/motherboard/CPU_2"<br> ],<br> "message": "200 OK",<br> "status": "ok"<br> }</font><br><font face="Segoe UI"> </font><br><font face="Segoe UI">As per my validation, the endpoint path is mentioned as cpu* (lowercase letters) but in my case the endpoint names are present in uppercase letters such as CPU_1,CPU_2.<br>I am also facing this same issue for some other test cases. Can we have the search for both CPU and cpu?</font><br><font face="Segoe UI">Is there any naming convention to be followed in REST api?</font><br><font face="Segoe UI"> </font><br><font face="Segoe UI"> </font><br><font face="Segoe UI">Thanks,</font><br><font face="Segoe UI">Regards,</font><br><font face="Segoe UI">Jayashree</font><br><font face="Segoe UI"> </font><br><font face="Calibri"> </font><p><font size="1" color="#808080" face="Arial">::DISCLAIMER::<br></font><hr width="100%" size="2" align="left"><font size="1" color="#808080" face="Arial">The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.<br></font><hr width="100%" size="2" align="left"><font size="2">-----------------------------------------------------------</font><br><br><font size="2">Thanks Jayashree for the input,</font><br><br><font size="2">I have added a regex pattern directive to search both lower and upper case end points.</font><br><br><i><font size="2"> ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${endpoint}\[0-9a-z]*$</font></i><br><font size="2"> </font><br><font size="2"> To</font><br><font size="2"> </font><br><font size="2"> </font><i><font size="2">${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${endpoint}\[0-9a-z]*$ case_insensitive=${True}</font></i><br><font size="2"> </font><br><font size="2"> Commit: </font><a href="https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc-test-automation/+/34519/"><font size="2">https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc-test-automation/+/34519/</font></a><p><p><font size="2">Take a look and see if that works for you.</font><p><font size="2">Regards</font><p><font size="2">George Keishing</font><p><p><BR>
</body></html>