Added tripleo_undercloud_user to novajoin conf

Currently the undercloud user is hardcoded to stack but in CI
we use zuul, it leads to failure while finding the respective
hardcoded file. Making it configurable and defaulting to stack
fixes the issue.

Change-Id: Ib9496024f7beeb27d13377c8062adf80e97f2c4a
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
Chandan Kumar (raukadah) 2019-11-14 20:00:46 +05:30
parent 80dd51a794
commit cb81f5311e
3 changed files with 7 additions and 2 deletions

View File

@ -48,6 +48,9 @@ NovajoinGroup = [
cfg.StrOpt('tripleo_undercloud',
default='undercloud',
help='Undercloud short host name'),
cfg.StrOpt('tripleo_undercloud_user',
default='stack',
help='Undercloud deployment user name'),
cfg.StrOpt('container_cli_exec',
default="sudo podman exec ",
help='container exec command'),

View File

@ -360,7 +360,8 @@ class NovajoinScenarioTest(manager.ScenarioTest):
user, host_ip, cmd)
def execute_on_controller(self, user, hostip, target_cmd):
keypair = '/home/stack/.ssh/id_rsa'
keypair = '/home/{user}/.ssh/id_rsa'.format(
user=CONF.novajoin.tripleo_undercloud_user)
cmd = ['ssh', '-i', keypair,
'{user}@{hostip}'.format(user=user, hostip=hostip),
'-C', target_cmd]

View File

@ -51,7 +51,8 @@ class TripleOTLSTest(novajoin_manager.NovajoinScenarioTest):
def get_haproxy_cfg_1(self, hostip):
print(hostip)
return "/home/stack/haproxy.cfg"
return "/home/{user}/haproxy.cfg".format(
user=CONF.novajoin.tripleo_undercloud_user)
def parse_haproxy_cfg(self, haproxy_data):
content = haproxy_data.splitlines()