[PATCH skeleton 3/3] Add inventory upload state for Barreleye

OpenBMC Patches openbmc-patches at stwcx.xyz
Mon Jun 6 14:10:59 AEST 2016


From: Brad Bishop <bradleyb at fuzziesquirrel.com>

Insert the inventory upload step into the boot sequence.

The current triggers ( host powered off and bmc boot )
don't handle a BMC reset while the host is running.

Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
---
 bin/Barreleye.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/bin/Barreleye.py b/bin/Barreleye.py
index 66691fa..c23f657 100755
--- a/bin/Barreleye.py
+++ b/bin/Barreleye.py
@@ -18,6 +18,7 @@ SYSTEM_STATES = [
 	'BMC_READY',
 	'HOST_POWERING_ON',
 	'HOST_POWERED_ON',
+	'INVENTORY_UPLOADED',
 	'HOST_BOOTING',
 	'HOST_BOOTED',
 	'HOST_POWERED_OFF',
@@ -42,7 +43,7 @@ EXIT_STATE_DEPEND = {
 
 ## method will be called when state is entered
 ENTER_STATE_CALLBACK = {
-	'HOST_POWERED_ON' : {
+	'INVENTORY_UPLOADED' : {
 		'boot' : {
 			'bus_name'    : 'org.openbmc.control.Host',
 			'obj_name'    : '/org/openbmc/control/host0',
@@ -95,10 +96,17 @@ APPS = {
 		'process_name'    : 'inventory_items.py',
 		'args'            : [ SYSTEM_NAME ]
 	},
-	'pcie_present' : {
+	'inventory_upload' : {
 		'system_state'    : 'HOST_POWERED_ON',
 		'start_process'   : True,
 		'monitor_process' : False,
+		'process_name'    : 'goto_system_state.py',
+		'args'            : [ 'INVENTORY_UPLOADED', 'inventory_upload.py' ]
+	},
+	'pcie_present' : {
+		'system_state'    : 'INVENTORY_UPLOADED',
+		'start_process'   : True,
+		'monitor_process' : False,
 		'process_name'    : 'pcie_slot_present.exe',
 	},
 	'fan_control' : {
-- 
2.8.3




More information about the openbmc mailing list