Deprecate bmc_bm_pairs

This file is no longer needed now that we set the name of each
instance in nodes.json itself.  Deprecate it for removal in about
six months.
This commit is contained in:
Ben Nemec 2018-01-24 09:08:40 -06:00
parent b3ab734140
commit c65fbbb9b5
2 changed files with 7 additions and 4 deletions

View File

@ -240,12 +240,13 @@ def _write_role_nodes(nodes, args):
(profile, outfile))
# TODO(bnemec): parameterize this based on args.nodes_json
# Or deprecate and remove it since it isn't necessary now that we set node
# names in the JSON file?
# TODO(bnemec): This functionality was deprecated 2018-01-24. Remove it in
# about six months.
def _write_pairs(bmc_bm_pairs):
filename = 'bmc_bm_pairs'
with open(filename, 'w') as pairs_file:
pairs_file.write('# This file is DEPRECATED. The mapping is now '
'available in nodes.json.\n')
pairs_file.write('# A list of BMC addresses and the name of the '
'instance that BMC manages.\n')
for i in bmc_bm_pairs:

View File

@ -396,7 +396,9 @@ class TestBuildNodesJson(testtools.TestCase):
pairs = [('1.1.1.1', 'bm_0'), ('1.1.1.2', 'bm_1')]
mock_open.return_value = mock.MagicMock()
build_nodes_json._write_pairs(pairs)
calls = [mock.call('# A list of BMC addresses and the name of the '
calls = [mock.call('# This file is DEPRECATED. The mapping is now '
'available in nodes.json.\n'),
mock.call('# A list of BMC addresses and the name of the '
'instance that BMC manages.\n'),
mock.call('1.1.1.1 bm_0\n'),
mock.call('1.1.1.2 bm_1\n'),