Remove deprecated store_data_location
The deprecated configuration option [processing]store_data_location was removed. Change-Id: I3f66af7fe67284e0b391188bef7d949cec8feb40
This commit is contained in:
parent
47b9468838
commit
0e11af26b5
@ -78,13 +78,6 @@ _OPTS = [
|
||||
'Possible values are: \'none\', \'database\' and '
|
||||
'\'swift\'. If set to \'none\', introspection data will '
|
||||
'not be stored.')),
|
||||
cfg.StrOpt('store_data_location',
|
||||
help=_('Name of the key to store the location of stored data '
|
||||
'in the extra column of the Ironic database.'),
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason=_('The introspection data could be retrieved '
|
||||
'from inspector API, there is no need to '
|
||||
'keep an extra link in ironic.')),
|
||||
cfg.BoolOpt('disk_partitioning_spacing',
|
||||
default=True,
|
||||
help=_('Whether to leave 1 GiB of disk size untouched for '
|
||||
|
@ -95,16 +95,6 @@ class SwiftStore(object):
|
||||
LOG.info('Introspection data was stored for node %(node)s in Swift '
|
||||
'object %(obj_name)s', {'node': node_uuid,
|
||||
'obj_name': swift_object_name})
|
||||
# TODO(kaifeng) Remove the deprecated store_data_location at Train
|
||||
# cycle.
|
||||
if CONF.processing.store_data_location:
|
||||
node_info = node_cache.get_node(node_uuid)
|
||||
# NOTE(kaifeng) node_info is not synced back, while we are not
|
||||
# using extra in the processing logic, it looks fine at the moment,
|
||||
# but we should consider refactor in a later time.
|
||||
node_info.patch([{'op': 'add', 'path': '/extra/%s' %
|
||||
CONF.processing.store_data_location,
|
||||
'value': swift_object_name}])
|
||||
|
||||
|
||||
class DatabaseStore(object):
|
||||
|
@ -78,25 +78,6 @@ class TestSwiftStore(BaseTest):
|
||||
db.Node(uuid=self.node_info.uuid,
|
||||
state=istate.States.starting).save(session)
|
||||
|
||||
def test_store_data_location(self, swift_mock):
|
||||
CONF.set_override('store_data_location', 'inspector_data_object',
|
||||
'processing')
|
||||
self._create_node()
|
||||
swift_conn = swift_mock.return_value
|
||||
name = 'inspector_data-%s' % self.uuid
|
||||
patch = [{'path': '/extra/inspector_data_object',
|
||||
'value': name, 'op': 'add'}]
|
||||
expected = self.data
|
||||
|
||||
self.driver.save(self.node_info.uuid, self.data)
|
||||
|
||||
data = introspection_data._filter_data_excluded_keys(self.data)
|
||||
swift_conn.create_object.assert_called_once_with(name,
|
||||
json.dumps(data))
|
||||
self.assertEqual(expected,
|
||||
json.loads(swift_conn.create_object.call_args[0][1]))
|
||||
self.cli.node.update.assert_any_call(self.uuid, patch)
|
||||
|
||||
|
||||
class TestDatabaseStore(BaseTest):
|
||||
def setUp(self):
|
||||
|
@ -500,24 +500,6 @@ class TestProcessNode(BaseTest):
|
||||
self.assertNotIn('logs',
|
||||
json.loads(swift_conn.create_object.call_args[0][1]))
|
||||
|
||||
@mock.patch.object(swift, 'SwiftAPI', autospec=True)
|
||||
def test_store_data_location_with_swift(self, swift_mock):
|
||||
CONF.set_override('store_data', 'swift', 'processing')
|
||||
CONF.set_override('store_data_location', 'inspector_data_object',
|
||||
'processing')
|
||||
swift_conn = swift_mock.return_value
|
||||
name = 'inspector_data-%s' % self.uuid
|
||||
patch = [{'path': '/extra/inspector_data_object',
|
||||
'value': name, 'op': 'add'}]
|
||||
expected = self.data
|
||||
|
||||
process._process_node(self.node_info, self.node, self.data)
|
||||
|
||||
swift_conn.create_object.assert_called_once_with(name, mock.ANY)
|
||||
self.assertEqual(expected,
|
||||
json.loads(swift_conn.create_object.call_args[0][1]))
|
||||
self.cli.node.update.assert_any_call(self.uuid, patch)
|
||||
|
||||
@mock.patch.object(node_cache, 'store_introspection_data', autospec=True)
|
||||
def test_store_data_with_database(self, store_mock):
|
||||
CONF.set_override('store_data', 'database', 'processing')
|
||||
|
@ -0,0 +1,4 @@
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated configuration option ``[processing]store_data_location``
|
||||
was removed.
|
Loading…
Reference in New Issue
Block a user