Merge "Do not ignore pm_port for Drac drivers"

This commit is contained in:
Jenkins 2016-11-24 00:10:50 +00:00 committed by Gerrit Code Review
commit 618bf6fae8
2 changed files with 34 additions and 1 deletions

View File

@ -509,6 +509,38 @@ class NodesTest(base.TestCase):
driver_info={'ucs_password': 'random', 'ucs_address': 'foo.bar',
'ucs_username': 'test'})
def test_register_ironic_node_pxe_ipmitool(self):
node_properties = {"cpus": "1",
"memory_mb": "2048",
"local_gb": "30",
"cpu_arch": "amd64",
"capabilities": "num_nics:6"}
node = self._get_node()
node['pm_type'] = 'pxe_ipmitool'
node['pm_port'] = '6230'
client = mock.MagicMock()
nodes.register_ironic_node(node, client=client)
client.node.create.assert_called_once_with(
driver='pxe_ipmitool', name='node1', properties=node_properties,
driver_info={'ipmi_password': 'random', 'ipmi_address': 'foo.bar',
'ipmi_username': 'test', 'ipmi_port': '6230'})
def test_register_ironic_node_pxe_drac(self):
node_properties = {"cpus": "1",
"memory_mb": "2048",
"local_gb": "30",
"cpu_arch": "amd64",
"capabilities": "num_nics:6"}
node = self._get_node()
node['pm_type'] = 'pxe_drac'
node['pm_port'] = '6230'
client = mock.MagicMock()
nodes.register_ironic_node(node, client=client)
client.node.create.assert_called_once_with(
driver='pxe_drac', name='node1', properties=node_properties,
driver_info={'drac_password': 'random', 'drac_host': 'foo.bar',
'drac_username': 'test', 'drac_port': '6230'})
def test_register_ironic_node_update_int_values(self):
node = self._get_node()
ironic = mock.MagicMock()

View File

@ -157,7 +157,8 @@ class iBootDriverInfo(PrefixedDriverInfo):
DRIVER_INFO = {
# production drivers
'.*_ipmi(tool|native)': PrefixedDriverInfo('ipmi', has_port=True),
'.*_drac': PrefixedDriverInfo('drac', address_field='host'),
'.*_drac': PrefixedDriverInfo('drac', address_field='host',
has_port=True),
'.*_ilo': PrefixedDriverInfo('ilo'),
'.*_ucs': PrefixedDriverInfo(
'ucs',