Fixup rabbit ssl

This commit is contained in:
James Page 2014-04-12 22:04:58 +01:00
parent a33374a6ca
commit 14bed5c577
2 changed files with 6 additions and 4 deletions

View File

@ -8,8 +8,8 @@ from charmhelpers.core.host import pwgen
HEAT_PATH = '/var/lib/heat/'
def generate_ec2_tokens(host, port):
ec2_tokens = 'http://%s:%s/v2.0/ec2tokens' % (host, port)
def generate_ec2_tokens(protocol, host, port):
ec2_tokens = '%s://%s:%s/v2.0/ec2tokens' % (protocol, host, port)
return ec2_tokens
@ -21,7 +21,8 @@ class HeatIdentityServiceContext(context.IdentityServiceContext):
# the ec2 api needs to know the location of the keystone ec2
# tokens endpoint, set in nova.conf
ec2_tokens = generate_ec2_tokens(ctxt['service_host'],
ec2_tokens = generate_ec2_tokens(ctxt['service_protocol'] or 'http',
ctxt['service_host'],
ctxt['service_port'])
ctxt['keystone_ec2_url'] = ec2_tokens
return ctxt

View File

@ -44,13 +44,14 @@ API_PORTS = {
'heat-api': 8004
}
HEAT_DIR = '/etc/heat'
HEAT_CONF = '/etc/heat/heat.conf'
HEAT_API_PASTE = '/etc/heat/api-paste.ini'
CONFIG_FILES = OrderedDict([
(HEAT_CONF, {
'services': BASE_SERVICES,
'contexts': [context.AMQPContext(),
'contexts': [context.AMQPContext(ssl_dir=HEAT_DIR),
context.SharedDBContext(relation_prefix='heat'),
context.OSConfigFlagContext(),
heat_context.HeatIdentityServiceContext(),