Remove the get_hiera_key function

It is no longer used in tripleoclient.

Change-Id: I8e4347fc340b01efae9afefa8ddae3c8667774ad
This commit is contained in:
Dougal Matthews 2016-09-08 14:16:42 +01:00
parent f0292635fd
commit 8b0501c72c
2 changed files with 0 additions and 24 deletions

View File

@ -259,17 +259,6 @@ class TestWaitForStackUtil(TestCase):
self.assertEqual(uuids, ['IJKLMNOP', ])
@mock.patch("subprocess.Popen")
def test_get_hiera_key(self, mock_popen):
process_mock = mock.Mock()
process_mock.communicate.return_value = ["pa$$word", ""]
mock_popen.return_value = process_mock
value = utils.get_hiera_key('password_name')
self.assertEqual(value, "pa$$word")
@mock.patch("six.moves.configparser")
@mock.patch("os.path.exists")
def test_get_config_value(self, mock_path_exists, mock_config_parser):

View File

@ -449,19 +449,6 @@ def set_nodes_state(baremetal_client, nodes, transition, target_state,
yield node.uuid
def get_hiera_key(key_name):
"""Retrieve a key from the hiera store
:param password_name: Name of the key to retrieve
:type password_name: type
"""
command = ["hiera", key_name]
p = subprocess.Popen(command, stdout=subprocess.PIPE)
out, err = p.communicate()
return out
def get_config_value(section, option):
# TODO(beagles): get_config_value is an odd name for this function as the
# hard coding of undercloud-passwords makes this a