Merge "[iRMC] Convert the type of irmc_port to int"

This commit is contained in:
Zuul 2021-11-16 04:26:50 +00:00 committed by Gerrit Code Review
commit 3625060943
3 changed files with 9 additions and 1 deletions

View File

@ -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')):

View File

@ -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",
}

View File

@ -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.