Get properties function
Added:
- New get properties function to return attributes of a resource.
Change-Id: I7880f0506d516b4e1881bea9c3b25acfb38b6891
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index cca8d3f..832da44 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -32,6 +32,17 @@
return None
+ def get_properties(self, resource_path):
+ r"""
+ Returns dictionary of attributes for the resource.
+
+ Description of argument(s):
+ resource_path URI resource absolute path (e.g. "/redfish/v1/Systems/1").
+ """
+
+ resp = self._redfish_.get(resource_path)
+ return resp.dict
+
def list_request(self, resource_path):
r"""
Perform a GET list request and return available resource paths.