2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #5014 from xuweibj/I4983

fix issue 4983, get autoreboot info
This commit is contained in:
zet809 2018-03-27 17:35:12 +08:00 committed by GitHub
commit 116c270b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -401,8 +401,10 @@ rmdir \"/tmp/$userid\" \n")
if isinstance(value, dict):
str_value = value.values()[0]
elif value:
str_value = str(value)
else:
str_value = value
str_value = '0'
result = '%s: %s: %s' % (node, openbmc.RSPCONFIG_APIS[key]['display_name'], str_value.split('.')[-1])
self.callback.info(result)

View File

@ -183,7 +183,7 @@ RSPCONFIG_APIS = {
'autoreboot' : {
'baseurl': "/control/host0/auto_reboot/",
'set_url': "attr/AutoReboot",
'get_url': "attr/AutoReboot",
'get_url': "",
'display_name': "BMC AutoReboot",
'attr_values': {
'0': False,
@ -203,9 +203,9 @@ RSPCONFIG_APIS = {
},
},
'powerrestorepolicy': {
'baseurl': "/control/host0/power_restore_policy/",
'set_url': "attr/PowerRestorePolicy",
'get_url': "attr/PowerRestorePolicy",
'baseurl': "/control/host0/power_restore_policy",
'set_url': "/attr/PowerRestorePolicy",
'get_url': "",
'display_name': "BMC PowerRestorePolicy",
'attr_values': {
'restore': "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore",
@ -214,9 +214,9 @@ RSPCONFIG_APIS = {
},
},
'bootmode': {
'baseurl': "/control/host0/boot/",
'set_url': "attr/BootMode",
'get_url': "attr/BootMode",
'baseurl': "/control/host0/boot",
'set_url': "/attr/BootMode",
'get_url': "",
'display_name':"BMC BootMode",
'attr_values': {
'regular': "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular",