Merge "Stop wiping driver_internal_info on node.driver updates"

This commit is contained in:
Zuul 2020-07-16 21:06:51 +00:00 committed by Gerrit Code Review
commit 203bf50ae9
2 changed files with 0 additions and 6 deletions

View File

@ -441,10 +441,6 @@ class Node(base.IronicObject, object_base.VersionedObjectDictCompat):
updates = self.do_version_changes_for_db()
self._validate_property_values(updates.get('properties'))
if 'driver' in updates and 'driver_internal_info' not in updates:
# Clean driver_internal_info when changes driver
self.driver_internal_info = {}
updates = self.do_version_changes_for_db()
self._validate_and_remove_traits(updates)
self._validate_and_format_conductor_group(updates)
db_node = self.dbapi.update_node(self.uuid, updates)

View File

@ -171,7 +171,6 @@ class TestNodeObject(db_base.DbTestCase, obj_utils.SchemasTestMixIn):
mock_update_node.assert_called_once_with(
uuid, {'properties': {"fake": "property"},
'driver': 'fake-driver',
'driver_internal_info': {},
'version': objects.Node.VERSION})
self.assertEqual(self.context, n._context)
res_updated_at = (n.updated_at).replace(tzinfo=None)
@ -221,7 +220,6 @@ class TestNodeObject(db_base.DbTestCase, obj_utils.SchemasTestMixIn):
{
'properties': {'fake': 'property'},
'driver': 'fake-driver',
'driver_internal_info': {},
'version': objects.Node.VERSION,
'maintenance_reason':
maintenance_reason[