Remove unused write_overcloudrc() function
Change-Id: Ifb3df132802dc1380e9949528416ecfed882cd06
This commit is contained in:
parent
9c5a51861c
commit
701c146bd7
@ -68,9 +68,6 @@ class UtilsFixture(fixtures.Fixture):
|
||||
self.mock_remove_known_hosts = self.useFixture(fixtures.MockPatch(
|
||||
'tripleoclient.utils.remove_known_hosts')
|
||||
).mock
|
||||
self.mock_write_overcloudrc = self.useFixture(fixtures.MockPatch(
|
||||
'tripleoclient.utils.write_overcloudrc')
|
||||
).mock
|
||||
self.mock_run_ansible_playbook = self.useFixture(fixtures.MockPatch(
|
||||
'tripleoclient.utils.run_ansible_playbook')
|
||||
).mock
|
||||
|
@ -561,31 +561,6 @@ class TestEnsureRunAsNormalUser(TestCase):
|
||||
self.assertEqual('stack', u)
|
||||
|
||||
|
||||
class TestCreateOvercloudRC(TestCase):
|
||||
|
||||
def test_write_overcloudrc(self):
|
||||
stack_name = 'teststack'
|
||||
|
||||
tempdir = tempfile.mkdtemp()
|
||||
rcfile = os.path.join(tempdir, 'teststackrc')
|
||||
|
||||
overcloudrcs = {
|
||||
"overcloudrc": "overcloudrc",
|
||||
}
|
||||
|
||||
try:
|
||||
utils.write_overcloudrc(stack_name, overcloudrcs,
|
||||
config_directory=tempdir)
|
||||
with open(rcfile, 'rt') as f:
|
||||
rc = f.read()
|
||||
self.assertEqual('overcloudrc', rc)
|
||||
finally:
|
||||
if os.path.exists(rcfile):
|
||||
os.unlink(rcfile)
|
||||
|
||||
os.rmdir(tempdir)
|
||||
|
||||
|
||||
class TestCreateTempestDeployerInput(TestCase):
|
||||
|
||||
def test_create_tempest_deployer_input(self):
|
||||
|
@ -813,18 +813,6 @@ def write_env_file(env_data, env_file, registry_overwrites):
|
||||
yaml.dump(data, f, default_flow_style=False, Dumper=dumper)
|
||||
|
||||
|
||||
def write_overcloudrc(stack_name, overcloudrcs, config_directory='.'):
|
||||
"""Write the overcloudrc files"""
|
||||
|
||||
rcpath = os.path.join(config_directory, '%src' % stack_name)
|
||||
|
||||
with open(rcpath, 'w') as rcfile:
|
||||
rcfile.write(overcloudrcs['overcloudrc'])
|
||||
os.chmod(rcpath, 0o600)
|
||||
|
||||
return os.path.abspath(rcpath)
|
||||
|
||||
|
||||
def store_cli_param(command_name, parsed_args):
|
||||
"""write the cli parameters into an history file"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user