Fix to get correct target action URI
Signed-off-by: Anusha Dathatri <adathatr@in.ibm.com>
Change-Id: I4ba4c1c20c07401f94eb9a41e62c5cd06a422b41
diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index ea39930..8ba416a 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -180,7 +180,9 @@
# Return the matching target URL entry.
for target in target_list:
# target "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
- if target_attribute in target:
+ attribute_in_uri = target.rsplit('/', 1)[-1]
+ # attribute_in_uri "ComputerSystem.Reset"
+ if target_attribute == attribute_in_uri:
return target
return None