Merge pull request #948 from javacruft/get-admin-passwords-k8s

k8s: use action to retrieve admin password
This commit is contained in:
Liam Young
2022-10-11 14:01:23 +01:00
committed by GitHub
+7 -3
View File
@@ -2140,9 +2140,13 @@ def _get_overcloud_auth_k8s(address=None, model_name=None):
'applications']['keystone'].public_address
address = network_utils.format_addr(address)
# This is hard-coded in the charm at the moment
logging.warning('Using hardcoded keystone password')
password = 'abc123'
logging.info('Retrieving admin password from keystone')
action = zaza.model.run_action_on_leader(
'keystone',
'get-admin-password',
action_params={}
)
password = action.data['results']['password']
# V3 or later
logging.info('Using keystone API V3 (or later) for overcloud auth')