Filter out JsonSchemas, SessionService and # from listed URI
The changes is made to avoid looking up schemas, session objects
and path like /redfish/v1/Managers/bmc#/Oem to avoid GET request
failure or spent time iterating it.
Change-Id: Iff22350bd2a9d0b7a272bacfcd8ed530e740081b
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index 4510b5b..2bd6c94 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -110,6 +110,10 @@
# Iterate and check if path object has the attribute.
for child_path_idx in child_path_list:
+ if ('JsonSchemas' in child_path_idx)\
+ or ('SessionService' in child_path_idx)\
+ or ('#' in child_path_idx):
+ continue
if self.get_attribute(child_path_idx, attribute):
valid_path_list.append(child_path_idx)