[iRMC] Convert the type of irmc_port to int
When using the node managed by the `irmc` hardware type, if the port number of the bmc address is manually specified, the following error will occur: ``` Value '443' is not supported for 'irmc_port' ``` However iRMC supports 80 and 443 ports, and default to 443. The reason for this error is that the type of irmc_port is not converted to int. Story: #2009671 Task: #43915 Signed-off-by: Zhou Hao <zhouhao@fujitsu.com> Change-Id: I4e9274de09758fdb468382a7f88298a279f43e92
This commit is contained in:
parent
b1d08ae805
commit
fc24275ba3
@ -20,6 +20,7 @@ from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common.i18n import _
|
||||
from ironic.common import utils
|
||||
from ironic.conf import CONF
|
||||
|
||||
scci = importutils.try_import('scciclient.irmc.scci')
|
||||
@ -84,6 +85,8 @@ def parse_driver_info(node):
|
||||
opt = {param: info.get(param, CONF.irmc.get(param[len('irmc_'):]))
|
||||
for param in OPTIONAL_PROPERTIES}
|
||||
d_info = dict(req, **opt)
|
||||
d_info['irmc_port'] = utils.validate_network_port(
|
||||
d_info['irmc_port'], 'irmc_port')
|
||||
|
||||
error_msgs = []
|
||||
if (d_info['irmc_auth_method'].lower() not in ('basic', 'digest')):
|
||||
|
@ -105,7 +105,7 @@ def get_test_irmc_info():
|
||||
"irmc_address": "1.2.3.4",
|
||||
"irmc_username": "admin0",
|
||||
"irmc_password": "fake0",
|
||||
"irmc_port": 80,
|
||||
"irmc_port": "80",
|
||||
"irmc_auth_method": "digest",
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fix the bug caused by not converting the port value to int type
|
||||
when the node managed by the `irmc` hardware type.
|
Loading…
x
Reference in New Issue
Block a user