added database type
This commit is contained in:
parent
4ed0e0560b
commit
70e61d50fd
@ -163,3 +163,14 @@ class IdentityServiceContext(context.IdentityServiceContext):
|
||||
ctxt['service_port'])
|
||||
ctxt['keystone_ec2_url'] = ec2_tokens
|
||||
return ctxt
|
||||
|
||||
class SharedDBContext(context.SharedDBContext):
|
||||
|
||||
interfaces = ['shared-db']
|
||||
|
||||
def __call__(self):
|
||||
# add database type
|
||||
ctxt = super(SharedDBContext, self).__call__()
|
||||
ctxt['database_type'] = 'mysql'
|
||||
return ctxt
|
||||
|
||||
|
@ -84,7 +84,7 @@ BASE_RESOURCE_MAP = OrderedDict([
|
||||
(NOVA_CONF, {
|
||||
'services': BASE_SERVICES,
|
||||
'contexts': [context.AMQPContext(),
|
||||
context.SharedDBContext(relation_prefix='nova'),
|
||||
nova_cc_context.SharedDBContext(relation_prefix='nova'),
|
||||
context.ImageServiceContext(),
|
||||
context.OSConfigFlagContext(),
|
||||
context.SubordinateConfigContext(
|
||||
|
@ -16,7 +16,7 @@
|
||||
--verbose
|
||||
--ec2_private_dns_show_ip
|
||||
{% if database_host -%}
|
||||
--sql_connection=mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
--sql_connection={{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% endif -%}
|
||||
{% if rabbitmq_host -%}
|
||||
--rabbit_host={{ rabbitmq_host }}
|
||||
|
@ -25,7 +25,7 @@ keystone_ec2_url = {{ keystone_ec2_url }}
|
||||
{% endif -%}
|
||||
|
||||
{% if database_host -%}
|
||||
sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
sql_connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% endif -%}
|
||||
|
||||
{% if rabbitmq_host -%}
|
||||
|
@ -11,7 +11,7 @@ local_ip = {{ local_ip }}
|
||||
|
||||
[DATABASE]
|
||||
{% if database_host -%}
|
||||
sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}?quantum?charset=utf8
|
||||
sql_connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}?quantum?charset=utf8
|
||||
reconnect_interval = 2
|
||||
{% else -%}
|
||||
connection = sqlite:////var/lib/quantum/quantum.sqlite
|
||||
|
@ -12,7 +12,7 @@ default_l3_gw_service_uuid = {{ nvp_l3_uuid }}
|
||||
|
||||
[database]
|
||||
{% if database_host -%}
|
||||
connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% else -%}
|
||||
connection = sqlite:////var/lib/neutron/neutron.sqlite
|
||||
{% endif -%}
|
||||
|
@ -6,7 +6,7 @@ local_ip = {{ local_ip }}
|
||||
|
||||
[database]
|
||||
{% if database_host -%}
|
||||
connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% else -%}
|
||||
connection = sqlite:////var/lib/neutron/neutron.sqlite
|
||||
{% endif -%}
|
||||
|
Loading…
Reference in New Issue
Block a user