Normalize the 'undercloud-passwords.conf' return data
This change normalizes our client return formation by ensuring we're always using the configured output path as defined within our constants. Closes-Bug: #1868619 Change-Id: Ied051214c4d3f2a695d58a6cde6180f040ca02d4 Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
parent
4a55e5b9c2
commit
8dc3273495
|
@ -17,6 +17,7 @@
|
|||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from openstackclient.i18n import _
|
||||
|
@ -145,7 +146,10 @@ class InstallUndercloud(command.Command):
|
|||
try:
|
||||
subprocess.check_call(cmd)
|
||||
self.log.warning(UNDERCLOUD_COMPLETION_MESSAGE.format(
|
||||
'~/undercloud-passwords.conf',
|
||||
os.path.join(
|
||||
constants.UNDERCLOUD_OUTPUT_DIR,
|
||||
'undercloud-passwords.conf'
|
||||
),
|
||||
'~/stackrc'
|
||||
))
|
||||
except Exception as e:
|
||||
|
@ -183,7 +187,10 @@ class UpgradeUndercloud(InstallUndercloud):
|
|||
subprocess.check_call(cmd)
|
||||
self.log.warning(
|
||||
UNDERCLOUD_UPGRADE_COMPLETION_MESSAGE.format(
|
||||
'~/undercloud-passwords.conf',
|
||||
os.path.join(
|
||||
constants.UNDERCLOUD_OUTPUT_DIR,
|
||||
'undercloud-passwords.conf'
|
||||
),
|
||||
'~/stackrc'))
|
||||
except Exception as e:
|
||||
self.log.error(UNDERCLOUD_FAILURE_MESSAGE)
|
||||
|
|
|
@ -39,8 +39,10 @@ CONF = cfg.CONF
|
|||
# We need 8 GB, leave a little room for variation in what 8 GB means on
|
||||
# different platforms.
|
||||
REQUIRED_MB = 7680
|
||||
PASSWORD_PATH = '%s/%s' % (constants.UNDERCLOUD_OUTPUT_DIR,
|
||||
'undercloud-passwords.conf')
|
||||
PASSWORD_PATH = os.path.join(
|
||||
constants.UNDERCLOUD_OUTPUT_DIR,
|
||||
'undercloud-passwords.conf'
|
||||
)
|
||||
|
||||
LOG = logging.getLogger(__name__ + ".UndercloudSetup")
|
||||
|
||||
|
|
Loading…
Reference in New Issue