Stop setting boot_option=local on ironic nodes
This is now the default in ironic on tripleo and redundant. Change-Id: I249a1a9e30c06ea15b487e952b91949c606423c5 Depends-On: Ib793acc98641091bcde2580b725656976e5d6625 Related-Bug: #1803965
This commit is contained in:
parent
92fab489a3
commit
08b89e6c82
|
@ -44,7 +44,7 @@ class RegisterOrUpdateNodes(base.TripleOAction):
|
|||
"""
|
||||
|
||||
def __init__(self, nodes_json, remove=False, kernel_name=None,
|
||||
ramdisk_name=None, instance_boot_option='local'):
|
||||
ramdisk_name=None, instance_boot_option=None):
|
||||
super(RegisterOrUpdateNodes, self).__init__()
|
||||
self.nodes_json = nodes.convert_nodes_json_mac_to_ports(nodes_json)
|
||||
self.remove = remove
|
||||
|
@ -56,7 +56,8 @@ class RegisterOrUpdateNodes(base.TripleOAction):
|
|||
for node in self.nodes_json:
|
||||
caps = node.get('capabilities', {})
|
||||
caps = nodes.capabilities_to_dict(caps)
|
||||
caps.setdefault('boot_option', self.instance_boot_option)
|
||||
if self.instance_boot_option is not None:
|
||||
caps.setdefault('boot_option', self.instance_boot_option)
|
||||
node['capabilities'] = nodes.dict_to_capabilities(caps)
|
||||
|
||||
baremetal_client = self.get_baremetal_client(context)
|
||||
|
@ -130,10 +131,6 @@ class ConfigureBootAction(base.TripleOAction):
|
|||
capabilities = nodes.capabilities_to_dict(capabilities)
|
||||
if self.instance_boot_option is not None:
|
||||
capabilities['boot_option'] = self.instance_boot_option
|
||||
else:
|
||||
# Add boot option capability if it didn't exist
|
||||
capabilities.setdefault(
|
||||
'boot_option', self.instance_boot_option or 'local')
|
||||
capabilities = nodes.dict_to_capabilities(capabilities)
|
||||
|
||||
baremetal_client.node.update(node.uuid, [
|
||||
|
|
|
@ -80,7 +80,7 @@ class TestConfigureBootAction(base.TestCase):
|
|||
result = action.run(self.context)
|
||||
self.assertIsNone(result)
|
||||
|
||||
self.node_update[0].update({'value': 'boot_option:local'})
|
||||
self.node_update[0].update({'value': ''})
|
||||
self.ironic.node.update.assert_called_once_with(mock.ANY,
|
||||
self.node_update)
|
||||
|
||||
|
@ -124,6 +124,7 @@ class TestConfigureBootAction(base.TestCase):
|
|||
|
||||
self.assertIsNone(result)
|
||||
|
||||
self.node_update[0].update({'value': ''})
|
||||
self.node_update[1:] = [{'op': 'add',
|
||||
'path': '/driver_info/deploy_ramdisk',
|
||||
'value': 'test_ramdisk_id'},
|
||||
|
|
|
@ -190,7 +190,7 @@ workflows:
|
|||
- queue_name: tripleo
|
||||
- kernel_name: null
|
||||
- ramdisk_name: null
|
||||
- instance_boot_option: local
|
||||
- instance_boot_option: null
|
||||
- initial_state: manageable
|
||||
|
||||
tags:
|
||||
|
@ -1158,7 +1158,7 @@ workflows:
|
|||
- ports: [623]
|
||||
- kernel_name: null
|
||||
- ramdisk_name: null
|
||||
- instance_boot_option: local
|
||||
- instance_boot_option: null
|
||||
- initial_state: manageable
|
||||
- queue_name: tripleo
|
||||
|
||||
|
|
Loading…
Reference in New Issue