From d600bb52cd7e71543932cdd30892f6dc9bb6d740 Mon Sep 17 00:00:00 2001 From: Kenneth Fullbright Date: Mon, 20 Dec 2021 17:01:31 -0600 Subject: Fixed Assembly table Identify LED switches Identify LED should toggle on/off successfully Rewrote the patch code to work with the Redfish schema Set LocationIndicatorActive to true: curl -k -H "X-Auth-Token: $token" -X PATCH -d ' { "Assemblies":[ {"MemberId" : "0", "LocationIndicatorActive":true}, {"MemberId": "1", "LocationIndicatorActive":true} ] }' https://${bmc}/redfish/v1/Chassis/chassis/Assembly MemberId is required to reference which assembly LED to toggle Signed-off-by: Kenneth Fullbright Change-Id: Id0a3cf4dc533f6a0205be9fd037b13f92647cc00 --- src/store/modules/HardwareStatus/AssemblyStore.js | 8 +++++++- src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/store/modules/HardwareStatus/AssemblyStore.js b/src/store/modules/HardwareStatus/AssemblyStore.js index 56e5631d..fe97a9c8 100644 --- a/src/store/modules/HardwareStatus/AssemblyStore.js +++ b/src/store/modules/HardwareStatus/AssemblyStore.js @@ -46,8 +46,14 @@ const AssemblyStore = { async updateIdentifyLedValue({ dispatch }, led) { const uri = led.uri; const updatedIdentifyLedValue = { - LocationIndicatorActive: led.identifyLed, + Assemblies: [ + { + MemberId: led.memberId, + LocationIndicatorActive: led.identifyLed, + }, + ], }; + return await api.patch(uri, updatedIdentifyLedValue).catch((error) => { dispatch('getAssemblyInfo'); console.log('error', error); diff --git a/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue b/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue index 68563691..afc14704 100644 --- a/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue +++ b/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue @@ -137,6 +137,7 @@ export default { this.$store .dispatch('assemblies/updateIdentifyLedValue', { uri: row.uri, + memberId: row.id, identifyLed: row.identifyLed, }) .catch(({ message }) => this.errorToast(message)); -- cgit v1.2.3