openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

[OpenPower] test_openbmctool_network: Valid Data Type mismatch while check #2222

Open tom-ky-wu opened 9 months ago

tom-ky-wu commented 9 months ago

Hi, as described, when I ran the test cases for 'Verify GetDomainName' and 'Verify GetNTP,' I encountered the following error. DN_001 NTP002

After modifying the robot code, it became valid. The modifications are as follows:

 Verify GetNTP
      # Get NTP server details via REDFISH.
      ${eth0}=  Redfish.Get Properties  ${REDFISH_NW_PROTOCOL_URI}
      ${tool_ntp}=  Network  getNTP  I=eth0
-     Valid Value  eth0['NTP']['NTPServers'][0]  ['${tool_ntp}']
+     Valid Value  eth0['NTP']['NTPServers'][0]  ${tool_ntp}
Verify GetDomainName
      [Tags]  Verify_GetDomainName

      Network  setDomainName  I=eth0  D=${domain_name}
      ${eth0}=  Redfish.Get Properties  ${REDFISH_NW_ETH0_URI}
      ${eth0_domain_name}=  Strip String  ${eth0['FQDN']}
      ...  characters=${eth0['HostName']}.  mode=left
      ${tool_domain_name}=  Network  getDomainName  I=eth0
-     Valid Value  eth0_domain_name  ['${tool_domain_name}']
+     Valid Value  eth0_domain_name  ${tool_domain_name}

I would like to ask if this modification is an improvement for the current code, or if you could please provide some advice. Thanks

gkeishin commented 9 months ago

@prkatti1 @swe12345 can u respond to this ?

swe12345 commented 9 months ago

You can go ahead and make these changes and push and the code Tom.

gkeishin commented 9 months ago

Maybe @swe12345 if it is quick you can push up the commit.

gkeishin commented 8 months ago

we are no longer supporting openbmctool at the latest master code. If needed use the branch v4.0-stable for it ..

Please take a look at the above mailing list note https://lists.ozlabs.org/pipermail/openbmc/2023-December/034575.html . Thanks