summaryrefslogtreecommitdiff
path: root/static/redfish/v1/schema/Settings_v1.xml
diff options
context:
space:
mode:
authorLakshmi Yadlapati <lakshmiy@us.ibm.com>2024-06-27 02:28:06 +0300
committerEd Tanous <ed@tanous.net>2024-10-04 19:19:23 +0300
commit3e42a3290ae35f05b30fa1863f44e95845577420 (patch)
treebbaeb7cbd9496b8ad643f86a62bed95aa9d1ac38 /static/redfish/v1/schema/Settings_v1.xml
parent1f1fb4f59de32f4fa46e8820fddc21c83309c47c (diff)
downloadbmcweb-master.tar.xz
Refactor mapper calls to use getAssociatedSubTreePathsByIdHEADmaster
This commit refactors power_supply to use the new ObjectMapper method `getAssociatedSubTreePathsById`. Replaced the two separate mapper calls `getValidChassisPath` and `getAssociatedSubTreePaths` with one call to `getAssociatedSubTreePathsById`. Tested: Validator passed 1. List Powersupplies in the system ``` curl -k https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies", "@odata.type": "#PowerSupplyCollection.PowerSupplyCollection", "Description": "The collection of PowerSupply resource instances.", "Members": [ { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply0" }, { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply1" }, { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply2" }, { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply3" } ], "Members@odata.count": 4, "Name": "Power Supply Collection" } ``` 2. List powersupply0 properties ``` curl -k https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply0 { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply0", "@odata.type": "#PowerSupply.v1_5_0.PowerSupply", "EfficiencyRatings": [ { "EfficiencyPercent": 90 } ], "FirmwareVersion": "030303030303", "Id": "powersupply0", "Location": { "PartLocation": { "ServiceLabel": "U78DB.ND0.WZS002U-E0" } }, "LocationIndicatorActive": false, "Manufacturer": "", "Model": "2B1E", "Name": "Power Supply", "PartNumber": "03FP729", "SerialNumber": "YL30NH1BN229", "SparePartNumber": "03FP728", "Status": { "Health": "OK", "State": "Enabled" } } ``` 3. Error condition, list unknown powersupply ``` curl -k https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply8 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type PowerSupplies named 'powersupply8' was not found.", "MessageArgs": [ "PowerSupplies", "powersupply8" ], "MessageId": "Base.1.13.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.13.0.ResourceNotFound", "message": "The requested resource of type PowerSupplies named 'powersupply8' was not found." } } ``` 4. Error condition, list unknown invalid chassis ``` curl -k https://${bmc}/redfish/v1/Chassis/InvalidChassis/PowerSubsystem/PowerSupplies/powersupply0 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'InvalidChassis' was not found.", "MessageArgs": [ "Chassis", "InvalidChassis" ], "MessageId": "Base.1.18.1.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.18.1.ResourceNotFound", "message": "The requested resource of type Chassis named 'InvalidChassis' was not found." } } ``` Change-Id: I07043b15cbfa0ac9a44cbf155fad3315eeacc859 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
Diffstat (limited to 'static/redfish/v1/schema/Settings_v1.xml')
0 files changed, 0 insertions, 0 deletions