added database type
This commit is contained in:
parent
4ed0e0560b
commit
70e61d50fd
hooks
templates
@ -163,3 +163,14 @@ class IdentityServiceContext(context.IdentityServiceContext):
|
|||||||
ctxt['service_port'])
|
ctxt['service_port'])
|
||||||
ctxt['keystone_ec2_url'] = ec2_tokens
|
ctxt['keystone_ec2_url'] = ec2_tokens
|
||||||
return ctxt
|
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, {
|
(NOVA_CONF, {
|
||||||
'services': BASE_SERVICES,
|
'services': BASE_SERVICES,
|
||||||
'contexts': [context.AMQPContext(),
|
'contexts': [context.AMQPContext(),
|
||||||
context.SharedDBContext(relation_prefix='nova'),
|
nova_cc_context.SharedDBContext(relation_prefix='nova'),
|
||||||
context.ImageServiceContext(),
|
context.ImageServiceContext(),
|
||||||
context.OSConfigFlagContext(),
|
context.OSConfigFlagContext(),
|
||||||
context.SubordinateConfigContext(
|
context.SubordinateConfigContext(
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
--verbose
|
--verbose
|
||||||
--ec2_private_dns_show_ip
|
--ec2_private_dns_show_ip
|
||||||
{% if database_host -%}
|
{% 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 -%}
|
{% endif -%}
|
||||||
{% if rabbitmq_host -%}
|
{% if rabbitmq_host -%}
|
||||||
--rabbit_host={{ rabbitmq_host }}
|
--rabbit_host={{ rabbitmq_host }}
|
||||||
|
@ -25,7 +25,7 @@ keystone_ec2_url = {{ keystone_ec2_url }}
|
|||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{% if database_host -%}
|
{% 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 -%}
|
{% endif -%}
|
||||||
|
|
||||||
{% if rabbitmq_host -%}
|
{% if rabbitmq_host -%}
|
||||||
|
@ -11,7 +11,7 @@ local_ip = {{ local_ip }}
|
|||||||
|
|
||||||
[DATABASE]
|
[DATABASE]
|
||||||
{% if database_host -%}
|
{% 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
|
reconnect_interval = 2
|
||||||
{% else -%}
|
{% else -%}
|
||||||
connection = sqlite:////var/lib/quantum/quantum.sqlite
|
connection = sqlite:////var/lib/quantum/quantum.sqlite
|
||||||
|
@ -12,7 +12,7 @@ default_l3_gw_service_uuid = {{ nvp_l3_uuid }}
|
|||||||
|
|
||||||
[database]
|
[database]
|
||||||
{% if database_host -%}
|
{% if database_host -%}
|
||||||
connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
connection = sqlite:////var/lib/neutron/neutron.sqlite
|
connection = sqlite:////var/lib/neutron/neutron.sqlite
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
@ -6,7 +6,7 @@ local_ip = {{ local_ip }}
|
|||||||
|
|
||||||
[database]
|
[database]
|
||||||
{% if database_host -%}
|
{% if database_host -%}
|
||||||
connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
connection = sqlite:////var/lib/neutron/neutron.sqlite
|
connection = sqlite:////var/lib/neutron/neutron.sqlite
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user