Move PowerLimit to correct location

See the following Redfish Validator errors and warning:
/redfish/v1/Chassis/chassis/Power
ERROR - PowerLimit not defined in schema Power.v1_5_2
(check version, spelling and casing)

/redfish/v1/Chassis/chassis/Power#/PowerControl/
ERROR - Decoded object no longer a dictionary /redfish/v1/Chassis/chassis/Power
ERROR - @odata.id of ReferenceableMember does not properly
resolve: /redfish/v1/Chassis/chassis/Power#/PowerControl/

WARNING - No @odata.type present, assuming highest type
Power.v1_0_0.PowerControl Power.v1_4_0.PowerControl

If you look at the specification/mockups, PowerLimit is
under PowerControl.

From the https://redfish.dmtf.org/redfish/mockups/v1/893 mockup:
PowerControl": [
    {
        "@odata.id": "/redfish/v1/Chassis/1U/Power#/PowerControl/0",
        "MemberId": "0",
        ...
        "PowerAvailableWatts": 0,
        "PowerCapacityWatts": 800,
        ...
        "PowerLimit": {
            "LimitInWatts": 500,
            "LimitException": "LogEventOnly",
            "CorrectionInMs": 50
         } ,
         ...
    }
],

Added an odata.type and fixed the odata.id for PowerControl.

Put all power control sensors under the same PowerControl
like we do for PowerSupplies.

Tested: No longer see the errors.

If no total_power (happens when a Open Power system is off):
curl -k https://${bmc}/redfish/v1/Chassis/chassis/Power
  ...
  "PowerControl": [
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0",
      "@odata.type": "#Power.v1_0_0.PowerControl",
      "MemberId": "0",
      "Name": "Chassis Power Control",
      "PowerLimit": {
        "LimitInWatts": null
      }
    }
  ],
  "Redundancy": [],
   ...

 curl -k https://${bmc}/redfish/v1/Chassis/chassis/Power/
{
  "PowerControl": [
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0",
      "@odata.type": "#Power.v1_0_0.PowerControl",
      "MemberId": "0",
      "Name": "Chassis Power Control",
      "PowerConsumedWatts": 232.0,
      "PowerLimit": {
        "LimitInWatts": null
      },
      "Status": {
        "Health": "OK",
        "State": "Enabled"

Change-Id: I8ca47bd6c7dedf5d0685886e2e45e6f964f69060
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index e6f1eba..8c3927b 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -124,11 +124,21 @@
                     }
 
                     nlohmann::json& tempArray =
-                        sensorAsyncResp->res.jsonValue["PowerLimit"];
+                        sensorAsyncResp->res.jsonValue["PowerControl"];
 
+                    // Put multiple "sensors" into a single PowerControl, 0, so
+                    // only create the first one
                     if (tempArray.empty())
                     {
-                        tempArray.push_back({});
+                        // Mandatory properties odata.id and MemberId
+                        // A warning without a odata.type
+                        tempArray.push_back(
+                            {{"@odata.type", "#Power.v1_0_0.PowerControl"},
+                             {"@odata.id", "/redfish/v1/Chassis/" +
+                                               sensorAsyncResp->chassisId +
+                                               "/Power#/PowerControl/0"},
+                             {"Name", "Chassis Power Control"},
+                             {"MemberId", "0"}});
                     }
 
                     nlohmann::json& sensorJson = tempArray.back();
@@ -188,7 +198,8 @@
                         }
                     }
 
-                    nlohmann::json& value = sensorJson["LimitInWatts"];
+                    nlohmann::json& value =
+                        sensorJson["PowerLimit"]["LimitInWatts"];
 
                     if (enabled)
                     {