Updated Power restore policy URI

- Previously, we used to get the values for power restore policy page
  from“JsonSchemas/ComputerSystem/ComputerSystem.json”. Now we have
  removed the hardcoded API call and are fetching the values from
  the JsonSchemas/ComputerSystem’s URI because we would have versioned
  ComputerSystem.json in the redfish response.

Change-Id: I1a25cbbb3dfc536485a6f71a359ae32c6eadf5f7
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
diff --git a/src/store/modules/Settings/PowerPolicyStore.js b/src/store/modules/Settings/PowerPolicyStore.js
index fc65381..0bdc0b5 100644
--- a/src/store/modules/Settings/PowerPolicyStore.js
+++ b/src/store/modules/Settings/PowerPolicyStore.js
@@ -20,27 +20,36 @@
   actions: {
     async getPowerRestorePolicies({ commit }) {
       return await api
-        .get('/redfish/v1/JsonSchemas/ComputerSystem/ComputerSystem.json')
-        .then(
-          ({
-            data: {
-              definitions: { PowerRestorePolicyTypes = {} },
-            },
-          }) => {
-            let powerPoliciesData = PowerRestorePolicyTypes.enum.map(
-              (powerState) => {
-                let desc = `${i18n.t(
-                  `pagePowerRestorePolicy.policies.${powerState}`,
-                )} - ${PowerRestorePolicyTypes.enumDescriptions[powerState]}`;
-                return {
-                  state: powerState,
-                  desc,
-                };
+        .get('/redfish/v1/JsonSchemas/ComputerSystem')
+        .then(async (response) => {
+          if (
+            response.data?.Location.length > 0 &&
+            response.data?.Location[0].Uri
+          ) {
+            return await api.get(response.data?.Location[0].Uri).then(
+              ({
+                data: {
+                  definitions: { PowerRestorePolicyTypes = {} },
+                },
+              }) => {
+                let powerPoliciesData = PowerRestorePolicyTypes.enum.map(
+                  (powerState) => {
+                    let desc = `${i18n.t(
+                      `pagePowerRestorePolicy.policies.${powerState}`,
+                    )} - ${
+                      PowerRestorePolicyTypes.enumDescriptions[powerState]
+                    }`;
+                    return {
+                      state: powerState,
+                      desc,
+                    };
+                  },
+                );
+                commit('setPowerRestorePolicies', powerPoliciesData);
               },
             );
-            commit('setPowerRestorePolicies', powerPoliciesData);
-          },
-        );
+          }
+        });
     },
     async getPowerRestoreCurrentPolicy({ commit }) {
       return await api