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',
'AodhPassword',
'BarbicanPassword',
'CeilometerPassword',
'CeilometerMeteringSecret',
'CeilometerPassword',
'CephAdminKey',
'CephClientKey',
'CephMonKey',
'CephRgwKey',
'CinderPassword',
'GlancePassword',
'GnocchiPassword',
@@ -68,22 +72,20 @@ PASSWORD_PARAMETER_NAMES = (
'HeatPassword',
'HeatStackDomainAdminPassword',
'IronicPassword',
'KeystoneCredential0',
'KeystoneCredential1',
'ManilaPassword',
'MistralPassword',
'MysqlClustercheckPassword',
'NeutronMetadataProxySharedSecret',
'NeutronPassword',
'NovaPassword',
'RabbitPassword',
'RedisPassword',
'SaharaPassword',
'SnmpdReadonlyUserPassword',
'SwiftHashSuffix',
'SwiftPassword',
'SnmpdReadonlyUserPassword',
'TrovePassword',
'ZaqarPassword',
'ManilaPassword',
'NeutronMetadataProxySharedSecret',
'CephMonKey',
'CephAdminKey',
'CephClientKey',
'CephRgwKey',
)

View File

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