Implement Get SDR and Reserve SDR repository command

Both Get SDR and Reserve SDR repository command is same as
Get Device SDR and Reserve Device SDR command respectively.
So the same implementation is shared.

Resolves openbmc/openbmc#2615

Change-Id: I64e37837bc5a616bed41a3ceff7d63033d88455c
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 59dfdde..fa630e3 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -19,6 +19,7 @@
 #include "storagehandler.h"
 #include "utils.hpp"
 #include "xyz/openbmc_project/Common/error.hpp"
+#include "sensorhandler.h"
 
 
 void register_netfn_storage_functions() __attribute__((constructor));
@@ -762,6 +763,16 @@
                            nullptr, ipmi_get_repository_info,
                            PRIVILEGE_USER);
 
+    // <Reserve SDR Repository>
+    ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_RESERVE_SDR,
+                           nullptr, ipmi_sen_reserve_sdr,
+                           PRIVILEGE_USER);
+
+    // <Get SDR>
+    ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_GET_SDR,
+                           nullptr, ipmi_sen_get_sdr,
+                           PRIVILEGE_USER);
+
     ipmi::fru::registerCallbackHandler();
     return;
 }