Delete Error Log Entry fix for callouts/0
Currently only entries ending in "/callout" are handled:
/xyz/openbmc_project/logging/entry/5/callout
Changes made to handle entries like this:
/xyz/openbmc_project/logging/entry/5/callouts/0
Change-Id: I09dbe03adf020c1aac57ba7876b2ec8e0032573e
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 374f5ef..a0c56b8 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1328,8 +1328,12 @@
# Ex. /xyz/openbmc_project/logging/entry/1
# Skip delete if entry URI is a callout.
- # Example: /xyz/openbmc_project/logging/entry/1/callout
- Return From Keyword If '${entry_path.rsplit('/', 1)[1]}' == 'callout'
+ # Examples:
+ # /xyz/openbmc_project/logging/entry/1/callout
+ # /xyz/openbmc_project/logging/entry/1/callouts/0
+ ${callout_entry}= Run Keyword And Return Status
+ ... Should Match Regexp ${entry_path} /callout[s]?(/|$)
+ Return From Keyword If ${callout_entry}
${data}= Create Dictionary data=@{EMPTY}
${resp}= Openbmc Delete Request ${entry_path} data=${data}