Merge "Add the KeystoneCredential0 and KeystoneCredential1 parameters"

This commit is contained in:
Jenkins
2016-10-06 23:24:48 +00:00
committed by Gerrit Code Review
2 changed files with 16 additions and 8 deletions

View File

@@ -59,8 +59,12 @@ PASSWORD_PARAMETER_NAMES = (
'AdminToken', 'AdminToken',
'AodhPassword', 'AodhPassword',
'BarbicanPassword', 'BarbicanPassword',
'CeilometerPassword',
'CeilometerMeteringSecret', 'CeilometerMeteringSecret',
'CeilometerPassword',
'CephAdminKey',
'CephClientKey',
'CephMonKey',
'CephRgwKey',
'CinderPassword', 'CinderPassword',
'GlancePassword', 'GlancePassword',
'GnocchiPassword', 'GnocchiPassword',
@@ -68,22 +72,20 @@ PASSWORD_PARAMETER_NAMES = (
'HeatPassword', 'HeatPassword',
'HeatStackDomainAdminPassword', 'HeatStackDomainAdminPassword',
'IronicPassword', 'IronicPassword',
'KeystoneCredential0',
'KeystoneCredential1',
'ManilaPassword',
'MistralPassword', 'MistralPassword',
'MysqlClustercheckPassword', 'MysqlClustercheckPassword',
'NeutronMetadataProxySharedSecret',
'NeutronPassword', 'NeutronPassword',
'NovaPassword', 'NovaPassword',
'RabbitPassword', 'RabbitPassword',
'RedisPassword', 'RedisPassword',
'SaharaPassword', 'SaharaPassword',
'SnmpdReadonlyUserPassword',
'SwiftHashSuffix', 'SwiftHashSuffix',
'SwiftPassword', 'SwiftPassword',
'SnmpdReadonlyUserPassword',
'TrovePassword', 'TrovePassword',
'ZaqarPassword', 'ZaqarPassword',
'ManilaPassword',
'NeutronMetadataProxySharedSecret',
'CephMonKey',
'CephAdminKey',
'CephClientKey',
'CephRgwKey',
) )

View File

@@ -48,6 +48,8 @@ def generate_overcloud_passwords():
if not snmp_password: if not snmp_password:
LOG.warning("Undercloud ceilometer SNMPd password " LOG.warning("Undercloud ceilometer SNMPd password "
"missing!") "missing!")
elif name in ('KeystoneCredential0', 'KeystoneCredential1'):
passwords[name] = create_keystone_credential()
else: else:
passwords[name] = passutils.generate_password( passwords[name] = passutils.generate_password(
size=_MIN_PASSWORD_SIZE) size=_MIN_PASSWORD_SIZE)
@@ -73,3 +75,7 @@ def get_hiera_key(key_name):
p = subprocess.Popen(command, stdout=subprocess.PIPE) p = subprocess.Popen(command, stdout=subprocess.PIPE)
out, err = p.communicate() out, err = p.communicate()
return out return out
def create_keystone_credential():
return base64.urlsafe_b64encode(os.urandom(32))