Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
CA-25248: Used configured name for 'BMC'
Browse files Browse the repository at this point in the history
CA-25249: Suppress Serial Number/Service Tag display according to Config
  • Loading branch information
Andy Southgate committed Jan 19, 2009
1 parent 530f1c4 commit 1d3abde
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
9 changes: 9 additions & 0 deletions XSConsoleConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ def BrandingMap(self):
def AllShellsTimeout(self):
return True

def DisplaySerialNumber(self):
return True

def DisplayAssetTag(self):
return True

def BMCName(self):
return 'BMC'

# Import a more specific configuration if available
if os.path.isfile(sys.path[0]+'/XSConsoleConfigOEM.py'):
import XSConsoleConfigOEM
Expand Down
1 change: 1 addition & 0 deletions XSConsoleStandard.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from XSConsoleAuth import *
from XSConsoleBases import *
from XSConsoleConfig import *
from XSConsoleData import *
from XSConsoleDataUtils import *
from XSConsoleDialogueBases import *
Expand Down
34 changes: 18 additions & 16 deletions plugins-base/XSFeatureSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@ def StatusUpdateHandlerSYSTEM(cls, inPane):
inPane.AddWrappedTextField(model)
inPane.NewLine()

inPane.AddTitleField(data.host.software_version.machine_serial_name(Lang("Serial Number")))
serialNumber = data.host.software_version.machine_serial_number('')
if serialNumber == '':
serialNumber = data.dmi.system_serial_number('')
if serialNumber == '':
serialNumber = Lang("<Not Set>")
inPane.AddWrappedTextField(serialNumber)
inPane.NewLine()
if Config.Inst().DisplaySerialNumber():
inPane.AddTitleField(data.host.software_version.machine_serial_name(Lang("Serial Number")))
serialNumber = data.host.software_version.machine_serial_number('')
if serialNumber == '':
serialNumber = data.dmi.system_serial_number('')
if serialNumber == '':
serialNumber = Lang("<Not Set>")
inPane.AddWrappedTextField(serialNumber)
inPane.NewLine()

inPane.AddTitleField(Lang("Asset Tag"))
assetTag = data.dmi.asset_tag('') # FIXME: Get from XAPI when available
if assetTag == '':
assetTag = Lang("<Not Set>")
inPane.AddWrappedTextField(assetTag)
if Config.Inst().DisplayAssetTag():
inPane.AddTitleField(Lang("Asset Tag"))
assetTag = data.dmi.asset_tag('') # FIXME: Get from XAPI when available
if assetTag == '':
assetTag = Lang("<Not Set>")
inPane.AddWrappedTextField(assetTag)

inPane.AddKeyHelpField( { Lang("<F5>") : Lang("Refresh")})

Expand Down Expand Up @@ -106,9 +108,9 @@ def StatusUpdateHandlerSTORAGE(cls, inPane):
def StatusUpdateHandlerBMC(cls, inPane):
data = Data.Inst()

inPane.AddTitleField(Lang("BMC Information"))
inPane.AddTitleField(Lang(Config.Inst().BMCName()+" Information"))

inPane.AddStatusField(Lang("BMC Firmware Version", 22), data.bmc.version())
inPane.AddStatusField(Lang(Config.Inst().BMCName()+" Firmware Version", 22), data.bmc.version())

inPane.AddKeyHelpField( { Lang("<F5>") : Lang("Refresh")})

Expand Down Expand Up @@ -192,7 +194,7 @@ def Register(self):
{
'menuname' : 'MENU_PROPERTIES',
'menupriority' : 600,
'menutext' : Lang('BMC Version') ,
'menutext' : Lang(Config.Inst().BMCName()+' Version'),
'statusupdatehandler' : self.StatusUpdateHandlerBMC
}
)
Expand Down

0 comments on commit 1d3abde

Please sign in to comment.